From 0d3de397c78e9898a0e66afef9a3078f541c8369 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Tue, 21 Apr 2026 23:05:56 -0700 Subject: [PATCH 1/7] Release v1.3.0: Regenerate client from latest OpenAPI spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: The Python SDK was out of date with the latest Rootly API v1 spec, missing new endpoints and models added since v1.2.1. - Regenerate client from latest OpenAPI specification - Apply nullable enum fix to 1,350 model files - Add new endpoints: API Keys, SLAs, On-Calls, On-Call Pay Reports, Meeting Recordings, Catalog Checklist Templates, Catalog Entity Checklists, Catalog Properties - Add new incident actions: detach_from_parent, unmark_as_duplicate - Add new workflow task types: JSM Ops paging and alerts - Add new role permission types (catalogs, communication, SLAs, etc.) - BREAKING: Catalog Fields renamed to Catalog Properties - Restore pyproject.toml settings overwritten by generator - Update CHANGELOG.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CHANGELOG.md | 37 + pyproject.toml | 4 +- .../api/alert_events/create_alert_event.py | 36 +- .../api/alert_events/delete_alert_event.py | 14 +- .../api/alert_events/get_alert_event.py | 14 +- .../api/alert_events/list_alert_events.py | 96 +- .../api/alert_events/update_alert_event.py | 44 +- .../api/alert_fields/create_alert_field.py | 8 +- .../api/alert_fields/delete_alert_field.py | 32 +- .../api/alert_fields/get_alert_field.py | 32 +- .../api/alert_fields/list_alert_fields.py | 199 +-- .../api/alert_fields/update_alert_field.py | 31 +- .../api/alert_groups/create_alert_group.py | 8 +- .../api/alert_groups/delete_alert_group.py | 32 +- .../api/alert_groups/get_alert_group.py | 32 +- .../api/alert_groups/list_alert_groups.py | 19 +- .../api/alert_groups/update_alert_group.py | 31 +- .../api/alert_routes/create_alert_route.py | 8 +- .../api/alert_routes/delete_alert_route.py | 14 +- .../api/alert_routes/get_alert_route.py | 14 +- .../api/alert_routes/list_alert_routes.py | 99 +- .../api/alert_routes/patch_alert_route.py | 13 +- .../api/alert_routes/update_alert_route.py | 13 +- .../create_alert_routing_rule.py | 8 +- .../delete_alert_routing_rule.py | 32 +- .../get_alert_routing_rule.py | 32 +- .../list_alert_routing_rules.py | 181 +-- .../update_alert_routing_rule.py | 31 +- .../api/alert_sources/create_alerts_source.py | 8 +- .../api/alert_sources/delete_alerts_source.py | 14 +- .../api/alert_sources/get_alerts_source.py | 14 +- .../api/alert_sources/list_alerts_sources.py | 145 +- .../api/alert_sources/update_alerts_source.py | 13 +- .../alert_urgencies/create_alert_urgency.py | 8 +- .../alert_urgencies/delete_alert_urgency.py | 14 +- .../api/alert_urgencies/get_alert_urgency.py | 14 +- .../alert_urgencies/list_alert_urgencies.py | 181 +-- .../alert_urgencies/update_alert_urgency.py | 13 +- rootly_sdk/api/alerts/acknowledge_alert.py | 14 +- rootly_sdk/api/alerts/attach_alert.py | 13 +- rootly_sdk/api/alerts/create_alert.py | 8 +- rootly_sdk/api/alerts/get_alert.py | 34 +- rootly_sdk/api/alerts/list_alerts.py | 396 +++--- rootly_sdk/api/alerts/list_incident_alerts.py | 26 +- rootly_sdk/api/alerts/resolve_alert.py | 36 +- rootly_sdk/api/alerts/update_alert.py | 36 +- .../{catalog_fields => api_keys}/__init__.py | 0 rootly_sdk/api/api_keys/create_api_key.py | 223 +++ rootly_sdk/api/api_keys/delete_api_key.py | 186 +++ rootly_sdk/api/api_keys/get_api_key.py | 195 +++ rootly_sdk/api/api_keys/list_api_keys.py | 583 ++++++++ rootly_sdk/api/api_keys/rotate_api_key.py | 267 ++++ rootly_sdk/api/api_keys/update_api_key.py | 215 +++ rootly_sdk/api/audits/list_audits.py | 217 +-- .../authorizations/create_authorization.py | 8 +- .../authorizations/delete_authorization.py | 14 +- .../api/authorizations/get_authorization.py | 14 +- .../api/authorizations/list_authorizations.py | 217 +-- .../authorizations/update_authorization.py | 13 +- .../catalog_checklist_templates/__init__.py | 1 + .../create_catalog_checklist_template.py | 179 +++ .../delete_catalog_checklist_template.py | 170 +++ .../get_catalog_checklist_template.py | 170 +++ .../list_catalog_checklist_templates.py | 347 +++++ .../trigger_catalog_checklist_template.py | 164 +++ .../update_catalog_checklist_template.py} | 103 +- .../catalog_entities/create_catalog_entity.py | 13 +- .../catalog_entities/delete_catalog_entity.py | 32 +- .../catalog_entities/get_catalog_entity.py | 52 +- .../catalog_entities/list_catalog_entities.py | 205 +-- .../catalog_entities/update_catalog_entity.py | 31 +- .../api/catalog_entity_checklists/__init__.py | 1 + .../get_catalog_entity_checklist.py | 170 +++ .../list_catalog_entity_checklists.py | 303 ++++ .../create_catalog_entity_property.py | 13 +- .../delete_catalog_entity_property.py | 14 +- .../get_catalog_entity_property.py | 34 +- .../list_catalog_entity_properties.py | 190 +-- .../update_catalog_entity_property.py | 13 +- .../api/catalog_fields/list_catalog_fields.py | 336 ----- rootly_sdk/api/catalog_properties/__init__.py | 1 + .../create_catalog_property.py | 117 ++ .../delete_catalog_property.py | 102 ++ .../get_catalog_property.py | 102 ++ .../list_catalog_properties.py | 102 ++ .../update_catalog_property.py | 117 ++ rootly_sdk/api/catalogs/create_catalog.py | 8 +- rootly_sdk/api/catalogs/delete_catalog.py | 32 +- rootly_sdk/api/catalogs/get_catalog.py | 32 +- rootly_sdk/api/catalogs/list_catalogs.py | 200 +-- rootly_sdk/api/catalogs/update_catalog.py | 31 +- rootly_sdk/api/causes/create_cause.py | 8 +- .../create_cause_catalog_property.py} | 62 +- rootly_sdk/api/causes/delete_cause.py | 32 +- rootly_sdk/api/causes/get_cause.py | 32 +- .../api/causes/list_cause_catalog_fields.py | 325 ----- .../causes/list_cause_catalog_properties.py | 328 +++++ rootly_sdk/api/causes/list_causes.py | 181 +-- rootly_sdk/api/causes/update_cause.py | 31 +- .../create_communications_group.py | 8 +- .../delete_communications_group.py | 14 +- .../get_communications_group.py | 14 +- .../list_communications_groups.py | 235 ++-- .../update_communications_group.py | 13 +- .../create_communications_stage.py | 8 +- .../delete_communications_stage.py | 14 +- .../get_communications_stage.py | 14 +- .../list_communications_stages.py | 181 +-- .../update_communications_stage.py | 13 +- .../create_communications_template.py | 8 +- .../delete_communications_template.py | 14 +- .../get_communications_template.py | 14 +- .../list_communications_templates.py | 199 +-- .../update_communications_template.py | 13 +- .../create_communications_type.py | 8 +- .../delete_communications_type.py | 14 +- .../get_communications_type.py | 14 +- .../list_communications_types.py | 181 +-- .../update_communications_type.py | 13 +- .../api/custom_forms/create_custom_form.py | 8 +- .../api/custom_forms/delete_custom_form.py | 32 +- .../api/custom_forms/get_custom_form.py | 32 +- .../api/custom_forms/list_custom_forms.py | 207 +-- .../api/custom_forms/update_custom_form.py | 31 +- .../create_dashboard_panel.py | 13 +- .../delete_dashboard_panel.py | 6 +- .../duplicate_dashboard_panel.py | 14 +- .../dashboard_panels/get_dashboard_panel.py | 60 +- .../dashboard_panels/list_dashboard_panels.py | 60 +- .../update_dashboard_panel.py | 5 +- rootly_sdk/api/dashboards/create_dashboard.py | 8 +- rootly_sdk/api/dashboards/delete_dashboard.py | 32 +- .../api/dashboards/duplicate_dashboard.py | 32 +- rootly_sdk/api/dashboards/get_dashboard.py | 52 +- rootly_sdk/api/dashboards/list_dashboards.py | 57 +- .../api/dashboards/set_default_dashboard.py | 32 +- rootly_sdk/api/dashboards/update_dashboard.py | 31 +- .../create_custom_field_option.py | 13 +- .../delete_custom_field_option.py | 14 +- .../get_custom_field_option.py | 14 +- .../list_custom_field_options.py | 96 +- .../update_custom_field_option.py | 13 +- .../create_custom_field.py | 8 +- .../delete_custom_field.py | 14 +- .../get_custom_field.py | 34 +- .../list_custom_fields.py | 221 +-- .../update_custom_field.py | 13 +- .../create_incident_custom_field_selection.py | 13 +- .../delete_incident_custom_field_selection.py | 14 +- .../get_incident_custom_field_selection.py | 14 +- .../list_incident_custom_field_selections.py | 60 +- .../update_incident_custom_field_selection.py | 13 +- .../create_workflow_custom_field_selection.py | 13 +- .../delete_workflow_custom_field_selection.py | 14 +- .../get_workflow_custom_field_selection.py | 14 +- .../list_workflow_custom_field_selections.py | 60 +- .../update_workflow_custom_field_selection.py | 13 +- .../create_edge_connector_action.py | 20 +- .../delete_edge_connector_action.py | 17 +- .../get_edge_connector_action.py | 17 +- .../list_edge_connector_actions.py | 6 +- .../update_edge_connector_action.py | 31 +- .../edge_connectors/create_edge_connector.py | 15 +- .../edge_connectors/delete_edge_connector.py | 6 +- .../api/edge_connectors/get_edge_connector.py | 6 +- .../edge_connectors/list_edge_connectors.py | 41 +- .../edge_connectors/update_edge_connector.py | 20 +- .../api/environments/create_environment.py | 8 +- .../create_environment_catalog_property.py} | 62 +- .../api/environments/delete_environment.py | 32 +- .../api/environments/get_environment.py | 32 +- .../list_environment_catalog_fields.py | 327 ----- .../list_environment_catalog_properties.py | 328 +++++ .../api/environments/list_environments.py | 217 +-- .../api/environments/update_environment.py | 31 +- .../delete_escalation_level.py | 14 +- .../escalation_levels/get_escalation_level.py | 14 +- .../update_escalation_level.py | 13 +- .../create_escalation_level_paths.py | 13 +- .../list_escalation_levels_paths.py | 60 +- .../create_escalation_level.py | 13 +- .../list_escalation_levels.py | 60 +- .../delete_escalation_path.py | 14 +- .../escalation_paths/get_escalation_path.py | 34 +- .../escalation_paths/list_escalation_paths.py | 62 +- .../create_escalation_policy.py | 8 +- .../delete_escalation_policy.py | 14 +- .../get_escalation_policy.py | 34 +- .../list_escalation_policies.py | 165 +-- .../update_escalation_policy.py | 13 +- .../create_form_field_option.py | 13 +- .../delete_form_field_option.py | 14 +- .../get_form_field_option.py | 14 +- .../list_form_field_options.py | 96 +- .../update_form_field_option.py | 13 +- .../create_form_field_placement_condition.py | 13 +- .../delete_form_field_placement_condition.py | 14 +- .../get_form_field_placement_condition.py | 14 +- .../list_form_field_placement_conditions.py | 78 +- .../update_form_field_placement_condition.py | 13 +- .../create_form_field_placement.py | 13 +- .../delete_form_field_placement.py | 14 +- .../get_form_field_placement.py | 14 +- .../list_form_field_placements.py | 78 +- .../update_form_field_placement.py | 13 +- .../create_form_field_position.py | 13 +- .../delete_form_field_position.py | 14 +- .../get_form_field_position.py | 14 +- .../list_form_field_positions.py | 78 +- .../update_form_field_position.py | 13 +- .../api/form_fields/create_form_field.py | 8 +- .../api/form_fields/delete_form_field.py | 32 +- rootly_sdk/api/form_fields/get_form_field.py | 52 +- .../api/form_fields/list_form_fields.py | 219 +-- .../api/form_fields/update_form_field.py | 31 +- .../create_form_set_condition.py | 13 +- .../delete_form_set_condition.py | 14 +- .../get_form_set_condition.py | 14 +- .../list_form_set_conditions.py | 78 +- .../update_form_set_condition.py | 13 +- rootly_sdk/api/form_sets/create_form_set.py | 8 +- rootly_sdk/api/form_sets/delete_form_set.py | 32 +- rootly_sdk/api/form_sets/get_form_set.py | 32 +- rootly_sdk/api/form_sets/list_form_sets.py | 163 +-- rootly_sdk/api/form_sets/update_form_set.py | 31 +- .../functionalities/create_functionality.py | 8 +- .../create_functionality_catalog_property.py | 179 +++ .../functionalities/delete_functionality.py | 32 +- .../api/functionalities/get_functionality.py | 32 +- .../get_functionality_incidents_chart.py | 32 +- .../get_functionality_uptime_chart.py | 50 +- .../functionalities/list_functionalities.py | 271 ++-- .../list_functionality_catalog_fields.py | 327 ----- .../list_functionality_catalog_properties.py | 328 +++++ .../functionalities/update_functionality.py | 31 +- rootly_sdk/api/heartbeats/create_heartbeat.py | 8 +- rootly_sdk/api/heartbeats/delete_heartbeat.py | 32 +- rootly_sdk/api/heartbeats/get_heartbeat.py | 32 +- rootly_sdk/api/heartbeats/list_heartbeats.py | 181 +-- rootly_sdk/api/heartbeats/ping_heartbeat.py | 14 +- rootly_sdk/api/heartbeats/update_heartbeat.py | 31 +- .../create_incident_action_item.py | 13 +- .../delete_incident_action_item.py | 14 +- .../get_incident_action_items.py | 14 +- .../list_all_incident_action_items.py | 361 ++--- .../list_incident_action_items.py | 60 +- .../update_incident_action_item.py | 13 +- .../create_incident_event_functionality.py | 13 +- .../delete_incident_event_functionality.py | 14 +- .../get_incident_event_functionalities.py | 14 +- .../list_incident_event_functionalities.py | 60 +- .../update_incident_event_functionality.py | 13 +- .../create_incident_event_service.py | 13 +- .../delete_incident_event_service.py | 14 +- .../get_incident_event_services.py | 14 +- .../list_incident_event_services.py | 60 +- .../update_incident_event_service.py | 13 +- .../incident_events/create_incident_event.py | 13 +- .../incident_events/delete_incident_event.py | 14 +- .../incident_events/get_incident_events.py | 14 +- .../incident_events/list_incident_events.py | 60 +- .../incident_events/update_incident_event.py | 13 +- .../create_incident_feedback.py | 13 +- .../get_incident_feedbacks.py | 14 +- .../list_incident_feedbacks.py | 60 +- .../update_incident_feedback.py | 13 +- .../create_incident_form_field_selection.py | 13 +- .../delete_incident_form_field_selection.py | 14 +- .../get_incident_form_field_selection.py | 14 +- .../list_incident_form_field_selections.py | 60 +- .../update_incident_form_field_selection.py | 13 +- .../create_incident_permission_set_boolean.py | 13 +- .../delete_incident_permission_set_boolean.py | 14 +- .../get_incident_permission_set_boolean.py | 14 +- .../list_incident_permission_set_booleans.py | 168 +-- .../update_incident_permission_set_boolean.py | 13 +- ...create_incident_permission_set_resource.py | 13 +- ...delete_incident_permission_set_resource.py | 14 +- .../get_incident_permission_set_resource.py | 14 +- .../list_incident_permission_set_resources.py | 168 +-- ...update_incident_permission_set_resource.py | 13 +- .../create_incident_permission_set.py | 8 +- .../delete_incident_permission_set.py | 32 +- .../get_incident_permission_set.py | 32 +- .../list_incident_permission_sets.py | 199 +-- .../update_incident_permission_set.py | 31 +- .../get_incident_retrospective_step.py | 14 +- .../update_incident_retrospective_step.py | 13 +- .../list_incident_post_mortems.py | 667 ++++----- .../list_incident_postmortem.py | 32 +- .../update_incident_postmortem.py | 31 +- .../create_incident_role_task.py | 13 +- .../delete_incident_role_task.py | 14 +- .../get_incident_role_task.py | 14 +- .../list_incident_role_tasks.py | 60 +- .../update_incident_role_task.py | 13 +- .../incident_roles/create_incident_role.py | 8 +- .../incident_roles/delete_incident_role.py | 32 +- .../api/incident_roles/get_incident_role.py | 32 +- .../api/incident_roles/list_incident_roles.py | 214 ++- .../incident_roles/update_incident_role.py | 31 +- .../create_incident_status_page.py | 13 +- .../delete_incident_status_page.py | 14 +- .../get_incident_status_pages.py | 14 +- .../list_incident_status_pages.py | 60 +- .../update_incident_status_page.py | 13 +- .../create_incident_sub_status.py | 13 +- .../delete_incident_sub_status.py | 14 +- .../get_incident_sub_status.py | 26 +- .../list_incident_sub_statuses.py | 172 +-- .../update_incident_sub_status.py | 5 +- .../incident_types/create_incident_type.py | 8 +- .../create_incident_type_catalog_property.py | 179 +++ .../incident_types/delete_incident_type.py | 32 +- .../api/incident_types/get_incident_type.py | 32 +- .../list_incident_type_catalog_fields.py | 327 ----- .../list_incident_type_catalog_properties.py | 328 +++++ .../api/incident_types/list_incident_types.py | 199 +-- .../incident_types/update_incident_type.py | 31 +- .../incidents/add_subscribers_to_incident.py | 31 +- .../api/incidents/assign_user_to_incident.py | 31 +- rootly_sdk/api/incidents/cancel_incident.py | 31 +- rootly_sdk/api/incidents/create_incident.py | 8 +- rootly_sdk/api/incidents/delete_incident.py | 32 +- .../incidents/detach_from_parent_incident.py | 174 +++ rootly_sdk/api/incidents/get_incident.py | 52 +- rootly_sdk/api/incidents/list_incidents.py | 1172 ++++++++-------- .../incidents/mark_as_duplicate_incident.py | 31 +- rootly_sdk/api/incidents/mitigate_incident.py | 31 +- .../remove_assigned_user_from_incident.py | 31 +- .../remove_subscribers_to_incident.py | 31 +- rootly_sdk/api/incidents/resolve_incident.py | 31 +- rootly_sdk/api/incidents/restart_incident.py | 31 +- rootly_sdk/api/incidents/triage_incident.py | 31 +- .../incidents/unmark_as_duplicate_incident.py | 174 +++ rootly_sdk/api/incidents/update_incident.py | 31 +- rootly_sdk/api/ip_ranges/get_ip_ranges.py | 1 + .../create_live_call_router.py | 8 +- .../delete_live_call_router.py | 14 +- .../generate_phone_number_live_call_router.py | 9 +- .../live_call_routers/get_live_call_router.py | 14 +- .../list_live_call_routers.py | 199 +-- .../update_live_call_router.py | 13 +- rootly_sdk/api/meeting_recordings/__init__.py | 1 + .../create_meeting_recording.py | 131 ++ .../delete_meeting_recording.py | 107 ++ .../delete_meeting_recording_video.py | 107 ++ .../get_meeting_recording.py | 107 ++ .../leave_meeting_recording.py | 109 ++ .../list_meeting_recordings.py | 207 +++ .../pause_meeting_recording.py | 107 ++ .../resume_meeting_recording.py | 105 ++ .../stop_meeting_recording.py | 109 ++ .../api/on_call_pay_reports/__init__.py | 1 + .../create_on_call_pay_report.py | 179 +++ .../get_on_call_pay_report.py} | 90 +- .../list_on_call_pay_reports.py | 269 ++++ .../regenerate_on_call_pay_report.py | 169 +++ .../update_on_call_pay_report.py | 195 +++ .../api/on_call_roles/create_on_call_role.py | 8 +- .../api/on_call_roles/delete_on_call_role.py | 14 +- .../api/on_call_roles/get_on_call_role.py | 14 +- .../api/on_call_roles/list_on_call_roles.py | 199 +-- .../api/on_call_roles/update_on_call_role.py | 13 +- .../on_call_shadows/create_on_call_shadow.py | 13 +- .../api/on_call_shadows/get_on_call_shadow.py | 14 +- .../on_call_shadows/list_on_call_shadows.py | 60 +- .../on_call_shadows/update_on_call_shadow.py | 13 +- rootly_sdk/api/on_calls/__init__.py | 1 + rootly_sdk/api/on_calls/list_oncalls.py | 317 +++++ .../override_shifts/create_override_shift.py | 13 +- .../override_shifts/delete_on_call_shadow.py | 31 +- .../override_shifts/delete_override_shift.py | 14 +- .../api/override_shifts/get_override_shift.py | 14 +- .../override_shifts/list_override_shifts.py | 60 +- .../override_shifts/update_override_shift.py | 13 +- .../playbook_tasks/create_playbook_task.py | 13 +- .../playbook_tasks/delete_playbook_task.py | 14 +- .../api/playbook_tasks/get_playbook_task.py | 14 +- .../api/playbook_tasks/list_playbook_tasks.py | 60 +- .../playbook_tasks/update_playbook_task.py | 13 +- rootly_sdk/api/playbooks/create_playbook.py | 8 +- rootly_sdk/api/playbooks/delete_playbook.py | 14 +- rootly_sdk/api/playbooks/get_playbook.py | 34 +- rootly_sdk/api/playbooks/list_playbooks.py | 57 +- rootly_sdk/api/playbooks/update_playbook.py | 13 +- rootly_sdk/api/pulses/create_pulse.py | 8 +- rootly_sdk/api/pulses/get_pulse.py | 14 +- rootly_sdk/api/pulses/list_pulses.py | 361 ++--- rootly_sdk/api/pulses/update_pulse.py | 13 +- .../get_retrospective_configuration.py | 34 +- .../list_retrospective_configurations.py | 75 +- .../update_retrospective_configuration.py | 13 +- ...create_retrospective_process_group_step.py | 13 +- ...delete_retrospective_process_group_step.py | 14 +- .../get_retrospective_process_group_step.py | 6 +- .../list_retrospective_process_group_steps.py | 150 +- ...update_retrospective_process_group_step.py | 5 +- .../create_retrospective_process_group.py | 13 +- .../delete_retrospective_process_group.py | 14 +- .../get_retrospective_process_group.py | 26 +- .../list_retrospective_process_groups.py | 172 +-- .../update_retrospective_process_group.py | 5 +- .../create_retrospective_process.py | 8 +- .../delete_retrospective_process.py | 14 +- .../get_retrospective_process.py | 34 +- .../list_retrospective_processes.py | 57 +- .../update_retrospective_process.py | 13 +- .../create_retrospective_step.py | 13 +- .../delete_retrospective_step.py | 14 +- .../get_retrospective_step.py | 14 +- .../list_retrospective_steps.py | 78 +- .../update_retrospective_step.py | 13 +- .../create_postmortem_template.py | 8 +- .../delete_postmortem_template.py | 32 +- .../get_postmortem_template.py | 32 +- .../list_postmortem_templates.py | 55 +- .../update_postmortem_template.py | 31 +- rootly_sdk/api/roles/create_role.py | 8 +- rootly_sdk/api/roles/delete_role.py | 32 +- rootly_sdk/api/roles/get_role.py | 32 +- rootly_sdk/api/roles/list_roles.py | 199 +-- rootly_sdk/api/roles/update_role.py | 31 +- .../create_schedule_rotation_active_day.py | 13 +- .../delete_schedule_rotation_active_day.py | 14 +- .../get_schedule_rotation_active_day.py | 14 +- .../list_schedule_rotation_active_days.py | 60 +- .../update_schedule_rotation_active_day.py | 13 +- .../create_schedule_rotation_user.py | 13 +- .../delete_schedule_rotation_user.py | 14 +- .../get_schedule_rotation_user.py | 14 +- .../list_schedule_rotation_users.py | 60 +- .../update_schedule_rotation_user.py | 13 +- .../create_schedule_rotation.py | 13 +- .../delete_schedule_rotation.py | 14 +- .../get_schedule_rotation.py | 14 +- .../list_schedule_rotations.py | 78 +- .../update_schedule_rotation.py | 13 +- rootly_sdk/api/schedules/create_schedule.py | 8 +- rootly_sdk/api/schedules/delete_schedule.py | 14 +- rootly_sdk/api/schedules/get_schedule.py | 14 +- rootly_sdk/api/schedules/list_schedules.py | 163 +-- rootly_sdk/api/schedules/update_schedule.py | 13 +- rootly_sdk/api/secrets/create_secret.py | 8 +- rootly_sdk/api/secrets/delete_secret.py | 14 +- rootly_sdk/api/secrets/get_secret.py | 14 +- rootly_sdk/api/secrets/list_secrets.py | 55 +- rootly_sdk/api/secrets/update_secret.py | 13 +- rootly_sdk/api/services/create_service.py | 8 +- .../services/create_service_catalog_field.py | 179 --- .../create_service_catalog_property.py} | 62 +- rootly_sdk/api/services/delete_service.py | 32 +- rootly_sdk/api/services/get_service.py | 32 +- .../services/get_service_incidents_chart.py | 32 +- .../api/services/get_service_uptime_chart.py | 50 +- .../services/list_service_catalog_fields.py | 327 ----- .../list_service_catalog_properties.py | 328 +++++ rootly_sdk/api/services/list_services.py | 307 ++-- rootly_sdk/api/services/update_service.py | 31 +- rootly_sdk/api/severities/create_severity.py | 8 +- rootly_sdk/api/severities/delete_severity.py | 32 +- rootly_sdk/api/severities/get_severity.py | 32 +- rootly_sdk/api/severities/list_severities.py | 235 ++-- rootly_sdk/api/severities/update_severity.py | 31 +- rootly_sdk/api/shifts/get_schedule_shifts.py | 50 +- rootly_sdk/api/shifts/list_shifts.py | 135 +- rootly_sdk/api/sl_as/__init__.py | 1 + .../create_sla.py} | 62 +- .../delete_sla.py} | 65 +- rootly_sdk/api/sl_as/get_sla.py | 169 +++ rootly_sdk/api/sl_as/list_sl_as.py | 299 ++++ .../update_sla.py} | 84 +- .../create_status_page_template.py | 13 +- .../delete_status_page_template.py | 14 +- .../get_status_page_template.py | 14 +- .../list_status_page_templates.py | 60 +- .../update_status_page_template.py | 13 +- .../api/status_pages/create_status_page.py | 8 +- .../api/status_pages/delete_status_page.py | 32 +- .../api/status_pages/get_status_page.py | 32 +- .../api/status_pages/list_status_pages.py | 199 +-- .../api/status_pages/update_status_page.py | 31 +- rootly_sdk/api/statuses/get_status.py | 32 +- rootly_sdk/api/statuses/list_statuses.py | 189 +-- .../api/sub_statuses/create_sub_status.py | 8 +- .../api/sub_statuses/delete_sub_status.py | 32 +- rootly_sdk/api/sub_statuses/get_sub_status.py | 32 +- .../api/sub_statuses/list_sub_statuses.py | 181 +-- .../api/sub_statuses/update_sub_status.py | 31 +- .../create_group_catalog_property.py} | 62 +- rootly_sdk/api/teams/create_team.py | 8 +- rootly_sdk/api/teams/delete_team.py | 32 +- rootly_sdk/api/teams/get_team.py | 52 +- .../api/teams/get_team_incidents_chart.py | 14 +- .../api/teams/list_group_catalog_fields.py | 325 ----- .../teams/list_group_catalog_properties.py | 328 +++++ rootly_sdk/api/teams/list_teams.py | 327 ++--- rootly_sdk/api/teams/update_team.py | 31 +- .../create_user_email_address.py | 13 +- .../delete_user_email_address.py | 14 +- .../get_user_email_addresses.py | 14 +- .../resend_user_email_address_verification.py | 14 +- .../show_user_email_address.py | 14 +- .../update_user_email_address.py | 13 +- .../verify_user_email_address.py | 14 +- .../create_user_notification_rule.py | 13 +- .../delete_user_notification_rule.py | 14 +- .../get_user_notification_rule.py | 14 +- .../list_user_notification_rules.py | 78 +- .../update_user_notification_rule.py | 13 +- .../create_user_phone_number.py | 13 +- .../delete_user_phone_number.py | 14 +- .../get_user_phone_numbers.py | 14 +- .../show_user_phone_number.py | 14 +- .../update_user_phone_number.py | 13 +- rootly_sdk/api/users/delete_user.py | 14 +- rootly_sdk/api/users/get_current_user.py | 9 +- rootly_sdk/api/users/get_user.py | 34 +- rootly_sdk/api/users/list_users.py | 193 +-- rootly_sdk/api/users/update_user.py | 36 +- .../deliver_webhooks_delivery.py | 6 +- .../get_webhooks_delivery.py | 14 +- .../list_webhooks_deliveries.py | 60 +- .../create_webhooks_endpoint.py | 8 +- .../delete_webhooks_endpoint.py | 14 +- .../get_webhooks_endpoint.py | 14 +- .../list_webhooks_endpoints.py | 91 +- .../update_webhooks_endpoint.py | 13 +- .../create_workflow_form_field_condition.py | 13 +- .../delete_workflow_form_field_condition.py | 14 +- .../get_workflow_form_field_condition.py | 14 +- .../list_workflow_form_field_conditions.py | 60 +- .../update_workflow_form_field_condition.py | 13 +- .../workflow_groups/create_workflow_group.py | 8 +- .../workflow_groups/delete_workflow_group.py | 14 +- .../api/workflow_groups/get_workflow_group.py | 14 +- .../workflow_groups/list_workflow_groups.py | 163 +-- .../workflow_groups/update_workflow_group.py | 13 +- .../api/workflow_runs/create_workflow_run.py | 13 +- .../api/workflow_runs/list_workflow_runs.py | 134 +- .../workflow_tasks/create_workflow_task.py | 13 +- .../workflow_tasks/delete_workflow_task.py | 14 +- .../api/workflow_tasks/get_workflow_task.py | 14 +- .../api/workflow_tasks/list_workflow_tasks.py | 114 +- .../workflow_tasks/update_workflow_task.py | 13 +- rootly_sdk/api/workflows/create_workflow.py | 8 +- rootly_sdk/api/workflows/delete_workflow.py | 32 +- rootly_sdk/api/workflows/get_workflow.py | 52 +- rootly_sdk/api/workflows/list_workflows.py | 203 +-- rootly_sdk/api/workflows/update_workflow.py | 31 +- rootly_sdk/client.py | 8 +- rootly_sdk/models/__init__.py | 762 ++++++++-- .../models/action_item_trigger_params.py | 312 +++-- .../models/add_action_item_task_params.py | 93 +- ...ction_item_task_params_assigned_to_user.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- ...dd_microsoft_teams_chat_tab_task_params.py | 12 +- ...crosoft_teams_chat_tab_task_params_chat.py | 10 +- rootly_sdk/models/add_role_task_params.py | 26 +- .../add_role_task_params_assigned_to_user.py | 10 +- rootly_sdk/models/add_subscribers.py | 4 +- rootly_sdk/models/add_subscribers_data.py | 4 +- .../models/add_subscribers_data_attributes.py | 26 +- rootly_sdk/models/add_team_task_params.py | 10 +- .../models/add_to_timeline_task_params.py | 34 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/alert.py | 317 +++-- ...ert_field_values_attributes_item_type_0.py | 2 + rootly_sdk/models/alert_data_type_0.py | 3 + rootly_sdk/models/alert_event.py | 22 +- rootly_sdk/models/alert_event_list.py | 10 +- .../models/alert_event_list_data_item.py | 4 +- rootly_sdk/models/alert_event_response.py | 4 +- .../models/alert_event_response_data.py | 4 +- rootly_sdk/models/alert_field.py | 6 +- rootly_sdk/models/alert_field_list.py | 10 +- .../models/alert_field_list_data_item.py | 4 +- rootly_sdk/models/alert_field_response.py | 4 +- .../models/alert_field_response_data.py | 8 +- rootly_sdk/models/alert_group.py | 72 +- .../models/alert_group_attributes_item.py | 6 +- .../models/alert_group_conditions_item.py | 112 +- ...roup_conditions_item_values_item_type_0.py | 2 + rootly_sdk/models/alert_group_list.py | 6 +- .../models/alert_group_list_data_item.py | 4 +- rootly_sdk/models/alert_group_response.py | 4 +- .../models/alert_group_response_data.py | 4 +- rootly_sdk/models/alert_group_targets_item.py | 2 + rootly_sdk/models/alert_labels_item_type_0.py | 4 +- rootly_sdk/models/alert_list.py | 10 +- rootly_sdk/models/alert_list_data_item.py | 12 +- .../models/alert_list_data_item_source.py | 4 + rootly_sdk/models/alert_response.py | 4 +- rootly_sdk/models/alert_response_data.py | 12 +- .../models/alert_response_data_source.py | 4 + rootly_sdk/models/alert_route.py | 38 +- rootly_sdk/models/alert_route_list.py | 10 +- .../models/alert_route_list_data_item.py | 4 +- rootly_sdk/models/alert_route_response.py | 4 +- .../models/alert_route_response_data.py | 4 +- rootly_sdk/models/alert_route_rules_item.py | 18 +- ..._route_rules_item_condition_groups_item.py | 10 +- ...m_condition_groups_item_conditions_item.py | 62 +- ...lert_route_rules_item_destinations_item.py | 5 +- ...ules_item_destinations_item_target_type.py | 3 +- rootly_sdk/models/alert_routing_rule.py | 49 +- .../models/alert_routing_rule_condition.py | 62 +- .../alert_routing_rule_condition_group.py | 34 +- ...lert_routing_rule_condition_groups_item.py | 35 +- ...e_condition_groups_item_conditions_item.py | 62 +- .../alert_routing_rule_conditions_item.py | 20 +- .../alert_routing_rule_destination_type_0.py | 5 +- ...ing_rule_destination_type_0_target_type.py | 3 +- rootly_sdk/models/alert_routing_rule_list.py | 10 +- .../alert_routing_rule_list_data_item.py | 4 +- .../models/alert_routing_rule_response.py | 4 +- .../alert_routing_rule_response_data.py | 4 +- .../alert_routing_rule_target_type_0.py | 5 +- ..._routing_rule_target_type_0_target_type.py | 3 +- rootly_sdk/models/alert_source.py | 4 + rootly_sdk/models/alert_trigger_params.py | 180 ++- ..._trigger_params_alert_condition_urgency.py | 29 + ...gger_params_alert_field_conditions_item.py | 8 +- ...trigger_params_alert_payload_conditions.py | 26 +- ...lert_payload_conditions_conditions_item.py | 12 +- rootly_sdk/models/alert_urgency.py | 2 + rootly_sdk/models/alert_urgency_list.py | 10 +- .../models/alert_urgency_list_data_item.py | 4 +- rootly_sdk/models/alert_urgency_response.py | 4 +- .../models/alert_urgency_response_data.py | 4 +- rootly_sdk/models/alerts_source.py | 167 +-- ...rce_alert_source_fields_attributes_item.py | 18 +- ...rt_source_urgency_rules_attributes_item.py | 60 +- ...source_alert_template_attributes_type_0.py | 32 +- rootly_sdk/models/alerts_source_list.py | 10 +- .../models/alerts_source_list_data_item.py | 4 +- ...ource_resolution_rule_attributes_type_0.py | 94 +- ...butes_type_0_conditions_attributes_item.py | 55 +- rootly_sdk/models/alerts_source_response.py | 4 +- .../models/alerts_source_response_data.py | 4 +- .../models/alerts_source_source_type.py | 4 + ...rts_source_sourceable_attributes_type_0.py | 48 +- ...s_type_0_field_mappings_attributes_item.py | 16 +- rootly_sdk/models/api_key.py | 208 +++ rootly_sdk/models/api_key_kind.py | 17 + rootly_sdk/models/api_key_list.py | 95 ++ rootly_sdk/models/api_key_list_data_item.py | 85 ++ .../models/api_key_list_data_item_type.py | 15 + ...lds_type_0_item.py => api_key_response.py} | 43 +- rootly_sdk/models/api_key_response_data.py | 85 ++ .../models/api_key_response_data_type.py | 15 + .../models/api_key_with_token_response.py | 67 + .../api_key_with_token_response_data.py | 88 ++ ...key_with_token_response_data_attributes.py | 216 +++ .../api_key_with_token_response_data_type.py | 15 + ...ve_microsoft_teams_channels_task_params.py | 16 +- ...eams_channels_task_params_channels_item.py | 10 +- ...crosoft_teams_channels_task_params_team.py | 10 +- .../archive_slack_channels_task_params.py | 14 +- ...lack_channels_task_params_channels_item.py | 10 +- rootly_sdk/models/assign_role_to_user.py | 4 +- rootly_sdk/models/assign_role_to_user_data.py | 4 +- .../assign_role_to_user_data_attributes.py | 10 +- rootly_sdk/models/attach_alert.py | 4 +- rootly_sdk/models/attach_alert_data.py | 4 +- .../models/attach_alert_data_attributes.py | 14 +- .../attach_datadog_dashboards_task_params.py | 38 +- ..._dashboards_task_params_dashboards_item.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/audit.py | 68 +- rootly_sdk/models/audit_item_type.py | 2 + .../models/audit_object_changes_type_0.py | 3 + rootly_sdk/models/audit_object_type_0.py | 3 + rootly_sdk/models/audits_list.py | 10 +- rootly_sdk/models/audits_list_data_item.py | 4 +- rootly_sdk/models/authorization.py | 2 + rootly_sdk/models/authorization_list.py | 10 +- .../models/authorization_list_data_item.py | 4 +- rootly_sdk/models/authorization_response.py | 4 +- .../models/authorization_response_data.py | 4 +- .../auto_assign_role_opsgenie_task_params.py | 12 +- ...sign_role_opsgenie_task_params_schedule.py | 10 +- .../auto_assign_role_rootly_task_params.py | 52 +- ...ly_task_params_escalation_policy_target.py | 10 +- ...gn_role_rootly_task_params_group_target.py | 10 +- ...role_rootly_task_params_schedule_target.py | 10 +- ..._role_rootly_task_params_service_target.py | 10 +- ...ign_role_rootly_task_params_user_target.py | 10 +- ...auto_assign_role_victor_ops_task_params.py | 12 +- ...assign_role_victor_ops_task_params_team.py | 10 +- rootly_sdk/models/call_people_task_params.py | 10 +- rootly_sdk/models/cancel_incident.py | 4 +- rootly_sdk/models/cancel_incident_data.py | 4 +- .../models/cancel_incident_data_attributes.py | 12 +- rootly_sdk/models/catalog.py | 22 +- .../models/catalog_checklist_template.py | 226 +++ ...catalog_checklist_template_catalog_type.py | 23 + ...g_checklist_template_fields_type_0_item.py | 101 ++ ...emplate_fields_type_0_item_field_source.py | 22 + .../models/catalog_checklist_template_list.py | 113 ++ ...talog_checklist_template_list_data_item.py | 88 ++ ..._checklist_template_list_data_item_type.py | 19 + ...g_checklist_template_owners_type_0_item.py | 81 ++ ...cklist_template_owners_type_0_item_type.py | 20 + .../catalog_checklist_template_response.py | 67 + ...atalog_checklist_template_response_data.py | 88 ++ ...g_checklist_template_response_data_type.py | 19 + .../catalog_checklist_template_scope_type.py | 16 + rootly_sdk/models/catalog_entity.py | 60 +- rootly_sdk/models/catalog_entity_checklist.py | 270 ++++ ...catalog_entity_checklist_auditable_type.py | 23 + ..._checklist_checklist_fields_type_0_item.py | 78 ++ ...klist_checklist_fields_type_0_item_data.py | 107 ++ ...list_fields_type_0_item_data_attributes.py | 214 +++ ...m_data_attributes_value_snapshot_type_0.py | 47 + ..._checklist_fields_type_0_item_data_type.py | 21 + ..._checklist_checklist_owners_type_0_item.py | 78 ++ ...klist_checklist_owners_type_0_item_data.py | 107 ++ ...list_owners_type_0_item_data_attributes.py | 88 ++ ..._checklist_owners_type_0_item_data_type.py | 21 + .../models/catalog_entity_checklist_list.py | 113 ++ ...catalog_entity_checklist_list_data_item.py | 88 ++ ...og_entity_checklist_list_data_item_type.py | 19 + .../catalog_entity_checklist_response.py | 67 + .../catalog_entity_checklist_response_data.py | 88 ++ ...log_entity_checklist_response_data_type.py | 19 + .../models/catalog_entity_checklist_status.py | 18 + rootly_sdk/models/catalog_entity_list.py | 10 +- .../models/catalog_entity_list_data_item.py | 4 +- ...m.py => catalog_entity_properties_item.py} | 26 +- rootly_sdk/models/catalog_entity_property.py | 2 + .../models/catalog_entity_property_key.py | 3 +- .../models/catalog_entity_property_list.py | 10 +- .../catalog_entity_property_list_data_item.py | 4 +- .../catalog_entity_property_response.py | 4 +- .../catalog_entity_property_response_data.py | 4 +- rootly_sdk/models/catalog_entity_response.py | 4 +- .../models/catalog_entity_response_data.py | 4 +- rootly_sdk/models/catalog_field.py | 40 +- rootly_sdk/models/catalog_field_list.py | 10 +- .../models/catalog_field_list_data_item.py | 4 +- .../catalog_field_list_data_item_type.py | 4 +- rootly_sdk/models/catalog_field_response.py | 4 +- .../models/catalog_field_response_data.py | 4 +- .../catalog_field_response_data_type.py | 4 +- rootly_sdk/models/catalog_list.py | 10 +- rootly_sdk/models/catalog_list_data_item.py | 4 +- rootly_sdk/models/catalog_property.py | 180 +++ .../models/catalog_property_catalog_type.py | 23 + rootly_sdk/models/catalog_property_kind.py | 16 + rootly_sdk/models/catalog_property_list.py | 95 ++ .../models/catalog_property_list_data_item.py | 88 ++ .../catalog_property_list_data_item_type.py | 15 + ...0_item.py => catalog_property_response.py} | 43 +- .../models/catalog_property_response_data.py | 88 ++ .../catalog_property_response_data_type.py | 15 + rootly_sdk/models/catalog_response.py | 4 +- rootly_sdk/models/catalog_response_data.py | 4 +- rootly_sdk/models/cause.py | 64 +- rootly_sdk/models/cause_list.py | 10 +- rootly_sdk/models/cause_list_data_item.py | 4 +- ...ype_0_item.py => cause_properties_item.py} | 28 +- rootly_sdk/models/cause_response.py | 4 +- rootly_sdk/models/cause_response_data.py | 4 +- ...hange_slack_channel_privacy_task_params.py | 20 +- ...ack_channel_privacy_task_params_channel.py | 10 +- rootly_sdk/models/communications_group.py | 68 +- ...tion_external_group_members_type_0_item.py | 18 +- ...munication_group_conditions_type_0_item.py | 71 +- .../models/communications_group_response.py | 4 +- .../communications_group_response_data.py | 4 +- .../models/communications_groups_response.py | 24 +- ...ommunications_groups_response_data_item.py | 4 +- rootly_sdk/models/communications_stage.py | 26 +- .../models/communications_stage_response.py | 4 +- .../communications_stage_response_data.py | 4 +- .../models/communications_stages_response.py | 24 +- ...ommunications_stages_response_data_item.py | 4 +- rootly_sdk/models/communications_template.py | 54 +- ...mmunication_template_stages_type_0_item.py | 12 +- ...cation_template_stages_type_0_item_data.py | 24 +- ...late_stages_type_0_item_data_attributes.py | 80 +- ...tem_data_attributes_communication_stage.py | 10 +- ..._data_attributes_communication_template.py | 10 +- ...munications_template_communication_type.py | 10 +- .../communications_template_response.py | 4 +- .../communications_template_response_data.py | 4 +- .../communications_templates_response.py | 24 +- ...unications_templates_response_data_item.py | 4 +- rootly_sdk/models/communications_type.py | 18 +- .../models/communications_type_response.py | 4 +- .../communications_type_response_data.py | 4 +- .../models/communications_types_response.py | 24 +- ...communications_types_response_data_item.py | 4 +- ...reate_airtable_table_record_task_params.py | 24 +- ..._airtable_table_record_task_params_base.py | 10 +- ...airtable_table_record_task_params_table.py | 10 +- ...e_anthropic_chat_completion_task_params.py | 16 +- ...ropic_chat_completion_task_params_model.py | 10 +- .../create_asana_subtask_task_params.py | 54 +- ...te_asana_subtask_task_params_completion.py | 10 +- .../models/create_asana_task_task_params.py | 60 +- ...reate_asana_task_task_params_completion.py | 10 +- ...te_asana_task_task_params_projects_item.py | 10 +- ...create_asana_task_task_params_workspace.py | 10 +- .../models/create_clickup_task_task_params.py | 52 +- ...reate_clickup_task_task_params_priority.py | 10 +- .../models/create_coda_page_task_params.py | 48 +- .../create_coda_page_task_params_doc.py | 10 +- .../create_coda_page_task_params_template.py | 10 +- .../create_confluence_page_task_params.py | 52 +- ...te_confluence_page_task_params_ancestor.py | 10 +- ...confluence_page_task_params_integration.py | 10 +- ...reate_confluence_page_task_params_space.py | 10 +- ...te_confluence_page_task_params_template.py | 10 +- .../create_datadog_notebook_task_params.py | 32 +- ...e_datadog_notebook_task_params_template.py | 10 +- .../create_dropbox_paper_page_task_params.py | 40 +- ...ropbox_paper_page_task_params_namespace.py | 10 +- ...ox_paper_page_task_params_parent_folder.py | 10 +- .../create_edge_connector_action_body.py | 12 +- ...reate_edge_connector_action_body_action.py | 12 +- ...e_connector_action_body_action_metadata.py | 28 +- ...on_body_action_metadata_parameters_item.py | 28 +- .../models/create_edge_connector_body.py | 4 +- .../models/create_edge_connector_body_data.py | 4 +- ...ate_edge_connector_body_data_attributes.py | 20 +- .../models/create_github_issue_task_params.py | 79 +- ...ate_github_issue_task_params_issue_type.py | 71 + ...te_github_issue_task_params_labels_item.py | 70 + ...ate_github_issue_task_params_repository.py | 10 +- .../models/create_gitlab_issue_task_params.py | 32 +- ...ate_gitlab_issue_task_params_repository.py | 10 +- .../create_go_to_meeting_task_params.py | 53 +- ...task_params_post_to_slack_channels_item.py | 10 +- ...reate_google_calendar_event_task_params.py | 88 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../create_google_docs_page_task_params.py | 48 +- ...eate_google_docs_page_task_params_drive.py | 10 +- ...gle_docs_page_task_params_parent_folder.py | 10 +- ...ate_google_docs_permissions_task_params.py | 24 +- ...ogle_gemini_chat_completion_task_params.py | 16 +- ...emini_chat_completion_task_params_model.py | 10 +- .../create_google_meeting_task_params.py | 64 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../create_incident_postmortem_task_params.py | 34 +- ..._postmortem_task_params_template_type_0.py | 10 +- .../models/create_incident_task_params.py | 62 +- .../models/create_jira_issue_task_params.py | 80 +- ...eate_jira_issue_task_params_integration.py | 10 +- ...reate_jira_issue_task_params_issue_type.py | 10 +- .../create_jira_issue_task_params_priority.py | 10 +- .../create_jira_issue_task_params_status.py | 10 +- .../models/create_jira_subtask_task_params.py | 80 +- ...te_jira_subtask_task_params_integration.py | 10 +- ...reate_jira_subtask_task_params_priority.py | 10 +- .../create_jira_subtask_task_params_status.py | 10 +- ..._subtask_task_params_subtask_issue_type.py | 10 +- .../models/create_jsmops_alert_task_params.py | 240 ++++ ...mops_alert_task_params_escalations_item.py | 70 + ...reate_jsmops_alert_task_params_priority.py | 20 + ...jsmops_alert_task_params_schedules_item.py | 70 + ...eate_jsmops_alert_task_params_task_type.py | 15 + ...ate_jsmops_alert_task_params_teams_item.py | 70 + ...ate_jsmops_alert_task_params_users_item.py | 70 + ...create_linear_issue_comment_task_params.py | 10 +- .../models/create_linear_issue_task_params.py | 56 +- ...te_linear_issue_task_params_labels_item.py | 10 +- ...reate_linear_issue_task_params_priority.py | 10 +- ...create_linear_issue_task_params_project.py | 10 +- .../create_linear_issue_task_params_state.py | 10 +- .../create_linear_issue_task_params_team.py | 10 +- ...create_linear_subtask_issue_task_params.py | 46 +- ...r_subtask_issue_task_params_labels_item.py | 10 +- ...near_subtask_issue_task_params_priority.py | 10 +- ..._linear_subtask_issue_task_params_state.py | 10 +- .../create_meeting_recording_platform.py | 18 + ...ate_microsoft_teams_channel_task_params.py | 32 +- ...icrosoft_teams_channel_task_params_team.py | 10 +- ...create_microsoft_teams_chat_task_params.py | 32 +- ...oft_teams_chat_task_params_members_item.py | 10 +- ...ate_microsoft_teams_meeting_task_params.py | 50 +- ...task_params_post_to_slack_channels_item.py | 10 +- ...ate_mistral_chat_completion_task_params.py | 28 +- ...stral_chat_completion_task_params_model.py | 10 +- .../models/create_motion_task_task_params.py | 56 +- ...create_motion_task_task_params_priority.py | 10 +- .../create_motion_task_task_params_project.py | 10 +- .../create_motion_task_task_params_status.py | 10 +- ...reate_motion_task_task_params_workspace.py | 10 +- .../models/create_notion_page_task_params.py | 34 +- ...ate_notion_page_task_params_parent_page.py | 10 +- ...eate_openai_chat_completion_task_params.py | 46 +- ...penai_chat_completion_task_params_model.py | 10 +- .../create_opsgenie_alert_task_params.py | 96 +- ...enie_alert_task_params_escalations_item.py | 10 +- ...sgenie_alert_task_params_schedules_item.py | 10 +- ...e_opsgenie_alert_task_params_teams_item.py | 10 +- ...e_opsgenie_alert_task_params_users_item.py | 10 +- .../create_outlook_event_task_params.py | 60 +- ...eate_outlook_event_task_params_calendar.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- ...ate_pagerduty_status_update_task_params.py | 10 +- .../create_pagertree_alert_task_params.py | 70 +- ..._pagertree_alert_task_params_teams_item.py | 10 +- ..._pagertree_alert_task_params_users_item.py | 10 +- .../models/create_quip_page_task_params.py | 30 +- ...create_service_now_incident_task_params.py | 42 +- ...ice_now_incident_task_params_completion.py | 10 +- ...rvice_now_incident_task_params_priority.py | 10 +- .../create_sharepoint_page_task_params.py | 40 +- ...reate_sharepoint_page_task_params_drive.py | 10 +- ...arepoint_page_task_params_parent_folder.py | 10 +- ...create_sharepoint_page_task_params_site.py | 10 +- .../create_shortcut_task_task_params.py | 12 +- ...te_shortcut_task_task_params_completion.py | 10 +- .../create_slack_channel_task_params.py | 20 +- ...ate_slack_channel_task_params_workspace.py | 10 +- .../models/create_sub_incident_task_params.py | 14 +- .../models/create_trello_card_task_params.py | 48 +- ...ate_trello_card_task_params_archivation.py | 10 +- .../create_trello_card_task_params_board.py | 10 +- ...ate_trello_card_task_params_labels_item.py | 10 +- .../create_trello_card_task_params_list.py | 10 +- ...ate_watsonx_chat_completion_task_params.py | 16 +- ...tsonx_chat_completion_task_params_model.py | 10 +- .../create_webex_meeting_task_params.py | 54 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../create_zendesk_jira_link_task_params.py | 10 +- .../create_zendesk_ticket_task_params.py | 56 +- ...e_zendesk_ticket_task_params_completion.py | 10 +- ...ate_zendesk_ticket_task_params_priority.py | 10 +- .../models/create_zoom_meeting_task_params.py | 72 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/custom_field.py | 46 +- rootly_sdk/models/custom_field_list.py | 10 +- .../models/custom_field_list_data_item.py | 4 +- rootly_sdk/models/custom_field_option.py | 10 +- rootly_sdk/models/custom_field_option_list.py | 10 +- .../custom_field_option_list_data_item.py | 4 +- .../models/custom_field_option_response.py | 4 +- .../custom_field_option_response_data.py | 4 +- rootly_sdk/models/custom_field_response.py | 4 +- .../models/custom_field_response_data.py | 4 +- rootly_sdk/models/custom_form.py | 18 +- rootly_sdk/models/custom_form_list.py | 10 +- .../models/custom_form_list_data_item.py | 4 +- rootly_sdk/models/custom_form_response.py | 4 +- .../models/custom_form_response_data.py | 4 +- rootly_sdk/models/dashboard.py | 70 +- rootly_sdk/models/dashboard_list.py | 10 +- rootly_sdk/models/dashboard_list_data_item.py | 4 +- rootly_sdk/models/dashboard_panel.py | 48 +- .../models/dashboard_panel_data_item.py | 3 + rootly_sdk/models/dashboard_panel_list.py | 10 +- .../models/dashboard_panel_list_data_item.py | 4 +- rootly_sdk/models/dashboard_panel_params.py | 54 +- .../dashboard_panel_params_datalabels.py | 6 +- .../dashboard_panel_params_datasets_item.py | 64 +- ...l_params_datasets_item_aggregate_type_0.py | 30 +- ..._panel_params_datasets_item_filter_item.py | 26 +- ...ms_datasets_item_filter_item_rules_item.py | 26 +- ...ms_datasets_item_group_by_type_1_type_0.py | 2 + ...atasets_item_group_by_type_1_type_0_key.py | 3 +- .../models/dashboard_panel_params_legend.py | 10 +- .../models/dashboard_panel_position_type_0.py | 2 + rootly_sdk/models/dashboard_panel_response.py | 4 +- .../models/dashboard_panel_response_data.py | 4 +- rootly_sdk/models/dashboard_response.py | 4 +- rootly_sdk/models/dashboard_response_data.py | 4 +- .../models/delete_alert_route_response_200.py | 12 +- .../delete_alert_route_response_200_data.py | 20 +- ...lert_route_response_200_data_attributes.py | 6 +- rootly_sdk/models/duplicate_incident.py | 4 +- rootly_sdk/models/duplicate_incident_data.py | 4 +- .../duplicate_incident_data_attributes.py | 26 +- rootly_sdk/models/edge_connector.py | 4 +- rootly_sdk/models/edge_connector_action.py | 4 +- .../models/edge_connector_action_data.py | 4 +- .../edge_connector_action_data_attributes.py | 75 +- ..._data_attributes_parameters_type_0_item.py | 50 +- rootly_sdk/models/edge_connector_data.py | 4 +- .../models/edge_connector_data_attributes.py | 70 +- rootly_sdk/models/environment.py | 126 +- rootly_sdk/models/environment_list.py | 10 +- .../models/environment_list_data_item.py | 4 +- ... => environment_properties_type_0_item.py} | 29 +- rootly_sdk/models/environment_response.py | 4 +- .../models/environment_response_data.py | 4 +- .../environment_slack_aliases_type_0_item.py | 2 + .../environment_slack_channels_type_0_item.py | 2 + rootly_sdk/models/errors_list.py | 18 +- rootly_sdk/models/errors_list_errors_item.py | 22 +- rootly_sdk/models/escalation_policy.py | 50 +- ...escalation_policy_business_hours_type_0.py | 42 +- ..._policy_business_hours_type_0_time_zone.py | 8 + rootly_sdk/models/escalation_policy_level.py | 54 +- .../models/escalation_policy_level_list.py | 10 +- .../escalation_policy_level_list_data_item.py | 4 +- ..._notification_target_params_item_type_0.py | 10 +- .../escalation_policy_level_response.py | 4 +- .../escalation_policy_level_response_data.py | 12 +- rootly_sdk/models/escalation_policy_list.py | 10 +- .../escalation_policy_list_data_item.py | 4 +- rootly_sdk/models/escalation_policy_path.py | 580 +++++--- ...ion_policy_path_after_deferral_behavior.py | 20 + .../models/escalation_policy_path_list.py | 10 +- .../escalation_policy_path_list_data_item.py | 4 +- .../escalation_policy_path_path_type.py | 16 + .../models/escalation_policy_path_response.py | 4 +- .../escalation_policy_path_response_data.py | 12 +- ...scalation_policy_path_rules_item_type_0.py | 2 + ...scalation_policy_path_rules_item_type_1.py | 2 + ...scalation_policy_path_rules_item_type_2.py | 38 +- ..._policy_path_rules_item_type_2_operator.py | 6 +- ...scalation_policy_path_rules_item_type_3.py | 8 +- ...scalation_policy_path_rules_item_type_4.py | 74 + ...policy_path_rules_item_type_4_rule_type.py | 19 + ...path_rules_item_type_4_type_0_rule_type.py | 21 - ...path_rules_item_type_4_type_1_rule_type.py | 21 - ...on_policy_path_rules_item_type_4_type_2.py | 92 -- ..._path_rules_item_type_4_type_2_operator.py | 24 - ...path_rules_item_type_4_type_2_rule_type.py | 21 - ...path_rules_item_type_4_type_3_rule_type.py | 21 - ...scalation_policy_path_rules_item_type_5.py | 105 ++ ...policy_path_rules_item_type_5_rule_type.py | 19 + ...path_rules_item_type_5_time_blocks_item.py | 251 ++++ ...policy_path_rules_item_type_5_time_zone.py | 597 ++++++++ ...path_rules_item_type_5_type_0_rule_type.py | 21 - ...path_rules_item_type_5_type_1_rule_type.py | 21 - ...on_policy_path_rules_item_type_5_type_2.py | 92 -- ..._path_rules_item_type_5_type_2_operator.py | 24 - ...path_rules_item_type_5_type_2_rule_type.py | 21 - ...path_rules_item_type_5_type_3_rule_type.py | 21 - ...n_policy_path_rules_item_type_6_type_0.py} | 24 +- ...path_rules_item_type_6_type_0_rule_type.py | 21 + ...n_policy_path_rules_item_type_6_type_1.py} | 24 +- ...path_rules_item_type_6_type_1_rule_type.py | 21 + ...on_policy_path_rules_item_type_6_type_2.py | 118 ++ ..._path_rules_item_type_6_type_2_operator.py | 28 + ...path_rules_item_type_6_type_2_rule_type.py | 21 + ...n_policy_path_rules_item_type_6_type_3.py} | 42 +- ...path_rules_item_type_6_type_3_operator.py} | 16 +- ...path_rules_item_type_6_type_3_rule_type.py | 21 + ...on_policy_path_rules_item_type_6_type_4.py | 74 + ...path_rules_item_type_6_type_4_rule_type.py | 21 + ...on_policy_path_rules_item_type_6_type_5.py | 105 ++ ...path_rules_item_type_6_type_5_rule_type.py | 21 + ...les_item_type_6_type_5_time_blocks_item.py | 251 ++++ ...path_rules_item_type_6_type_5_time_zone.py | 599 ++++++++ ...n_policy_path_rules_item_type_7_type_0.py} | 24 +- ...path_rules_item_type_7_type_0_rule_type.py | 21 + ...n_policy_path_rules_item_type_7_type_1.py} | 24 +- ...path_rules_item_type_7_type_1_rule_type.py | 21 + ...on_policy_path_rules_item_type_7_type_2.py | 118 ++ ..._path_rules_item_type_7_type_2_operator.py | 28 + ...path_rules_item_type_7_type_2_rule_type.py | 21 + ...n_policy_path_rules_item_type_7_type_3.py} | 42 +- ...path_rules_item_type_7_type_3_operator.py} | 16 +- ...path_rules_item_type_7_type_3_rule_type.py | 21 + ...on_policy_path_rules_item_type_7_type_4.py | 74 + ...path_rules_item_type_7_type_4_rule_type.py | 21 + ...on_policy_path_rules_item_type_7_type_5.py | 105 ++ ...path_rules_item_type_7_type_5_rule_type.py | 21 + ...les_item_type_7_type_5_time_blocks_item.py | 251 ++++ ...path_rules_item_type_7_type_5_time_zone.py | 599 ++++++++ ..._policy_path_time_restriction_time_zone.py | 8 + ...tion_policy_path_time_restrictions_item.py | 26 +- .../models/escalation_policy_response.py | 4 +- .../models/escalation_policy_response_data.py | 4 +- rootly_sdk/models/form_field.py | 61 +- rootly_sdk/models/form_field_list.py | 10 +- .../models/form_field_list_data_item.py | 4 +- rootly_sdk/models/form_field_option.py | 14 +- rootly_sdk/models/form_field_option_list.py | 10 +- .../form_field_option_list_data_item.py | 4 +- .../models/form_field_option_response.py | 4 +- .../models/form_field_option_response_data.py | 4 +- rootly_sdk/models/form_field_placement.py | 24 +- .../models/form_field_placement_condition.py | 2 + .../form_field_placement_condition_list.py | 10 +- ...ield_placement_condition_list_data_item.py | 4 +- ...form_field_placement_condition_response.py | 4 +- ...field_placement_condition_response_data.py | 4 +- .../models/form_field_placement_list.py | 10 +- .../form_field_placement_list_data_item.py | 4 +- .../models/form_field_placement_response.py | 4 +- .../form_field_placement_response_data.py | 4 +- rootly_sdk/models/form_field_position.py | 2 + rootly_sdk/models/form_field_position_list.py | 10 +- .../form_field_position_list_data_item.py | 4 +- .../models/form_field_position_response.py | 4 +- .../form_field_position_response_data.py | 4 +- rootly_sdk/models/form_field_response.py | 4 +- rootly_sdk/models/form_field_response_data.py | 4 +- rootly_sdk/models/form_set.py | 6 +- rootly_sdk/models/form_set_condition.py | 2 + rootly_sdk/models/form_set_condition_list.py | 10 +- .../form_set_condition_list_data_item.py | 4 +- .../models/form_set_condition_response.py | 4 +- .../form_set_condition_response_data.py | 4 +- rootly_sdk/models/form_set_list.py | 10 +- rootly_sdk/models/form_set_list_data_item.py | 4 +- rootly_sdk/models/form_set_response.py | 4 +- rootly_sdk/models/form_set_response_data.py | 4 +- rootly_sdk/models/functionality.py | 257 ++-- rootly_sdk/models/functionality_list.py | 10 +- .../models/functionality_list_data_item.py | 4 +- ...> functionality_properties_type_0_item.py} | 28 +- rootly_sdk/models/functionality_response.py | 4 +- .../models/functionality_response_data.py | 4 +- ...functionality_slack_aliases_type_0_item.py | 2 + ...unctionality_slack_channels_type_0_item.py | 2 + ...ne_number_live_call_router_country_code.py | 3 +- rootly_sdk/models/get_alerts_task_params.py | 78 +- ..._task_params_parent_message_thread_task.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../models/get_catalog_field_include.py | 15 - rootly_sdk/models/get_pulses_task_params.py | 84 +- ..._task_params_parent_message_thread_task.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/heartbeat.py | 75 +- rootly_sdk/models/heartbeat_list.py | 10 +- rootly_sdk/models/heartbeat_list_data_item.py | 4 +- .../heartbeat_notification_target_type.py | 3 +- rootly_sdk/models/heartbeat_response.py | 4 +- rootly_sdk/models/heartbeat_response_data.py | 4 +- rootly_sdk/models/http_client_task_params.py | 62 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/in_triage_incident.py | 4 +- rootly_sdk/models/in_triage_incident_data.py | 2 + rootly_sdk/models/incident.py | 1181 ++++++++-------- rootly_sdk/models/incident_action_item.py | 98 +- .../models/incident_action_item_list.py | 10 +- .../incident_action_item_list_data_item.py | 4 +- .../models/incident_action_item_response.py | 4 +- .../incident_action_item_response_data.py | 4 +- .../models/incident_cancelled_by_type_0.py | 3 + .../models/incident_closed_by_type_0.py | 3 + .../models/incident_custom_field_selection.py | 12 +- .../incident_custom_field_selection_list.py | 10 +- ...t_custom_field_selection_list_data_item.py | 4 +- ...ncident_custom_field_selection_response.py | 4 +- ...nt_custom_field_selection_response_data.py | 4 +- rootly_sdk/models/incident_event.py | 10 +- .../models/incident_event_functionality.py | 2 + .../incident_event_functionality_list.py | 10 +- ...dent_event_functionality_list_data_item.py | 4 +- .../incident_event_functionality_response.py | 4 +- ...ident_event_functionality_response_data.py | 4 +- rootly_sdk/models/incident_event_list.py | 10 +- .../models/incident_event_list_data_item.py | 4 +- rootly_sdk/models/incident_event_response.py | 4 +- .../models/incident_event_response_data.py | 4 +- rootly_sdk/models/incident_event_service.py | 2 + .../models/incident_event_service_list.py | 10 +- .../incident_event_service_list_data_item.py | 4 +- .../models/incident_event_service_response.py | 4 +- .../incident_event_service_response_data.py | 4 +- rootly_sdk/models/incident_feedback.py | 2 + rootly_sdk/models/incident_feedback_list.py | 10 +- .../incident_feedback_list_data_item.py | 4 +- .../models/incident_feedback_response.py | 4 +- .../models/incident_feedback_response_data.py | 4 +- .../models/incident_form_field_selection.py | 66 +- .../incident_form_field_selection_list.py | 10 +- ...ent_form_field_selection_list_data_item.py | 4 +- .../incident_form_field_selection_response.py | 4 +- ...dent_form_field_selection_response_data.py | 4 +- .../models/incident_in_triage_by_type_0.py | 3 + rootly_sdk/models/incident_labels_type_0.py | 3 + rootly_sdk/models/incident_list.py | 10 +- rootly_sdk/models/incident_list_data_item.py | 4 +- .../models/incident_mitigated_by_type_0.py | 3 + rootly_sdk/models/incident_permission_set.py | 56 +- .../models/incident_permission_set_boolean.py | 14 +- .../incident_permission_set_boolean_list.py | 10 +- ...t_permission_set_boolean_list_data_item.py | 4 +- ...ncident_permission_set_boolean_response.py | 4 +- ...nt_permission_set_boolean_response_data.py | 4 +- .../models/incident_permission_set_list.py | 10 +- .../incident_permission_set_list_data_item.py | 4 +- .../incident_permission_set_resource.py | 14 +- .../incident_permission_set_resource_list.py | 10 +- ..._permission_set_resource_list_data_item.py | 4 +- ...cident_permission_set_resource_response.py | 4 +- ...t_permission_set_resource_response_data.py | 4 +- .../incident_permission_set_response.py | 4 +- .../incident_permission_set_response_data.py | 4 +- rootly_sdk/models/incident_post_mortem.py | 98 +- .../models/incident_post_mortem_list.py | 10 +- .../incident_post_mortem_list_data_item.py | 4 +- .../models/incident_post_mortem_response.py | 4 +- .../incident_post_mortem_response_data.py | 4 +- .../models/incident_resolved_by_type_0.py | 3 + rootly_sdk/models/incident_response.py | 4 +- rootly_sdk/models/incident_response_data.py | 4 +- .../models/incident_retrospective_step.py | 48 +- .../incident_retrospective_step_response.py | 4 +- ...cident_retrospective_step_response_data.py | 4 +- rootly_sdk/models/incident_role.py | 48 +- rootly_sdk/models/incident_role_list.py | 10 +- .../models/incident_role_list_data_item.py | 4 +- rootly_sdk/models/incident_role_response.py | 4 +- .../models/incident_role_response_data.py | 4 +- rootly_sdk/models/incident_role_task.py | 24 +- rootly_sdk/models/incident_role_task_list.py | 10 +- .../incident_role_task_list_data_item.py | 4 +- .../models/incident_role_task_response.py | 4 +- .../incident_role_task_response_data.py | 4 +- .../models/incident_started_by_type_0.py | 3 + .../models/incident_status_page_event.py | 22 +- .../models/incident_status_page_event_list.py | 10 +- ...cident_status_page_event_list_data_item.py | 4 +- .../incident_status_page_event_response.py | 4 +- ...ncident_status_page_event_response_data.py | 4 +- rootly_sdk/models/incident_sub_status.py | 12 +- rootly_sdk/models/incident_sub_status_list.py | 10 +- .../incident_sub_status_list_data_item.py | 4 +- .../models/incident_sub_status_response.py | 4 +- .../incident_sub_status_response_data.py | 4 +- rootly_sdk/models/incident_trigger_params.py | 216 +-- rootly_sdk/models/incident_type.py | 114 +- rootly_sdk/models/incident_type_list.py | 10 +- .../models/incident_type_list_data_item.py | 4 +- ...em.py => incident_type_properties_item.py} | 28 +- rootly_sdk/models/incident_type_response.py | 4 +- .../models/incident_type_response_data.py | 4 +- ...incident_type_slack_aliases_type_0_item.py | 2 + ...ncident_type_slack_channels_type_0_item.py | 2 + rootly_sdk/models/incident_user_type_0.py | 3 + ...ting_global_dial_in_numbers_type_0_item.py | 97 ++ rootly_sdk/models/incidents_chart_response.py | 3 + ..._to_microsoft_teams_channel_task_params.py | 22 +- ...osoft_teams_channel_task_params_channel.py | 10 +- ...icrosoft_teams_channel_task_params_team.py | 10 +- ...e_to_slack_channel_opsgenie_task_params.py | 16 +- ...nnel_opsgenie_task_params_channels_item.py | 10 +- ...k_channel_opsgenie_task_params_schedule.py | 10 +- ...ite_to_slack_channel_rootly_task_params.py | 56 +- ...hannel_rootly_task_params_channels_item.py | 10 +- ...ly_task_params_escalation_policy_target.py | 10 +- ...channel_rootly_task_params_group_target.py | 10 +- ...nnel_rootly_task_params_schedule_target.py | 10 +- ...annel_rootly_task_params_service_target.py | 10 +- ..._channel_rootly_task_params_user_target.py | 10 +- ...to_slack_channel_victor_ops_task_params.py | 16 +- ...el_victor_ops_task_params_channels_item.py | 10 +- ...ack_channel_victor_ops_task_params_team.py | 10 +- rootly_sdk/models/ip_ranges.py | 2 + rootly_sdk/models/ip_ranges_response.py | 4 +- rootly_sdk/models/ip_ranges_response_data.py | 4 +- rootly_sdk/models/links.py | 6 +- ...ist_catalog_checklist_templates_include.py | 16 + .../list_catalog_checklist_templates_sort.py | 20 + .../models/list_catalog_fields_include.py | 15 - rootly_sdk/models/list_catalog_fields_sort.py | 20 - .../list_cause_catalog_fields_include.py | 15 - .../models/list_cause_catalog_fields_sort.py | 20 - .../list_cause_catalog_properties_include.py | 15 + .../list_cause_catalog_properties_sort.py | 22 + ...list_environment_catalog_fields_include.py | 15 - .../list_environment_catalog_fields_sort.py | 22 - ..._environment_catalog_properties_include.py | 19 + ...ist_environment_catalog_properties_sort.py | 22 + ...st_functionality_catalog_fields_include.py | 15 - .../list_functionality_catalog_fields_sort.py | 22 - ...unctionality_catalog_properties_include.py | 19 + ...t_functionality_catalog_properties_sort.py | 26 + .../list_group_catalog_fields_include.py | 15 - .../models/list_group_catalog_fields_sort.py | 20 - .../list_group_catalog_properties_include.py | 15 + .../list_group_catalog_properties_sort.py | 22 + ...st_incident_type_catalog_fields_include.py | 15 - .../list_incident_type_catalog_fields_sort.py | 22 - ...ncident_type_catalog_properties_include.py | 19 + ...t_incident_type_catalog_properties_sort.py | 24 + rootly_sdk/models/list_incidents_sort.py | 23 +- rootly_sdk/models/list_oncalls_include.py | 17 + .../list_service_catalog_fields_include.py | 15 - .../list_service_catalog_fields_sort.py | 22 - ...list_service_catalog_properties_include.py | 15 + .../list_service_catalog_properties_sort.py | 22 + rootly_sdk/models/list_shifts_include.py | 3 +- rootly_sdk/models/live_call_router.py | 106 +- .../models/live_call_router_country_code.py | 3 +- ...router_escalation_policy_trigger_params.py | 5 +- ...r_escalation_policy_trigger_params_type.py | 3 +- rootly_sdk/models/live_call_router_list.py | 10 +- .../models/live_call_router_list_data_item.py | 4 +- .../live_call_router_paging_targets_item.py | 5 +- ...ve_call_router_paging_targets_item_type.py | 3 +- .../models/live_call_router_response.py | 4 +- .../models/live_call_router_response_data.py | 4 +- rootly_sdk/models/meeting_recording.py | 228 +++ rootly_sdk/models/meeting_recording_list.py | 95 ++ .../meeting_recording_list_data_item.py | 88 ++ .../meeting_recording_list_data_item_type.py | 15 + .../models/meeting_recording_platform.py | 18 + rootly_sdk/models/meeting_recording_status.py | 21 + rootly_sdk/models/meta.py | 57 +- rootly_sdk/models/mitigate_incident.py | 4 +- rootly_sdk/models/mitigate_incident_data.py | 4 +- .../mitigate_incident_data_attributes.py | 12 +- rootly_sdk/models/new_alert.py | 4 +- rootly_sdk/models/new_alert_data.py | 4 +- .../models/new_alert_data_attributes.py | 276 ++-- ...ert_field_values_attributes_item_type_0.py | 2 + .../new_alert_data_attributes_data_type_0.py | 3 + ...lert_data_attributes_labels_item_type_0.py | 4 +- .../new_alert_data_attributes_source.py | 4 + rootly_sdk/models/new_alert_event.py | 4 +- rootly_sdk/models/new_alert_event_data.py | 4 +- .../models/new_alert_event_data_attributes.py | 6 +- rootly_sdk/models/new_alert_field.py | 4 +- rootly_sdk/models/new_alert_field_data.py | 4 +- .../models/new_alert_field_data_attributes.py | 2 + rootly_sdk/models/new_alert_group.py | 4 +- rootly_sdk/models/new_alert_group_data.py | 4 +- .../models/new_alert_group_data_attributes.py | 100 +- ...t_group_data_attributes_attributes_item.py | 6 +- ...t_group_data_attributes_conditions_item.py | 55 +- ...lert_group_data_attributes_targets_item.py | 2 + rootly_sdk/models/new_alert_route.py | 12 +- rootly_sdk/models/new_alert_route_data.py | 20 +- .../models/new_alert_route_data_attributes.py | 38 +- ..._alert_route_data_attributes_rules_item.py | 18 +- ...ibutes_rules_item_condition_groups_item.py | 10 +- ...m_condition_groups_item_conditions_item.py | 63 +- ...attributes_rules_item_destinations_item.py | 5 +- ...ules_item_destinations_item_target_type.py | 5 +- rootly_sdk/models/new_alert_routing_rule.py | 4 +- .../models/new_alert_routing_rule_data.py | 4 +- .../new_alert_routing_rule_data_attributes.py | 58 +- ...ng_rule_data_attributes_conditions_item.py | 17 +- ...outing_rule_data_attributes_destination.py | 5 +- ...data_attributes_destination_target_type.py | 5 +- rootly_sdk/models/new_alert_urgency.py | 4 +- rootly_sdk/models/new_alert_urgency_data.py | 4 +- .../new_alert_urgency_data_attributes.py | 12 +- rootly_sdk/models/new_alerts_source.py | 4 +- rootly_sdk/models/new_alerts_source_data.py | 4 +- .../new_alerts_source_data_attributes.py | 151 +- ...tes_alert_source_fields_attributes_item.py | 18 +- ...rt_source_urgency_rules_attributes_item.py | 61 +- ...ibutes_alert_template_attributes_type_0.py | 32 +- ...butes_resolution_rule_attributes_type_0.py | 101 +- ...butes_type_0_conditions_attributes_item.py | 59 +- ...erts_source_data_attributes_source_type.py | 4 + ...attributes_sourceable_attributes_type_0.py | 50 +- ...s_type_0_field_mappings_attributes_item.py | 16 +- rootly_sdk/models/new_api_key.py | 67 + rootly_sdk/models/new_api_key_data.py | 77 + .../models/new_api_key_data_attributes.py | 146 ++ .../new_api_key_data_attributes_kind.py | 17 + rootly_sdk/models/new_api_key_data_type.py | 15 + rootly_sdk/models/new_authorization.py | 4 +- rootly_sdk/models/new_authorization_data.py | 4 +- .../new_authorization_data_attributes.py | 2 + rootly_sdk/models/new_catalog.py | 4 +- .../models/new_catalog_checklist_template.py | 67 + .../new_catalog_checklist_template_data.py | 80 ++ ...alog_checklist_template_data_attributes.py | 260 ++++ ..._template_data_attributes_builtin_field.py | 76 + ...a_attributes_builtin_field_field_source.py | 21 + ...t_template_data_attributes_catalog_type.py | 29 + ...t_template_data_attributes_custom_field.py | 86 ++ ...ta_attributes_custom_field_field_source.py | 21 + ...late_data_attributes_owners_type_0_item.py | 74 + ...data_attributes_owners_type_0_item_type.py | 22 + ...ist_template_data_attributes_scope_type.py | 22 + ...ew_catalog_checklist_template_data_type.py | 15 + rootly_sdk/models/new_catalog_data.py | 4 +- .../models/new_catalog_data_attributes.py | 30 +- rootly_sdk/models/new_catalog_entity.py | 4 +- rootly_sdk/models/new_catalog_entity_data.py | 4 +- .../new_catalog_entity_data_attributes.py | 64 +- ...entity_data_attributes_properties_item.py} | 26 +- .../models/new_catalog_entity_property.py | 4 +- .../new_catalog_entity_property_data.py | 4 +- ...catalog_entity_property_data_attributes.py | 6 +- ...log_entity_property_data_attributes_key.py | 3 +- rootly_sdk/models/new_catalog_field.py | 4 +- rootly_sdk/models/new_catalog_field_data.py | 4 +- .../new_catalog_field_data_attributes.py | 38 +- .../models/new_catalog_field_data_type.py | 4 +- rootly_sdk/models/new_catalog_property.py | 68 + .../models/new_catalog_property_data.py | 77 + .../new_catalog_property_data_attributes.py | 134 ++ ...g_property_data_attributes_catalog_type.py | 27 + ...w_catalog_property_data_attributes_kind.py | 26 + .../models/new_catalog_property_data_type.py | 15 + rootly_sdk/models/new_cause.py | 4 +- rootly_sdk/models/new_cause_data.py | 4 +- .../models/new_cause_data_attributes.py | 60 +- .../new_cause_data_attributes_fields_item.py | 68 - ..._cause_data_attributes_properties_item.py} | 28 +- rootly_sdk/models/new_communications_group.py | 4 +- .../models/new_communications_group_data.py | 4 +- ...ew_communications_group_data_attributes.py | 105 +- ...tion_external_group_members_type_0_item.py | 14 +- ...munication_group_conditions_type_0_item.py | 72 +- rootly_sdk/models/new_communications_stage.py | 4 +- .../models/new_communications_stage_data.py | 4 +- ...ew_communications_stage_data_attributes.py | 22 +- .../models/new_communications_template.py | 4 +- .../new_communications_template_data.py | 4 +- ...communications_template_data_attributes.py | 44 +- ..._template_stages_attributes_type_0_item.py | 46 +- rootly_sdk/models/new_communications_type.py | 4 +- .../models/new_communications_type_data.py | 4 +- ...new_communications_type_data_attributes.py | 24 +- rootly_sdk/models/new_custom_field.py | 4 +- rootly_sdk/models/new_custom_field_data.py | 4 +- .../new_custom_field_data_attributes.py | 54 +- rootly_sdk/models/new_custom_field_option.py | 4 +- .../models/new_custom_field_option_data.py | 4 +- ...new_custom_field_option_data_attributes.py | 14 +- rootly_sdk/models/new_custom_form.py | 4 +- rootly_sdk/models/new_custom_form_data.py | 4 +- .../models/new_custom_form_data_attributes.py | 16 +- rootly_sdk/models/new_dashboard.py | 4 +- rootly_sdk/models/new_dashboard_data.py | 4 +- .../models/new_dashboard_data_attributes.py | 50 +- rootly_sdk/models/new_dashboard_panel.py | 4 +- rootly_sdk/models/new_dashboard_panel_data.py | 4 +- .../new_dashboard_panel_data_attributes.py | 28 +- ..._dashboard_panel_data_attributes_params.py | 54 +- ...panel_data_attributes_params_datalabels.py | 6 +- ...el_data_attributes_params_datasets_item.py | 64 +- ...s_params_datasets_item_aggregate_type_0.py | 30 +- ...ibutes_params_datasets_item_filter_item.py | 28 +- ...ms_datasets_item_filter_item_rules_item.py | 26 +- ...ms_datasets_item_group_by_type_1_type_0.py | 2 + ...atasets_item_group_by_type_1_type_0_key.py | 5 +- ...ard_panel_data_attributes_params_legend.py | 10 +- ...d_panel_data_attributes_position_type_0.py | 2 + rootly_sdk/models/new_edge_connector.py | 4 +- .../models/new_edge_connector_action.py | 4 +- .../new_edge_connector_action_action.py | 12 +- ...w_edge_connector_action_action_metadata.py | 42 +- ..._action_metadata_parameters_type_0_item.py | 50 +- .../new_edge_connector_edge_connector.py | 26 +- rootly_sdk/models/new_environment.py | 4 +- rootly_sdk/models/new_environment_data.py | 4 +- .../models/new_environment_data_attributes.py | 108 +- ...onment_data_attributes_properties_item.py} | 28 +- ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/new_escalation_policy.py | 4 +- .../models/new_escalation_policy_data.py | 4 +- .../new_escalation_policy_data_attributes.py | 46 +- ...y_data_attributes_business_hours_type_0.py | 43 +- ...ributes_business_hours_type_0_time_zone.py | 8 + .../models/new_escalation_policy_level.py | 4 +- .../new_escalation_policy_level_data.py | 4 +- ...escalation_policy_level_data_attributes.py | 58 +- ..._notification_target_params_item_type_0.py | 12 +- rootly_sdk/models/new_form_field.py | 4 +- rootly_sdk/models/new_form_field_data.py | 4 +- .../models/new_form_field_data_attributes.py | 92 +- rootly_sdk/models/new_form_field_option.py | 4 +- .../models/new_form_field_option_data.py | 4 +- .../new_form_field_option_data_attributes.py | 14 +- rootly_sdk/models/new_form_field_placement.py | 4 +- .../new_form_field_placement_condition.py | 4 +- ...new_form_field_placement_condition_data.py | 4 +- ...eld_placement_condition_data_attributes.py | 6 +- .../models/new_form_field_placement_data.py | 4 +- ...ew_form_field_placement_data_attributes.py | 30 +- rootly_sdk/models/new_form_field_position.py | 4 +- .../models/new_form_field_position_data.py | 4 +- ...new_form_field_position_data_attributes.py | 2 + rootly_sdk/models/new_form_set.py | 4 +- rootly_sdk/models/new_form_set_condition.py | 4 +- .../models/new_form_set_condition_data.py | 4 +- .../new_form_set_condition_data_attributes.py | 2 + rootly_sdk/models/new_form_set_data.py | 4 +- .../models/new_form_set_data_attributes.py | 2 + rootly_sdk/models/new_functionality.py | 4 +- rootly_sdk/models/new_functionality_data.py | 4 +- .../new_functionality_data_attributes.py | 256 ++-- ...nctionality_data_attributes_fields_item.py | 68 - ...onality_data_attributes_properties_item.py | 70 + ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/new_heartbeat.py | 4 +- rootly_sdk/models/new_heartbeat_data.py | 4 +- .../models/new_heartbeat_data_attributes.py | 39 +- ...ata_attributes_notification_target_type.py | 5 +- rootly_sdk/models/new_incident.py | 4 +- rootly_sdk/models/new_incident_action_item.py | 4 +- .../models/new_incident_action_item_data.py | 4 +- ...ew_incident_action_item_data_attributes.py | 92 +- .../new_incident_custom_field_selection.py | 4 +- ...ew_incident_custom_field_selection_data.py | 4 +- ..._custom_field_selection_data_attributes.py | 10 +- rootly_sdk/models/new_incident_data.py | 4 +- .../models/new_incident_data_attributes.py | 420 +++--- ..._incident_data_attributes_labels_type_0.py | 3 + rootly_sdk/models/new_incident_event.py | 4 +- rootly_sdk/models/new_incident_event_data.py | 4 +- .../new_incident_event_data_attributes.py | 10 +- .../new_incident_event_functionality.py | 4 +- .../new_incident_event_functionality_data.py | 4 +- ...ent_event_functionality_data_attributes.py | 2 + .../models/new_incident_event_service.py | 4 +- .../models/new_incident_event_service_data.py | 4 +- ..._incident_event_service_data_attributes.py | 2 + rootly_sdk/models/new_incident_feedback.py | 4 +- .../models/new_incident_feedback_data.py | 4 +- .../new_incident_feedback_data_attributes.py | 6 +- .../new_incident_form_field_selection.py | 4 +- .../new_incident_form_field_selection_data.py | 4 +- ...nt_form_field_selection_data_attributes.py | 66 +- .../models/new_incident_permission_set.py | 4 +- .../new_incident_permission_set_boolean.py | 4 +- ...ew_incident_permission_set_boolean_data.py | 4 +- ..._permission_set_boolean_data_attributes.py | 20 +- ...boolean_data_attributes_severity_params.py | 28 +- .../new_incident_permission_set_data.py | 4 +- ...incident_permission_set_data_attributes.py | 63 +- .../new_incident_permission_set_resource.py | 4 +- ...w_incident_permission_set_resource_data.py | 4 +- ...permission_set_resource_data_attributes.py | 24 +- ...esource_data_attributes_severity_params.py | 28 +- rootly_sdk/models/new_incident_role.py | 4 +- rootly_sdk/models/new_incident_role_data.py | 4 +- .../new_incident_role_data_attributes.py | 44 +- rootly_sdk/models/new_incident_role_task.py | 4 +- .../models/new_incident_role_task_data.py | 4 +- .../new_incident_role_task_data_attributes.py | 24 +- .../models/new_incident_status_page_event.py | 4 +- .../new_incident_status_page_event_data.py | 4 +- ...ident_status_page_event_data_attributes.py | 36 +- rootly_sdk/models/new_incident_sub_status.py | 4 +- .../models/new_incident_sub_status_data.py | 4 +- ...new_incident_sub_status_data_attributes.py | 12 +- rootly_sdk/models/new_incident_type.py | 4 +- rootly_sdk/models/new_incident_type_data.py | 4 +- .../new_incident_type_data_attributes.py | 110 +- ...t_type_data_attributes_properties_item.py} | 28 +- ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/new_live_call_router.py | 4 +- .../models/new_live_call_router_data.py | 4 +- .../new_live_call_router_data_attributes.py | 64 +- ...all_router_data_attributes_country_code.py | 3 +- ...ibutes_escalation_policy_trigger_params.py | 5 +- ...s_escalation_policy_trigger_params_type.py | 5 +- ...ter_data_attributes_paging_targets_item.py | 5 +- ...ata_attributes_paging_targets_item_type.py | 3 +- rootly_sdk/models/new_on_call_pay_report.py | 67 + .../models/new_on_call_pay_report_data.py | 77 + .../new_on_call_pay_report_data_attributes.py | 65 + .../new_on_call_pay_report_data_type.py | 15 + rootly_sdk/models/new_on_call_role.py | 4 +- rootly_sdk/models/new_on_call_role_data.py | 4 +- .../new_on_call_role_data_attributes.py | 467 ++++--- rootly_sdk/models/new_on_call_shadow.py | 4 +- rootly_sdk/models/new_on_call_shadow_data.py | 4 +- .../new_on_call_shadow_data_attributes.py | 2 + rootly_sdk/models/new_override_shift.py | 4 +- rootly_sdk/models/new_override_shift_data.py | 4 +- .../new_override_shift_data_attributes.py | 2 + rootly_sdk/models/new_playbook.py | 4 +- rootly_sdk/models/new_playbook_data.py | 4 +- .../models/new_playbook_data_attributes.py | 94 +- rootly_sdk/models/new_playbook_task.py | 4 +- rootly_sdk/models/new_playbook_task_data.py | 4 +- .../new_playbook_task_data_attributes.py | 22 +- rootly_sdk/models/new_post_mortem_template.py | 4 +- .../models/new_post_mortem_template_data.py | 4 +- ...ew_post_mortem_template_data_attributes.py | 24 +- rootly_sdk/models/new_pulse.py | 4 +- rootly_sdk/models/new_pulse_data.py | 4 +- .../models/new_pulse_data_attributes.py | 164 +-- .../new_pulse_data_attributes_data_type_0.py | 3 + ...ulse_data_attributes_labels_item_type_0.py | 2 + ..._pulse_data_attributes_refs_item_type_0.py | 2 + .../models/new_retrospective_process.py | 4 +- .../models/new_retrospective_process_data.py | 4 +- ...w_retrospective_process_data_attributes.py | 50 +- ...ective_process_matching_criteria_type_0.py | 2 + ...ective_process_matching_criteria_type_1.py | 2 + ...ective_process_matching_criteria_type_2.py | 2 + .../models/new_retrospective_process_group.py | 4 +- .../new_retrospective_process_group_data.py | 4 +- ...ospective_process_group_data_attributes.py | 6 +- .../new_retrospective_process_group_step.py | 4 +- ...w_retrospective_process_group_step_data.py | 4 +- ...tive_process_group_step_data_attributes.py | 6 +- rootly_sdk/models/new_retrospective_step.py | 4 +- .../models/new_retrospective_step_data.py | 4 +- .../new_retrospective_step_data_attributes.py | 48 +- rootly_sdk/models/new_role.py | 4 +- rootly_sdk/models/new_role_data.py | 4 +- rootly_sdk/models/new_role_data_attributes.py | 723 ++++++---- ...ta_attributes_catalogs_permissions_item.py | 22 + ...tributes_communication_permissions_item.py | 24 + ...ributes_edge_connector_permissions_item.py | 24 + ...incident_communication_permissions_item.py | 25 + ...data_attributes_paging_permissions_item.py | 22 + ...e_data_attributes_slas_permissions_item.py | 22 + ...ttributes_sub_statuses_permissions_item.py | 22 + rootly_sdk/models/new_schedule.py | 4 +- rootly_sdk/models/new_schedule_data.py | 4 +- .../models/new_schedule_data_attributes.py | 50 +- ...le_data_attributes_slack_channel_type_0.py | 10 +- ...hedule_data_attributes_slack_user_group.py | 10 +- rootly_sdk/models/new_schedule_rotation.py | 4 +- .../new_schedule_rotation_active_day.py | 4 +- .../new_schedule_rotation_active_day_data.py | 4 +- ...ule_rotation_active_day_data_attributes.py | 6 +- ..._attributes_active_time_attributes_item.py | 10 +- .../models/new_schedule_rotation_data.py | 4 +- .../new_schedule_rotation_data_attributes.py | 137 +- ..._attributes_active_time_attributes_item.py | 2 + ...s_schedule_rotation_members_type_0_item.py | 6 +- ...schedule_rotationable_attributes_type_0.py | 2 + ...schedule_rotationable_attributes_type_1.py | 2 + ...schedule_rotationable_attributes_type_2.py | 2 + ...schedule_rotationable_attributes_type_3.py | 2 + .../models/new_schedule_rotation_user.py | 12 +- .../models/new_schedule_rotation_user_data.py | 20 +- ..._schedule_rotation_user_data_attributes.py | 6 +- rootly_sdk/models/new_secret.py | 4 +- rootly_sdk/models/new_secret_data.py | 4 +- .../models/new_secret_data_attributes.py | 40 +- rootly_sdk/models/new_service.py | 4 +- rootly_sdk/models/new_service_data.py | 4 +- .../models/new_service_data_attributes.py | 395 +++--- ...tributes_alert_broadcast_channel_type_0.py | 6 +- ...new_service_data_attributes_fields_item.py | 68 - ...butes_incident_broadcast_channel_type_0.py | 6 +- ...service_data_attributes_properties_item.py | 70 + ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/new_severity.py | 4 +- rootly_sdk/models/new_severity_data.py | 4 +- .../models/new_severity_data_attributes.py | 84 +- ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/new_sla.py | 67 + rootly_sdk/models/new_sla_data.py | 77 + rootly_sdk/models/new_sla_data_attributes.py | 357 +++++ ...ata_attributes_assignment_deadline_days.py | 24 + ...butes_assignment_deadline_parent_status.py | 28 + ...ata_attributes_completion_deadline_days.py | 24 + ...butes_completion_deadline_parent_status.py | 28 + ...la_data_attributes_condition_match_type.py | 20 + ...new_sla_data_attributes_conditions_item.py | 169 +++ ...utes_conditions_item_conditionable_type.py | 24 + ...ata_attributes_conditions_item_property.py | 55 + ...ibutes_notification_configurations_item.py | 75 + ...ication_configurations_item_offset_type.py | 23 + rootly_sdk/models/new_sla_data_type.py | 15 + rootly_sdk/models/new_status_page.py | 4 +- rootly_sdk/models/new_status_page_data.py | 4 +- .../models/new_status_page_data_attributes.py | 329 +++-- ...ta_attributes_section_order_type_0_item.py | 23 + rootly_sdk/models/new_status_page_template.py | 4 +- .../models/new_status_page_template_data.py | 4 +- ...ew_status_page_template_data_attributes.py | 58 +- rootly_sdk/models/new_sub_status.py | 4 +- rootly_sdk/models/new_sub_status_data.py | 4 +- .../models/new_sub_status_data_attributes.py | 22 +- rootly_sdk/models/new_team.py | 4 +- rootly_sdk/models/new_team_data.py | 4 +- rootly_sdk/models/new_team_data_attributes.py | 319 +++-- ...tributes_alert_broadcast_channel_type_0.py | 6 +- ...butes_incident_broadcast_channel_type_0.py | 6 +- ...w_team_data_attributes_properties_item.py} | 28 +- ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/new_user_email_address.py | 4 +- .../models/new_user_email_address_data.py | 4 +- .../new_user_email_address_data_attributes.py | 2 + .../models/new_user_notification_rule.py | 4 +- .../models/new_user_notification_rule_data.py | 4 +- ..._user_notification_rule_data_attributes.py | 62 +- rootly_sdk/models/new_user_phone_number.py | 4 +- .../models/new_user_phone_number_data.py | 4 +- .../new_user_phone_number_data_attributes.py | 2 + rootly_sdk/models/new_webhooks_endpoint.py | 4 +- .../models/new_webhooks_endpoint_data.py | 4 +- .../new_webhooks_endpoint_data_attributes.py | 26 +- rootly_sdk/models/new_workflow.py | 4 +- .../new_workflow_custom_field_selection.py | 4 +- ...ew_workflow_custom_field_selection_data.py | 4 +- ..._custom_field_selection_data_attributes.py | 18 +- rootly_sdk/models/new_workflow_data.py | 4 +- .../models/new_workflow_data_attributes.py | 224 +-- .../new_workflow_form_field_condition.py | 4 +- .../new_workflow_form_field_condition_data.py | 4 +- ...ow_form_field_condition_data_attributes.py | 66 +- rootly_sdk/models/new_workflow_group.py | 4 +- rootly_sdk/models/new_workflow_group_data.py | 4 +- .../new_workflow_group_data_attributes.py | 32 +- rootly_sdk/models/new_workflow_run.py | 4 +- rootly_sdk/models/new_workflow_run_data.py | 52 +- ...new_workflow_run_data_attributes_type_0.py | 34 +- ...flow_run_data_attributes_type_0_context.py | 3 + ...new_workflow_run_data_attributes_type_1.py | 35 +- ...flow_run_data_attributes_type_1_context.py | 3 + ...new_workflow_run_data_attributes_type_2.py | 35 +- ...flow_run_data_attributes_type_2_context.py | 3 + ...new_workflow_run_data_attributes_type_3.py | 35 +- ...flow_run_data_attributes_type_3_context.py | 3 + ...new_workflow_run_data_attributes_type_4.py | 35 +- ...flow_run_data_attributes_type_4_context.py | 3 + ...new_workflow_run_data_attributes_type_5.py | 35 +- ...flow_run_data_attributes_type_5_context.py | 3 + rootly_sdk/models/new_workflow_task.py | 4 +- rootly_sdk/models/new_workflow_task_data.py | 4 +- .../new_workflow_task_data_attributes.py | 1233 ++++++++-------- rootly_sdk/models/on_call_pay_report.py | 235 ++++ rootly_sdk/models/on_call_pay_report_list.py | 95 ++ .../on_call_pay_report_list_data_item.py | 88 ++ .../on_call_pay_report_list_data_item_type.py | 15 + .../models/on_call_pay_report_pay_type.py | 16 + .../models/on_call_pay_report_response.py | 67 + .../on_call_pay_report_response_data.py | 88 ++ .../on_call_pay_report_response_data_type.py | 15 + .../models/on_call_pay_report_status.py | 17 + rootly_sdk/models/on_call_role.py | 420 +++--- rootly_sdk/models/on_call_role_list.py | 10 +- .../models/on_call_role_list_data_item.py | 4 +- .../models/on_call_role_relationship.py | 16 +- .../on_call_role_relationship_data_type_0.py | 14 +- rootly_sdk/models/on_call_role_response.py | 4 +- .../models/on_call_role_response_data.py | 4 +- rootly_sdk/models/on_call_shadow.py | 10 +- rootly_sdk/models/on_call_shadow_response.py | 4 +- .../models/on_call_shadow_response_data.py | 4 +- rootly_sdk/models/on_call_shadows_list.py | 10 +- .../models/on_call_shadows_list_data_item.py | 4 +- rootly_sdk/models/override_shift.py | 34 +- rootly_sdk/models/override_shift_list.py | 10 +- .../models/override_shift_list_data_item.py | 4 +- rootly_sdk/models/override_shift_response.py | 4 +- .../models/override_shift_response_data.py | 4 +- ...e_jsmops_on_call_responders_task_params.py | 189 +++ ...on_call_responders_task_params_priority.py | 24 + ...n_call_responders_task_params_task_type.py | 19 + ..._call_responders_task_params_teams_item.py | 70 + ..._call_responders_task_params_users_item.py | 70 + ...opsgenie_on_call_responders_task_params.py | 68 +- ..._call_responders_task_params_teams_item.py | 10 +- ..._call_responders_task_params_users_item.py | 10 +- ...agerduty_on_call_responders_task_params.py | 84 +- ...rs_task_params_escalation_policies_item.py | 10 +- ..._on_call_responders_task_params_service.py | 10 +- ..._call_responders_task_params_users_item.py | 10 +- ...e_rootly_on_call_responders_task_params.py | 76 +- ...rs_task_params_escalation_policy_target.py | 10 +- ...onders_task_params_functionality_target.py | 70 + ...all_responders_task_params_group_target.py | 10 +- ...l_responders_task_params_service_target.py | 10 +- ...call_responders_task_params_user_target.py | 10 +- rootly_sdk/models/patch_alert_route.py | 4 +- rootly_sdk/models/patch_alert_route_data.py | 4 +- .../patch_alert_route_data_attributes.py | 58 +- ..._alert_route_data_attributes_rules_item.py | 64 +- ...ibutes_rules_item_condition_groups_item.py | 39 +- ...m_condition_groups_item_conditions_item.py | 95 +- ...attributes_rules_item_destinations_item.py | 32 +- ...ules_item_destinations_item_target_type.py | 5 +- .../models/phone_verification_response.py | 10 +- rootly_sdk/models/playbook.py | 94 +- rootly_sdk/models/playbook_list.py | 10 +- rootly_sdk/models/playbook_list_data_item.py | 4 +- rootly_sdk/models/playbook_response.py | 4 +- rootly_sdk/models/playbook_response_data.py | 4 +- rootly_sdk/models/playbook_task.py | 26 +- rootly_sdk/models/playbook_task_list.py | 10 +- .../models/playbook_task_list_data_item.py | 4 +- rootly_sdk/models/playbook_task_response.py | 4 +- .../models/playbook_task_response_data.py | 4 +- rootly_sdk/models/post_mortem_template.py | 55 +- ...ost_mortem_template_content_json_type_0.py | 3 + .../models/post_mortem_template_list.py | 10 +- .../post_mortem_template_list_data_item.py | 4 +- .../models/post_mortem_template_response.py | 4 +- .../post_mortem_template_response_data.py | 4 +- .../models/post_mortem_trigger_params.py | 256 ++-- rootly_sdk/models/print_task_params.py | 10 +- .../models/publish_incident_task_params.py | 50 +- .../publish_incident_task_params_incident.py | 10 +- ...cident_task_params_status_page_template.py | 10 +- rootly_sdk/models/pulse.py | 148 +- rootly_sdk/models/pulse_data_type_0.py | 3 + rootly_sdk/models/pulse_labels_item_type_0.py | 2 + rootly_sdk/models/pulse_list.py | 10 +- rootly_sdk/models/pulse_list_data_item.py | 4 +- rootly_sdk/models/pulse_refs_item_type_0.py | 2 + rootly_sdk/models/pulse_response.py | 4 +- rootly_sdk/models/pulse_response_data.py | 4 +- rootly_sdk/models/pulse_trigger_params.py | 90 +- rootly_sdk/models/redis_client_task_params.py | 42 +- ...task_params_post_to_slack_channels_item.py | 10 +- ...ove_google_docs_permissions_task_params.py | 10 +- rootly_sdk/models/remove_subscribers.py | 4 +- rootly_sdk/models/remove_subscribers_data.py | 4 +- .../remove_subscribers_data_attributes.py | 26 +- ...ame_microsoft_teams_channel_task_params.py | 14 +- ...osoft_teams_channel_task_params_channel.py | 10 +- ...icrosoft_teams_channel_task_params_team.py | 10 +- .../rename_slack_channel_task_params.py | 12 +- ...ename_slack_channel_task_params_channel.py | 10 +- rootly_sdk/models/resolve_alert.py | 12 +- rootly_sdk/models/resolve_alert_data.py | 20 +- .../models/resolve_alert_data_attributes.py | 22 +- rootly_sdk/models/resolve_incident.py | 4 +- rootly_sdk/models/resolve_incident_data.py | 4 +- .../resolve_incident_data_attributes.py | 12 +- rootly_sdk/models/restart_incident.py | 4 +- rootly_sdk/models/restart_incident_data.py | 12 +- .../restart_incident_data_attributes.py | 3 + .../models/retrospective_configuration.py | 55 +- .../retrospective_configuration_list.py | 6 +- ...rospective_configuration_list_data_item.py | 4 +- .../retrospective_configuration_response.py | 4 +- ...trospective_configuration_response_data.py | 4 +- rootly_sdk/models/retrospective_process.py | 72 +- .../models/retrospective_process_group.py | 2 + .../retrospective_process_group_list.py | 10 +- ...rospective_process_group_list_data_item.py | 4 +- .../retrospective_process_group_response.py | 4 +- ...trospective_process_group_response_data.py | 4 +- .../retrospective_process_group_step.py | 2 + .../retrospective_process_group_step_list.py | 10 +- ...ctive_process_group_step_list_data_item.py | 4 +- ...trospective_process_group_step_response.py | 4 +- ...ective_process_group_step_response_data.py | 4 +- .../models/retrospective_process_list.py | 10 +- .../retrospective_process_list_data_item.py | 4 +- .../models/retrospective_process_response.py | 4 +- .../retrospective_process_response_data.py | 4 +- ...ective_process_matching_criteria_type_0.py | 2 + ...ective_process_matching_criteria_type_1.py | 2 + ...ective_process_matching_criteria_type_2.py | 2 + rootly_sdk/models/retrospective_step.py | 46 +- rootly_sdk/models/retrospective_step_list.py | 10 +- .../retrospective_step_list_data_item.py | 4 +- .../models/retrospective_step_response.py | 4 +- .../retrospective_step_response_data.py | 4 +- rootly_sdk/models/role.py | 652 ++++++--- .../models/role_catalogs_permissions_item.py | 18 + .../role_communication_permissions_item.py | 18 + .../role_edge_connector_permissions_item.py | 18 + ...incident_communication_permissions_item.py | 23 + rootly_sdk/models/role_list.py | 10 +- rootly_sdk/models/role_list_data_item.py | 4 +- .../models/role_paging_permissions_item.py | 18 + rootly_sdk/models/role_relationship.py | 16 +- .../models/role_relationship_data_type_0.py | 14 +- rootly_sdk/models/role_response.py | 4 +- rootly_sdk/models/role_response_data.py | 4 +- .../models/role_slas_permissions_item.py | 18 + .../role_sub_statuses_permissions_item.py | 18 + rootly_sdk/models/rotate_api_key.py | 67 + rootly_sdk/models/rotate_api_key_data.py | 77 + .../models/rotate_api_key_data_attributes.py | 76 + rootly_sdk/models/rotate_api_key_data_type.py | 15 + .../models/run_command_heroku_task_params.py | 34 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/schedule.py | 54 +- rootly_sdk/models/schedule_list.py | 10 +- rootly_sdk/models/schedule_list_data_item.py | 4 +- rootly_sdk/models/schedule_response.py | 4 +- rootly_sdk/models/schedule_response_data.py | 4 +- rootly_sdk/models/schedule_rotation.py | 120 +- .../models/schedule_rotation_active_day.py | 8 +- ..._active_day_active_time_attributes_item.py | 10 +- .../schedule_rotation_active_day_list.py | 10 +- ...dule_rotation_active_day_list_data_item.py | 4 +- .../schedule_rotation_active_day_response.py | 12 +- ...edule_rotation_active_day_response_data.py | 24 +- ...le_rotation_active_time_attributes_item.py | 2 + rootly_sdk/models/schedule_rotation_list.py | 10 +- .../schedule_rotation_list_data_item.py | 4 +- .../models/schedule_rotation_response.py | 4 +- .../models/schedule_rotation_response_data.py | 4 +- ...schedule_rotationable_attributes_type_0.py | 2 + ...schedule_rotationable_attributes_type_1.py | 2 + ...schedule_rotationable_attributes_type_2.py | 2 + ...schedule_rotationable_attributes_type_3.py | 2 + rootly_sdk/models/schedule_rotation_user.py | 2 + .../models/schedule_rotation_user_list.py | 10 +- .../schedule_rotation_user_list_data_item.py | 4 +- .../models/schedule_rotation_user_response.py | 4 +- .../schedule_rotation_user_response_data.py | 4 +- .../models/schedule_slack_channel_type_0.py | 10 +- .../schedule_slack_user_group_type_0.py | 10 +- rootly_sdk/models/secret.py | 24 +- rootly_sdk/models/secret_list.py | 24 +- rootly_sdk/models/secret_list_data_item.py | 4 +- rootly_sdk/models/secret_response.py | 4 +- rootly_sdk/models/secret_response_data.py | 4 +- .../send_dashboard_report_task_params.py | 28 +- rootly_sdk/models/send_email_task_params.py | 58 +- ...icrosoft_teams_chat_message_task_params.py | 14 +- ...ams_chat_message_task_params_chats_item.py | 10 +- rootly_sdk/models/send_sms_task_params.py | 10 +- .../send_whatsapp_message_task_params.py | 10 +- rootly_sdk/models/service.py | 389 +++--- .../service_alert_broadcast_channel_type_0.py | 10 +- ...rvice_incident_broadcast_channel_type_0.py | 10 +- rootly_sdk/models/service_list.py | 10 +- rootly_sdk/models/service_list_data_item.py | 4 +- ...m.py => service_properties_type_0_item.py} | 28 +- rootly_sdk/models/service_response.py | 4 +- rootly_sdk/models/service_response_data.py | 4 +- .../service_slack_aliases_type_0_item.py | 2 + .../service_slack_channels_type_0_item.py | 2 + rootly_sdk/models/severity.py | 81 +- rootly_sdk/models/severity_list.py | 10 +- rootly_sdk/models/severity_list_data_item.py | 4 +- rootly_sdk/models/severity_response.py | 4 +- rootly_sdk/models/severity_response_data.py | 4 +- .../severity_slack_aliases_type_0_item.py | 2 + .../severity_slack_channels_type_0_item.py | 2 + rootly_sdk/models/shift.py | 22 +- rootly_sdk/models/shift_list.py | 26 +- rootly_sdk/models/shift_list_data_item.py | 14 +- rootly_sdk/models/shift_override.py | 10 +- rootly_sdk/models/shift_override_response.py | 4 +- .../models/shift_override_response_data.py | 4 +- rootly_sdk/models/shift_relationships.py | 28 +- .../models/shift_relationships_assignee.py | 16 +- ...hift_relationships_assignee_data_type_0.py | 10 +- .../shift_relationships_shift_override.py | 16 +- ...elationships_shift_override_data_type_0.py | 14 +- rootly_sdk/models/shift_relationships_user.py | 16 +- .../shift_relationships_user_data_type_0.py | 14 +- rootly_sdk/models/simple_trigger_params.py | 18 +- rootly_sdk/models/sla.py | 361 +++++ rootly_sdk/models/sla_condition_match_type.py | 16 + rootly_sdk/models/sla_conditions_item.py | 188 +++ .../sla_conditions_item_conditionable_type.py | 16 + rootly_sdk/models/sla_entity_type.py | 15 + rootly_sdk/models/sla_list.py | 95 ++ rootly_sdk/models/sla_list_data_item.py | 85 ++ rootly_sdk/models/sla_list_data_item_type.py | 15 + .../sla_notification_configurations_item.py | 117 ++ ...ication_configurations_item_offset_type.py | 21 + rootly_sdk/models/sla_response.py | 67 + rootly_sdk/models/sla_response_data.py | 85 ++ rootly_sdk/models/sla_response_data_type.py | 15 + .../snapshot_datadog_graph_task_params.py | 56 +- ...tadog_graph_task_params_dashboards_item.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../snapshot_grafana_dashboard_task_params.py | 38 +- ...a_dashboard_task_params_dashboards_item.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../snapshot_looker_look_task_params.py | 38 +- ...looker_look_task_params_dashboards_item.py | 10 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../snapshot_new_relic_graph_task_params.py | 34 +- ...task_params_post_to_slack_channels_item.py | 10 +- rootly_sdk/models/status.py | 16 +- rootly_sdk/models/status_list.py | 10 +- rootly_sdk/models/status_list_data_item.py | 4 +- rootly_sdk/models/status_page.py | 354 +++-- .../status_page_cname_records_type_0.py | 50 + rootly_sdk/models/status_page_list.py | 10 +- .../models/status_page_list_data_item.py | 4 +- rootly_sdk/models/status_page_response.py | 4 +- .../models/status_page_response_data.py | 4 +- .../status_page_section_order_type_0_item.py | 17 + rootly_sdk/models/status_page_template.py | 54 +- .../models/status_page_template_list.py | 10 +- .../status_page_template_list_data_item.py | 4 +- .../models/status_page_template_response.py | 4 +- .../status_page_template_response_data.py | 4 +- rootly_sdk/models/status_response.py | 4 +- rootly_sdk/models/status_response_data.py | 4 +- rootly_sdk/models/sub_status.py | 26 +- rootly_sdk/models/sub_status_list.py | 10 +- .../models/sub_status_list_data_item.py | 4 +- rootly_sdk/models/sub_status_response.py | 4 +- rootly_sdk/models/sub_status_response_data.py | 4 +- rootly_sdk/models/team.py | 329 +++-- .../team_alert_broadcast_channel_type_0.py | 10 +- .../team_incident_broadcast_channel_type_0.py | 10 +- rootly_sdk/models/team_list.py | 10 +- rootly_sdk/models/team_list_data_item.py | 4 +- ...item.py => team_properties_type_0_item.py} | 28 +- rootly_sdk/models/team_response.py | 4 +- rootly_sdk/models/team_response_data.py | 4 +- .../models/team_slack_aliases_type_0_item.py | 2 + .../models/team_slack_channels_type_0_item.py | 2 + rootly_sdk/models/tiptap_block_schema.py | 20 +- .../tiptap_block_schema_followup_component.py | 10 +- .../tiptap_block_schema_timeline_component.py | 2 + .../models/trigger_workflow_task_params.py | 18 +- .../trigger_workflow_task_params_resource.py | 10 +- .../trigger_workflow_task_params_workflow.py | 10 +- .../tweet_twitter_message_task_params.py | 10 +- rootly_sdk/models/unassign_role_from_user.py | 4 +- .../models/unassign_role_from_user_data.py | 4 +- ...unassign_role_from_user_data_attributes.py | 10 +- .../models/update_action_item_task_params.py | 77 +- ...ction_item_task_params_assigned_to_user.py | 10 +- ...pdate_airtable_table_record_task_params.py | 20 +- rootly_sdk/models/update_alert.py | 4 +- rootly_sdk/models/update_alert_data.py | 12 +- .../models/update_alert_data_attributes.py | 256 ++-- ...ert_field_values_attributes_item_type_0.py | 2 + ...pdate_alert_data_attributes_data_type_0.py | 3 + ...lert_data_attributes_labels_item_type_0.py | 4 +- .../update_alert_data_attributes_source.py | 4 + rootly_sdk/models/update_alert_event.py | 4 +- rootly_sdk/models/update_alert_event_data.py | 4 +- .../update_alert_event_data_attributes.py | 6 +- rootly_sdk/models/update_alert_field.py | 4 +- rootly_sdk/models/update_alert_field_data.py | 4 +- .../update_alert_field_data_attributes.py | 6 +- rootly_sdk/models/update_alert_group.py | 4 +- rootly_sdk/models/update_alert_group_data.py | 4 +- .../update_alert_group_data_attributes.py | 102 +- ...t_group_data_attributes_attributes_item.py | 6 +- ...t_group_data_attributes_conditions_item.py | 57 +- ...lert_group_data_attributes_targets_item.py | 2 + rootly_sdk/models/update_alert_route.py | 4 +- rootly_sdk/models/update_alert_route_data.py | 4 +- .../update_alert_route_data_attributes.py | 58 +- ..._alert_route_data_attributes_rules_item.py | 18 +- ...ibutes_rules_item_condition_groups_item.py | 10 +- ...m_condition_groups_item_conditions_item.py | 63 +- ...attributes_rules_item_destinations_item.py | 5 +- ...ules_item_destinations_item_target_type.py | 5 +- .../models/update_alert_routing_rule.py | 4 +- .../models/update_alert_routing_rule_data.py | 4 +- ...date_alert_routing_rule_data_attributes.py | 74 +- ...ng_rule_data_attributes_conditions_item.py | 59 +- ...outing_rule_data_attributes_destination.py | 19 +- ...data_attributes_destination_target_type.py | 5 +- rootly_sdk/models/update_alert_urgency.py | 4 +- .../models/update_alert_urgency_data.py | 4 +- .../update_alert_urgency_data_attributes.py | 20 +- rootly_sdk/models/update_alerts_source.py | 4 +- .../models/update_alerts_source_data.py | 4 +- .../update_alerts_source_data_attributes.py | 160 +-- ...tes_alert_source_fields_attributes_item.py | 18 +- ...rt_source_urgency_rules_attributes_item.py | 63 +- ...ibutes_alert_template_attributes_type_0.py | 32 +- ...butes_resolution_rule_attributes_type_0.py | 100 +- ...butes_type_0_conditions_attributes_item.py | 63 +- ...erts_source_data_attributes_source_type.py | 4 + ...attributes_sourceable_attributes_type_0.py | 50 +- ...s_type_0_field_mappings_attributes_item.py | 14 +- rootly_sdk/models/update_api_key.py | 67 + rootly_sdk/models/update_api_key_data.py | 77 + .../models/update_api_key_data_attributes.py | 94 ++ rootly_sdk/models/update_api_key_data_type.py | 15 + .../models/update_asana_task_task_params.py | 58 +- ...pdate_asana_task_task_params_completion.py | 10 +- .../update_attached_alerts_task_params.py | 10 +- rootly_sdk/models/update_authorization.py | 4 +- .../models/update_authorization_data.py | 4 +- .../update_authorization_data_attributes.py | 18 +- rootly_sdk/models/update_catalog.py | 4 +- .../update_catalog_checklist_template.py | 67 + .../update_catalog_checklist_template_data.py | 82 ++ ...alog_checklist_template_data_attributes.py | 227 +++ ..._template_data_attributes_builtin_field.py | 76 + ...a_attributes_builtin_field_field_source.py | 21 + ...t_template_data_attributes_custom_field.py | 86 ++ ...ta_attributes_custom_field_field_source.py | 21 + ...late_data_attributes_owners_type_0_item.py | 74 + ...data_attributes_owners_type_0_item_type.py | 22 + ...te_catalog_checklist_template_data_type.py | 19 + rootly_sdk/models/update_catalog_data.py | 4 +- .../models/update_catalog_data_attributes.py | 34 +- rootly_sdk/models/update_catalog_entity.py | 4 +- .../models/update_catalog_entity_data.py | 4 +- .../update_catalog_entity_data_attributes.py | 68 +- ..._entity_data_attributes_properties_item.py | 69 + .../models/update_catalog_entity_property.py | 4 +- .../update_catalog_entity_property_data.py | 4 +- ...catalog_entity_property_data_attributes.py | 14 +- ...log_entity_property_data_attributes_key.py | 3 +- rootly_sdk/models/update_catalog_field.py | 4 +- .../models/update_catalog_field_data.py | 4 +- .../update_catalog_field_data_attributes.py | 47 +- .../models/update_catalog_field_data_type.py | 4 +- rootly_sdk/models/update_catalog_property.py | 67 + .../models/update_catalog_property_data.py | 80 ++ ...update_catalog_property_data_attributes.py | 132 ++ ...g_property_data_attributes_catalog_type.py | 27 + ...e_catalog_property_data_attributes_kind.py | 30 + .../update_catalog_property_data_type.py | 15 + rootly_sdk/models/update_cause.py | 4 +- rootly_sdk/models/update_cause_data.py | 4 +- .../models/update_cause_data_attributes.py | 64 +- ..._cause_data_attributes_properties_item.py} | 28 +- .../models/update_clickup_task_task_params.py | 56 +- ...pdate_clickup_task_task_params_priority.py | 10 +- .../models/update_coda_page_task_params.py | 36 +- .../update_coda_page_task_params_template.py | 10 +- .../models/update_communications_group.py | 4 +- .../update_communications_group_data.py | 4 +- ...te_communications_group_data_attributes.py | 117 +- ...tion_external_group_members_type_0_item.py | 24 +- ...munication_group_conditions_type_0_item.py | 82 +- .../models/update_communications_stage.py | 4 +- .../update_communications_stage_data.py | 4 +- ...te_communications_stage_data_attributes.py | 26 +- .../models/update_communications_template.py | 4 +- .../update_communications_template_data.py | 4 +- ...communications_template_data_attributes.py | 52 +- ..._template_stages_attributes_type_0_item.py | 52 +- .../models/update_communications_type.py | 4 +- .../models/update_communications_type_data.py | 4 +- ...ate_communications_type_data_attributes.py | 36 +- .../update_confluence_page_task_params.py | 32 +- ...te_confluence_page_task_params_template.py | 10 +- rootly_sdk/models/update_custom_field.py | 4 +- rootly_sdk/models/update_custom_field_data.py | 4 +- .../update_custom_field_data_attributes.py | 58 +- .../models/update_custom_field_option.py | 4 +- .../models/update_custom_field_option_data.py | 4 +- ...ate_custom_field_option_data_attributes.py | 18 +- rootly_sdk/models/update_custom_form.py | 4 +- rootly_sdk/models/update_custom_form_data.py | 4 +- .../update_custom_form_data_attributes.py | 24 +- rootly_sdk/models/update_dashboard.py | 4 +- rootly_sdk/models/update_dashboard_data.py | 20 +- .../update_dashboard_data_attributes.py | 62 +- rootly_sdk/models/update_dashboard_panel.py | 4 +- .../models/update_dashboard_panel_data.py | 20 +- .../update_dashboard_panel_data_attributes.py | 34 +- ..._dashboard_panel_data_attributes_params.py | 54 +- ...panel_data_attributes_params_datalabels.py | 6 +- ...el_data_attributes_params_datasets_item.py | 62 +- ...s_params_datasets_item_aggregate_type_0.py | 30 +- ...ibutes_params_datasets_item_filter_item.py | 30 +- ...ms_datasets_item_filter_item_rules_item.py | 26 +- ...ms_datasets_item_group_by_type_1_type_0.py | 2 + ...atasets_item_group_by_type_1_type_0_key.py | 5 +- ...ard_panel_data_attributes_params_legend.py | 10 +- ...d_panel_data_attributes_position_type_0.py | 2 + .../update_datadog_notebook_task_params.py | 40 +- ...e_datadog_notebook_task_params_template.py | 10 +- .../update_dropbox_paper_page_task_params.py | 22 +- rootly_sdk/models/update_edge_connector.py | 4 +- .../models/update_edge_connector_action.py | 4 +- .../update_edge_connector_action_action.py | 24 +- ...e_edge_connector_action_action_metadata.py | 3 + .../update_edge_connector_action_body.py | 12 +- ...pdate_edge_connector_action_body_action.py | 24 +- ...e_connector_action_body_action_metadata.py | 3 + .../models/update_edge_connector_body.py | 12 +- .../models/update_edge_connector_body_data.py | 24 +- ...ate_edge_connector_body_data_attributes.py | 24 +- .../update_edge_connector_edge_connector.py | 24 +- rootly_sdk/models/update_environment.py | 4 +- rootly_sdk/models/update_environment_data.py | 4 +- .../update_environment_data_attributes.py | 116 +- ...ronment_data_attributes_properties_item.py | 70 + ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + rootly_sdk/models/update_escalation_policy.py | 4 +- .../models/update_escalation_policy_data.py | 4 +- ...pdate_escalation_policy_data_attributes.py | 48 +- ...y_data_attributes_business_hours_type_0.py | 44 +- ...ributes_business_hours_type_0_time_zone.py | 8 + .../models/update_escalation_policy_level.py | 4 +- .../update_escalation_policy_level_data.py | 4 +- ...escalation_policy_level_data_attributes.py | 106 +- ..._notification_target_params_item_type_0.py | 13 +- rootly_sdk/models/update_form_field.py | 4 +- rootly_sdk/models/update_form_field_data.py | 4 +- .../update_form_field_data_attributes.py | 104 +- rootly_sdk/models/update_form_field_option.py | 4 +- .../models/update_form_field_option_data.py | 4 +- ...pdate_form_field_option_data_attributes.py | 18 +- .../models/update_form_field_placement.py | 4 +- .../update_form_field_placement_condition.py | 4 +- ...ate_form_field_placement_condition_data.py | 4 +- ...eld_placement_condition_data_attributes.py | 34 +- .../update_form_field_placement_data.py | 4 +- ...te_form_field_placement_data_attributes.py | 40 +- .../models/update_form_field_position.py | 4 +- .../models/update_form_field_position_data.py | 4 +- ...ate_form_field_position_data_attributes.py | 18 +- rootly_sdk/models/update_form_set.py | 4 +- .../models/update_form_set_condition.py | 4 +- .../models/update_form_set_condition_data.py | 4 +- ...date_form_set_condition_data_attributes.py | 20 +- rootly_sdk/models/update_form_set_data.py | 4 +- .../models/update_form_set_data_attributes.py | 14 +- rootly_sdk/models/update_functionality.py | 4 +- .../models/update_functionality_data.py | 4 +- .../update_functionality_data_attributes.py | 246 ++-- ...onality_data_attributes_properties_item.py | 70 + ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + .../models/update_github_issue_task_params.py | 80 +- ...ate_github_issue_task_params_completion.py | 10 +- ...ate_github_issue_task_params_issue_type.py | 71 + ...te_github_issue_task_params_labels_item.py | 70 + ...te_github_issue_task_params_repository.py} | 47 +- .../models/update_gitlab_issue_task_params.py | 36 +- ...ate_gitlab_issue_task_params_completion.py | 10 +- ...pdate_google_calendar_event_task_params.py | 98 +- ...task_params_post_to_slack_channels_item.py | 10 +- .../update_google_docs_page_task_params.py | 26 +- rootly_sdk/models/update_heartbeat.py | 4 +- rootly_sdk/models/update_heartbeat_data.py | 4 +- .../update_heartbeat_data_attributes.py | 69 +- ...ata_attributes_notification_target_type.py | 5 +- rootly_sdk/models/update_incident.py | 4 +- .../models/update_incident_action_item.py | 4 +- .../update_incident_action_item_data.py | 4 +- ...te_incident_action_item_data_attributes.py | 102 +- .../update_incident_custom_field_selection.py | 4 +- ...te_incident_custom_field_selection_data.py | 4 +- ..._custom_field_selection_data_attributes.py | 18 +- rootly_sdk/models/update_incident_data.py | 4 +- .../models/update_incident_data_attributes.py | 422 +++--- ..._incident_data_attributes_labels_type_0.py | 3 + rootly_sdk/models/update_incident_event.py | 4 +- .../models/update_incident_event_data.py | 4 +- .../update_incident_event_data_attributes.py | 15 +- .../update_incident_event_functionality.py | 4 +- ...pdate_incident_event_functionality_data.py | 4 +- ...ent_event_functionality_data_attributes.py | 2 + .../models/update_incident_event_service.py | 4 +- .../update_incident_event_service_data.py | 4 +- ..._incident_event_service_data_attributes.py | 2 + rootly_sdk/models/update_incident_feedback.py | 4 +- .../models/update_incident_feedback_data.py | 4 +- ...pdate_incident_feedback_data_attributes.py | 18 +- .../update_incident_form_field_selection.py | 4 +- ...date_incident_form_field_selection_data.py | 4 +- ...nt_form_field_selection_data_attributes.py | 66 +- .../models/update_incident_permission_set.py | 4 +- .../update_incident_permission_set_boolean.py | 4 +- ...te_incident_permission_set_boolean_data.py | 4 +- ..._permission_set_boolean_data_attributes.py | 28 +- ...boolean_data_attributes_severity_params.py | 28 +- .../update_incident_permission_set_data.py | 4 +- ...incident_permission_set_data_attributes.py | 68 +- ...update_incident_permission_set_resource.py | 4 +- ...e_incident_permission_set_resource_data.py | 4 +- ...permission_set_resource_data_attributes.py | 32 +- ...esource_data_attributes_severity_params.py | 28 +- .../models/update_incident_post_mortem.py | 4 +- .../update_incident_post_mortem_data.py | 4 +- ...te_incident_post_mortem_data_attributes.py | 96 +- .../update_incident_postmortem_task_params.py | 30 +- .../update_incident_retrospective_step.py | 4 +- ...update_incident_retrospective_step_data.py | 4 +- ...dent_retrospective_step_data_attributes.py | 49 +- rootly_sdk/models/update_incident_role.py | 4 +- .../models/update_incident_role_data.py | 4 +- .../update_incident_role_data_attributes.py | 48 +- .../models/update_incident_role_task.py | 4 +- .../models/update_incident_role_task_data.py | 4 +- ...date_incident_role_task_data_attributes.py | 24 +- .../update_incident_status_page_event.py | 4 +- .../update_incident_status_page_event_data.py | 4 +- ...ident_status_page_event_data_attributes.py | 40 +- ...e_incident_status_timestamp_task_params.py | 10 +- .../models/update_incident_sub_status.py | 4 +- .../models/update_incident_sub_status_data.py | 4 +- ...ate_incident_sub_status_data_attributes.py | 24 +- .../models/update_incident_task_params.py | 182 +-- rootly_sdk/models/update_incident_type.py | 4 +- .../models/update_incident_type_data.py | 4 +- .../update_incident_type_data_attributes.py | 116 +- ...nt_type_data_attributes_properties_item.py | 70 + ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + .../models/update_jira_issue_task_params.py | 72 +- .../update_jira_issue_task_params_priority.py | 10 +- .../update_jira_issue_task_params_status.py | 10 +- .../models/update_linear_issue_task_params.py | 68 +- ...te_linear_issue_task_params_labels_item.py | 10 +- ...pdate_linear_issue_task_params_priority.py | 10 +- ...update_linear_issue_task_params_project.py | 10 +- ...e_linear_issue_task_params_state_type_0.py | 10 +- rootly_sdk/models/update_live_call_router.py | 4 +- .../models/update_live_call_router_data.py | 4 +- ...update_live_call_router_data_attributes.py | 114 +- ...all_router_data_attributes_country_code.py | 3 +- ...ibutes_escalation_policy_trigger_params.py | 5 +- ...s_escalation_policy_trigger_params_type.py | 5 +- ...ter_data_attributes_paging_targets_item.py | 5 +- ...ata_attributes_paging_targets_item_type.py | 5 +- .../models/update_motion_task_task_params.py | 42 +- ...update_motion_task_task_params_priority.py | 10 +- .../models/update_notion_page_task_params.py | 32 +- .../models/update_on_call_pay_report.py | 67 + .../models/update_on_call_pay_report_data.py | 80 ++ ...date_on_call_pay_report_data_attributes.py | 78 ++ .../update_on_call_pay_report_data_type.py | 15 + rootly_sdk/models/update_on_call_role.py | 4 +- rootly_sdk/models/update_on_call_role_data.py | 4 +- .../update_on_call_role_data_attributes.py | 483 ++++--- rootly_sdk/models/update_on_call_shadow.py | 4 +- .../models/update_on_call_shadow_data.py | 4 +- .../update_on_call_shadow_data_attributes.py | 38 +- .../update_opsgenie_alert_task_params.py | 20 +- ...e_opsgenie_alert_task_params_completion.py | 10 +- .../update_opsgenie_incident_task_params.py | 34 +- ..._opsgenie_incident_task_params_priority.py | 3 +- rootly_sdk/models/update_override_shift.py | 4 +- .../models/update_override_shift_data.py | 4 +- .../update_override_shift_data_attributes.py | 2 + .../update_pagerduty_incident_task_params.py | 44 +- .../update_pagertree_alert_task_params.py | 74 +- ..._pagertree_alert_task_params_teams_item.py | 10 +- ..._pagertree_alert_task_params_users_item.py | 10 +- rootly_sdk/models/update_playbook.py | 4 +- rootly_sdk/models/update_playbook_data.py | 4 +- .../models/update_playbook_data_attributes.py | 98 +- rootly_sdk/models/update_playbook_task.py | 4 +- .../models/update_playbook_task_data.py | 4 +- .../update_playbook_task_data_attributes.py | 26 +- .../models/update_post_mortem_template.py | 4 +- .../update_post_mortem_template_data.py | 4 +- ...te_post_mortem_template_data_attributes.py | 28 +- rootly_sdk/models/update_pulse.py | 4 +- rootly_sdk/models/update_pulse_data.py | 12 +- .../models/update_pulse_data_attributes.py | 168 +-- ...pdate_pulse_data_attributes_data_type_0.py | 3 + ...ulse_data_attributes_labels_item_type_0.py | 2 + ..._pulse_data_attributes_refs_item_type_0.py | 2 + .../models/update_quip_page_task_params.py | 26 +- .../update_retrospective_configuration.py | 4 +- ...update_retrospective_configuration_data.py | 4 +- ...ospective_configuration_data_attributes.py | 39 +- .../models/update_retrospective_process.py | 4 +- .../update_retrospective_process_data.py | 4 +- ...e_retrospective_process_data_attributes.py | 56 +- ...ective_process_matching_criteria_type_0.py | 2 + ...ective_process_matching_criteria_type_1.py | 2 + ...ective_process_matching_criteria_type_2.py | 2 + .../update_retrospective_process_group.py | 4 +- ...update_retrospective_process_group_data.py | 4 +- ...ospective_process_group_data_attributes.py | 10 +- ...update_retrospective_process_group_step.py | 4 +- ...e_retrospective_process_group_step_data.py | 4 +- ...tive_process_group_step_data_attributes.py | 6 +- .../models/update_retrospective_step.py | 4 +- .../models/update_retrospective_step_data.py | 4 +- ...date_retrospective_step_data_attributes.py | 52 +- rootly_sdk/models/update_role.py | 4 +- rootly_sdk/models/update_role_data.py | 4 +- .../models/update_role_data_attributes.py | 703 +++++++--- ...ta_attributes_catalogs_permissions_item.py | 22 + ...tributes_communication_permissions_item.py | 24 + ...ributes_edge_connector_permissions_item.py | 24 + ...incident_communication_permissions_item.py | 25 + ...data_attributes_paging_permissions_item.py | 22 + ...e_data_attributes_slas_permissions_item.py | 22 + ...ttributes_sub_statuses_permissions_item.py | 24 + rootly_sdk/models/update_schedule.py | 4 +- rootly_sdk/models/update_schedule_data.py | 4 +- .../models/update_schedule_data_attributes.py | 64 +- ...le_data_attributes_slack_channel_type_0.py | 10 +- ...hedule_data_attributes_slack_user_group.py | 10 +- rootly_sdk/models/update_schedule_rotation.py | 4 +- .../update_schedule_rotation_active_day.py | 4 +- ...pdate_schedule_rotation_active_day_data.py | 4 +- ...ule_rotation_active_day_data_attributes.py | 41 +- ..._attributes_active_time_attributes_item.py | 10 +- .../models/update_schedule_rotation_data.py | 4 +- ...pdate_schedule_rotation_data_attributes.py | 149 +- ..._attributes_active_time_attributes_item.py | 2 + ...s_schedule_rotation_members_type_0_item.py | 6 +- ...schedule_rotationable_attributes_type_0.py | 2 + ...schedule_rotationable_attributes_type_1.py | 2 + ...schedule_rotationable_attributes_type_2.py | 2 + ...schedule_rotationable_attributes_type_3.py | 2 + .../models/update_schedule_rotation_user.py | 4 +- .../update_schedule_rotation_user_data.py | 4 +- ..._schedule_rotation_user_data_attributes.py | 10 +- rootly_sdk/models/update_secret.py | 4 +- rootly_sdk/models/update_secret_data.py | 4 +- .../models/update_secret_data_attributes.py | 36 +- rootly_sdk/models/update_service.py | 4 +- rootly_sdk/models/update_service_data.py | 4 +- .../models/update_service_data_attributes.py | 366 ++--- ...tributes_alert_broadcast_channel_type_0.py | 6 +- ...butes_incident_broadcast_channel_type_0.py | 6 +- ...ervice_data_attributes_properties_item.py} | 28 +- ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + ...update_service_now_incident_task_params.py | 46 +- ...ice_now_incident_task_params_completion.py | 10 +- ...rvice_now_incident_task_params_priority.py | 10 +- rootly_sdk/models/update_severity.py | 4 +- rootly_sdk/models/update_severity_data.py | 4 +- .../models/update_severity_data_attributes.py | 82 +- ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + .../update_sharepoint_page_task_params.py | 22 +- .../update_shortcut_story_task_params.py | 28 +- ..._shortcut_story_task_params_archivation.py | 10 +- .../update_shortcut_task_task_params.py | 16 +- ...te_shortcut_task_task_params_completion.py | 10 +- rootly_sdk/models/update_sla.py | 67 + rootly_sdk/models/update_sla_data.py | 77 + .../models/update_sla_data_attributes.py | 386 +++++ ...ata_attributes_assignment_deadline_days.py | 26 + ...butes_assignment_deadline_parent_status.py | 28 + ...ata_attributes_completion_deadline_days.py | 26 + ...butes_completion_deadline_parent_status.py | 28 + ...la_data_attributes_condition_match_type.py | 20 + ...ate_sla_data_attributes_conditions_item.py | 169 +++ ...utes_conditions_item_conditionable_type.py | 24 + ...ata_attributes_conditions_item_property.py | 55 + ...ibutes_notification_configurations_item.py | 77 + ...ication_configurations_item_offset_type.py | 23 + rootly_sdk/models/update_sla_data_type.py | 15 + .../update_slack_channel_topic_task_params.py | 12 +- ...slack_channel_topic_task_params_channel.py | 10 +- rootly_sdk/models/update_status_page.py | 4 +- rootly_sdk/models/update_status_page_data.py | 4 +- .../update_status_page_data_attributes.py | 331 +++-- ...ta_attributes_section_order_type_0_item.py | 23 + .../models/update_status_page_template.py | 4 +- .../update_status_page_template_data.py | 4 +- ...te_status_page_template_data_attributes.py | 54 +- .../models/update_status_task_params.py | 14 +- rootly_sdk/models/update_sub_status.py | 4 +- rootly_sdk/models/update_sub_status_data.py | 4 +- .../update_sub_status_data_attributes.py | 26 +- rootly_sdk/models/update_team.py | 4 +- rootly_sdk/models/update_team_data.py | 4 +- .../models/update_team_data_attributes.py | 315 +++-- ...tributes_alert_broadcast_channel_type_0.py | 6 +- ...update_team_data_attributes_fields_item.py | 68 - ...butes_incident_broadcast_channel_type_0.py | 6 +- ...te_team_data_attributes_properties_item.py | 70 + ...ta_attributes_slack_aliases_type_0_item.py | 2 + ...a_attributes_slack_channels_type_0_item.py | 2 + .../models/update_trello_card_task_params.py | 58 +- ...ate_trello_card_task_params_archivation.py | 10 +- .../update_trello_card_task_params_board.py | 10 +- ...ate_trello_card_task_params_labels_item.py | 10 +- .../update_trello_card_task_params_list.py | 10 +- rootly_sdk/models/update_user.py | 4 +- rootly_sdk/models/update_user_data.py | 4 +- .../models/update_user_data_attributes.py | 42 +- .../models/update_user_email_address.py | 4 +- .../models/update_user_email_address_data.py | 4 +- ...date_user_email_address_data_attributes.py | 6 +- .../models/update_user_notification_rule.py | 4 +- .../update_user_notification_rule_data.py | 4 +- ..._user_notification_rule_data_attributes.py | 86 +- rootly_sdk/models/update_user_phone_number.py | 4 +- .../models/update_user_phone_number_data.py | 4 +- ...pdate_user_phone_number_data_attributes.py | 6 +- .../update_victor_ops_incident_task_params.py | 14 +- rootly_sdk/models/update_webhooks_endpoint.py | 4 +- .../models/update_webhooks_endpoint_data.py | 4 +- ...pdate_webhooks_endpoint_data_attributes.py | 28 +- rootly_sdk/models/update_workflow.py | 4 +- .../update_workflow_custom_field_selection.py | 4 +- ...te_workflow_custom_field_selection_data.py | 4 +- ..._custom_field_selection_data_attributes.py | 24 +- rootly_sdk/models/update_workflow_data.py | 4 +- .../models/update_workflow_data_attributes.py | 204 +-- .../update_workflow_form_field_condition.py | 4 +- ...date_workflow_form_field_condition_data.py | 4 +- ...ow_form_field_condition_data_attributes.py | 70 +- rootly_sdk/models/update_workflow_group.py | 4 +- .../models/update_workflow_group_data.py | 4 +- .../update_workflow_group_data_attributes.py | 36 +- rootly_sdk/models/update_workflow_task.py | 4 +- .../models/update_workflow_task_data.py | 4 +- .../update_workflow_task_data_attributes.py | 1241 +++++++++-------- .../update_zendesk_ticket_task_params.py | 56 +- ...e_zendesk_ticket_task_params_completion.py | 10 +- ...ate_zendesk_ticket_task_params_priority.py | 10 +- rootly_sdk/models/uptime_chart_response.py | 3 + rootly_sdk/models/user.py | 52 +- rootly_sdk/models/user_email_address.py | 22 +- rootly_sdk/models/user_email_address_list.py | 10 +- .../user_email_address_list_data_item.py | 4 +- .../models/user_email_address_response.py | 4 +- .../user_email_address_response_data.py | 4 +- rootly_sdk/models/user_flat_response.py | 52 +- rootly_sdk/models/user_list.py | 10 +- rootly_sdk/models/user_list_data_item.py | 14 +- rootly_sdk/models/user_notification_rule.py | 104 +- .../models/user_notification_rule_list.py | 10 +- .../user_notification_rule_list_data_item.py | 4 +- .../models/user_notification_rule_response.py | 4 +- .../user_notification_rule_response_data.py | 4 +- rootly_sdk/models/user_phone_number.py | 38 +- rootly_sdk/models/user_phone_number_list.py | 10 +- .../user_phone_number_list_data_item.py | 4 +- .../models/user_phone_number_response.py | 4 +- .../models/user_phone_number_response_data.py | 4 +- rootly_sdk/models/user_relationships.py | 20 +- rootly_sdk/models/user_response.py | 4 +- rootly_sdk/models/user_response_data.py | 14 +- .../models/verify_phone_number_request.py | 2 + rootly_sdk/models/webhooks_delivery.py | 4 +- rootly_sdk/models/webhooks_delivery_list.py | 24 +- .../webhooks_delivery_list_data_item.py | 4 +- .../models/webhooks_delivery_response.py | 4 +- .../models/webhooks_delivery_response_data.py | 4 +- rootly_sdk/models/webhooks_endpoint.py | 6 +- rootly_sdk/models/webhooks_endpoint_list.py | 24 +- .../webhooks_endpoint_list_data_item.py | 4 +- .../models/webhooks_endpoint_response.py | 4 +- .../models/webhooks_endpoint_response_data.py | 4 +- rootly_sdk/models/workflow.py | 216 +-- .../models/workflow_custom_field_selection.py | 8 +- .../workflow_custom_field_selection_list.py | 10 +- ...w_custom_field_selection_list_data_item.py | 4 +- ...orkflow_custom_field_selection_response.py | 4 +- ...ow_custom_field_selection_response_data.py | 4 +- .../models/workflow_form_field_condition.py | 44 +- .../workflow_form_field_condition_list.py | 10 +- ...low_form_field_condition_list_data_item.py | 4 +- .../workflow_form_field_condition_response.py | 4 +- ...flow_form_field_condition_response_data.py | 4 +- rootly_sdk/models/workflow_group.py | 32 +- rootly_sdk/models/workflow_group_list.py | 10 +- .../models/workflow_group_list_data_item.py | 4 +- rootly_sdk/models/workflow_group_response.py | 4 +- .../models/workflow_group_response_data.py | 4 +- rootly_sdk/models/workflow_list.py | 10 +- rootly_sdk/models/workflow_list_data_item.py | 4 +- rootly_sdk/models/workflow_response.py | 4 +- rootly_sdk/models/workflow_response_data.py | 4 +- rootly_sdk/models/workflow_run.py | 112 +- rootly_sdk/models/workflow_run_context.py | 3 + rootly_sdk/models/workflow_run_response.py | 4 +- .../models/workflow_run_response_data.py | 4 +- rootly_sdk/models/workflow_runs_list.py | 10 +- .../models/workflow_runs_list_data_item.py | 4 +- rootly_sdk/models/workflow_task.py | 1221 ++++++++-------- rootly_sdk/models/workflow_task_list.py | 10 +- .../models/workflow_task_list_data_item.py | 4 +- rootly_sdk/models/workflow_task_response.py | 4 +- .../models/workflow_task_response_data.py | 4 +- rootly_sdk/types.py | 2 - 2547 files changed, 64222 insertions(+), 33118 deletions(-) rename rootly_sdk/api/{catalog_fields => api_keys}/__init__.py (100%) create mode 100644 rootly_sdk/api/api_keys/create_api_key.py create mode 100644 rootly_sdk/api/api_keys/delete_api_key.py create mode 100644 rootly_sdk/api/api_keys/get_api_key.py create mode 100644 rootly_sdk/api/api_keys/list_api_keys.py create mode 100644 rootly_sdk/api/api_keys/rotate_api_key.py create mode 100644 rootly_sdk/api/api_keys/update_api_key.py create mode 100644 rootly_sdk/api/catalog_checklist_templates/__init__.py create mode 100644 rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py create mode 100644 rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py create mode 100644 rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py create mode 100644 rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py create mode 100644 rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py rename rootly_sdk/api/{catalog_fields/create_catalog_field.py => catalog_checklist_templates/update_catalog_checklist_template.py} (58%) create mode 100644 rootly_sdk/api/catalog_entity_checklists/__init__.py create mode 100644 rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py create mode 100644 rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py delete mode 100644 rootly_sdk/api/catalog_fields/list_catalog_fields.py create mode 100644 rootly_sdk/api/catalog_properties/__init__.py create mode 100644 rootly_sdk/api/catalog_properties/create_catalog_property.py create mode 100644 rootly_sdk/api/catalog_properties/delete_catalog_property.py create mode 100644 rootly_sdk/api/catalog_properties/get_catalog_property.py create mode 100644 rootly_sdk/api/catalog_properties/list_catalog_properties.py create mode 100644 rootly_sdk/api/catalog_properties/update_catalog_property.py rename rootly_sdk/api/{environments/create_environment_catalog_field.py => causes/create_cause_catalog_property.py} (67%) delete mode 100644 rootly_sdk/api/causes/list_cause_catalog_fields.py create mode 100644 rootly_sdk/api/causes/list_cause_catalog_properties.py rename rootly_sdk/api/{functionalities/create_functionality_catalog_field.py => environments/create_environment_catalog_property.py} (66%) delete mode 100644 rootly_sdk/api/environments/list_environment_catalog_fields.py create mode 100644 rootly_sdk/api/environments/list_environment_catalog_properties.py create mode 100644 rootly_sdk/api/functionalities/create_functionality_catalog_property.py delete mode 100644 rootly_sdk/api/functionalities/list_functionality_catalog_fields.py create mode 100644 rootly_sdk/api/functionalities/list_functionality_catalog_properties.py create mode 100644 rootly_sdk/api/incident_types/create_incident_type_catalog_property.py delete mode 100644 rootly_sdk/api/incident_types/list_incident_type_catalog_fields.py create mode 100644 rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py create mode 100644 rootly_sdk/api/incidents/detach_from_parent_incident.py create mode 100644 rootly_sdk/api/incidents/unmark_as_duplicate_incident.py create mode 100644 rootly_sdk/api/meeting_recordings/__init__.py create mode 100644 rootly_sdk/api/meeting_recordings/create_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/delete_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py create mode 100644 rootly_sdk/api/meeting_recordings/get_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/leave_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/list_meeting_recordings.py create mode 100644 rootly_sdk/api/meeting_recordings/pause_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/resume_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/stop_meeting_recording.py create mode 100644 rootly_sdk/api/on_call_pay_reports/__init__.py create mode 100644 rootly_sdk/api/on_call_pay_reports/create_on_call_pay_report.py rename rootly_sdk/api/{catalog_fields/get_catalog_field.py => on_call_pay_reports/get_on_call_pay_report.py} (62%) create mode 100644 rootly_sdk/api/on_call_pay_reports/list_on_call_pay_reports.py create mode 100644 rootly_sdk/api/on_call_pay_reports/regenerate_on_call_pay_report.py create mode 100644 rootly_sdk/api/on_call_pay_reports/update_on_call_pay_report.py create mode 100644 rootly_sdk/api/on_calls/__init__.py create mode 100644 rootly_sdk/api/on_calls/list_oncalls.py delete mode 100644 rootly_sdk/api/services/create_service_catalog_field.py rename rootly_sdk/api/{causes/create_cause_catalog_field.py => services/create_service_catalog_property.py} (66%) delete mode 100644 rootly_sdk/api/services/list_service_catalog_fields.py create mode 100644 rootly_sdk/api/services/list_service_catalog_properties.py create mode 100644 rootly_sdk/api/sl_as/__init__.py rename rootly_sdk/api/{teams/create_group_catalog_field.py => sl_as/create_sla.py} (68%) rename rootly_sdk/api/{catalog_fields/delete_catalog_field.py => sl_as/delete_sla.py} (70%) create mode 100644 rootly_sdk/api/sl_as/get_sla.py create mode 100644 rootly_sdk/api/sl_as/list_sl_as.py rename rootly_sdk/api/{catalog_fields/update_catalog_field.py => sl_as/update_sla.py} (66%) rename rootly_sdk/api/{incident_types/create_incident_type_catalog_field.py => teams/create_group_catalog_property.py} (67%) delete mode 100644 rootly_sdk/api/teams/list_group_catalog_fields.py create mode 100644 rootly_sdk/api/teams/list_group_catalog_properties.py create mode 100644 rootly_sdk/models/alert_trigger_params_alert_condition_urgency.py create mode 100644 rootly_sdk/models/api_key.py create mode 100644 rootly_sdk/models/api_key_kind.py create mode 100644 rootly_sdk/models/api_key_list.py create mode 100644 rootly_sdk/models/api_key_list_data_item.py create mode 100644 rootly_sdk/models/api_key_list_data_item_type.py rename rootly_sdk/models/{team_fields_type_0_item.py => api_key_response.py} (60%) create mode 100644 rootly_sdk/models/api_key_response_data.py create mode 100644 rootly_sdk/models/api_key_response_data_type.py create mode 100644 rootly_sdk/models/api_key_with_token_response.py create mode 100644 rootly_sdk/models/api_key_with_token_response_data.py create mode 100644 rootly_sdk/models/api_key_with_token_response_data_attributes.py create mode 100644 rootly_sdk/models/api_key_with_token_response_data_type.py create mode 100644 rootly_sdk/models/catalog_checklist_template.py create mode 100644 rootly_sdk/models/catalog_checklist_template_catalog_type.py create mode 100644 rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py create mode 100644 rootly_sdk/models/catalog_checklist_template_fields_type_0_item_field_source.py create mode 100644 rootly_sdk/models/catalog_checklist_template_list.py create mode 100644 rootly_sdk/models/catalog_checklist_template_list_data_item.py create mode 100644 rootly_sdk/models/catalog_checklist_template_list_data_item_type.py create mode 100644 rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py create mode 100644 rootly_sdk/models/catalog_checklist_template_owners_type_0_item_type.py create mode 100644 rootly_sdk/models/catalog_checklist_template_response.py create mode 100644 rootly_sdk/models/catalog_checklist_template_response_data.py create mode 100644 rootly_sdk/models/catalog_checklist_template_response_data_type.py create mode 100644 rootly_sdk/models/catalog_checklist_template_scope_type.py create mode 100644 rootly_sdk/models/catalog_entity_checklist.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_auditable_type.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_type.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_attributes.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_type.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_list.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_list_data_item.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_list_data_item_type.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_response.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_response_data.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_response_data_type.py create mode 100644 rootly_sdk/models/catalog_entity_checklist_status.py rename rootly_sdk/models/{catalog_entity_fields_item.py => catalog_entity_properties_item.py} (65%) create mode 100644 rootly_sdk/models/catalog_property.py create mode 100644 rootly_sdk/models/catalog_property_catalog_type.py create mode 100644 rootly_sdk/models/catalog_property_kind.py create mode 100644 rootly_sdk/models/catalog_property_list.py create mode 100644 rootly_sdk/models/catalog_property_list_data_item.py create mode 100644 rootly_sdk/models/catalog_property_list_data_item_type.py rename rootly_sdk/models/{service_fields_type_0_item.py => catalog_property_response.py} (59%) create mode 100644 rootly_sdk/models/catalog_property_response_data.py create mode 100644 rootly_sdk/models/catalog_property_response_data_type.py rename rootly_sdk/models/{environment_fields_type_0_item.py => cause_properties_item.py} (66%) create mode 100644 rootly_sdk/models/create_github_issue_task_params_issue_type.py create mode 100644 rootly_sdk/models/create_github_issue_task_params_labels_item.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params_priority.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params_task_type.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py create mode 100644 rootly_sdk/models/create_jsmops_alert_task_params_users_item.py create mode 100644 rootly_sdk/models/create_meeting_recording_platform.py rename rootly_sdk/models/{update_catalog_entity_data_attributes_fields_item.py => environment_properties_type_0_item.py} (64%) create mode 100644 rootly_sdk/models/escalation_policy_path_after_deferral_behavior.py create mode 100644 rootly_sdk/models/escalation_policy_path_path_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_4_type_0.py => escalation_policy_path_rules_item_type_6_type_0.py} (71%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5_type_1.py => escalation_policy_path_rules_item_type_6_type_1.py} (71%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_4_type_3.py => escalation_policy_path_rules_item_type_6_type_3.py} (67%) rename rootly_sdk/models/{escalation_policy_path_rules_item_type_4_type_3_operator.py => escalation_policy_path_rules_item_type_6_type_3_operator.py} (61%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5_type_0.py => escalation_policy_path_rules_item_type_7_type_0.py} (71%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_4_type_1.py => escalation_policy_path_rules_item_type_7_type_1.py} (71%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5_type_3.py => escalation_policy_path_rules_item_type_7_type_3.py} (67%) rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5_type_3_operator.py => escalation_policy_path_rules_item_type_7_type_3_operator.py} (61%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py rename rootly_sdk/models/{new_team_data_attributes_fields_item.py => functionality_properties_type_0_item.py} (64%) delete mode 100644 rootly_sdk/models/get_catalog_field_include.py rename rootly_sdk/models/{new_environment_data_attributes_fields_item.py => incident_type_properties_item.py} (65%) create mode 100644 rootly_sdk/models/incident_zoom_meeting_global_dial_in_numbers_type_0_item.py create mode 100644 rootly_sdk/models/list_catalog_checklist_templates_include.py create mode 100644 rootly_sdk/models/list_catalog_checklist_templates_sort.py delete mode 100644 rootly_sdk/models/list_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_catalog_fields_sort.py delete mode 100644 rootly_sdk/models/list_cause_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_cause_catalog_fields_sort.py create mode 100644 rootly_sdk/models/list_cause_catalog_properties_include.py create mode 100644 rootly_sdk/models/list_cause_catalog_properties_sort.py delete mode 100644 rootly_sdk/models/list_environment_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_environment_catalog_fields_sort.py create mode 100644 rootly_sdk/models/list_environment_catalog_properties_include.py create mode 100644 rootly_sdk/models/list_environment_catalog_properties_sort.py delete mode 100644 rootly_sdk/models/list_functionality_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_functionality_catalog_fields_sort.py create mode 100644 rootly_sdk/models/list_functionality_catalog_properties_include.py create mode 100644 rootly_sdk/models/list_functionality_catalog_properties_sort.py delete mode 100644 rootly_sdk/models/list_group_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_group_catalog_fields_sort.py create mode 100644 rootly_sdk/models/list_group_catalog_properties_include.py create mode 100644 rootly_sdk/models/list_group_catalog_properties_sort.py delete mode 100644 rootly_sdk/models/list_incident_type_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_incident_type_catalog_fields_sort.py create mode 100644 rootly_sdk/models/list_incident_type_catalog_properties_include.py create mode 100644 rootly_sdk/models/list_incident_type_catalog_properties_sort.py create mode 100644 rootly_sdk/models/list_oncalls_include.py delete mode 100644 rootly_sdk/models/list_service_catalog_fields_include.py delete mode 100644 rootly_sdk/models/list_service_catalog_fields_sort.py create mode 100644 rootly_sdk/models/list_service_catalog_properties_include.py create mode 100644 rootly_sdk/models/list_service_catalog_properties_sort.py create mode 100644 rootly_sdk/models/meeting_recording.py create mode 100644 rootly_sdk/models/meeting_recording_list.py create mode 100644 rootly_sdk/models/meeting_recording_list_data_item.py create mode 100644 rootly_sdk/models/meeting_recording_list_data_item_type.py create mode 100644 rootly_sdk/models/meeting_recording_platform.py create mode 100644 rootly_sdk/models/meeting_recording_status.py create mode 100644 rootly_sdk/models/new_api_key.py create mode 100644 rootly_sdk/models/new_api_key_data.py create mode 100644 rootly_sdk/models/new_api_key_data_attributes.py create mode 100644 rootly_sdk/models/new_api_key_data_attributes_kind.py create mode 100644 rootly_sdk/models/new_api_key_data_type.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field_field_source.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_catalog_type.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field_field_source.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item_type.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_attributes_scope_type.py create mode 100644 rootly_sdk/models/new_catalog_checklist_template_data_type.py rename rootly_sdk/models/{new_catalog_entity_data_attributes_fields_item.py => new_catalog_entity_data_attributes_properties_item.py} (62%) create mode 100644 rootly_sdk/models/new_catalog_property.py create mode 100644 rootly_sdk/models/new_catalog_property_data.py create mode 100644 rootly_sdk/models/new_catalog_property_data_attributes.py create mode 100644 rootly_sdk/models/new_catalog_property_data_attributes_catalog_type.py create mode 100644 rootly_sdk/models/new_catalog_property_data_attributes_kind.py create mode 100644 rootly_sdk/models/new_catalog_property_data_type.py delete mode 100644 rootly_sdk/models/new_cause_data_attributes_fields_item.py rename rootly_sdk/models/{functionality_fields_type_0_item.py => new_cause_data_attributes_properties_item.py} (63%) rename rootly_sdk/models/{update_incident_type_data_attributes_fields_item.py => new_environment_data_attributes_properties_item.py} (62%) delete mode 100644 rootly_sdk/models/new_functionality_data_attributes_fields_item.py create mode 100644 rootly_sdk/models/new_functionality_data_attributes_properties_item.py rename rootly_sdk/models/{update_functionality_data_attributes_fields_item.py => new_incident_type_data_attributes_properties_item.py} (62%) create mode 100644 rootly_sdk/models/new_on_call_pay_report.py create mode 100644 rootly_sdk/models/new_on_call_pay_report_data.py create mode 100644 rootly_sdk/models/new_on_call_pay_report_data_attributes.py create mode 100644 rootly_sdk/models/new_on_call_pay_report_data_type.py create mode 100644 rootly_sdk/models/new_role_data_attributes_catalogs_permissions_item.py create mode 100644 rootly_sdk/models/new_role_data_attributes_communication_permissions_item.py create mode 100644 rootly_sdk/models/new_role_data_attributes_edge_connector_permissions_item.py create mode 100644 rootly_sdk/models/new_role_data_attributes_incident_communication_permissions_item.py create mode 100644 rootly_sdk/models/new_role_data_attributes_paging_permissions_item.py create mode 100644 rootly_sdk/models/new_role_data_attributes_slas_permissions_item.py create mode 100644 rootly_sdk/models/new_role_data_attributes_sub_statuses_permissions_item.py delete mode 100644 rootly_sdk/models/new_service_data_attributes_fields_item.py create mode 100644 rootly_sdk/models/new_service_data_attributes_properties_item.py create mode 100644 rootly_sdk/models/new_sla.py create mode 100644 rootly_sdk/models/new_sla_data.py create mode 100644 rootly_sdk/models/new_sla_data_attributes.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_assignment_deadline_days.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_assignment_deadline_parent_status.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_completion_deadline_days.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_completion_deadline_parent_status.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_condition_match_type.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_conditions_item.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_conditions_item_conditionable_type.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_conditions_item_property.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py create mode 100644 rootly_sdk/models/new_sla_data_attributes_notification_configurations_item_offset_type.py create mode 100644 rootly_sdk/models/new_sla_data_type.py create mode 100644 rootly_sdk/models/new_status_page_data_attributes_section_order_type_0_item.py rename rootly_sdk/models/{update_cause_data_attributes_fields_item.py => new_team_data_attributes_properties_item.py} (64%) create mode 100644 rootly_sdk/models/on_call_pay_report.py create mode 100644 rootly_sdk/models/on_call_pay_report_list.py create mode 100644 rootly_sdk/models/on_call_pay_report_list_data_item.py create mode 100644 rootly_sdk/models/on_call_pay_report_list_data_item_type.py create mode 100644 rootly_sdk/models/on_call_pay_report_pay_type.py create mode 100644 rootly_sdk/models/on_call_pay_report_response.py create mode 100644 rootly_sdk/models/on_call_pay_report_response_data.py create mode 100644 rootly_sdk/models/on_call_pay_report_response_data_type.py create mode 100644 rootly_sdk/models/on_call_pay_report_status.py create mode 100644 rootly_sdk/models/page_jsmops_on_call_responders_task_params.py create mode 100644 rootly_sdk/models/page_jsmops_on_call_responders_task_params_priority.py create mode 100644 rootly_sdk/models/page_jsmops_on_call_responders_task_params_task_type.py create mode 100644 rootly_sdk/models/page_jsmops_on_call_responders_task_params_teams_item.py create mode 100644 rootly_sdk/models/page_jsmops_on_call_responders_task_params_users_item.py create mode 100644 rootly_sdk/models/page_rootly_on_call_responders_task_params_functionality_target.py create mode 100644 rootly_sdk/models/role_catalogs_permissions_item.py create mode 100644 rootly_sdk/models/role_communication_permissions_item.py create mode 100644 rootly_sdk/models/role_edge_connector_permissions_item.py create mode 100644 rootly_sdk/models/role_incident_communication_permissions_item.py create mode 100644 rootly_sdk/models/role_paging_permissions_item.py create mode 100644 rootly_sdk/models/role_slas_permissions_item.py create mode 100644 rootly_sdk/models/role_sub_statuses_permissions_item.py create mode 100644 rootly_sdk/models/rotate_api_key.py create mode 100644 rootly_sdk/models/rotate_api_key_data.py create mode 100644 rootly_sdk/models/rotate_api_key_data_attributes.py create mode 100644 rootly_sdk/models/rotate_api_key_data_type.py rename rootly_sdk/models/{cause_fields_item.py => service_properties_type_0_item.py} (65%) create mode 100644 rootly_sdk/models/sla.py create mode 100644 rootly_sdk/models/sla_condition_match_type.py create mode 100644 rootly_sdk/models/sla_conditions_item.py create mode 100644 rootly_sdk/models/sla_conditions_item_conditionable_type.py create mode 100644 rootly_sdk/models/sla_entity_type.py create mode 100644 rootly_sdk/models/sla_list.py create mode 100644 rootly_sdk/models/sla_list_data_item.py create mode 100644 rootly_sdk/models/sla_list_data_item_type.py create mode 100644 rootly_sdk/models/sla_notification_configurations_item.py create mode 100644 rootly_sdk/models/sla_notification_configurations_item_offset_type.py create mode 100644 rootly_sdk/models/sla_response.py create mode 100644 rootly_sdk/models/sla_response_data.py create mode 100644 rootly_sdk/models/sla_response_data_type.py create mode 100644 rootly_sdk/models/status_page_cname_records_type_0.py create mode 100644 rootly_sdk/models/status_page_section_order_type_0_item.py rename rootly_sdk/models/{incident_type_fields_item.py => team_properties_type_0_item.py} (65%) create mode 100644 rootly_sdk/models/update_api_key.py create mode 100644 rootly_sdk/models/update_api_key_data.py create mode 100644 rootly_sdk/models/update_api_key_data_attributes.py create mode 100644 rootly_sdk/models/update_api_key_data_type.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field_field_source.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field_field_source.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item_type.py create mode 100644 rootly_sdk/models/update_catalog_checklist_template_data_type.py create mode 100644 rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py create mode 100644 rootly_sdk/models/update_catalog_property.py create mode 100644 rootly_sdk/models/update_catalog_property_data.py create mode 100644 rootly_sdk/models/update_catalog_property_data_attributes.py create mode 100644 rootly_sdk/models/update_catalog_property_data_attributes_catalog_type.py create mode 100644 rootly_sdk/models/update_catalog_property_data_attributes_kind.py create mode 100644 rootly_sdk/models/update_catalog_property_data_type.py rename rootly_sdk/models/{new_incident_type_data_attributes_fields_item.py => update_cause_data_attributes_properties_item.py} (63%) create mode 100644 rootly_sdk/models/update_environment_data_attributes_properties_item.py create mode 100644 rootly_sdk/models/update_functionality_data_attributes_properties_item.py create mode 100644 rootly_sdk/models/update_github_issue_task_params_issue_type.py create mode 100644 rootly_sdk/models/update_github_issue_task_params_labels_item.py rename rootly_sdk/models/{update_service_data_attributes_fields_item.py => update_github_issue_task_params_repository.py} (55%) create mode 100644 rootly_sdk/models/update_incident_type_data_attributes_properties_item.py create mode 100644 rootly_sdk/models/update_on_call_pay_report.py create mode 100644 rootly_sdk/models/update_on_call_pay_report_data.py create mode 100644 rootly_sdk/models/update_on_call_pay_report_data_attributes.py create mode 100644 rootly_sdk/models/update_on_call_pay_report_data_type.py create mode 100644 rootly_sdk/models/update_role_data_attributes_catalogs_permissions_item.py create mode 100644 rootly_sdk/models/update_role_data_attributes_communication_permissions_item.py create mode 100644 rootly_sdk/models/update_role_data_attributes_edge_connector_permissions_item.py create mode 100644 rootly_sdk/models/update_role_data_attributes_incident_communication_permissions_item.py create mode 100644 rootly_sdk/models/update_role_data_attributes_paging_permissions_item.py create mode 100644 rootly_sdk/models/update_role_data_attributes_slas_permissions_item.py create mode 100644 rootly_sdk/models/update_role_data_attributes_sub_statuses_permissions_item.py rename rootly_sdk/models/{update_environment_data_attributes_fields_item.py => update_service_data_attributes_properties_item.py} (63%) create mode 100644 rootly_sdk/models/update_sla.py create mode 100644 rootly_sdk/models/update_sla_data.py create mode 100644 rootly_sdk/models/update_sla_data_attributes.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_assignment_deadline_days.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_assignment_deadline_parent_status.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_completion_deadline_days.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_completion_deadline_parent_status.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_condition_match_type.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_conditions_item.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_conditions_item_conditionable_type.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_conditions_item_property.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py create mode 100644 rootly_sdk/models/update_sla_data_attributes_notification_configurations_item_offset_type.py create mode 100644 rootly_sdk/models/update_sla_data_type.py create mode 100644 rootly_sdk/models/update_status_page_data_attributes_section_order_type_0_item.py delete mode 100644 rootly_sdk/models/update_team_data_attributes_fields_item.py create mode 100644 rootly_sdk/models/update_team_data_attributes_properties_item.py diff --git a/CHANGELOG.md b/CHANGELOG.md index f58ba1c4..6f49c0b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.3.0] - 2026-04-21 + +### Added +- New API Keys endpoints (create, read, update, delete, list, rotate) +- New SLA endpoints (create, read, update, delete, list) +- New On-Call endpoints (list on-call users) +- New On-Call Pay Reports endpoints (create, read, update, delete, list) +- New Meeting Recordings endpoints (read, list) +- New Catalog Checklist Templates endpoints (create, read, update, delete, list) +- New Catalog Entity Checklists endpoints (read, list) +- New Catalog Properties endpoints (create, read, update, delete, list) — replaces Catalog Fields +- Catalog property endpoints for causes, environments, functionalities, incident types, services, and teams +- New incident actions: `detach_from_parent_incident`, `unmark_as_duplicate_incident` +- New workflow task type: `PageJsmopsOnCallRespondersTaskParams` — page JSM Ops on-call responders +- New workflow task type: `CreateJsmopsAlertTaskParams` — create JSM Ops alerts +- New role permission types: catalogs, communication, edge connectors, incident communication, paging, SLAs, sub-statuses +- Alert trigger params: alert condition urgency support +- Status page: CNAME records and section ordering support +- Page Rootly on-call responders: functionality target support +- GitHub issue task params: issue type and labels support +- Zoom meeting: global dial-in numbers support + +### Changed +- Regenerated client from latest OpenAPI specification +- **BREAKING**: Catalog Fields renamed to Catalog Properties across all endpoints and models +- Minimum Python version bumped to 3.10 in generated code (SDK still supports 3.9 via pyproject.toml) + +### Removed +- Catalog Fields endpoints and models (replaced by Catalog Properties) +- Some escalation policy path rule type models (consolidated in upstream spec) + +### Fixed +- Applied nullable enum fix to 1,350 model files via `tools/fix_nullable_enums.py` + +### Known Issues +- Escalation path endpoints not generated due to OpenAPI schema issues with union types in `rules_item` + ## [1.2.1] - 2025-03-02 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index b33be1e6..7b4acf9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rootly" -version = "1.2.1" +version = "1.3.0" description = "A client library for accessing Rootly API v1" authors = [] readme = "README.md" @@ -11,7 +11,7 @@ include = ["CHANGELOG.md", "rootly_sdk/py.typed"] [tool.poetry.dependencies] python = "^3.9" -httpx = ">=0.23.0,<0.29.0" +httpx = ">=0.20.0,<0.29.0" attrs = ">=22.2.0" python-dateutil = "^2.8.0" diff --git a/rootly_sdk/api/alert_events/create_alert_event.py b/rootly_sdk/api/alert_events/create_alert_event.py index f5d287dc..1ba1d753 100644 --- a/rootly_sdk/api/alert_events/create_alert_event.py +++ b/rootly_sdk/api/alert_events/create_alert_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -8,22 +9,25 @@ from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList from ...models.new_alert_event import NewAlertEvent -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( alert_id: str, *, - body: NewAlertEvent, + body: NewAlertEvent | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/alerts/{alert_id}/events", + "url": "/v1/alerts/{alert_id}/events".format( + alert_id=quote(str(alert_id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -65,7 +69,7 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient, - body: NewAlertEvent, + body: NewAlertEvent | Unset = UNSET, ) -> Response[AlertEventResponse | ErrorsList]: """Create alert event @@ -73,14 +77,14 @@ def sync_detailed( Args: alert_id (str): - body (NewAlertEvent): + body (NewAlertEvent | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertEventResponse, ErrorsList]] + Response[AlertEventResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( alert_id: str, *, client: AuthenticatedClient, - body: NewAlertEvent, + body: NewAlertEvent | Unset = UNSET, ) -> AlertEventResponse | ErrorsList | None: """Create alert event @@ -107,14 +111,14 @@ def sync( Args: alert_id (str): - body (NewAlertEvent): + body (NewAlertEvent | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertEventResponse, ErrorsList] + AlertEventResponse | ErrorsList """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient, - body: NewAlertEvent, + body: NewAlertEvent | Unset = UNSET, ) -> Response[AlertEventResponse | ErrorsList]: """Create alert event @@ -136,14 +140,14 @@ async def asyncio_detailed( Args: alert_id (str): - body (NewAlertEvent): + body (NewAlertEvent | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertEventResponse, ErrorsList]] + Response[AlertEventResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -160,7 +164,7 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient, - body: NewAlertEvent, + body: NewAlertEvent | Unset = UNSET, ) -> AlertEventResponse | ErrorsList | None: """Create alert event @@ -168,14 +172,14 @@ async def asyncio( Args: alert_id (str): - body (NewAlertEvent): + body (NewAlertEvent | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertEventResponse, ErrorsList] + AlertEventResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_events/delete_alert_event.py b/rootly_sdk/api/alert_events/delete_alert_event.py index cb3dd9b6..fa37ebdf 100644 --- a/rootly_sdk/api/alert_events/delete_alert_event.py +++ b/rootly_sdk/api/alert_events/delete_alert_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_events/{id}", + "url": "/v1/alert_events/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -63,7 +67,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -95,7 +99,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -122,7 +126,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -152,7 +156,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_events/get_alert_event.py b/rootly_sdk/api/alert_events/get_alert_event.py index 97436121..0c7b7f99 100644 --- a/rootly_sdk/api/alert_events/get_alert_event.py +++ b/rootly_sdk/api/alert_events/get_alert_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_events/{id}", + "url": "/v1/alert_events/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertEventResponse, ErrorsList]] + Response[AlertEventResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertEventResponse, ErrorsList] + AlertEventResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertEventResponse, ErrorsList]] + Response[AlertEventResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertEventResponse, ErrorsList] + AlertEventResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_events/list_alert_events.py b/rootly_sdk/api/alert_events/list_alert_events.py index 9f2e292e..cdbb09b0 100644 --- a/rootly_sdk/api/alert_events/list_alert_events.py +++ b/rootly_sdk/api/alert_events/list_alert_events.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,12 +13,13 @@ def _get_kwargs( alert_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filteraction: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filteraction: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -34,7 +36,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alerts/{alert_id}/events", + "url": "/v1/alerts/{alert_id}/events".format( + alert_id=quote(str(alert_id), safe=""), + ), "params": params, } @@ -66,11 +70,11 @@ def sync_detailed( alert_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filteraction: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filteraction: str | Unset = UNSET, ) -> Response[AlertEventList]: """List alert events @@ -78,11 +82,11 @@ def sync_detailed( Args: alert_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filteraction (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filteraction (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -112,11 +116,11 @@ def sync( alert_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filteraction: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filteraction: str | Unset = UNSET, ) -> AlertEventList | None: """List alert events @@ -124,11 +128,11 @@ def sync( Args: alert_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filteraction (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filteraction (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,11 +157,11 @@ async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filteraction: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filteraction: str | Unset = UNSET, ) -> Response[AlertEventList]: """List alert events @@ -165,11 +169,11 @@ async def asyncio_detailed( Args: alert_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filteraction (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filteraction (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -197,11 +201,11 @@ async def asyncio( alert_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filteraction: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filteraction: str | Unset = UNSET, ) -> AlertEventList | None: """List alert events @@ -209,11 +213,11 @@ async def asyncio( Args: alert_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filteraction (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filteraction (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alert_events/update_alert_event.py b/rootly_sdk/api/alert_events/update_alert_event.py index f4649948..ef172e7d 100644 --- a/rootly_sdk/api/alert_events/update_alert_event.py +++ b/rootly_sdk/api/alert_events/update_alert_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -8,22 +9,25 @@ from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList from ...models.update_alert_event import UpdateAlertEvent -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( id: str, *, - body: UpdateAlertEvent, + body: UpdateAlertEvent | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/alert_events/{id}", + "url": "/v1/alert_events/{id}".format( + id=quote(str(id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -65,7 +69,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateAlertEvent, + body: UpdateAlertEvent | Unset = UNSET, ) -> Response[AlertEventResponse | ErrorsList]: """Update alert event @@ -74,15 +78,15 @@ def sync_detailed( Args: id (str): - body (UpdateAlertEvent): Update an alert event. Note: Only alert events with kind='note' - can be updated. You cannot change the kind field. + body (UpdateAlertEvent | Unset): Update an alert event. Note: Only alert events with + kind='note' can be updated. You cannot change the kind field. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertEventResponse, ErrorsList]] + Response[AlertEventResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -101,7 +105,7 @@ def sync( id: str, *, client: AuthenticatedClient, - body: UpdateAlertEvent, + body: UpdateAlertEvent | Unset = UNSET, ) -> AlertEventResponse | ErrorsList | None: """Update alert event @@ -110,15 +114,15 @@ def sync( Args: id (str): - body (UpdateAlertEvent): Update an alert event. Note: Only alert events with kind='note' - can be updated. You cannot change the kind field. + body (UpdateAlertEvent | Unset): Update an alert event. Note: Only alert events with + kind='note' can be updated. You cannot change the kind field. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertEventResponse, ErrorsList] + AlertEventResponse | ErrorsList """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateAlertEvent, + body: UpdateAlertEvent | Unset = UNSET, ) -> Response[AlertEventResponse | ErrorsList]: """Update alert event @@ -141,15 +145,15 @@ async def asyncio_detailed( Args: id (str): - body (UpdateAlertEvent): Update an alert event. Note: Only alert events with kind='note' - can be updated. You cannot change the kind field. + body (UpdateAlertEvent | Unset): Update an alert event. Note: Only alert events with + kind='note' can be updated. You cannot change the kind field. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertEventResponse, ErrorsList]] + Response[AlertEventResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -166,7 +170,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - body: UpdateAlertEvent, + body: UpdateAlertEvent | Unset = UNSET, ) -> AlertEventResponse | ErrorsList | None: """Update alert event @@ -175,15 +179,15 @@ async def asyncio( Args: id (str): - body (UpdateAlertEvent): Update an alert event. Note: Only alert events with kind='note' - can be updated. You cannot change the kind field. + body (UpdateAlertEvent | Unset): Update an alert event. Note: Only alert events with + kind='note' can be updated. You cannot change the kind field. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertEventResponse, ErrorsList] + AlertEventResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_fields/create_alert_field.py b/rootly_sdk/api/alert_fields/create_alert_field.py index 768e2a75..7d0b7150 100644 --- a/rootly_sdk/api/alert_fields/create_alert_field.py +++ b/rootly_sdk/api/alert_fields/create_alert_field.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_fields/delete_alert_field.py b/rootly_sdk/api/alert_fields/delete_alert_field.py index 7adfde1f..0b0984e0 100644 --- a/rootly_sdk/api/alert_fields/delete_alert_field.py +++ b/rootly_sdk/api/alert_fields/delete_alert_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_fields/{id}", + "url": "/v1/alert_fields/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -58,7 +62,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertFieldResponse | ErrorsList]: @@ -67,14 +71,14 @@ def sync_detailed( Delete a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -89,7 +93,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertFieldResponse | ErrorsList | None: @@ -98,14 +102,14 @@ def sync( Delete a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return sync_detailed( @@ -115,7 +119,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertFieldResponse | ErrorsList]: @@ -124,14 +128,14 @@ async def asyncio_detailed( Delete a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -144,7 +148,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertFieldResponse | ErrorsList | None: @@ -153,14 +157,14 @@ async def asyncio( Delete a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_fields/get_alert_field.py b/rootly_sdk/api/alert_fields/get_alert_field.py index 5d58ac0c..10e2a4c9 100644 --- a/rootly_sdk/api/alert_fields/get_alert_field.py +++ b/rootly_sdk/api/alert_fields/get_alert_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_fields/{id}", + "url": "/v1/alert_fields/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertFieldResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertFieldResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertFieldResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertFieldResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_fields/list_alert_fields.py b/rootly_sdk/api/alert_fields/list_alert_fields.py index aed7750d..73d8a746 100644 --- a/rootly_sdk/api/alert_fields/list_alert_fields.py +++ b/rootly_sdk/api/alert_fields/list_alert_fields.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -82,34 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertFieldList]: """List alert fields List alert fields Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,34 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertFieldList | None: """List alert fields List alert fields Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,34 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertFieldList]: """List alert fields List alert fields Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,34 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertFieldList | None: """List alert fields List alert fields Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alert_fields/update_alert_field.py b/rootly_sdk/api/alert_fields/update_alert_field.py index 256920be..a65a1e6f 100644 --- a/rootly_sdk/api/alert_fields/update_alert_field.py +++ b/rootly_sdk/api/alert_fields/update_alert_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateAlertField, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/alert_fields/{id}", + "url": "/v1/alert_fields/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertField): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, @@ -107,7 +110,7 @@ def sync( Update a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertField): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertField): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertFieldResponse, ErrorsList]] + Response[AlertFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, @@ -168,7 +171,7 @@ async def asyncio( Update a specific alert field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertField): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertFieldResponse, ErrorsList] + AlertFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_groups/create_alert_group.py b/rootly_sdk/api/alert_groups/create_alert_group.py index 0a1096b0..fc100c79 100644 --- a/rootly_sdk/api/alert_groups/create_alert_group.py +++ b/rootly_sdk/api/alert_groups/create_alert_group.py @@ -84,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -117,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return sync_detailed( @@ -145,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -176,7 +176,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_groups/delete_alert_group.py b/rootly_sdk/api/alert_groups/delete_alert_group.py index 71a11c17..e23900a9 100644 --- a/rootly_sdk/api/alert_groups/delete_alert_group.py +++ b/rootly_sdk/api/alert_groups/delete_alert_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_groups/{id}", + "url": "/v1/alert_groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertGroupResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertGroupResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertGroupResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertGroupResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_groups/get_alert_group.py b/rootly_sdk/api/alert_groups/get_alert_group.py index 01d08e47..67e96c43 100644 --- a/rootly_sdk/api/alert_groups/get_alert_group.py +++ b/rootly_sdk/api/alert_groups/get_alert_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_groups/{id}", + "url": "/v1/alert_groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertGroupResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertGroupResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertGroupResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertGroupResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific alert group by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_groups/list_alert_groups.py b/rootly_sdk/api/alert_groups/list_alert_groups.py index 0d959f79..0b409151 100644 --- a/rootly_sdk/api/alert_groups/list_alert_groups.py +++ b/rootly_sdk/api/alert_groups/list_alert_groups.py @@ -11,8 +11,9 @@ def _get_kwargs( *, - include: Unset | str = UNSET, + include: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -52,14 +53,14 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, + include: str | Unset = UNSET, ) -> Response[AlertGroupList]: """List alert groups List alert groups Args: - include (Union[Unset, str]): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -83,14 +84,14 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, + include: str | Unset = UNSET, ) -> AlertGroupList | None: """List alert groups List alert groups Args: - include (Union[Unset, str]): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,14 +110,14 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, + include: str | Unset = UNSET, ) -> Response[AlertGroupList]: """List alert groups List alert groups Args: - include (Union[Unset, str]): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -138,14 +139,14 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, + include: str | Unset = UNSET, ) -> AlertGroupList | None: """List alert groups List alert groups Args: - include (Union[Unset, str]): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alert_groups/update_alert_group.py b/rootly_sdk/api/alert_groups/update_alert_group.py index f61520b5..34654d17 100644 --- a/rootly_sdk/api/alert_groups/update_alert_group.py +++ b/rootly_sdk/api/alert_groups/update_alert_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateAlertGroup, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/alert_groups/{id}", + "url": "/v1/alert_groups/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, @@ -75,7 +78,7 @@ def sync_detailed( `group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields. Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertGroup): Raises: @@ -83,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +102,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, @@ -111,7 +114,7 @@ def sync( `group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields. Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertGroup): Raises: @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return sync_detailed( @@ -130,7 +133,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, @@ -142,7 +145,7 @@ async def asyncio_detailed( `group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields. Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertGroup): Raises: @@ -150,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertGroupResponse, ErrorsList]] + Response[AlertGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -164,7 +167,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, @@ -176,7 +179,7 @@ async def asyncio( `group_by_alert_title`, `group_by_alert_urgency`, and `attributes` fields. Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertGroup): Raises: @@ -184,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertGroupResponse, ErrorsList] + AlertGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routes/create_alert_route.py b/rootly_sdk/api/alert_routes/create_alert_route.py index 71352eb9..26d162de 100644 --- a/rootly_sdk/api/alert_routes/create_alert_route.py +++ b/rootly_sdk/api/alert_routes/create_alert_route.py @@ -96,7 +96,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -141,7 +141,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return sync_detailed( @@ -181,7 +181,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -224,7 +224,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routes/delete_alert_route.py b/rootly_sdk/api/alert_routes/delete_alert_route.py index 58ef7c73..013c2d58 100644 --- a/rootly_sdk/api/alert_routes/delete_alert_route.py +++ b/rootly_sdk/api/alert_routes/delete_alert_route.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_routes/{id}", + "url": "/v1/alert_routes/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -80,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DeleteAlertRouteResponse200, ErrorsList]] + Response[DeleteAlertRouteResponse200 | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DeleteAlertRouteResponse200, ErrorsList] + DeleteAlertRouteResponse200 | ErrorsList """ return sync_detailed( @@ -141,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DeleteAlertRouteResponse200, ErrorsList]] + Response[DeleteAlertRouteResponse200 | ErrorsList] """ kwargs = _get_kwargs( @@ -172,7 +176,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DeleteAlertRouteResponse200, ErrorsList] + DeleteAlertRouteResponse200 | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routes/get_alert_route.py b/rootly_sdk/api/alert_routes/get_alert_route.py index 0cc6a688..72f3fec8 100644 --- a/rootly_sdk/api/alert_routes/get_alert_route.py +++ b/rootly_sdk/api/alert_routes/get_alert_route.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_routes/{id}", + "url": "/v1/alert_routes/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -82,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -122,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return sync_detailed( @@ -157,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -195,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routes/list_alert_routes.py b/rootly_sdk/api/alert_routes/list_alert_routes.py index df8ee49c..5bc4f2e3 100644 --- a/rootly_sdk/api/alert_routes/list_alert_routes.py +++ b/rootly_sdk/api/alert_routes/list_alert_routes.py @@ -12,12 +12,13 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -74,11 +75,11 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertRouteList | ErrorsList]: """List alert routes @@ -87,18 +88,18 @@ def sync_detailed( please contact Rootly customer support.** Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteList, ErrorsList]] + Response[AlertRouteList | ErrorsList] """ kwargs = _get_kwargs( @@ -119,11 +120,11 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertRouteList | ErrorsList | None: """List alert routes @@ -132,18 +133,18 @@ def sync( please contact Rootly customer support.** Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteList, ErrorsList] + AlertRouteList | ErrorsList """ return sync_detailed( @@ -159,11 +160,11 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertRouteList | ErrorsList]: """List alert routes @@ -172,18 +173,18 @@ async def asyncio_detailed( please contact Rootly customer support.** Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteList, ErrorsList]] + Response[AlertRouteList | ErrorsList] """ kwargs = _get_kwargs( @@ -202,11 +203,11 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertRouteList | ErrorsList | None: """List alert routes @@ -215,18 +216,18 @@ async def asyncio( please contact Rootly customer support.** Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteList, ErrorsList] + AlertRouteList | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routes/patch_alert_route.py b/rootly_sdk/api/alert_routes/patch_alert_route.py index 019b4703..a8c0c4a9 100644 --- a/rootly_sdk/api/alert_routes/patch_alert_route.py +++ b/rootly_sdk/api/alert_routes/patch_alert_route.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/alert_routes/{id}", + "url": "/v1/alert_routes/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -91,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -126,7 +129,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return sync_detailed( @@ -156,7 +159,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -189,7 +192,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routes/update_alert_route.py b/rootly_sdk/api/alert_routes/update_alert_route.py index 61f7adaa..5a47cf35 100644 --- a/rootly_sdk/api/alert_routes/update_alert_route.py +++ b/rootly_sdk/api/alert_routes/update_alert_route.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/alert_routes/{id}", + "url": "/v1/alert_routes/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -99,7 +102,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -147,7 +150,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return sync_detailed( @@ -190,7 +193,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRouteResponse, ErrorsList]] + Response[AlertRouteResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -236,7 +239,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRouteResponse, ErrorsList] + AlertRouteResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routing_rules/create_alert_routing_rule.py b/rootly_sdk/api/alert_routing_rules/create_alert_routing_rule.py index 1d62f2ab..55f243d7 100644 --- a/rootly_sdk/api/alert_routing_rules/create_alert_routing_rule.py +++ b/rootly_sdk/api/alert_routing_rules/create_alert_routing_rule.py @@ -84,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -117,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return sync_detailed( @@ -145,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -176,7 +176,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routing_rules/delete_alert_routing_rule.py b/rootly_sdk/api/alert_routing_rules/delete_alert_routing_rule.py index fbb953a2..9a0263e6 100644 --- a/rootly_sdk/api/alert_routing_rules/delete_alert_routing_rule.py +++ b/rootly_sdk/api/alert_routing_rules/delete_alert_routing_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_routing_rules/{id}", + "url": "/v1/alert_routing_rules/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertRoutingRuleResponse | ErrorsList]: @@ -64,14 +68,14 @@ def sync_detailed( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -86,7 +90,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertRoutingRuleResponse | ErrorsList | None: @@ -97,14 +101,14 @@ def sync( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return sync_detailed( @@ -114,7 +118,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertRoutingRuleResponse | ErrorsList]: @@ -125,14 +129,14 @@ async def asyncio_detailed( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -145,7 +149,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertRoutingRuleResponse | ErrorsList | None: @@ -156,14 +160,14 @@ async def asyncio( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routing_rules/get_alert_routing_rule.py b/rootly_sdk/api/alert_routing_rules/get_alert_routing_rule.py index bf683612..5946c97a 100644 --- a/rootly_sdk/api/alert_routing_rules/get_alert_routing_rule.py +++ b/rootly_sdk/api/alert_routing_rules/get_alert_routing_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_routing_rules/{id}", + "url": "/v1/alert_routing_rules/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertRoutingRuleResponse | ErrorsList]: @@ -64,14 +68,14 @@ def sync_detailed( an advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -86,7 +90,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertRoutingRuleResponse | ErrorsList | None: @@ -97,14 +101,14 @@ def sync( an advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return sync_detailed( @@ -114,7 +118,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[AlertRoutingRuleResponse | ErrorsList]: @@ -125,14 +129,14 @@ async def asyncio_detailed( an advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -145,7 +149,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> AlertRoutingRuleResponse | ErrorsList | None: @@ -156,14 +160,14 @@ async def asyncio( an advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py b/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py index 6a5a6319..fa385d56 100644 --- a/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py +++ b/rootly_sdk/api/alert_routing_rules/list_alert_routing_rules.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -81,16 +82,16 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertRoutingRuleList]: """List alert routing rules @@ -99,16 +100,16 @@ def sync_detailed( please contact Rootly customer support.** Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,16 +142,16 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertRoutingRuleList | None: """List alert routing rules @@ -159,16 +160,16 @@ def sync( please contact Rootly customer support.** Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -196,16 +197,16 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertRoutingRuleList]: """List alert routing rules @@ -214,16 +215,16 @@ async def asyncio_detailed( please contact Rootly customer support.** Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -254,16 +255,16 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertRoutingRuleList | None: """List alert routing rules @@ -272,16 +273,16 @@ async def asyncio( please contact Rootly customer support.** Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alert_routing_rules/update_alert_routing_rule.py b/rootly_sdk/api/alert_routing_rules/update_alert_routing_rule.py index 2963b725..6bc038cd 100644 --- a/rootly_sdk/api/alert_routing_rules/update_alert_routing_rule.py +++ b/rootly_sdk/api/alert_routing_rules/update_alert_routing_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateAlertRoutingRule, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/alert_routing_rules/{id}", + "url": "/v1/alert_routing_rules/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, @@ -75,7 +78,7 @@ def sync_detailed( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertRoutingRule): Raises: @@ -83,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +102,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, @@ -111,7 +114,7 @@ def sync( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertRoutingRule): Raises: @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return sync_detailed( @@ -130,7 +133,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, @@ -142,7 +145,7 @@ async def asyncio_detailed( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertRoutingRule): Raises: @@ -150,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertRoutingRuleResponse, ErrorsList]] + Response[AlertRoutingRuleResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -164,7 +167,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, @@ -176,7 +179,7 @@ async def asyncio( advanced user, please contact Rootly customer support.** Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateAlertRoutingRule): Raises: @@ -184,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertRoutingRuleResponse, ErrorsList] + AlertRoutingRuleResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_sources/create_alerts_source.py b/rootly_sdk/api/alert_sources/create_alerts_source.py index 2799fd4c..893eb998 100644 --- a/rootly_sdk/api/alert_sources/create_alerts_source.py +++ b/rootly_sdk/api/alert_sources/create_alerts_source.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_sources/delete_alerts_source.py b/rootly_sdk/api/alert_sources/delete_alerts_source.py index 92d06bad..24e0748d 100644 --- a/rootly_sdk/api/alert_sources/delete_alerts_source.py +++ b/rootly_sdk/api/alert_sources/delete_alerts_source.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_sources/{id}", + "url": "/v1/alert_sources/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_sources/get_alerts_source.py b/rootly_sdk/api/alert_sources/get_alerts_source.py index dcca8a3e..e3617a5a 100644 --- a/rootly_sdk/api/alert_sources/get_alerts_source.py +++ b/rootly_sdk/api/alert_sources/get_alerts_source.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_sources/{id}", + "url": "/v1/alert_sources/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_sources/list_alerts_sources.py b/rootly_sdk/api/alert_sources/list_alerts_sources.py index e253b38e..c055971e 100644 --- a/rootly_sdk/api/alert_sources/list_alerts_sources.py +++ b/rootly_sdk/api/alert_sources/list_alerts_sources.py @@ -11,15 +11,16 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatuses: Unset | str = UNSET, - filtersource_types: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatuses: str | Unset = UNSET, + filtersource_types: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -73,28 +74,28 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatuses: Unset | str = UNSET, - filtersource_types: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatuses: str | Unset = UNSET, + filtersource_types: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertsSourceList]: """List alert sources List alert sources Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatuses (Union[Unset, str]): - filtersource_types (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatuses (str | Unset): + filtersource_types (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -125,28 +126,28 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatuses: Unset | str = UNSET, - filtersource_types: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatuses: str | Unset = UNSET, + filtersource_types: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertsSourceList | None: """List alert sources List alert sources Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatuses (Union[Unset, str]): - filtersource_types (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatuses (str | Unset): + filtersource_types (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,28 +173,28 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatuses: Unset | str = UNSET, - filtersource_types: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatuses: str | Unset = UNSET, + filtersource_types: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertsSourceList]: """List alert sources List alert sources Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatuses (Union[Unset, str]): - filtersource_types (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatuses (str | Unset): + filtersource_types (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -222,28 +223,28 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatuses: Unset | str = UNSET, - filtersource_types: Unset | str = UNSET, - filtername: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatuses: str | Unset = UNSET, + filtersource_types: str | Unset = UNSET, + filtername: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertsSourceList | None: """List alert sources List alert sources Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatuses (Union[Unset, str]): - filtersource_types (Union[Unset, str]): - filtername (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatuses (str | Unset): + filtersource_types (str | Unset): + filtername (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alert_sources/update_alerts_source.py b/rootly_sdk/api/alert_sources/update_alerts_source.py index 0a73d9e4..32c1f348 100644 --- a/rootly_sdk/api/alert_sources/update_alerts_source.py +++ b/rootly_sdk/api/alert_sources/update_alerts_source.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/alert_sources/{id}", + "url": "/v1/alert_sources/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertsSourceResponse, ErrorsList]] + Response[AlertsSourceResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertsSourceResponse, ErrorsList] + AlertsSourceResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py index 875f1fa0..d44f0d38 100644 --- a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py index e9f92b31..46ed88c4 100644 --- a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/alert_urgencies/{id}", + "url": "/v1/alert_urgencies/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py index a1b9d84b..947f8dd9 100644 --- a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alert_urgencies/{id}", + "url": "/v1/alert_urgencies/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py index aed293f4..e29c4393 100644 --- a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py +++ b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -79,32 +80,32 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertUrgencyList]: """List alert urgencies List alert urgencies Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,32 +138,32 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertUrgencyList | None: """List alert urgencies List alert urgencies Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,32 +191,32 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AlertUrgencyList]: """List alert urgencies List alert urgencies Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,32 +247,32 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AlertUrgencyList | None: """List alert urgencies List alert urgencies Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py index fb82767a..2bef0a08 100644 --- a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/alert_urgencies/{id}", + "url": "/v1/alert_urgencies/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertUrgencyResponse, ErrorsList]] + Response[AlertUrgencyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertUrgencyResponse, ErrorsList] + AlertUrgencyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alerts/acknowledge_alert.py b/rootly_sdk/api/alerts/acknowledge_alert.py index 7bc7b1dd..be8c6611 100644 --- a/rootly_sdk/api/alerts/acknowledge_alert.py +++ b/rootly_sdk/api/alerts/acknowledge_alert.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/alerts/{id}/acknowledge", + "url": "/v1/alerts/{id}/acknowledge".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alerts/attach_alert.py b/rootly_sdk/api/alerts/attach_alert.py index 2c0ce528..3f0911e6 100644 --- a/rootly_sdk/api/alerts/attach_alert.py +++ b/rootly_sdk/api/alerts/attach_alert.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/alerts", + "url": "/v1/incidents/{incident_id}/alerts".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -78,7 +81,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertList, ErrorsList]] + Response[AlertList | ErrorsList] """ kwargs = _get_kwargs( @@ -112,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertList, ErrorsList] + AlertList | ErrorsList """ return sync_detailed( @@ -141,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertList, ErrorsList]] + Response[AlertList | ErrorsList] """ kwargs = _get_kwargs( @@ -173,7 +176,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertList, ErrorsList] + AlertList | ErrorsList """ return ( diff --git a/rootly_sdk/api/alerts/create_alert.py b/rootly_sdk/api/alerts/create_alert.py index 9578c1ca..e7ef6e59 100644 --- a/rootly_sdk/api/alerts/create_alert.py +++ b/rootly_sdk/api/alerts/create_alert.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alerts/get_alert.py b/rootly_sdk/api/alerts/get_alert.py index c34c24e4..20a1c7fd 100644 --- a/rootly_sdk/api/alerts/get_alert.py +++ b/rootly_sdk/api/alerts/get_alert.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,11 +15,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetAlertInclude = UNSET, + include: GetAlertInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/alerts/{id}", + "url": "/v1/alerts/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -69,7 +73,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetAlertInclude = UNSET, + include: GetAlertInclude | Unset = UNSET, ) -> Response[AlertResponse | ErrorsList]: """Retrieves an alert @@ -77,14 +81,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetAlertInclude]): + include (GetAlertInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -103,7 +107,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetAlertInclude = UNSET, + include: GetAlertInclude | Unset = UNSET, ) -> AlertResponse | ErrorsList | None: """Retrieves an alert @@ -111,14 +115,14 @@ def sync( Args: id (str): - include (Union[Unset, GetAlertInclude]): + include (GetAlertInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetAlertInclude = UNSET, + include: GetAlertInclude | Unset = UNSET, ) -> Response[AlertResponse | ErrorsList]: """Retrieves an alert @@ -140,14 +144,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetAlertInclude]): + include (GetAlertInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetAlertInclude = UNSET, + include: GetAlertInclude | Unset = UNSET, ) -> AlertResponse | ErrorsList | None: """Retrieves an alert @@ -172,14 +176,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetAlertInclude]): + include (GetAlertInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alerts/list_alerts.py b/rootly_sdk/api/alerts/list_alerts.py index 28b4a837..02d855d6 100644 --- a/rootly_sdk/api/alerts/list_alerts.py +++ b/rootly_sdk/api/alerts/list_alerts.py @@ -12,31 +12,33 @@ def _get_kwargs( *, - include: Unset | ListAlertsInclude = UNSET, - filterstatus: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filtergroups: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListAlertsInclude | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filtergroups: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pageafter: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -78,6 +80,8 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["page[after]"] = pageafter + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -117,54 +121,56 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListAlertsInclude = UNSET, - filterstatus: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filtergroups: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListAlertsInclude | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filtergroups: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pageafter: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[AlertList]: """List alerts List alerts Args: - include (Union[Unset, ListAlertsInclude]): - filterstatus (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filtergroups (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListAlertsInclude | Unset): + filterstatus (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filtergroups (str | Unset): + filterlabels (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pageafter (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -194,6 +200,7 @@ def sync_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, ) @@ -208,54 +215,56 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListAlertsInclude = UNSET, - filterstatus: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filtergroups: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListAlertsInclude | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filtergroups: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pageafter: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> AlertList | None: """List alerts List alerts Args: - include (Union[Unset, ListAlertsInclude]): - filterstatus (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filtergroups (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListAlertsInclude | Unset): + filterstatus (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filtergroups (str | Unset): + filterlabels (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pageafter (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -286,6 +295,7 @@ def sync( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, ).parsed @@ -294,54 +304,56 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListAlertsInclude = UNSET, - filterstatus: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filtergroups: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListAlertsInclude | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filtergroups: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pageafter: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[AlertList]: """List alerts List alerts Args: - include (Union[Unset, ListAlertsInclude]): - filterstatus (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filtergroups (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListAlertsInclude | Unset): + filterstatus (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filtergroups (str | Unset): + filterlabels (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pageafter (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -371,6 +383,7 @@ async def asyncio_detailed( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, ) @@ -383,54 +396,56 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListAlertsInclude = UNSET, - filterstatus: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filtergroups: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListAlertsInclude | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filtergroups: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pageafter: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> AlertList | None: """List alerts List alerts Args: - include (Union[Unset, ListAlertsInclude]): - filterstatus (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filtergroups (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListAlertsInclude | Unset): + filterstatus (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filtergroups (str | Unset): + filterlabels (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pageafter (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -462,6 +477,7 @@ async def asyncio( filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, filtercreated_atlte=filtercreated_atlte, + pageafter=pageafter, pagenumber=pagenumber, pagesize=pagesize, ) diff --git a/rootly_sdk/api/alerts/list_incident_alerts.py b/rootly_sdk/api/alerts/list_incident_alerts.py index 0932d1c3..4358b186 100644 --- a/rootly_sdk/api/alerts/list_incident_alerts.py +++ b/rootly_sdk/api/alerts/list_incident_alerts.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,11 +14,12 @@ def _get_kwargs( incident_id: str, *, - include: Unset | ListIncidentAlertsInclude = UNSET, + include: ListIncidentAlertsInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -27,7 +29,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/alerts", + "url": "/v1/incidents/{incident_id}/alerts".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -59,7 +63,7 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentAlertsInclude = UNSET, + include: ListIncidentAlertsInclude | Unset = UNSET, ) -> Response[AlertList]: """List Incident alerts @@ -67,7 +71,7 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, ListIncidentAlertsInclude]): + include (ListIncidentAlertsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -93,7 +97,7 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentAlertsInclude = UNSET, + include: ListIncidentAlertsInclude | Unset = UNSET, ) -> AlertList | None: """List Incident alerts @@ -101,7 +105,7 @@ def sync( Args: incident_id (str): - include (Union[Unset, ListIncidentAlertsInclude]): + include (ListIncidentAlertsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +126,7 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentAlertsInclude = UNSET, + include: ListIncidentAlertsInclude | Unset = UNSET, ) -> Response[AlertList]: """List Incident alerts @@ -130,7 +134,7 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, ListIncidentAlertsInclude]): + include (ListIncidentAlertsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +158,7 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentAlertsInclude = UNSET, + include: ListIncidentAlertsInclude | Unset = UNSET, ) -> AlertList | None: """List Incident alerts @@ -162,7 +166,7 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, ListIncidentAlertsInclude]): + include (ListIncidentAlertsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/alerts/resolve_alert.py b/rootly_sdk/api/alerts/resolve_alert.py index 0dfeab41..66ec0165 100644 --- a/rootly_sdk/api/alerts/resolve_alert.py +++ b/rootly_sdk/api/alerts/resolve_alert.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -8,22 +9,25 @@ from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.resolve_alert import ResolveAlert -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( id: str, *, - body: ResolveAlert, + body: ResolveAlert | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/alerts/{id}/resolve", + "url": "/v1/alerts/{id}/resolve".format( + id=quote(str(id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -65,7 +69,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - body: ResolveAlert, + body: ResolveAlert | Unset = UNSET, ) -> Response[AlertResponse | ErrorsList]: """Resolves an alert @@ -73,14 +77,14 @@ def sync_detailed( Args: id (str): - body (ResolveAlert): + body (ResolveAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( id: str, *, client: AuthenticatedClient, - body: ResolveAlert, + body: ResolveAlert | Unset = UNSET, ) -> AlertResponse | ErrorsList | None: """Resolves an alert @@ -107,14 +111,14 @@ def sync( Args: id (str): - body (ResolveAlert): + body (ResolveAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - body: ResolveAlert, + body: ResolveAlert | Unset = UNSET, ) -> Response[AlertResponse | ErrorsList]: """Resolves an alert @@ -136,14 +140,14 @@ async def asyncio_detailed( Args: id (str): - body (ResolveAlert): + body (ResolveAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -160,7 +164,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - body: ResolveAlert, + body: ResolveAlert | Unset = UNSET, ) -> AlertResponse | ErrorsList | None: """Resolves an alert @@ -168,14 +172,14 @@ async def asyncio( Args: id (str): - body (ResolveAlert): + body (ResolveAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/alerts/update_alert.py b/rootly_sdk/api/alerts/update_alert.py index 169e0410..5a60b818 100644 --- a/rootly_sdk/api/alerts/update_alert.py +++ b/rootly_sdk/api/alerts/update_alert.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -8,22 +9,25 @@ from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.update_alert import UpdateAlert -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( id: str, *, - body: UpdateAlert, + body: UpdateAlert | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/alerts/{id}", + "url": "/v1/alerts/{id}".format( + id=quote(str(id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -65,7 +69,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateAlert, + body: UpdateAlert | Unset = UNSET, ) -> Response[AlertResponse | ErrorsList]: """Update alert @@ -73,14 +77,14 @@ def sync_detailed( Args: id (str): - body (UpdateAlert): + body (UpdateAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( id: str, *, client: AuthenticatedClient, - body: UpdateAlert, + body: UpdateAlert | Unset = UNSET, ) -> AlertResponse | ErrorsList | None: """Update alert @@ -107,14 +111,14 @@ def sync( Args: id (str): - body (UpdateAlert): + body (UpdateAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateAlert, + body: UpdateAlert | Unset = UNSET, ) -> Response[AlertResponse | ErrorsList]: """Update alert @@ -136,14 +140,14 @@ async def asyncio_detailed( Args: id (str): - body (UpdateAlert): + body (UpdateAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AlertResponse, ErrorsList]] + Response[AlertResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -160,7 +164,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - body: UpdateAlert, + body: UpdateAlert | Unset = UNSET, ) -> AlertResponse | ErrorsList | None: """Update alert @@ -168,14 +172,14 @@ async def asyncio( Args: id (str): - body (UpdateAlert): + body (UpdateAlert | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AlertResponse, ErrorsList] + AlertResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_fields/__init__.py b/rootly_sdk/api/api_keys/__init__.py similarity index 100% rename from rootly_sdk/api/catalog_fields/__init__.py rename to rootly_sdk/api/api_keys/__init__.py diff --git a/rootly_sdk/api/api_keys/create_api_key.py b/rootly_sdk/api/api_keys/create_api_key.py new file mode 100644 index 00000000..6573821d --- /dev/null +++ b/rootly_sdk/api/api_keys/create_api_key.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_key_with_token_response import ApiKeyWithTokenResponse +from ...models.errors_list import ErrorsList +from ...models.new_api_key import NewApiKey +from ...types import Response + + +def _get_kwargs( + *, + body: NewApiKey, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/api_keys", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKeyWithTokenResponse | ErrorsList | None: + if response.status_code == 201: + response_201 = ApiKeyWithTokenResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: NewApiKey, +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: + """Creates an API key + + Creates a new API key and returns it with the plaintext token. **The token is only returned once** — + store it securely, as it cannot be retrieved again. + + **Kinds and required fields:** + - `personal` — created for the authenticated user. No additional fields required. + - `team` — scoped to a team (group). Requires `group_id`. A service account is automatically created + with permissions derived from group membership. + - `organization` — organization-wide access. Requires owner or admin role. Optionally set `role_id` + and `on_call_role_id` to control the service account's permissions. + + **Expiration:** All keys require an `expires_at` date set in the future (maximum 5 years). Names + must be unique within their kind and scope. + + Args: + body (NewApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyWithTokenResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: NewApiKey, +) -> ApiKeyWithTokenResponse | ErrorsList | None: + """Creates an API key + + Creates a new API key and returns it with the plaintext token. **The token is only returned once** — + store it securely, as it cannot be retrieved again. + + **Kinds and required fields:** + - `personal` — created for the authenticated user. No additional fields required. + - `team` — scoped to a team (group). Requires `group_id`. A service account is automatically created + with permissions derived from group membership. + - `organization` — organization-wide access. Requires owner or admin role. Optionally set `role_id` + and `on_call_role_id` to control the service account's permissions. + + **Expiration:** All keys require an `expires_at` date set in the future (maximum 5 years). Names + must be unique within their kind and scope. + + Args: + body (NewApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyWithTokenResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: NewApiKey, +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: + """Creates an API key + + Creates a new API key and returns it with the plaintext token. **The token is only returned once** — + store it securely, as it cannot be retrieved again. + + **Kinds and required fields:** + - `personal` — created for the authenticated user. No additional fields required. + - `team` — scoped to a team (group). Requires `group_id`. A service account is automatically created + with permissions derived from group membership. + - `organization` — organization-wide access. Requires owner or admin role. Optionally set `role_id` + and `on_call_role_id` to control the service account's permissions. + + **Expiration:** All keys require an `expires_at` date set in the future (maximum 5 years). Names + must be unique within their kind and scope. + + Args: + body (NewApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyWithTokenResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: NewApiKey, +) -> ApiKeyWithTokenResponse | ErrorsList | None: + """Creates an API key + + Creates a new API key and returns it with the plaintext token. **The token is only returned once** — + store it securely, as it cannot be retrieved again. + + **Kinds and required fields:** + - `personal` — created for the authenticated user. No additional fields required. + - `team` — scoped to a team (group). Requires `group_id`. A service account is automatically created + with permissions derived from group membership. + - `organization` — organization-wide access. Requires owner or admin role. Optionally set `role_id` + and `on_call_role_id` to control the service account's permissions. + + **Expiration:** All keys require an `expires_at` date set in the future (maximum 5 years). Names + must be unique within their kind and scope. + + Args: + body (NewApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyWithTokenResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/api_keys/delete_api_key.py b/rootly_sdk/api/api_keys/delete_api_key.py new file mode 100644 index 00000000..948015a0 --- /dev/null +++ b/rootly_sdk/api/api_keys/delete_api_key.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_key_response import ApiKeyResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/api_keys/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKeyResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = ApiKeyResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient, +) -> Response[ApiKeyResponse | ErrorsList]: + """Revoke an API key + + Revoke an API key. The key is immediately invalidated and can no longer be used for authentication. + This action cannot be undone. + + For `team` and `organization` keys, the associated service account is also deleted. Any active + sessions using this key will fail on the next request. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient, +) -> ApiKeyResponse | ErrorsList | None: + """Revoke an API key + + Revoke an API key. The key is immediately invalidated and can no longer be used for authentication. + This action cannot be undone. + + For `team` and `organization` keys, the associated service account is also deleted. Any active + sessions using this key will fail on the next request. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient, +) -> Response[ApiKeyResponse | ErrorsList]: + """Revoke an API key + + Revoke an API key. The key is immediately invalidated and can no longer be used for authentication. + This action cannot be undone. + + For `team` and `organization` keys, the associated service account is also deleted. Any active + sessions using this key will fail on the next request. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient, +) -> ApiKeyResponse | ErrorsList | None: + """Revoke an API key + + Revoke an API key. The key is immediately invalidated and can no longer be used for authentication. + This action cannot be undone. + + For `team` and `organization` keys, the associated service account is also deleted. Any active + sessions using this key will fail on the next request. + + Args: + id (UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/api_keys/get_api_key.py b/rootly_sdk/api/api_keys/get_api_key.py new file mode 100644 index 00000000..6ba239a8 --- /dev/null +++ b/rootly_sdk/api/api_keys/get_api_key.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_key_response import ApiKeyResponse +from ...models.errors_list import ErrorsList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + id: UUID, + *, + include: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["include"] = include + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/api_keys/{id}".format( + id=quote(str(id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKeyResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = ApiKeyResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, +) -> Response[ApiKeyResponse | ErrorsList]: + """Retrieves an API key + + Retrieves a specific API key by its UUID. Returns key metadata including name, kind, expiration, + last usage timestamp, and the grace period status — the secret token is never included. + + Args: + id (UUID): + include (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + include=include, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, +) -> ApiKeyResponse | ErrorsList | None: + """Retrieves an API key + + Retrieves a specific API key by its UUID. Returns key metadata including name, kind, expiration, + last usage timestamp, and the grace period status — the secret token is never included. + + Args: + id (UUID): + include (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + include=include, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, +) -> Response[ApiKeyResponse | ErrorsList]: + """Retrieves an API key + + Retrieves a specific API key by its UUID. Returns key metadata including name, kind, expiration, + last usage timestamp, and the grace period status — the secret token is never included. + + Args: + id (UUID): + include (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + include=include, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, +) -> ApiKeyResponse | ErrorsList | None: + """Retrieves an API key + + Retrieves a specific API key by its UUID. Returns key metadata including name, kind, expiration, + last usage timestamp, and the grace period status — the secret token is never included. + + Args: + id (UUID): + include (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/api_keys/list_api_keys.py b/rootly_sdk/api/api_keys/list_api_keys.py new file mode 100644 index 00000000..6f057d91 --- /dev/null +++ b/rootly_sdk/api/api_keys/list_api_keys.py @@ -0,0 +1,583 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_key_list import ApiKeyList +from ...models.errors_list import ErrorsList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, + filterrole_id: str | Unset = UNSET, + filteractive: bool | Unset = UNSET, + filterexpired: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterexpires_atgt: str | Unset = UNSET, + filterexpires_atgte: str | Unset = UNSET, + filterexpires_atlt: str | Unset = UNSET, + filterexpires_atlte: str | Unset = UNSET, + filterlast_used_atgt: str | Unset = UNSET, + filterlast_used_atgte: str | Unset = UNSET, + filterlast_used_atlt: str | Unset = UNSET, + filterlast_used_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["include"] = include + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[kind]"] = filterkind + + params["filter[search]"] = filtersearch + + params["filter[name]"] = filtername + + params["filter[user_id]"] = filteruser_id + + params["filter[group_ids]"] = filtergroup_ids + + params["filter[role_id]"] = filterrole_id + + params["filter[active]"] = filteractive + + params["filter[expired]"] = filterexpired + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params["filter[expires_at][gt]"] = filterexpires_atgt + + params["filter[expires_at][gte]"] = filterexpires_atgte + + params["filter[expires_at][lt]"] = filterexpires_atlt + + params["filter[expires_at][lte]"] = filterexpires_atlte + + params["filter[last_used_at][gt]"] = filterlast_used_atgt + + params["filter[last_used_at][gte]"] = filterlast_used_atgte + + params["filter[last_used_at][lt]"] = filterlast_used_atlt + + params["filter[last_used_at][lte]"] = filterlast_used_atlte + + params["sort"] = sort + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/api_keys", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKeyList | ErrorsList | None: + if response.status_code == 200: + response_200 = ApiKeyList.from_dict(response.json()) + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyList | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, + filterrole_id: str | Unset = UNSET, + filteractive: bool | Unset = UNSET, + filterexpired: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterexpires_atgt: str | Unset = UNSET, + filterexpires_atgte: str | Unset = UNSET, + filterexpires_atlt: str | Unset = UNSET, + filterexpires_atlte: str | Unset = UNSET, + filterlast_used_atgt: str | Unset = UNSET, + filterlast_used_atgte: str | Unset = UNSET, + filterlast_used_atlt: str | Unset = UNSET, + filterlast_used_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> Response[ApiKeyList | ErrorsList]: + """List API keys + + List API keys for the current organization. Returns key metadata including name, kind, expiration, + and last usage — the secret token value is never included in the response. + + **API key kinds:** + - `personal` — tied to a specific user, inherits that user's permissions. + - `team` — scoped to one or more teams (groups), creates a service account with permissions derived + from group membership. + - `organization` — organization-wide, creates a service account with a configurable role and on-call + role. + + **Automated rotation workflow:** Use `filter[expires_at][lt]` to find keys approaching expiration, + then call the rotate endpoint to issue a new token before the old one expires. Combine with + `filter[active]=true` to exclude already-expired keys. + + **Sorting:** Use the `sort` parameter with a field name (e.g., `sort=expires_at`). Prefix with `-` + for descending order (e.g., `sort=-created_at`). Allowed fields: `name`, `kind`, `created_at`, + `updated_at`, `expires_at`, `last_used_at`. + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filteruser_id (str | Unset): + filtergroup_ids (str | Unset): + filterrole_id (str | Unset): + filteractive (bool | Unset): + filterexpired (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterexpires_atgt (str | Unset): + filterexpires_atgte (str | Unset): + filterexpires_atlt (str | Unset): + filterexpires_atlte (str | Unset): + filterlast_used_atgt (str | Unset): + filterlast_used_atgte (str | Unset): + filterlast_used_atlt (str | Unset): + filterlast_used_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyList | ErrorsList] + """ + + kwargs = _get_kwargs( + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtersearch=filtersearch, + filtername=filtername, + filteruser_id=filteruser_id, + filtergroup_ids=filtergroup_ids, + filterrole_id=filterrole_id, + filteractive=filteractive, + filterexpired=filterexpired, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterexpires_atgt=filterexpires_atgt, + filterexpires_atgte=filterexpires_atgte, + filterexpires_atlt=filterexpires_atlt, + filterexpires_atlte=filterexpires_atlte, + filterlast_used_atgt=filterlast_used_atgt, + filterlast_used_atgte=filterlast_used_atgte, + filterlast_used_atlt=filterlast_used_atlt, + filterlast_used_atlte=filterlast_used_atlte, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, + filterrole_id: str | Unset = UNSET, + filteractive: bool | Unset = UNSET, + filterexpired: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterexpires_atgt: str | Unset = UNSET, + filterexpires_atgte: str | Unset = UNSET, + filterexpires_atlt: str | Unset = UNSET, + filterexpires_atlte: str | Unset = UNSET, + filterlast_used_atgt: str | Unset = UNSET, + filterlast_used_atgte: str | Unset = UNSET, + filterlast_used_atlt: str | Unset = UNSET, + filterlast_used_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> ApiKeyList | ErrorsList | None: + """List API keys + + List API keys for the current organization. Returns key metadata including name, kind, expiration, + and last usage — the secret token value is never included in the response. + + **API key kinds:** + - `personal` — tied to a specific user, inherits that user's permissions. + - `team` — scoped to one or more teams (groups), creates a service account with permissions derived + from group membership. + - `organization` — organization-wide, creates a service account with a configurable role and on-call + role. + + **Automated rotation workflow:** Use `filter[expires_at][lt]` to find keys approaching expiration, + then call the rotate endpoint to issue a new token before the old one expires. Combine with + `filter[active]=true` to exclude already-expired keys. + + **Sorting:** Use the `sort` parameter with a field name (e.g., `sort=expires_at`). Prefix with `-` + for descending order (e.g., `sort=-created_at`). Allowed fields: `name`, `kind`, `created_at`, + `updated_at`, `expires_at`, `last_used_at`. + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filteruser_id (str | Unset): + filtergroup_ids (str | Unset): + filterrole_id (str | Unset): + filteractive (bool | Unset): + filterexpired (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterexpires_atgt (str | Unset): + filterexpires_atgte (str | Unset): + filterexpires_atlt (str | Unset): + filterexpires_atlte (str | Unset): + filterlast_used_atgt (str | Unset): + filterlast_used_atgte (str | Unset): + filterlast_used_atlt (str | Unset): + filterlast_used_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyList | ErrorsList + """ + + return sync_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtersearch=filtersearch, + filtername=filtername, + filteruser_id=filteruser_id, + filtergroup_ids=filtergroup_ids, + filterrole_id=filterrole_id, + filteractive=filteractive, + filterexpired=filterexpired, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterexpires_atgt=filterexpires_atgt, + filterexpires_atgte=filterexpires_atgte, + filterexpires_atlt=filterexpires_atlt, + filterexpires_atlte=filterexpires_atlte, + filterlast_used_atgt=filterlast_used_atgt, + filterlast_used_atgte=filterlast_used_atgte, + filterlast_used_atlt=filterlast_used_atlt, + filterlast_used_atlte=filterlast_used_atlte, + sort=sort, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, + filterrole_id: str | Unset = UNSET, + filteractive: bool | Unset = UNSET, + filterexpired: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterexpires_atgt: str | Unset = UNSET, + filterexpires_atgte: str | Unset = UNSET, + filterexpires_atlt: str | Unset = UNSET, + filterexpires_atlte: str | Unset = UNSET, + filterlast_used_atgt: str | Unset = UNSET, + filterlast_used_atgte: str | Unset = UNSET, + filterlast_used_atlt: str | Unset = UNSET, + filterlast_used_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> Response[ApiKeyList | ErrorsList]: + """List API keys + + List API keys for the current organization. Returns key metadata including name, kind, expiration, + and last usage — the secret token value is never included in the response. + + **API key kinds:** + - `personal` — tied to a specific user, inherits that user's permissions. + - `team` — scoped to one or more teams (groups), creates a service account with permissions derived + from group membership. + - `organization` — organization-wide, creates a service account with a configurable role and on-call + role. + + **Automated rotation workflow:** Use `filter[expires_at][lt]` to find keys approaching expiration, + then call the rotate endpoint to issue a new token before the old one expires. Combine with + `filter[active]=true` to exclude already-expired keys. + + **Sorting:** Use the `sort` parameter with a field name (e.g., `sort=expires_at`). Prefix with `-` + for descending order (e.g., `sort=-created_at`). Allowed fields: `name`, `kind`, `created_at`, + `updated_at`, `expires_at`, `last_used_at`. + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filteruser_id (str | Unset): + filtergroup_ids (str | Unset): + filterrole_id (str | Unset): + filteractive (bool | Unset): + filterexpired (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterexpires_atgt (str | Unset): + filterexpires_atgte (str | Unset): + filterexpires_atlt (str | Unset): + filterexpires_atlte (str | Unset): + filterlast_used_atgt (str | Unset): + filterlast_used_atgte (str | Unset): + filterlast_used_atlt (str | Unset): + filterlast_used_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyList | ErrorsList] + """ + + kwargs = _get_kwargs( + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtersearch=filtersearch, + filtername=filtername, + filteruser_id=filteruser_id, + filtergroup_ids=filtergroup_ids, + filterrole_id=filterrole_id, + filteractive=filteractive, + filterexpired=filterexpired, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterexpires_atgt=filterexpires_atgt, + filterexpires_atgte=filterexpires_atgte, + filterexpires_atlt=filterexpires_atlt, + filterexpires_atlte=filterexpires_atlte, + filterlast_used_atgt=filterlast_used_atgt, + filterlast_used_atgte=filterlast_used_atgte, + filterlast_used_atlt=filterlast_used_atlt, + filterlast_used_atlte=filterlast_used_atlte, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, + filterrole_id: str | Unset = UNSET, + filteractive: bool | Unset = UNSET, + filterexpired: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterexpires_atgt: str | Unset = UNSET, + filterexpires_atgte: str | Unset = UNSET, + filterexpires_atlt: str | Unset = UNSET, + filterexpires_atlte: str | Unset = UNSET, + filterlast_used_atgt: str | Unset = UNSET, + filterlast_used_atgte: str | Unset = UNSET, + filterlast_used_atlt: str | Unset = UNSET, + filterlast_used_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> ApiKeyList | ErrorsList | None: + """List API keys + + List API keys for the current organization. Returns key metadata including name, kind, expiration, + and last usage — the secret token value is never included in the response. + + **API key kinds:** + - `personal` — tied to a specific user, inherits that user's permissions. + - `team` — scoped to one or more teams (groups), creates a service account with permissions derived + from group membership. + - `organization` — organization-wide, creates a service account with a configurable role and on-call + role. + + **Automated rotation workflow:** Use `filter[expires_at][lt]` to find keys approaching expiration, + then call the rotate endpoint to issue a new token before the old one expires. Combine with + `filter[active]=true` to exclude already-expired keys. + + **Sorting:** Use the `sort` parameter with a field name (e.g., `sort=expires_at`). Prefix with `-` + for descending order (e.g., `sort=-created_at`). Allowed fields: `name`, `kind`, `created_at`, + `updated_at`, `expires_at`, `last_used_at`. + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filteruser_id (str | Unset): + filtergroup_ids (str | Unset): + filterrole_id (str | Unset): + filteractive (bool | Unset): + filterexpired (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterexpires_atgt (str | Unset): + filterexpires_atgte (str | Unset): + filterexpires_atlt (str | Unset): + filterexpires_atlte (str | Unset): + filterlast_used_atgt (str | Unset): + filterlast_used_atgte (str | Unset): + filterlast_used_atlt (str | Unset): + filterlast_used_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyList | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtersearch=filtersearch, + filtername=filtername, + filteruser_id=filteruser_id, + filtergroup_ids=filtergroup_ids, + filterrole_id=filterrole_id, + filteractive=filteractive, + filterexpired=filterexpired, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterexpires_atgt=filterexpires_atgt, + filterexpires_atgte=filterexpires_atgte, + filterexpires_atlt=filterexpires_atlt, + filterexpires_atlte=filterexpires_atlte, + filterlast_used_atgt=filterlast_used_atgt, + filterlast_used_atgte=filterlast_used_atgte, + filterlast_used_atlt=filterlast_used_atlt, + filterlast_used_atlte=filterlast_used_atlte, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/api_keys/rotate_api_key.py b/rootly_sdk/api/api_keys/rotate_api_key.py new file mode 100644 index 00000000..9bdb2773 --- /dev/null +++ b/rootly_sdk/api/api_keys/rotate_api_key.py @@ -0,0 +1,267 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_key_with_token_response import ApiKeyWithTokenResponse +from ...models.errors_list import ErrorsList +from ...models.rotate_api_key import RotateApiKey +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + id: str, + *, + body: RotateApiKey | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/api_keys/{id}/rotate".format( + id=quote(str(id), safe=""), + ), + } + + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKeyWithTokenResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = ApiKeyWithTokenResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: RotateApiKey | Unset = UNSET, +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: + """Rotate an API key + + Rotate an API key's token. Issues a new secret token and returns it — **the new token is only shown + once**, so store it securely. + + **Self-only:** You can only rotate the API key that was used to authenticate this request. + Attempting to rotate a different key returns `403 Forbidden`. + + **Grace period:** When enabled for your organization, the previous token remains valid after + rotation, giving you time to deploy the new token without downtime. Pass `grace_period_minutes` + (integer, 0–1440, default 30) to control how long the old token stays valid. Set to 0 to immediately + invalidate the old token. The `grace_period_ends_at` field in the response confirms the exact time + the old token will stop working. + + **Expiration:** Optionally provide a new `expires_at` date (ISO 8601, up to 5 years). Defaults to 90 + days from now if omitted. Dates in the past are rejected. + + **Typical rotation workflow:** + 1. Call this endpoint to get a new token (optionally with a custom `grace_period_minutes`). + 2. Deploy the new token to your systems. + 3. The old token continues working for `grace_period_minutes` (if grace period is enabled). + 4. After the grace period, the old token is automatically invalidated. + + Args: + id (str): + body (RotateApiKey | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyWithTokenResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: RotateApiKey | Unset = UNSET, +) -> ApiKeyWithTokenResponse | ErrorsList | None: + """Rotate an API key + + Rotate an API key's token. Issues a new secret token and returns it — **the new token is only shown + once**, so store it securely. + + **Self-only:** You can only rotate the API key that was used to authenticate this request. + Attempting to rotate a different key returns `403 Forbidden`. + + **Grace period:** When enabled for your organization, the previous token remains valid after + rotation, giving you time to deploy the new token without downtime. Pass `grace_period_minutes` + (integer, 0–1440, default 30) to control how long the old token stays valid. Set to 0 to immediately + invalidate the old token. The `grace_period_ends_at` field in the response confirms the exact time + the old token will stop working. + + **Expiration:** Optionally provide a new `expires_at` date (ISO 8601, up to 5 years). Defaults to 90 + days from now if omitted. Dates in the past are rejected. + + **Typical rotation workflow:** + 1. Call this endpoint to get a new token (optionally with a custom `grace_period_minutes`). + 2. Deploy the new token to your systems. + 3. The old token continues working for `grace_period_minutes` (if grace period is enabled). + 4. After the grace period, the old token is automatically invalidated. + + Args: + id (str): + body (RotateApiKey | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyWithTokenResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: RotateApiKey | Unset = UNSET, +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: + """Rotate an API key + + Rotate an API key's token. Issues a new secret token and returns it — **the new token is only shown + once**, so store it securely. + + **Self-only:** You can only rotate the API key that was used to authenticate this request. + Attempting to rotate a different key returns `403 Forbidden`. + + **Grace period:** When enabled for your organization, the previous token remains valid after + rotation, giving you time to deploy the new token without downtime. Pass `grace_period_minutes` + (integer, 0–1440, default 30) to control how long the old token stays valid. Set to 0 to immediately + invalidate the old token. The `grace_period_ends_at` field in the response confirms the exact time + the old token will stop working. + + **Expiration:** Optionally provide a new `expires_at` date (ISO 8601, up to 5 years). Defaults to 90 + days from now if omitted. Dates in the past are rejected. + + **Typical rotation workflow:** + 1. Call this endpoint to get a new token (optionally with a custom `grace_period_minutes`). + 2. Deploy the new token to your systems. + 3. The old token continues working for `grace_period_minutes` (if grace period is enabled). + 4. After the grace period, the old token is automatically invalidated. + + Args: + id (str): + body (RotateApiKey | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyWithTokenResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: RotateApiKey | Unset = UNSET, +) -> ApiKeyWithTokenResponse | ErrorsList | None: + """Rotate an API key + + Rotate an API key's token. Issues a new secret token and returns it — **the new token is only shown + once**, so store it securely. + + **Self-only:** You can only rotate the API key that was used to authenticate this request. + Attempting to rotate a different key returns `403 Forbidden`. + + **Grace period:** When enabled for your organization, the previous token remains valid after + rotation, giving you time to deploy the new token without downtime. Pass `grace_period_minutes` + (integer, 0–1440, default 30) to control how long the old token stays valid. Set to 0 to immediately + invalidate the old token. The `grace_period_ends_at` field in the response confirms the exact time + the old token will stop working. + + **Expiration:** Optionally provide a new `expires_at` date (ISO 8601, up to 5 years). Defaults to 90 + days from now if omitted. Dates in the past are rejected. + + **Typical rotation workflow:** + 1. Call this endpoint to get a new token (optionally with a custom `grace_period_minutes`). + 2. Deploy the new token to your systems. + 3. The old token continues working for `grace_period_minutes` (if grace period is enabled). + 4. After the grace period, the old token is automatically invalidated. + + Args: + id (str): + body (RotateApiKey | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyWithTokenResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/api_keys/update_api_key.py b/rootly_sdk/api/api_keys/update_api_key.py new file mode 100644 index 00000000..94cebad5 --- /dev/null +++ b/rootly_sdk/api/api_keys/update_api_key.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_key_response import ApiKeyResponse +from ...models.errors_list import ErrorsList +from ...models.update_api_key import UpdateApiKey +from ...types import Response + + +def _get_kwargs( + id: UUID, + *, + body: UpdateApiKey, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/api_keys/{id}".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ApiKeyResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = ApiKeyResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient, + body: UpdateApiKey, +) -> Response[ApiKeyResponse | ErrorsList]: + """Update an API key + + Update an API key's mutable attributes: `name`, `description`, and `expires_at`. + + The key's `kind`, `role_id`, `on_call_role_id`, and token cannot be changed after creation. To issue + a new token, use the rotate endpoint. To change the role or kind, revoke the key and create a new + one. + + The new `expires_at` must be in the future and within 5 years. + + Args: + id (UUID): + body (UpdateApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient, + body: UpdateApiKey, +) -> ApiKeyResponse | ErrorsList | None: + """Update an API key + + Update an API key's mutable attributes: `name`, `description`, and `expires_at`. + + The key's `kind`, `role_id`, `on_call_role_id`, and token cannot be changed after creation. To issue + a new token, use the rotate endpoint. To change the role or kind, revoke the key and create a new + one. + + The new `expires_at` must be in the future and within 5 years. + + Args: + id (UUID): + body (UpdateApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient, + body: UpdateApiKey, +) -> Response[ApiKeyResponse | ErrorsList]: + """Update an API key + + Update an API key's mutable attributes: `name`, `description`, and `expires_at`. + + The key's `kind`, `role_id`, `on_call_role_id`, and token cannot be changed after creation. To issue + a new token, use the rotate endpoint. To change the role or kind, revoke the key and create a new + one. + + The new `expires_at` must be in the future and within 5 years. + + Args: + id (UUID): + body (UpdateApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiKeyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient, + body: UpdateApiKey, +) -> ApiKeyResponse | ErrorsList | None: + """Update an API key + + Update an API key's mutable attributes: `name`, `description`, and `expires_at`. + + The key's `kind`, `role_id`, `on_call_role_id`, and token cannot be changed after creation. To issue + a new token, use the rotate endpoint. To change the role or kind, revoke the key and create a new + one. + + The new `expires_at` must be in the future and within 5 years. + + Args: + id (UUID): + body (UpdateApiKey): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiKeyResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/audits/list_audits.py b/rootly_sdk/api/audits/list_audits.py index 55223a69..d4d6bab5 100644 --- a/rootly_sdk/api/audits/list_audits.py +++ b/rootly_sdk/api/audits/list_audits.py @@ -11,19 +11,20 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filteruser_id: Unset | str = UNSET, - filterapi_key_id: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filteritem_type: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filterapi_key_id: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filteritem_type: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -85,36 +86,36 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filteruser_id: Unset | str = UNSET, - filterapi_key_id: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filteritem_type: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filterapi_key_id: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filteritem_type: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AuditsList]: """List audits List audits Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filteruser_id (Union[Unset, str]): - filterapi_key_id (Union[Unset, str]): - filtersource (Union[Unset, str]): - filteritem_type (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filteruser_id (str | Unset): + filterapi_key_id (str | Unset): + filtersource (str | Unset): + filteritem_type (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -149,36 +150,36 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filteruser_id: Unset | str = UNSET, - filterapi_key_id: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filteritem_type: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filterapi_key_id: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filteritem_type: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AuditsList | None: """List audits List audits Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filteruser_id (Union[Unset, str]): - filterapi_key_id (Union[Unset, str]): - filtersource (Union[Unset, str]): - filteritem_type (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filteruser_id (str | Unset): + filterapi_key_id (str | Unset): + filtersource (str | Unset): + filteritem_type (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,36 +209,36 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filteruser_id: Unset | str = UNSET, - filterapi_key_id: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filteritem_type: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filterapi_key_id: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filteritem_type: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AuditsList]: """List audits List audits Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filteruser_id (Union[Unset, str]): - filterapi_key_id (Union[Unset, str]): - filtersource (Union[Unset, str]): - filteritem_type (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filteruser_id (str | Unset): + filterapi_key_id (str | Unset): + filtersource (str | Unset): + filteritem_type (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,36 +271,36 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filteruser_id: Unset | str = UNSET, - filterapi_key_id: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filteritem_type: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filteruser_id: str | Unset = UNSET, + filterapi_key_id: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filteritem_type: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AuditsList | None: """List audits List audits Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filteruser_id (Union[Unset, str]): - filterapi_key_id (Union[Unset, str]): - filtersource (Union[Unset, str]): - filteritem_type (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filteruser_id (str | Unset): + filterapi_key_id (str | Unset): + filtersource (str | Unset): + filteritem_type (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/authorizations/create_authorization.py b/rootly_sdk/api/authorizations/create_authorization.py index 42583829..2d0bfee5 100644 --- a/rootly_sdk/api/authorizations/create_authorization.py +++ b/rootly_sdk/api/authorizations/create_authorization.py @@ -77,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -108,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return sync_detailed( @@ -134,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -163,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/authorizations/delete_authorization.py b/rootly_sdk/api/authorizations/delete_authorization.py index bfe0dd26..9fed121b 100644 --- a/rootly_sdk/api/authorizations/delete_authorization.py +++ b/rootly_sdk/api/authorizations/delete_authorization.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/authorizations/{id}", + "url": "/v1/authorizations/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/authorizations/get_authorization.py b/rootly_sdk/api/authorizations/get_authorization.py index f715f915..c58b0704 100644 --- a/rootly_sdk/api/authorizations/get_authorization.py +++ b/rootly_sdk/api/authorizations/get_authorization.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/authorizations/{id}", + "url": "/v1/authorizations/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/authorizations/list_authorizations.py b/rootly_sdk/api/authorizations/list_authorizations.py index a5da47f3..46d7343d 100644 --- a/rootly_sdk/api/authorizations/list_authorizations.py +++ b/rootly_sdk/api/authorizations/list_authorizations.py @@ -11,19 +11,20 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterauthorizable_id: Unset | str = UNSET, - filterauthorizable_type: Unset | str = UNSET, - filtergrantee_id: Unset | str = UNSET, - filtergrantee_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterauthorizable_id: str | Unset = UNSET, + filterauthorizable_type: str | Unset = UNSET, + filtergrantee_id: str | Unset = UNSET, + filtergrantee_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -85,36 +86,36 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterauthorizable_id: Unset | str = UNSET, - filterauthorizable_type: Unset | str = UNSET, - filtergrantee_id: Unset | str = UNSET, - filtergrantee_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterauthorizable_id: str | Unset = UNSET, + filterauthorizable_type: str | Unset = UNSET, + filtergrantee_id: str | Unset = UNSET, + filtergrantee_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AuthorizationList]: """List authorizations List authorizations Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterauthorizable_id (Union[Unset, str]): - filterauthorizable_type (Union[Unset, str]): - filtergrantee_id (Union[Unset, str]): - filtergrantee_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterauthorizable_id (str | Unset): + filterauthorizable_type (str | Unset): + filtergrantee_id (str | Unset): + filtergrantee_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -149,36 +150,36 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterauthorizable_id: Unset | str = UNSET, - filterauthorizable_type: Unset | str = UNSET, - filtergrantee_id: Unset | str = UNSET, - filtergrantee_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterauthorizable_id: str | Unset = UNSET, + filterauthorizable_type: str | Unset = UNSET, + filtergrantee_id: str | Unset = UNSET, + filtergrantee_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AuthorizationList | None: """List authorizations List authorizations Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterauthorizable_id (Union[Unset, str]): - filterauthorizable_type (Union[Unset, str]): - filtergrantee_id (Union[Unset, str]): - filtergrantee_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterauthorizable_id (str | Unset): + filterauthorizable_type (str | Unset): + filtergrantee_id (str | Unset): + filtergrantee_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,36 +209,36 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterauthorizable_id: Unset | str = UNSET, - filterauthorizable_type: Unset | str = UNSET, - filtergrantee_id: Unset | str = UNSET, - filtergrantee_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterauthorizable_id: str | Unset = UNSET, + filterauthorizable_type: str | Unset = UNSET, + filtergrantee_id: str | Unset = UNSET, + filtergrantee_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[AuthorizationList]: """List authorizations List authorizations Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterauthorizable_id (Union[Unset, str]): - filterauthorizable_type (Union[Unset, str]): - filtergrantee_id (Union[Unset, str]): - filtergrantee_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterauthorizable_id (str | Unset): + filterauthorizable_type (str | Unset): + filtergrantee_id (str | Unset): + filtergrantee_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,36 +271,36 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterauthorizable_id: Unset | str = UNSET, - filterauthorizable_type: Unset | str = UNSET, - filtergrantee_id: Unset | str = UNSET, - filtergrantee_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterauthorizable_id: str | Unset = UNSET, + filterauthorizable_type: str | Unset = UNSET, + filtergrantee_id: str | Unset = UNSET, + filtergrantee_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> AuthorizationList | None: """List authorizations List authorizations Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterauthorizable_id (Union[Unset, str]): - filterauthorizable_type (Union[Unset, str]): - filtergrantee_id (Union[Unset, str]): - filtergrantee_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterauthorizable_id (str | Unset): + filterauthorizable_type (str | Unset): + filtergrantee_id (str | Unset): + filtergrantee_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/authorizations/update_authorization.py b/rootly_sdk/api/authorizations/update_authorization.py index 67dfa1c8..958e25ad 100644 --- a/rootly_sdk/api/authorizations/update_authorization.py +++ b/rootly_sdk/api/authorizations/update_authorization.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/authorizations/{id}", + "url": "/v1/authorizations/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AuthorizationResponse, ErrorsList]] + Response[AuthorizationResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AuthorizationResponse, ErrorsList] + AuthorizationResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_checklist_templates/__init__.py b/rootly_sdk/api/catalog_checklist_templates/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/catalog_checklist_templates/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py new file mode 100644 index 00000000..a0c9a8cf --- /dev/null +++ b/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse +from ...models.errors_list import ErrorsList +from ...models.new_catalog_checklist_template import NewCatalogChecklistTemplate +from ...types import Response + + +def _get_kwargs( + *, + body: NewCatalogChecklistTemplate, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalog_checklist_templates", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + if response.status_code == 201: + response_201 = CatalogChecklistTemplateResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: NewCatalogChecklistTemplate, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Creates a catalog checklist template + + Creates a new catalog checklist template + + Args: + body (NewCatalogChecklistTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: NewCatalogChecklistTemplate, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Creates a catalog checklist template + + Creates a new catalog checklist template + + Args: + body (NewCatalogChecklistTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: NewCatalogChecklistTemplate, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Creates a catalog checklist template + + Creates a new catalog checklist template + + Args: + body (NewCatalogChecklistTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: NewCatalogChecklistTemplate, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Creates a catalog checklist template + + Creates a new catalog checklist template + + Args: + body (NewCatalogChecklistTemplate): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py new file mode 100644 index 00000000..e96022f3 --- /dev/null +++ b/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + id: str | UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/catalog_checklist_templates/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = CatalogChecklistTemplateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Delete a catalog checklist template + + Delete a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Delete a catalog checklist template + + Delete a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Delete a catalog checklist template + + Delete a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Delete a catalog checklist template + + Delete a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py new file mode 100644 index 00000000..baaac4c8 --- /dev/null +++ b/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + id: str | UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/catalog_checklist_templates/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = CatalogChecklistTemplateResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Retrieves a catalog checklist template + + Retrieves a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Retrieves a catalog checklist template + + Retrieves a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Retrieves a catalog checklist template + + Retrieves a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Retrieves a catalog checklist template + + Retrieves a specific catalog checklist template by id + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py b/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py new file mode 100644 index 00000000..4b04ef57 --- /dev/null +++ b/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py @@ -0,0 +1,347 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_checklist_template_list import CatalogChecklistTemplateList +from ...models.list_catalog_checklist_templates_include import ( + ListCatalogChecklistTemplatesInclude, +) +from ...models.list_catalog_checklist_templates_sort import ( + ListCatalogChecklistTemplatesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListCatalogChecklistTemplatesInclude | Unset = UNSET, + sort: ListCatalogChecklistTemplatesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercatalog_type: str | Unset = UNSET, + filterscope_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[name]"] = filtername + + params["filter[slug]"] = filterslug + + params["filter[catalog_type]"] = filtercatalog_type + + params["filter[scope_type]"] = filterscope_type + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/catalog_checklist_templates", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogChecklistTemplateList | None: + if response.status_code == 200: + response_200 = CatalogChecklistTemplateList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListCatalogChecklistTemplatesInclude | Unset = UNSET, + sort: ListCatalogChecklistTemplatesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercatalog_type: str | Unset = UNSET, + filterscope_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogChecklistTemplateList]: + """List catalog checklist templates + + List catalog checklist templates + + Args: + include (ListCatalogChecklistTemplatesInclude | Unset): + sort (ListCatalogChecklistTemplatesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercatalog_type (str | Unset): + filterscope_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtername=filtername, + filterslug=filterslug, + filtercatalog_type=filtercatalog_type, + filterscope_type=filterscope_type, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListCatalogChecklistTemplatesInclude | Unset = UNSET, + sort: ListCatalogChecklistTemplatesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercatalog_type: str | Unset = UNSET, + filterscope_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogChecklistTemplateList | None: + """List catalog checklist templates + + List catalog checklist templates + + Args: + include (ListCatalogChecklistTemplatesInclude | Unset): + sort (ListCatalogChecklistTemplatesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercatalog_type (str | Unset): + filterscope_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtername=filtername, + filterslug=filterslug, + filtercatalog_type=filtercatalog_type, + filterscope_type=filterscope_type, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListCatalogChecklistTemplatesInclude | Unset = UNSET, + sort: ListCatalogChecklistTemplatesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercatalog_type: str | Unset = UNSET, + filterscope_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogChecklistTemplateList]: + """List catalog checklist templates + + List catalog checklist templates + + Args: + include (ListCatalogChecklistTemplatesInclude | Unset): + sort (ListCatalogChecklistTemplatesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercatalog_type (str | Unset): + filterscope_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogChecklistTemplateList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtername=filtername, + filterslug=filterslug, + filtercatalog_type=filtercatalog_type, + filterscope_type=filterscope_type, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListCatalogChecklistTemplatesInclude | Unset = UNSET, + sort: ListCatalogChecklistTemplatesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercatalog_type: str | Unset = UNSET, + filterscope_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogChecklistTemplateList | None: + """List catalog checklist templates + + List catalog checklist templates + + Args: + include (ListCatalogChecklistTemplatesInclude | Unset): + sort (ListCatalogChecklistTemplatesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercatalog_type (str | Unset): + filterscope_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogChecklistTemplateList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtername=filtername, + filterslug=filterslug, + filtercatalog_type=filtercatalog_type, + filterscope_type=filterscope_type, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py new file mode 100644 index 00000000..03363ecf --- /dev/null +++ b/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py @@ -0,0 +1,164 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + id: str | UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalog_checklist_templates/{id}/trigger".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: + if response.status_code == 202: + response_202 = cast(Any, None) + return response_202 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[Any | ErrorsList]: + """Trigger an audit for a catalog checklist template + + Triggers an audit for all applicable entities of the checklist template + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Any | ErrorsList | None: + """Trigger an audit for a catalog checklist template + + Triggers an audit for all applicable entities of the checklist template + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[Any | ErrorsList]: + """Trigger an audit for a catalog checklist template + + Triggers an audit for all applicable entities of the checklist template + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Any | ErrorsList | None: + """Trigger an audit for a catalog checklist template + + Triggers an audit for all applicable entities of the checklist template + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_fields/create_catalog_field.py b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py similarity index 58% rename from rootly_sdk/api/catalog_fields/create_catalog_field.py rename to rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py index 890bdf85..180d4b3c 100644 --- a/rootly_sdk/api/catalog_fields/create_catalog_field.py +++ b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py @@ -1,26 +1,30 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote +from uuid import UUID import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse +from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField +from ...models.update_catalog_checklist_template import UpdateCatalogChecklistTemplate from ...types import Response def _get_kwargs( - catalog_id: str, + id: str | UUID, *, - body: NewCatalogField, + body: UpdateCatalogChecklistTemplate, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { - "method": "post", - "url": f"/v1/catalogs/{catalog_id}/fields", + "method": "put", + "url": "/v1/catalog_checklist_templates/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -33,16 +37,11 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: - if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = CatalogChecklistTemplateResponse.from_dict(response.json()) - return response_201 - - if response.status_code == 401: - response_401 = ErrorsList.from_dict(response.json()) - - return response_401 + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) @@ -57,7 +56,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,29 +66,29 @@ def _build_response( def sync_detailed( - catalog_id: str, + id: str | UUID, *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: UpdateCatalogChecklistTemplate, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Update a catalog checklist template - Creates a new Catalog Field from provided data + Update a specific catalog checklist template by id Args: - catalog_id (str): - body (NewCatalogField): A catalog can have a maximum of 50 fields. + id (str | UUID): + body (UpdateCatalogChecklistTemplate): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogChecklistTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( - catalog_id=catalog_id, + id=id, body=body, ) @@ -101,58 +100,58 @@ def sync_detailed( def sync( - catalog_id: str, + id: str | UUID, *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: UpdateCatalogChecklistTemplate, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Update a catalog checklist template - Creates a new Catalog Field from provided data + Update a specific catalog checklist template by id Args: - catalog_id (str): - body (NewCatalogField): A catalog can have a maximum of 50 fields. + id (str | UUID): + body (UpdateCatalogChecklistTemplate): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogChecklistTemplateResponse | ErrorsList """ return sync_detailed( - catalog_id=catalog_id, + id=id, client=client, body=body, ).parsed async def asyncio_detailed( - catalog_id: str, + id: str | UUID, *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: UpdateCatalogChecklistTemplate, +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: + """Update a catalog checklist template - Creates a new Catalog Field from provided data + Update a specific catalog checklist template by id Args: - catalog_id (str): - body (NewCatalogField): A catalog can have a maximum of 50 fields. + id (str | UUID): + body (UpdateCatalogChecklistTemplate): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogChecklistTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( - catalog_id=catalog_id, + id=id, body=body, ) @@ -162,30 +161,30 @@ async def asyncio_detailed( async def asyncio( - catalog_id: str, + id: str | UUID, *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: UpdateCatalogChecklistTemplate, +) -> CatalogChecklistTemplateResponse | ErrorsList | None: + """Update a catalog checklist template - Creates a new Catalog Field from provided data + Update a specific catalog checklist template by id Args: - catalog_id (str): - body (NewCatalogField): A catalog can have a maximum of 50 fields. + id (str | UUID): + body (UpdateCatalogChecklistTemplate): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogChecklistTemplateResponse | ErrorsList """ return ( await asyncio_detailed( - catalog_id=catalog_id, + id=id, client=client, body=body, ) diff --git a/rootly_sdk/api/catalog_entities/create_catalog_entity.py b/rootly_sdk/api/catalog_entities/create_catalog_entity.py index 19599362..37fa998e 100644 --- a/rootly_sdk/api/catalog_entities/create_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/create_catalog_entity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/catalogs/{catalog_id}/entities", + "url": "/v1/catalogs/{catalog_id}/entities".format( + catalog_id=quote(str(catalog_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py index 0507b2ea..f256d19c 100644 --- a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/catalog_entities/{id}", + "url": "/v1/catalog_entities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CatalogEntityResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CatalogEntityResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CatalogEntityResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CatalogEntityResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entities/get_catalog_entity.py b/rootly_sdk/api/catalog_entities/get_catalog_entity.py index 6251c47a..a2b59694 100644 --- a/rootly_sdk/api/catalog_entities/get_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/get_catalog_entity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,13 +14,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - include: Unset | GetCatalogEntityInclude = UNSET, + include: GetCatalogEntityInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/catalog_entities/{id}", + "url": "/v1/catalog_entities/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -67,25 +71,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityInclude = UNSET, + include: GetCatalogEntityInclude | Unset = UNSET, ) -> Response[CatalogEntityResponse | ErrorsList]: """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogEntityInclude]): + id (str | UUID): + include (GetCatalogEntityInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -101,25 +105,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityInclude = UNSET, + include: GetCatalogEntityInclude | Unset = UNSET, ) -> CatalogEntityResponse | ErrorsList | None: """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogEntityInclude]): + id (str | UUID): + include (GetCatalogEntityInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return sync_detailed( @@ -130,25 +134,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityInclude = UNSET, + include: GetCatalogEntityInclude | Unset = UNSET, ) -> Response[CatalogEntityResponse | ErrorsList]: """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogEntityInclude]): + id (str | UUID): + include (GetCatalogEntityInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -162,25 +166,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityInclude = UNSET, + include: GetCatalogEntityInclude | Unset = UNSET, ) -> CatalogEntityResponse | ErrorsList | None: """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogEntityInclude]): + id (str | UUID): + include (GetCatalogEntityInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entities/list_catalog_entities.py b/rootly_sdk/api/catalog_entities/list_catalog_entities.py index a7ff9bfe..f9685565 100644 --- a/rootly_sdk/api/catalog_entities/list_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/list_catalog_entities.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,26 +15,28 @@ def _get_kwargs( catalog_id: str, *, - include: Unset | ListCatalogEntitiesInclude = UNSET, - sort: Unset | ListCatalogEntitiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntitiesInclude | Unset = UNSET, + sort: ListCatalogEntitiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -43,6 +46,8 @@ def _get_kwargs( params["page[size]"] = pagesize + params["filter[search]"] = filtersearch + params["filter[slug]"] = filterslug params["filter[name]"] = filtername @@ -59,7 +64,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/catalogs/{catalog_id}/entities", + "url": "/v1/catalogs/{catalog_id}/entities".format( + catalog_id=quote(str(catalog_id), safe=""), + ), "params": params, } @@ -91,16 +98,17 @@ def sync_detailed( catalog_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntitiesInclude = UNSET, - sort: Unset | ListCatalogEntitiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntitiesInclude | Unset = UNSET, + sort: ListCatalogEntitiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CatalogEntityList]: """List Catalog Entities @@ -108,16 +116,17 @@ def sync_detailed( Args: catalog_id (str): - include (Union[Unset, ListCatalogEntitiesInclude]): - sort (Union[Unset, ListCatalogEntitiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntitiesInclude | Unset): + sort (ListCatalogEntitiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,6 +142,7 @@ def sync_detailed( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, @@ -152,16 +162,17 @@ def sync( catalog_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntitiesInclude = UNSET, - sort: Unset | ListCatalogEntitiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntitiesInclude | Unset = UNSET, + sort: ListCatalogEntitiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CatalogEntityList | None: """List Catalog Entities @@ -169,16 +180,17 @@ def sync( Args: catalog_id (str): - include (Union[Unset, ListCatalogEntitiesInclude]): - sort (Union[Unset, ListCatalogEntitiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntitiesInclude | Unset): + sort (ListCatalogEntitiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -195,6 +207,7 @@ def sync( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, @@ -208,16 +221,17 @@ async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntitiesInclude = UNSET, - sort: Unset | ListCatalogEntitiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntitiesInclude | Unset = UNSET, + sort: ListCatalogEntitiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CatalogEntityList]: """List Catalog Entities @@ -225,16 +239,17 @@ async def asyncio_detailed( Args: catalog_id (str): - include (Union[Unset, ListCatalogEntitiesInclude]): - sort (Union[Unset, ListCatalogEntitiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntitiesInclude | Unset): + sort (ListCatalogEntitiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -250,6 +265,7 @@ async def asyncio_detailed( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, @@ -267,16 +283,17 @@ async def asyncio( catalog_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntitiesInclude = UNSET, - sort: Unset | ListCatalogEntitiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntitiesInclude | Unset = UNSET, + sort: ListCatalogEntitiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CatalogEntityList | None: """List Catalog Entities @@ -284,16 +301,17 @@ async def asyncio( Args: catalog_id (str): - include (Union[Unset, ListCatalogEntitiesInclude]): - sort (Union[Unset, ListCatalogEntitiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntitiesInclude | Unset): + sort (ListCatalogEntitiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -311,6 +329,7 @@ async def asyncio( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, diff --git a/rootly_sdk/api/catalog_entities/update_catalog_entity.py b/rootly_sdk/api/catalog_entities/update_catalog_entity.py index 9d1d2f5c..6613d141 100644 --- a/rootly_sdk/api/catalog_entities/update_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/update_catalog_entity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateCatalogEntity, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/catalog_entities/{id}", + "url": "/v1/catalog_entities/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalogEntity): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, @@ -107,7 +110,7 @@ def sync( Update a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalogEntity): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalogEntity): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityResponse, ErrorsList]] + Response[CatalogEntityResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, @@ -168,7 +171,7 @@ async def asyncio( Update a specific Catalog Entity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalogEntity): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityResponse, ErrorsList] + CatalogEntityResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entity_checklists/__init__.py b/rootly_sdk/api/catalog_entity_checklists/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/catalog_entity_checklists/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py b/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py new file mode 100644 index 00000000..b1dacf13 --- /dev/null +++ b/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_entity_checklist_response import CatalogEntityChecklistResponse +from ...models.errors_list import ErrorsList +from ...types import Response + + +def _get_kwargs( + id: UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/catalog_entity_checklists/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityChecklistResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = CatalogEntityChecklistResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityChecklistResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: UUID, + *, + client: AuthenticatedClient, +) -> Response[CatalogEntityChecklistResponse | ErrorsList]: + """Retrieves a catalog entity checklist + + Retrieves a specific catalog entity checklist by id + + Args: + id (UUID): Resource UUID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogEntityChecklistResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: UUID, + *, + client: AuthenticatedClient, +) -> CatalogEntityChecklistResponse | ErrorsList | None: + """Retrieves a catalog entity checklist + + Retrieves a specific catalog entity checklist by id + + Args: + id (UUID): Resource UUID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogEntityChecklistResponse | ErrorsList + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: UUID, + *, + client: AuthenticatedClient, +) -> Response[CatalogEntityChecklistResponse | ErrorsList]: + """Retrieves a catalog entity checklist + + Retrieves a specific catalog entity checklist by id + + Args: + id (UUID): Resource UUID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogEntityChecklistResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: UUID, + *, + client: AuthenticatedClient, +) -> CatalogEntityChecklistResponse | ErrorsList | None: + """Retrieves a catalog entity checklist + + Retrieves a specific catalog entity checklist by id + + Args: + id (UUID): Resource UUID + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogEntityChecklistResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py b/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py new file mode 100644 index 00000000..63fefcf6 --- /dev/null +++ b/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py @@ -0,0 +1,303 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_entity_checklist_list import CatalogEntityChecklistList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercatalog_checklist_template_id: str | Unset = UNSET, + filterauditable_type: str | Unset = UNSET, + filterauditable_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[status]"] = filterstatus + + params["filter[catalog_checklist_template_id]"] = filtercatalog_checklist_template_id + + params["filter[auditable_type]"] = filterauditable_type + + params["filter[auditable_id]"] = filterauditable_id + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/catalog_entity_checklists", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityChecklistList | None: + if response.status_code == 200: + response_200 = CatalogEntityChecklistList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityChecklistList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercatalog_checklist_template_id: str | Unset = UNSET, + filterauditable_type: str | Unset = UNSET, + filterauditable_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogEntityChecklistList]: + """List catalog entity checklists + + List catalog entity checklists + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercatalog_checklist_template_id (str | Unset): + filterauditable_type (str | Unset): + filterauditable_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogEntityChecklistList] + """ + + kwargs = _get_kwargs( + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercatalog_checklist_template_id=filtercatalog_checklist_template_id, + filterauditable_type=filterauditable_type, + filterauditable_id=filterauditable_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercatalog_checklist_template_id: str | Unset = UNSET, + filterauditable_type: str | Unset = UNSET, + filterauditable_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogEntityChecklistList | None: + """List catalog entity checklists + + List catalog entity checklists + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercatalog_checklist_template_id (str | Unset): + filterauditable_type (str | Unset): + filterauditable_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogEntityChecklistList + """ + + return sync_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercatalog_checklist_template_id=filtercatalog_checklist_template_id, + filterauditable_type=filterauditable_type, + filterauditable_id=filterauditable_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercatalog_checklist_template_id: str | Unset = UNSET, + filterauditable_type: str | Unset = UNSET, + filterauditable_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogEntityChecklistList]: + """List catalog entity checklists + + List catalog entity checklists + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercatalog_checklist_template_id (str | Unset): + filterauditable_type (str | Unset): + filterauditable_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogEntityChecklistList] + """ + + kwargs = _get_kwargs( + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercatalog_checklist_template_id=filtercatalog_checklist_template_id, + filterauditable_type=filterauditable_type, + filterauditable_id=filterauditable_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercatalog_checklist_template_id: str | Unset = UNSET, + filterauditable_type: str | Unset = UNSET, + filterauditable_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogEntityChecklistList | None: + """List catalog entity checklists + + List catalog entity checklists + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercatalog_checklist_template_id (str | Unset): + filterauditable_type (str | Unset): + filterauditable_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogEntityChecklistList + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercatalog_checklist_template_id=filtercatalog_checklist_template_id, + filterauditable_type=filterauditable_type, + filterauditable_id=filterauditable_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entity_properties/create_catalog_entity_property.py b/rootly_sdk/api/catalog_entity_properties/create_catalog_entity_property.py index 43ab5578..3c834928 100644 --- a/rootly_sdk/api/catalog_entity_properties/create_catalog_entity_property.py +++ b/rootly_sdk/api/catalog_entity_properties/create_catalog_entity_property.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/catalog_entities/{catalog_entity_id}/properties", + "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format( + catalog_entity_id=quote(str(catalog_entity_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -91,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -131,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return sync_detailed( @@ -166,7 +169,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -204,7 +207,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entity_properties/delete_catalog_entity_property.py b/rootly_sdk/api/catalog_entity_properties/delete_catalog_entity_property.py index acd0aab7..5fb2acac 100644 --- a/rootly_sdk/api/catalog_entity_properties/delete_catalog_entity_property.py +++ b/rootly_sdk/api/catalog_entity_properties/delete_catalog_entity_property.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/catalog_entity_properties/{id}", + "url": "/v1/catalog_entity_properties/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -72,7 +76,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -107,7 +111,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return sync_detailed( @@ -137,7 +141,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -170,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entity_properties/get_catalog_entity_property.py b/rootly_sdk/api/catalog_entity_properties/get_catalog_entity_property.py index 774c79cb..698b1a78 100644 --- a/rootly_sdk/api/catalog_entity_properties/get_catalog_entity_property.py +++ b/rootly_sdk/api/catalog_entity_properties/get_catalog_entity_property.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,11 +17,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetCatalogEntityPropertyInclude = UNSET, + include: GetCatalogEntityPropertyInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -30,7 +32,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/catalog_entity_properties/{id}", + "url": "/v1/catalog_entity_properties/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -71,7 +75,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityPropertyInclude = UNSET, + include: GetCatalogEntityPropertyInclude | Unset = UNSET, ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: """Retrieves a Catalog Entity Property @@ -83,14 +87,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetCatalogEntityPropertyInclude]): + include (GetCatalogEntityPropertyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -109,7 +113,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityPropertyInclude = UNSET, + include: GetCatalogEntityPropertyInclude | Unset = UNSET, ) -> CatalogEntityPropertyResponse | ErrorsList | None: """Retrieves a Catalog Entity Property @@ -121,14 +125,14 @@ def sync( Args: id (str): - include (Union[Unset, GetCatalogEntityPropertyInclude]): + include (GetCatalogEntityPropertyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return sync_detailed( @@ -142,7 +146,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityPropertyInclude = UNSET, + include: GetCatalogEntityPropertyInclude | Unset = UNSET, ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: """Retrieves a Catalog Entity Property @@ -154,14 +158,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetCatalogEntityPropertyInclude]): + include (GetCatalogEntityPropertyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -178,7 +182,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogEntityPropertyInclude = UNSET, + include: GetCatalogEntityPropertyInclude | Unset = UNSET, ) -> CatalogEntityPropertyResponse | ErrorsList | None: """Retrieves a Catalog Entity Property @@ -190,14 +194,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetCatalogEntityPropertyInclude]): + include (GetCatalogEntityPropertyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_entity_properties/list_catalog_entity_properties.py b/rootly_sdk/api/catalog_entity_properties/list_catalog_entity_properties.py index b0e16a22..f4183034 100644 --- a/rootly_sdk/api/catalog_entity_properties/list_catalog_entity_properties.py +++ b/rootly_sdk/api/catalog_entity_properties/list_catalog_entity_properties.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -18,26 +19,27 @@ def _get_kwargs( catalog_entity_id: str, *, - include: Unset | ListCatalogEntityPropertiesInclude = UNSET, - sort: Unset | ListCatalogEntityPropertiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercatalog_field_id: Unset | str = UNSET, - filterkey: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntityPropertiesInclude | Unset = UNSET, + sort: ListCatalogEntityPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercatalog_field_id: str | Unset = UNSET, + filterkey: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -63,7 +65,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/catalog_entities/{catalog_entity_id}/properties", + "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format( + catalog_entity_id=quote(str(catalog_entity_id), safe=""), + ), "params": params, } @@ -99,16 +103,16 @@ def sync_detailed( catalog_entity_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntityPropertiesInclude = UNSET, - sort: Unset | ListCatalogEntityPropertiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercatalog_field_id: Unset | str = UNSET, - filterkey: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntityPropertiesInclude | Unset = UNSET, + sort: ListCatalogEntityPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercatalog_field_id: str | Unset = UNSET, + filterkey: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CatalogEntityPropertyList]: """List catalog properties @@ -120,16 +124,16 @@ def sync_detailed( Args: catalog_entity_id (str): - include (Union[Unset, ListCatalogEntityPropertiesInclude]): - sort (Union[Unset, ListCatalogEntityPropertiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercatalog_field_id (Union[Unset, str]): - filterkey (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntityPropertiesInclude | Unset): + sort (ListCatalogEntityPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercatalog_field_id (str | Unset): + filterkey (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,16 +168,16 @@ def sync( catalog_entity_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntityPropertiesInclude = UNSET, - sort: Unset | ListCatalogEntityPropertiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercatalog_field_id: Unset | str = UNSET, - filterkey: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntityPropertiesInclude | Unset = UNSET, + sort: ListCatalogEntityPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercatalog_field_id: str | Unset = UNSET, + filterkey: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CatalogEntityPropertyList | None: """List catalog properties @@ -185,16 +189,16 @@ def sync( Args: catalog_entity_id (str): - include (Union[Unset, ListCatalogEntityPropertiesInclude]): - sort (Union[Unset, ListCatalogEntityPropertiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercatalog_field_id (Union[Unset, str]): - filterkey (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntityPropertiesInclude | Unset): + sort (ListCatalogEntityPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercatalog_field_id (str | Unset): + filterkey (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -224,16 +228,16 @@ async def asyncio_detailed( catalog_entity_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntityPropertiesInclude = UNSET, - sort: Unset | ListCatalogEntityPropertiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercatalog_field_id: Unset | str = UNSET, - filterkey: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntityPropertiesInclude | Unset = UNSET, + sort: ListCatalogEntityPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercatalog_field_id: str | Unset = UNSET, + filterkey: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CatalogEntityPropertyList]: """List catalog properties @@ -245,16 +249,16 @@ async def asyncio_detailed( Args: catalog_entity_id (str): - include (Union[Unset, ListCatalogEntityPropertiesInclude]): - sort (Union[Unset, ListCatalogEntityPropertiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercatalog_field_id (Union[Unset, str]): - filterkey (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntityPropertiesInclude | Unset): + sort (ListCatalogEntityPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercatalog_field_id (str | Unset): + filterkey (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -287,16 +291,16 @@ async def asyncio( catalog_entity_id: str, *, client: AuthenticatedClient, - include: Unset | ListCatalogEntityPropertiesInclude = UNSET, - sort: Unset | ListCatalogEntityPropertiesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercatalog_field_id: Unset | str = UNSET, - filterkey: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogEntityPropertiesInclude | Unset = UNSET, + sort: ListCatalogEntityPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercatalog_field_id: str | Unset = UNSET, + filterkey: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CatalogEntityPropertyList | None: """List catalog properties @@ -308,16 +312,16 @@ async def asyncio( Args: catalog_entity_id (str): - include (Union[Unset, ListCatalogEntityPropertiesInclude]): - sort (Union[Unset, ListCatalogEntityPropertiesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercatalog_field_id (Union[Unset, str]): - filterkey (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogEntityPropertiesInclude | Unset): + sort (ListCatalogEntityPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercatalog_field_id (str | Unset): + filterkey (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/catalog_entity_properties/update_catalog_entity_property.py b/rootly_sdk/api/catalog_entity_properties/update_catalog_entity_property.py index 121225f3..5d1cc4b3 100644 --- a/rootly_sdk/api/catalog_entity_properties/update_catalog_entity_property.py +++ b/rootly_sdk/api/catalog_entity_properties/update_catalog_entity_property.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/catalog_entity_properties/{id}", + "url": "/v1/catalog_entity_properties/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -87,7 +90,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -128,7 +131,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return sync_detailed( @@ -164,7 +167,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogEntityPropertyResponse, ErrorsList]] + Response[CatalogEntityPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -203,7 +206,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogEntityPropertyResponse, ErrorsList] + CatalogEntityPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalog_fields/list_catalog_fields.py b/rootly_sdk/api/catalog_fields/list_catalog_fields.py deleted file mode 100644 index 93129388..00000000 --- a/rootly_sdk/api/catalog_fields/list_catalog_fields.py +++ /dev/null @@ -1,336 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_catalog_fields_include import ListCatalogFieldsInclude -from ...models.list_catalog_fields_sort import ListCatalogFieldsSort -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - catalog_id: str, - *, - include: Unset | ListCatalogFieldsInclude = UNSET, - sort: Unset | ListCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": f"/v1/catalogs/{catalog_id}/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - catalog_id: str, - *, - client: AuthenticatedClient, - include: Unset | ListCatalogFieldsInclude = UNSET, - sort: Unset | ListCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Catalog Fields - - Args: - catalog_id (str): - include (Union[Unset, ListCatalogFieldsInclude]): - sort (Union[Unset, ListCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - catalog_id=catalog_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - catalog_id: str, - *, - client: AuthenticatedClient, - include: Unset | ListCatalogFieldsInclude = UNSET, - sort: Unset | ListCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Catalog Fields - - Args: - catalog_id (str): - include (Union[Unset, ListCatalogFieldsInclude]): - sort (Union[Unset, ListCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - catalog_id=catalog_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - catalog_id: str, - *, - client: AuthenticatedClient, - include: Unset | ListCatalogFieldsInclude = UNSET, - sort: Unset | ListCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Catalog Fields - - Args: - catalog_id (str): - include (Union[Unset, ListCatalogFieldsInclude]): - sort (Union[Unset, ListCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - catalog_id=catalog_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - catalog_id: str, - *, - client: AuthenticatedClient, - include: Unset | ListCatalogFieldsInclude = UNSET, - sort: Unset | ListCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Catalog Fields - - Args: - catalog_id (str): - include (Union[Unset, ListCatalogFieldsInclude]): - sort (Union[Unset, ListCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - catalog_id=catalog_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/catalog_properties/__init__.py b/rootly_sdk/api/catalog_properties/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/catalog_properties/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/catalog_properties/create_catalog_property.py b/rootly_sdk/api/catalog_properties/create_catalog_property.py new file mode 100644 index 00000000..ce8b71c5 --- /dev/null +++ b/rootly_sdk/api/catalog_properties/create_catalog_property.py @@ -0,0 +1,117 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.new_catalog_field import NewCatalogField +from ...types import Response + + +def _get_kwargs( + catalog_id: str, + *, + body: NewCatalogField, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalogs/{catalog_id}/properties".format( + catalog_id=quote(str(catalog_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 201: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: NewCatalogField, +) -> Response[Any]: + """Creates a Catalog Property (alias for field) + + Creates a new Catalog Property - returns catalog_properties type + + Args: + catalog_id (str): + body (NewCatalogField): A catalog can have a maximum of 50 fields. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: NewCatalogField, +) -> Response[Any]: + """Creates a Catalog Property (alias for field) + + Creates a new Catalog Property - returns catalog_properties type + + Args: + catalog_id (str): + body (NewCatalogField): A catalog can have a maximum of 50 fields. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/catalog_properties/delete_catalog_property.py b/rootly_sdk/api/catalog_properties/delete_catalog_property.py new file mode 100644 index 00000000..b08c47da --- /dev/null +++ b/rootly_sdk/api/catalog_properties/delete_catalog_property.py @@ -0,0 +1,102 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/catalog_properties/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete a catalog_property + + Delete a specific catalog_property by id - returns catalog_properties type + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete a catalog_property + + Delete a specific catalog_property by id - returns catalog_properties type + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/catalog_properties/get_catalog_property.py b/rootly_sdk/api/catalog_properties/get_catalog_property.py new file mode 100644 index 00000000..e42871f8 --- /dev/null +++ b/rootly_sdk/api/catalog_properties/get_catalog_property.py @@ -0,0 +1,102 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/catalog_properties/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Retrieves a Catalog Property (alias for field) + + Retrieves a specific Catalog Property by id - returns catalog_properties type + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Retrieves a Catalog Property (alias for field) + + Retrieves a specific Catalog Property by id - returns catalog_properties type + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/catalog_properties/list_catalog_properties.py b/rootly_sdk/api/catalog_properties/list_catalog_properties.py new file mode 100644 index 00000000..4d717126 --- /dev/null +++ b/rootly_sdk/api/catalog_properties/list_catalog_properties.py @@ -0,0 +1,102 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + catalog_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/catalogs/{catalog_id}/properties".format( + catalog_id=quote(str(catalog_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """List Catalog Properties (alias for fields) + + List Catalog Properties - returns catalog_properties type + + Args: + catalog_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """List Catalog Properties (alias for fields) + + List Catalog Properties - returns catalog_properties type + + Args: + catalog_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + catalog_id=catalog_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/catalog_properties/update_catalog_property.py b/rootly_sdk/api/catalog_properties/update_catalog_property.py new file mode 100644 index 00000000..2847e350 --- /dev/null +++ b/rootly_sdk/api/catalog_properties/update_catalog_property.py @@ -0,0 +1,117 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.update_catalog_field import UpdateCatalogField +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UpdateCatalogField, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/catalog_properties/{id}".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateCatalogField, +) -> Response[Any]: + """Update a catalog_property (alias for field) + + Update a specific catalog_property by id - returns catalog_properties type + + Args: + id (str): + body (UpdateCatalogField): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateCatalogField, +) -> Response[Any]: + """Update a catalog_property (alias for field) + + Update a specific catalog_property by id - returns catalog_properties type + + Args: + id (str): + body (UpdateCatalogField): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/catalogs/create_catalog.py b/rootly_sdk/api/catalogs/create_catalog.py index 17867409..736014b9 100644 --- a/rootly_sdk/api/catalogs/create_catalog.py +++ b/rootly_sdk/api/catalogs/create_catalog.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalogs/delete_catalog.py b/rootly_sdk/api/catalogs/delete_catalog.py index ec886956..eeebd62e 100644 --- a/rootly_sdk/api/catalogs/delete_catalog.py +++ b/rootly_sdk/api/catalogs/delete_catalog.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/catalogs/{id}", + "url": "/v1/catalogs/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CatalogResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CatalogResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CatalogResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CatalogResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalogs/get_catalog.py b/rootly_sdk/api/catalogs/get_catalog.py index 4d6d46de..146cb1a4 100644 --- a/rootly_sdk/api/catalogs/get_catalog.py +++ b/rootly_sdk/api/catalogs/get_catalog.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/catalogs/{id}", + "url": "/v1/catalogs/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CatalogResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CatalogResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CatalogResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CatalogResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/catalogs/list_catalogs.py b/rootly_sdk/api/catalogs/list_catalogs.py index 0e4abd35..8305bec5 100644 --- a/rootly_sdk/api/catalogs/list_catalogs.py +++ b/rootly_sdk/api/catalogs/list_catalogs.py @@ -13,26 +13,28 @@ def _get_kwargs( *, - include: Unset | ListCatalogsInclude = UNSET, - sort: Unset | ListCatalogsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogsInclude | Unset = UNSET, + sort: ListCatalogsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -42,6 +44,8 @@ def _get_kwargs( params["page[size]"] = pagesize + params["filter[search]"] = filtersearch + params["filter[slug]"] = filterslug params["filter[name]"] = filtername @@ -89,32 +93,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListCatalogsInclude = UNSET, - sort: Unset | ListCatalogsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogsInclude | Unset = UNSET, + sort: ListCatalogsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CatalogList]: """List catalogs List catalogs Args: - include (Union[Unset, ListCatalogsInclude]): - sort (Union[Unset, ListCatalogsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogsInclude | Unset): + sort (ListCatalogsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,6 +135,7 @@ def sync_detailed( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, @@ -147,32 +154,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListCatalogsInclude = UNSET, - sort: Unset | ListCatalogsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogsInclude | Unset = UNSET, + sort: ListCatalogsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CatalogList | None: """List catalogs List catalogs Args: - include (Union[Unset, ListCatalogsInclude]): - sort (Union[Unset, ListCatalogsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogsInclude | Unset): + sort (ListCatalogsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -188,6 +197,7 @@ def sync( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, @@ -200,32 +210,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListCatalogsInclude = UNSET, - sort: Unset | ListCatalogsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogsInclude | Unset = UNSET, + sort: ListCatalogsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CatalogList]: """List catalogs List catalogs Args: - include (Union[Unset, ListCatalogsInclude]): - sort (Union[Unset, ListCatalogsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogsInclude | Unset): + sort (ListCatalogsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +252,7 @@ async def asyncio_detailed( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, @@ -256,32 +269,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListCatalogsInclude = UNSET, - sort: Unset | ListCatalogsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCatalogsInclude | Unset = UNSET, + sort: ListCatalogsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CatalogList | None: """List catalogs List catalogs Args: - include (Union[Unset, ListCatalogsInclude]): - sort (Union[Unset, ListCatalogsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCatalogsInclude | Unset): + sort (ListCatalogsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -298,6 +313,7 @@ async def asyncio( sort=sort, pagenumber=pagenumber, pagesize=pagesize, + filtersearch=filtersearch, filterslug=filterslug, filtername=filtername, filtercreated_atgt=filtercreated_atgt, diff --git a/rootly_sdk/api/catalogs/update_catalog.py b/rootly_sdk/api/catalogs/update_catalog.py index c4838523..47da6eea 100644 --- a/rootly_sdk/api/catalogs/update_catalog.py +++ b/rootly_sdk/api/catalogs/update_catalog.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateCatalog, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/catalogs/{id}", + "url": "/v1/catalogs/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalog): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, @@ -107,7 +110,7 @@ def sync( Update a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalog): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalog): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogResponse, ErrorsList]] + Response[CatalogResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, @@ -168,7 +171,7 @@ async def asyncio( Update a specific catalog by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCatalog): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogResponse, ErrorsList] + CatalogResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/causes/create_cause.py b/rootly_sdk/api/causes/create_cause.py index 963bab83..c1e704a0 100644 --- a/rootly_sdk/api/causes/create_cause.py +++ b/rootly_sdk/api/causes/create_cause.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/environments/create_environment_catalog_field.py b/rootly_sdk/api/causes/create_cause_catalog_property.py similarity index 67% rename from rootly_sdk/api/environments/create_environment_catalog_field.py rename to rootly_sdk/api/causes/create_cause_catalog_property.py index 562536ad..6e2bf436 100644 --- a/rootly_sdk/api/environments/create_environment_catalog_field.py +++ b/rootly_sdk/api/causes/create_cause_catalog_property.py @@ -5,21 +5,21 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse +from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField +from ...models.new_catalog_property import NewCatalogProperty from ...types import Response def _get_kwargs( *, - body: NewCatalogField, + body: NewCatalogProperty, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/environments/fields", + "url": "/v1/causes/properties", } _kwargs["json"] = body.to_dict() @@ -32,9 +32,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> CatalogPropertyResponse | ErrorsList | None: if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) + response_201 = CatalogPropertyResponse.from_dict(response.json()) return response_201 @@ -56,7 +56,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,21 +68,21 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,21 +99,21 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return sync_detailed( @@ -125,21 +125,21 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,21 +154,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/causes/delete_cause.py b/rootly_sdk/api/causes/delete_cause.py index e025be3a..3edaf3a4 100644 --- a/rootly_sdk/api/causes/delete_cause.py +++ b/rootly_sdk/api/causes/delete_cause.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/causes/{id}", + "url": "/v1/causes/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CauseResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CauseResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CauseResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CauseResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/causes/get_cause.py b/rootly_sdk/api/causes/get_cause.py index d0c85914..e8c8bff7 100644 --- a/rootly_sdk/api/causes/get_cause.py +++ b/rootly_sdk/api/causes/get_cause.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/causes/{id}", + "url": "/v1/causes/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CauseResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CauseResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CauseResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CauseResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/causes/list_cause_catalog_fields.py b/rootly_sdk/api/causes/list_cause_catalog_fields.py deleted file mode 100644 index 9839cb4b..00000000 --- a/rootly_sdk/api/causes/list_cause_catalog_fields.py +++ /dev/null @@ -1,325 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_cause_catalog_fields_include import ( - ListCauseCatalogFieldsInclude, -) -from ...models.list_cause_catalog_fields_sort import ListCauseCatalogFieldsSort -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - include: Unset | ListCauseCatalogFieldsInclude = UNSET, - sort: Unset | ListCauseCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/causes/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListCauseCatalogFieldsInclude = UNSET, - sort: Unset | ListCauseCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Cause Catalog Fields - - Args: - include (Union[Unset, ListCauseCatalogFieldsInclude]): - sort (Union[Unset, ListCauseCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - include: Unset | ListCauseCatalogFieldsInclude = UNSET, - sort: Unset | ListCauseCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Cause Catalog Fields - - Args: - include (Union[Unset, ListCauseCatalogFieldsInclude]): - sort (Union[Unset, ListCauseCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListCauseCatalogFieldsInclude = UNSET, - sort: Unset | ListCauseCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Cause Catalog Fields - - Args: - include (Union[Unset, ListCauseCatalogFieldsInclude]): - sort (Union[Unset, ListCauseCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - include: Unset | ListCauseCatalogFieldsInclude = UNSET, - sort: Unset | ListCauseCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Cause Catalog Fields - - Args: - include (Union[Unset, ListCauseCatalogFieldsInclude]): - sort (Union[Unset, ListCauseCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/causes/list_cause_catalog_properties.py b/rootly_sdk/api/causes/list_cause_catalog_properties.py new file mode 100644 index 00000000..56923dc0 --- /dev/null +++ b/rootly_sdk/api/causes/list_cause_catalog_properties.py @@ -0,0 +1,328 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_list import CatalogPropertyList +from ...models.list_cause_catalog_properties_include import ( + ListCauseCatalogPropertiesInclude, +) +from ...models.list_cause_catalog_properties_sort import ( + ListCauseCatalogPropertiesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListCauseCatalogPropertiesInclude | Unset = UNSET, + sort: ListCauseCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[kind]"] = filterkind + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/causes/properties", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogPropertyList | None: + if response.status_code == 200: + response_200 = CatalogPropertyList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListCauseCatalogPropertiesInclude | Unset = UNSET, + sort: ListCauseCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Cause Catalog Properties + + Args: + include (ListCauseCatalogPropertiesInclude | Unset): + sort (ListCauseCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListCauseCatalogPropertiesInclude | Unset = UNSET, + sort: ListCauseCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Cause Catalog Properties + + Args: + include (ListCauseCatalogPropertiesInclude | Unset): + sort (ListCauseCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListCauseCatalogPropertiesInclude | Unset = UNSET, + sort: ListCauseCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Cause Catalog Properties + + Args: + include (ListCauseCatalogPropertiesInclude | Unset): + sort (ListCauseCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListCauseCatalogPropertiesInclude | Unset = UNSET, + sort: ListCauseCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Cause Catalog Properties + + Args: + include (ListCauseCatalogPropertiesInclude | Unset): + sort (ListCauseCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/causes/list_causes.py b/rootly_sdk/api/causes/list_causes.py index 99b5d373..4c7ee7f4 100644 --- a/rootly_sdk/api/causes/list_causes.py +++ b/rootly_sdk/api/causes/list_causes.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -79,32 +80,32 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CauseList]: """List causes List causes Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,32 +138,32 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CauseList | None: """List causes List causes Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,32 +191,32 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CauseList]: """List causes List causes Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,32 +247,32 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CauseList | None: """List causes List causes Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/causes/update_cause.py b/rootly_sdk/api/causes/update_cause.py index a33c39fc..46e11dce 100644 --- a/rootly_sdk/api/causes/update_cause.py +++ b/rootly_sdk/api/causes/update_cause.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateCause, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/causes/{id}", + "url": "/v1/causes/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCause): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, @@ -107,7 +110,7 @@ def sync( Update a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCause): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCause): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CauseResponse, ErrorsList]] + Response[CauseResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, @@ -168,7 +171,7 @@ async def asyncio( Update a specific cause by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCause): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CauseResponse, ErrorsList] + CauseResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_groups/create_communications_group.py b/rootly_sdk/api/communications_groups/create_communications_group.py index c3ed86fd..84fa7b89 100644 --- a/rootly_sdk/api/communications_groups/create_communications_group.py +++ b/rootly_sdk/api/communications_groups/create_communications_group.py @@ -77,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsGroupResponse, ErrorsList]] + Response[CommunicationsGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -108,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsGroupResponse, ErrorsList] + CommunicationsGroupResponse | ErrorsList """ return sync_detailed( @@ -134,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsGroupResponse, ErrorsList]] + Response[CommunicationsGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -163,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsGroupResponse, ErrorsList] + CommunicationsGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_groups/delete_communications_group.py b/rootly_sdk/api/communications_groups/delete_communications_group.py index 3101f2d4..7bb4306a 100644 --- a/rootly_sdk/api/communications_groups/delete_communications_group.py +++ b/rootly_sdk/api/communications_groups/delete_communications_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/communications/groups/{id}", + "url": "/v1/communications/groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -62,7 +66,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -93,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -119,7 +123,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -148,7 +152,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_groups/get_communications_group.py b/rootly_sdk/api/communications_groups/get_communications_group.py index d50430d4..9c1e74ef 100644 --- a/rootly_sdk/api/communications_groups/get_communications_group.py +++ b/rootly_sdk/api/communications_groups/get_communications_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/communications/groups/{id}", + "url": "/v1/communications/groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsGroupResponse, ErrorsList]] + Response[CommunicationsGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsGroupResponse, ErrorsList] + CommunicationsGroupResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsGroupResponse, ErrorsList]] + Response[CommunicationsGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsGroupResponse, ErrorsList] + CommunicationsGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_groups/list_communications_groups.py b/rootly_sdk/api/communications_groups/list_communications_groups.py index c3054d0c..880eea27 100644 --- a/rootly_sdk/api/communications_groups/list_communications_groups.py +++ b/rootly_sdk/api/communications_groups/list_communications_groups.py @@ -11,20 +11,21 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filteris_private: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercondition_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_private: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercondition_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -92,38 +93,38 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filteris_private: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercondition_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_private: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercondition_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsGroupsResponse]: """Lists communications groups Lists communications groups Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filteris_private (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercondition_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filteris_private (str | Unset): + filtercommunication_type_id (str | Unset): + filtercondition_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -159,38 +160,38 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filteris_private: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercondition_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_private: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercondition_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsGroupsResponse | None: """Lists communications groups Lists communications groups Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filteris_private (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercondition_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filteris_private (str | Unset): + filtercommunication_type_id (str | Unset): + filtercondition_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -221,38 +222,38 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filteris_private: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercondition_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_private: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercondition_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsGroupsResponse]: """Lists communications groups Lists communications groups Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filteris_private (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercondition_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filteris_private (str | Unset): + filtercommunication_type_id (str | Unset): + filtercondition_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -286,38 +287,38 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filteris_private: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercondition_type: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_private: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercondition_type: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsGroupsResponse | None: """Lists communications groups Lists communications groups Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filteris_private (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercondition_type (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filteris_private (str | Unset): + filtercommunication_type_id (str | Unset): + filtercondition_type (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/communications_groups/update_communications_group.py b/rootly_sdk/api/communications_groups/update_communications_group.py index d8ec28ec..56751baf 100644 --- a/rootly_sdk/api/communications_groups/update_communications_group.py +++ b/rootly_sdk/api/communications_groups/update_communications_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/communications/groups/{id}", + "url": "/v1/communications/groups/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsGroupResponse, ErrorsList]] + Response[CommunicationsGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsGroupResponse, ErrorsList] + CommunicationsGroupResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsGroupResponse, ErrorsList]] + Response[CommunicationsGroupResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsGroupResponse, ErrorsList] + CommunicationsGroupResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_stages/create_communications_stage.py b/rootly_sdk/api/communications_stages/create_communications_stage.py index 6d610ff8..9e90afde 100644 --- a/rootly_sdk/api/communications_stages/create_communications_stage.py +++ b/rootly_sdk/api/communications_stages/create_communications_stage.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsStageResponse, ErrorsList]] + Response[CommunicationsStageResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsStageResponse, ErrorsList] + CommunicationsStageResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsStageResponse, ErrorsList]] + Response[CommunicationsStageResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsStageResponse, ErrorsList] + CommunicationsStageResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_stages/delete_communications_stage.py b/rootly_sdk/api/communications_stages/delete_communications_stage.py index acee9e80..b5921be8 100644 --- a/rootly_sdk/api/communications_stages/delete_communications_stage.py +++ b/rootly_sdk/api/communications_stages/delete_communications_stage.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/communications/stages/{id}", + "url": "/v1/communications/stages/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -62,7 +66,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -93,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -119,7 +123,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -148,7 +152,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_stages/get_communications_stage.py b/rootly_sdk/api/communications_stages/get_communications_stage.py index 11af7837..477e0d9a 100644 --- a/rootly_sdk/api/communications_stages/get_communications_stage.py +++ b/rootly_sdk/api/communications_stages/get_communications_stage.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/communications/stages/{id}", + "url": "/v1/communications/stages/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsStageResponse, ErrorsList]] + Response[CommunicationsStageResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsStageResponse, ErrorsList] + CommunicationsStageResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsStageResponse, ErrorsList]] + Response[CommunicationsStageResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsStageResponse, ErrorsList] + CommunicationsStageResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_stages/list_communications_stages.py b/rootly_sdk/api/communications_stages/list_communications_stages.py index e68a79e0..174a6873 100644 --- a/rootly_sdk/api/communications_stages/list_communications_stages.py +++ b/rootly_sdk/api/communications_stages/list_communications_stages.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -83,32 +84,32 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsStagesResponse]: """Lists communications stages Lists communications stages Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,32 +142,32 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsStagesResponse | None: """Lists communications stages Lists communications stages Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -194,32 +195,32 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsStagesResponse]: """Lists communications stages Lists communications stages Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -250,32 +251,32 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsStagesResponse | None: """Lists communications stages Lists communications stages Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/communications_stages/update_communications_stage.py b/rootly_sdk/api/communications_stages/update_communications_stage.py index 0214d959..13ed4698 100644 --- a/rootly_sdk/api/communications_stages/update_communications_stage.py +++ b/rootly_sdk/api/communications_stages/update_communications_stage.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/communications/stages/{id}", + "url": "/v1/communications/stages/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsStageResponse, ErrorsList]] + Response[CommunicationsStageResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsStageResponse, ErrorsList] + CommunicationsStageResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsStageResponse, ErrorsList]] + Response[CommunicationsStageResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsStageResponse, ErrorsList] + CommunicationsStageResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_templates/create_communications_template.py b/rootly_sdk/api/communications_templates/create_communications_template.py index 6c67d411..5c62ff97 100644 --- a/rootly_sdk/api/communications_templates/create_communications_template.py +++ b/rootly_sdk/api/communications_templates/create_communications_template.py @@ -77,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTemplateResponse, ErrorsList]] + Response[CommunicationsTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -108,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTemplateResponse, ErrorsList] + CommunicationsTemplateResponse | ErrorsList """ return sync_detailed( @@ -134,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTemplateResponse, ErrorsList]] + Response[CommunicationsTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -163,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTemplateResponse, ErrorsList] + CommunicationsTemplateResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_templates/delete_communications_template.py b/rootly_sdk/api/communications_templates/delete_communications_template.py index d1ffce2e..5750a7a4 100644 --- a/rootly_sdk/api/communications_templates/delete_communications_template.py +++ b/rootly_sdk/api/communications_templates/delete_communications_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/communications/templates/{id}", + "url": "/v1/communications/templates/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -62,7 +66,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -93,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -119,7 +123,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -148,7 +152,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_templates/get_communications_template.py b/rootly_sdk/api/communications_templates/get_communications_template.py index f8d67d19..84eda309 100644 --- a/rootly_sdk/api/communications_templates/get_communications_template.py +++ b/rootly_sdk/api/communications_templates/get_communications_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/communications/templates/{id}", + "url": "/v1/communications/templates/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTemplateResponse, ErrorsList]] + Response[CommunicationsTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTemplateResponse, ErrorsList] + CommunicationsTemplateResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTemplateResponse, ErrorsList]] + Response[CommunicationsTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTemplateResponse, ErrorsList] + CommunicationsTemplateResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_templates/list_communications_templates.py b/rootly_sdk/api/communications_templates/list_communications_templates.py index a3161de8..8d3f4fb0 100644 --- a/rootly_sdk/api/communications_templates/list_communications_templates.py +++ b/rootly_sdk/api/communications_templates/list_communications_templates.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -86,34 +87,34 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsTemplatesResponse]: """Lists communications templates Lists communications templates Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommunication_type_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,34 +148,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsTemplatesResponse | None: """Lists communications templates Lists communications templates Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommunication_type_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -203,34 +204,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsTemplatesResponse]: """Lists communications templates Lists communications templates Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommunication_type_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -262,34 +263,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommunication_type_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommunication_type_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsTemplatesResponse | None: """Lists communications templates Lists communications templates Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommunication_type_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommunication_type_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/communications_templates/update_communications_template.py b/rootly_sdk/api/communications_templates/update_communications_template.py index 5894b08a..d3b3b5a0 100644 --- a/rootly_sdk/api/communications_templates/update_communications_template.py +++ b/rootly_sdk/api/communications_templates/update_communications_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/communications/templates/{id}", + "url": "/v1/communications/templates/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTemplateResponse, ErrorsList]] + Response[CommunicationsTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTemplateResponse, ErrorsList] + CommunicationsTemplateResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTemplateResponse, ErrorsList]] + Response[CommunicationsTemplateResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTemplateResponse, ErrorsList] + CommunicationsTemplateResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_types/create_communications_type.py b/rootly_sdk/api/communications_types/create_communications_type.py index 62e71775..873b6e89 100644 --- a/rootly_sdk/api/communications_types/create_communications_type.py +++ b/rootly_sdk/api/communications_types/create_communications_type.py @@ -77,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTypeResponse, ErrorsList]] + Response[CommunicationsTypeResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -108,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTypeResponse, ErrorsList] + CommunicationsTypeResponse | ErrorsList """ return sync_detailed( @@ -134,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTypeResponse, ErrorsList]] + Response[CommunicationsTypeResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -163,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTypeResponse, ErrorsList] + CommunicationsTypeResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_types/delete_communications_type.py b/rootly_sdk/api/communications_types/delete_communications_type.py index 50705d45..c14a941b 100644 --- a/rootly_sdk/api/communications_types/delete_communications_type.py +++ b/rootly_sdk/api/communications_types/delete_communications_type.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/communications/types/{id}", + "url": "/v1/communications/types/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -62,7 +66,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -93,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -119,7 +123,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -148,7 +152,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_types/get_communications_type.py b/rootly_sdk/api/communications_types/get_communications_type.py index 6c3d3e3f..1326081e 100644 --- a/rootly_sdk/api/communications_types/get_communications_type.py +++ b/rootly_sdk/api/communications_types/get_communications_type.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/communications/types/{id}", + "url": "/v1/communications/types/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTypeResponse, ErrorsList]] + Response[CommunicationsTypeResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTypeResponse, ErrorsList] + CommunicationsTypeResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTypeResponse, ErrorsList]] + Response[CommunicationsTypeResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTypeResponse, ErrorsList] + CommunicationsTypeResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/communications_types/list_communications_types.py b/rootly_sdk/api/communications_types/list_communications_types.py index 1d7c6b9a..fdbac8ae 100644 --- a/rootly_sdk/api/communications_types/list_communications_types.py +++ b/rootly_sdk/api/communications_types/list_communications_types.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -83,32 +84,32 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsTypesResponse]: """Lists communications types Lists communications types Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,32 +142,32 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsTypesResponse | None: """Lists communications types Lists communications types Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -194,32 +195,32 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CommunicationsTypesResponse]: """Lists communications types Lists communications types Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -250,32 +251,32 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CommunicationsTypesResponse | None: """Lists communications types Lists communications types Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/communications_types/update_communications_type.py b/rootly_sdk/api/communications_types/update_communications_type.py index cda47a9b..7e463b14 100644 --- a/rootly_sdk/api/communications_types/update_communications_type.py +++ b/rootly_sdk/api/communications_types/update_communications_type.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/communications/types/{id}", + "url": "/v1/communications/types/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTypeResponse, ErrorsList]] + Response[CommunicationsTypeResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTypeResponse, ErrorsList] + CommunicationsTypeResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CommunicationsTypeResponse, ErrorsList]] + Response[CommunicationsTypeResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CommunicationsTypeResponse, ErrorsList] + CommunicationsTypeResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/custom_forms/create_custom_form.py b/rootly_sdk/api/custom_forms/create_custom_form.py index bbe174d9..3ce9ad7d 100644 --- a/rootly_sdk/api/custom_forms/create_custom_form.py +++ b/rootly_sdk/api/custom_forms/create_custom_form.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/custom_forms/delete_custom_form.py b/rootly_sdk/api/custom_forms/delete_custom_form.py index 18759967..596f17a9 100644 --- a/rootly_sdk/api/custom_forms/delete_custom_form.py +++ b/rootly_sdk/api/custom_forms/delete_custom_form.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/custom_forms/{id}", + "url": "/v1/custom_forms/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CustomFormResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CustomFormResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CustomFormResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CustomFormResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/custom_forms/get_custom_form.py b/rootly_sdk/api/custom_forms/get_custom_form.py index b6d6b985..bddf53a7 100644 --- a/rootly_sdk/api/custom_forms/get_custom_form.py +++ b/rootly_sdk/api/custom_forms/get_custom_form.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/custom_forms/{id}", + "url": "/v1/custom_forms/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CustomFormResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CustomFormResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[CustomFormResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> CustomFormResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/custom_forms/list_custom_forms.py b/rootly_sdk/api/custom_forms/list_custom_forms.py index d1dc7aa2..0308a583 100644 --- a/rootly_sdk/api/custom_forms/list_custom_forms.py +++ b/rootly_sdk/api/custom_forms/list_custom_forms.py @@ -12,18 +12,19 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommand: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommand: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -92,41 +93,41 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommand: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommand: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CustomFormList | ErrorsList]: """List custom forms List custom forms Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommand (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommand (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormList, ErrorsList]] + Response[CustomFormList | ErrorsList] """ kwargs = _get_kwargs( @@ -153,41 +154,41 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommand: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommand: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CustomFormList | ErrorsList | None: """List custom forms List custom forms Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommand (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommand (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormList, ErrorsList] + CustomFormList | ErrorsList """ return sync_detailed( @@ -209,41 +210,41 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommand: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommand: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[CustomFormList | ErrorsList]: """List custom forms List custom forms Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommand (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommand (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormList, ErrorsList]] + Response[CustomFormList | ErrorsList] """ kwargs = _get_kwargs( @@ -268,41 +269,41 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercommand: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercommand: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> CustomFormList | ErrorsList | None: """List custom forms List custom forms Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercommand (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercommand (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormList, ErrorsList] + CustomFormList | ErrorsList """ return ( diff --git a/rootly_sdk/api/custom_forms/update_custom_form.py b/rootly_sdk/api/custom_forms/update_custom_form.py index c5e1b259..1b640d81 100644 --- a/rootly_sdk/api/custom_forms/update_custom_form.py +++ b/rootly_sdk/api/custom_forms/update_custom_form.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateCustomForm, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/custom_forms/{id}", + "url": "/v1/custom_forms/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCustomForm): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, @@ -107,7 +110,7 @@ def sync( Update a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCustomForm): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCustomForm): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFormResponse, ErrorsList]] + Response[CustomFormResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, @@ -168,7 +171,7 @@ async def asyncio( Update a specific custom form by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateCustomForm): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFormResponse, ErrorsList] + CustomFormResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py index e1302e00..89a6b704 100644 --- a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/dashboards/{dashboard_id}/panels", + "url": "/v1/dashboards/{dashboard_id}/panels".format( + dashboard_id=quote(str(dashboard_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardPanelResponse, ErrorsList]] + Response[DashboardPanelResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardPanelResponse, ErrorsList] + DashboardPanelResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardPanelResponse, ErrorsList]] + Response[DashboardPanelResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardPanelResponse, ErrorsList] + DashboardPanelResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py index 9580cb4c..d630d717 100644 --- a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/dashboard_panels/{id}", + "url": "/v1/dashboard_panels/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs diff --git a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py index ef54bcfd..825e1ab8 100644 --- a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/dashboard_panels/{id}/duplicate", + "url": "/v1/dashboard_panels/{id}/duplicate".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardPanelResponse, ErrorsList]] + Response[DashboardPanelResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardPanelResponse, ErrorsList] + DashboardPanelResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardPanelResponse, ErrorsList]] + Response[DashboardPanelResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardPanelResponse, ErrorsList] + DashboardPanelResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py index 8fabc049..9bee49b7 100644 --- a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( id: str, *, - range_: Unset | str = UNSET, - period: Unset | str = UNSET, - time_zone: Unset | str = UNSET, + range_: str | Unset = UNSET, + period: str | Unset = UNSET, + time_zone: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["range"] = range_ @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/dashboard_panels/{id}", + "url": "/v1/dashboard_panels/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -62,9 +66,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - range_: Unset | str = UNSET, - period: Unset | str = UNSET, - time_zone: Unset | str = UNSET, + range_: str | Unset = UNSET, + period: str | Unset = UNSET, + time_zone: str | Unset = UNSET, ) -> Response[DashboardPanelResponse]: """Retrieves a dashboard panel @@ -72,9 +76,9 @@ def sync_detailed( Args: id (str): - range_ (Union[Unset, str]): - period (Union[Unset, str]): - time_zone (Union[Unset, str]): + range_ (str | Unset): + period (str | Unset): + time_zone (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,9 +106,9 @@ def sync( id: str, *, client: AuthenticatedClient, - range_: Unset | str = UNSET, - period: Unset | str = UNSET, - time_zone: Unset | str = UNSET, + range_: str | Unset = UNSET, + period: str | Unset = UNSET, + time_zone: str | Unset = UNSET, ) -> DashboardPanelResponse | None: """Retrieves a dashboard panel @@ -112,9 +116,9 @@ def sync( Args: id (str): - range_ (Union[Unset, str]): - period (Union[Unset, str]): - time_zone (Union[Unset, str]): + range_ (str | Unset): + period (str | Unset): + time_zone (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,9 +141,9 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - range_: Unset | str = UNSET, - period: Unset | str = UNSET, - time_zone: Unset | str = UNSET, + range_: str | Unset = UNSET, + period: str | Unset = UNSET, + time_zone: str | Unset = UNSET, ) -> Response[DashboardPanelResponse]: """Retrieves a dashboard panel @@ -147,9 +151,9 @@ async def asyncio_detailed( Args: id (str): - range_ (Union[Unset, str]): - period (Union[Unset, str]): - time_zone (Union[Unset, str]): + range_ (str | Unset): + period (str | Unset): + time_zone (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,9 +179,9 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - range_: Unset | str = UNSET, - period: Unset | str = UNSET, - time_zone: Unset | str = UNSET, + range_: str | Unset = UNSET, + period: str | Unset = UNSET, + time_zone: str | Unset = UNSET, ) -> DashboardPanelResponse | None: """Retrieves a dashboard panel @@ -185,9 +189,9 @@ async def asyncio( Args: id (str): - range_ (Union[Unset, str]): - period (Union[Unset, str]): - time_zone (Union[Unset, str]): + range_ (str | Unset): + period (str | Unset): + time_zone (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py index 60d15e58..d807646c 100644 --- a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py +++ b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( dashboard_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/dashboards/{dashboard_id}/panels", + "url": "/v1/dashboards/{dashboard_id}/panels".format( + dashboard_id=quote(str(dashboard_id), safe=""), + ), "params": params, } @@ -60,9 +64,9 @@ def sync_detailed( dashboard_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[DashboardPanelList]: """List dashboard panels @@ -70,9 +74,9 @@ def sync_detailed( Args: dashboard_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,9 +104,9 @@ def sync( dashboard_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> DashboardPanelList | None: """List dashboard panels @@ -110,9 +114,9 @@ def sync( Args: dashboard_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,9 +139,9 @@ async def asyncio_detailed( dashboard_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[DashboardPanelList]: """List dashboard panels @@ -145,9 +149,9 @@ async def asyncio_detailed( Args: dashboard_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,9 +177,9 @@ async def asyncio( dashboard_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> DashboardPanelList | None: """List dashboard panels @@ -183,9 +187,9 @@ async def asyncio( Args: dashboard_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py index 05914600..8c15920b 100644 --- a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -19,7 +20,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/dashboard_panels/{id}", + "url": "/v1/dashboard_panels/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/rootly_sdk/api/dashboards/create_dashboard.py b/rootly_sdk/api/dashboards/create_dashboard.py index aa3291f9..32bb4589 100644 --- a/rootly_sdk/api/dashboards/create_dashboard.py +++ b/rootly_sdk/api/dashboards/create_dashboard.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboards/delete_dashboard.py b/rootly_sdk/api/dashboards/delete_dashboard.py index 8d7d943a..e16a82d5 100644 --- a/rootly_sdk/api/dashboards/delete_dashboard.py +++ b/rootly_sdk/api/dashboards/delete_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/dashboards/{id}", + "url": "/v1/dashboards/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[DashboardResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> DashboardResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[DashboardResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> DashboardResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboards/duplicate_dashboard.py b/rootly_sdk/api/dashboards/duplicate_dashboard.py index ae8dfea4..2c874a17 100644 --- a/rootly_sdk/api/dashboards/duplicate_dashboard.py +++ b/rootly_sdk/api/dashboards/duplicate_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/dashboards/{id}/duplicate", + "url": "/v1/dashboards/{id}/duplicate".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[DashboardResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Duplicates a dashboard Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> DashboardResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Duplicates a dashboard Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[DashboardResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Duplicates a dashboard Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> DashboardResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Duplicates a dashboard Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboards/get_dashboard.py b/rootly_sdk/api/dashboards/get_dashboard.py index 41389041..f20260b3 100644 --- a/rootly_sdk/api/dashboards/get_dashboard.py +++ b/rootly_sdk/api/dashboards/get_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,13 +14,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - include: Unset | GetDashboardInclude = UNSET, + include: GetDashboardInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/dashboards/{id}", + "url": "/v1/dashboards/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -67,25 +71,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetDashboardInclude = UNSET, + include: GetDashboardInclude | Unset = UNSET, ) -> Response[DashboardResponse | ErrorsList]: """Retrieves a dashboard Retrieves a specific dashboard by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetDashboardInclude]): + id (str | UUID): + include (GetDashboardInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -101,25 +105,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetDashboardInclude = UNSET, + include: GetDashboardInclude | Unset = UNSET, ) -> DashboardResponse | ErrorsList | None: """Retrieves a dashboard Retrieves a specific dashboard by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetDashboardInclude]): + id (str | UUID): + include (GetDashboardInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return sync_detailed( @@ -130,25 +134,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetDashboardInclude = UNSET, + include: GetDashboardInclude | Unset = UNSET, ) -> Response[DashboardResponse | ErrorsList]: """Retrieves a dashboard Retrieves a specific dashboard by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetDashboardInclude]): + id (str | UUID): + include (GetDashboardInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -162,25 +166,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetDashboardInclude = UNSET, + include: GetDashboardInclude | Unset = UNSET, ) -> DashboardResponse | ErrorsList | None: """Retrieves a dashboard Retrieves a specific dashboard by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetDashboardInclude]): + id (str | UUID): + include (GetDashboardInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboards/list_dashboards.py b/rootly_sdk/api/dashboards/list_dashboards.py index 13665e62..c0c41cd8 100644 --- a/rootly_sdk/api/dashboards/list_dashboards.py +++ b/rootly_sdk/api/dashboards/list_dashboards.py @@ -12,13 +12,14 @@ def _get_kwargs( *, - include: Unset | ListDashboardsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListDashboardsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -63,18 +64,18 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListDashboardsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListDashboardsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[DashboardList]: """List dashboards List dashboards Args: - include (Union[Unset, ListDashboardsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListDashboardsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,18 +101,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListDashboardsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListDashboardsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> DashboardList | None: """List dashboards List dashboards Args: - include (Union[Unset, ListDashboardsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListDashboardsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,18 +133,18 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListDashboardsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListDashboardsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[DashboardList]: """List dashboards List dashboards Args: - include (Union[Unset, ListDashboardsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListDashboardsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,18 +168,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListDashboardsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListDashboardsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> DashboardList | None: """List dashboards List dashboards Args: - include (Union[Unset, ListDashboardsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListDashboardsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/dashboards/set_default_dashboard.py b/rootly_sdk/api/dashboards/set_default_dashboard.py index d6fb3419..7cf3246d 100644 --- a/rootly_sdk/api/dashboards/set_default_dashboard.py +++ b/rootly_sdk/api/dashboards/set_default_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/dashboards/{id}/set_default", + "url": "/v1/dashboards/{id}/set_default".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[DashboardResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Sets dashboard to user default Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> DashboardResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Sets dashboard to user default Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[DashboardResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Sets dashboard to user default Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> DashboardResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Sets dashboard to user default Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/dashboards/update_dashboard.py b/rootly_sdk/api/dashboards/update_dashboard.py index f1dab2cb..56ac6566 100644 --- a/rootly_sdk/api/dashboards/update_dashboard.py +++ b/rootly_sdk/api/dashboards/update_dashboard.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateDashboard, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/dashboards/{id}", + "url": "/v1/dashboards/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateDashboard): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, @@ -107,7 +110,7 @@ def sync( Update a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateDashboard): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateDashboard): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[DashboardResponse, ErrorsList]] + Response[DashboardResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, @@ -168,7 +171,7 @@ async def asyncio( Update a specific dashboard by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateDashboard): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[DashboardResponse, ErrorsList] + DashboardResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_field_options/create_custom_field_option.py b/rootly_sdk/api/deprecated_custom_field_options/create_custom_field_option.py index 64fb8702..65314afc 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/create_custom_field_option.py +++ b/rootly_sdk/api/deprecated_custom_field_options/create_custom_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/custom_fields/{custom_field_id}/options", + "url": "/v1/custom_fields/{custom_field_id}/options".format( + custom_field_id=quote(str(custom_field_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_field_options/delete_custom_field_option.py b/rootly_sdk/api/deprecated_custom_field_options/delete_custom_field_option.py index 331f1a0e..3968cd4d 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/delete_custom_field_option.py +++ b/rootly_sdk/api/deprecated_custom_field_options/delete_custom_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/custom_field_options/{id}", + "url": "/v1/custom_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_field_options/get_custom_field_option.py b/rootly_sdk/api/deprecated_custom_field_options/get_custom_field_option.py index 1f7ee239..afdda05c 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/get_custom_field_option.py +++ b/rootly_sdk/api/deprecated_custom_field_options/get_custom_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/custom_field_options/{id}", + "url": "/v1/custom_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_field_options/list_custom_field_options.py b/rootly_sdk/api/deprecated_custom_field_options/list_custom_field_options.py index cec6b6d7..bca688b3 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/list_custom_field_options.py +++ b/rootly_sdk/api/deprecated_custom_field_options/list_custom_field_options.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,12 +13,13 @@ def _get_kwargs( custom_field_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -34,7 +36,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/custom_fields/{custom_field_id}/options", + "url": "/v1/custom_fields/{custom_field_id}/options".format( + custom_field_id=quote(str(custom_field_id), safe=""), + ), "params": params, } @@ -68,11 +72,11 @@ def sync_detailed( custom_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> Response[CustomFieldOptionList]: """[DEPRECATED] List custom field options @@ -80,11 +84,11 @@ def sync_detailed( Args: custom_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -114,11 +118,11 @@ def sync( custom_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> CustomFieldOptionList | None: """[DEPRECATED] List custom field options @@ -126,11 +130,11 @@ def sync( Args: custom_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -155,11 +159,11 @@ async def asyncio_detailed( custom_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> Response[CustomFieldOptionList]: """[DEPRECATED] List custom field options @@ -167,11 +171,11 @@ async def asyncio_detailed( Args: custom_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,11 +203,11 @@ async def asyncio( custom_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> CustomFieldOptionList | None: """[DEPRECATED] List custom field options @@ -211,11 +215,11 @@ async def asyncio( Args: custom_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/deprecated_custom_field_options/update_custom_field_option.py b/rootly_sdk/api/deprecated_custom_field_options/update_custom_field_option.py index 4f114d44..394362f8 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/update_custom_field_option.py +++ b/rootly_sdk/api/deprecated_custom_field_options/update_custom_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/custom_field_options/{id}", + "url": "/v1/custom_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldOptionResponse, ErrorsList]] + Response[CustomFieldOptionResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldOptionResponse, ErrorsList] + CustomFieldOptionResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py b/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py index d8545178..d4ca5660 100644 --- a/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py b/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py index 3391f10e..9fa62894 100644 --- a/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/custom_fields/{id}", + "url": "/v1/custom_fields/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py b/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py index 693eb8ff..3ee224fc 100644 --- a/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,11 +15,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetCustomFieldInclude = UNSET, + include: GetCustomFieldInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/custom_fields/{id}", + "url": "/v1/custom_fields/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -69,7 +73,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetCustomFieldInclude = UNSET, + include: GetCustomFieldInclude | Unset = UNSET, ) -> Response[CustomFieldResponse | ErrorsList]: """[DEPRECATED] Retrieves a Custom Field @@ -77,14 +81,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetCustomFieldInclude]): + include (GetCustomFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -103,7 +107,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetCustomFieldInclude = UNSET, + include: GetCustomFieldInclude | Unset = UNSET, ) -> CustomFieldResponse | ErrorsList | None: """[DEPRECATED] Retrieves a Custom Field @@ -111,14 +115,14 @@ def sync( Args: id (str): - include (Union[Unset, GetCustomFieldInclude]): + include (GetCustomFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetCustomFieldInclude = UNSET, + include: GetCustomFieldInclude | Unset = UNSET, ) -> Response[CustomFieldResponse | ErrorsList]: """[DEPRECATED] Retrieves a Custom Field @@ -140,14 +144,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetCustomFieldInclude]): + include (GetCustomFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetCustomFieldInclude = UNSET, + include: GetCustomFieldInclude | Unset = UNSET, ) -> CustomFieldResponse | ErrorsList | None: """[DEPRECATED] Retrieves a Custom Field @@ -172,14 +176,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetCustomFieldInclude]): + include (GetCustomFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py index 25900182..a31e3002 100644 --- a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py +++ b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py @@ -13,28 +13,29 @@ def _get_kwargs( *, - include: Unset | ListCustomFieldsInclude = UNSET, - sort: Unset | ListCustomFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filterlabel: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCustomFieldsInclude | Unset = UNSET, + sort: ListCustomFieldsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterlabel: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -95,36 +96,36 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListCustomFieldsInclude = UNSET, - sort: Unset | ListCustomFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filterlabel: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCustomFieldsInclude | Unset = UNSET, + sort: ListCustomFieldsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterlabel: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CustomFieldList]: """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields Args: - include (Union[Unset, ListCustomFieldsInclude]): - sort (Union[Unset, ListCustomFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filterlabel (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCustomFieldsInclude | Unset): + sort (ListCustomFieldsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filterlabel (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -159,36 +160,36 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListCustomFieldsInclude = UNSET, - sort: Unset | ListCustomFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filterlabel: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCustomFieldsInclude | Unset = UNSET, + sort: ListCustomFieldsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterlabel: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CustomFieldList | None: """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields Args: - include (Union[Unset, ListCustomFieldsInclude]): - sort (Union[Unset, ListCustomFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filterlabel (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCustomFieldsInclude | Unset): + sort (ListCustomFieldsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filterlabel (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -218,36 +219,36 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListCustomFieldsInclude = UNSET, - sort: Unset | ListCustomFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filterlabel: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCustomFieldsInclude | Unset = UNSET, + sort: ListCustomFieldsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterlabel: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[CustomFieldList]: """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields Args: - include (Union[Unset, ListCustomFieldsInclude]): - sort (Union[Unset, ListCustomFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filterlabel (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCustomFieldsInclude | Unset): + sort (ListCustomFieldsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filterlabel (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -280,36 +281,36 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListCustomFieldsInclude = UNSET, - sort: Unset | ListCustomFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filterlabel: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListCustomFieldsInclude | Unset = UNSET, + sort: ListCustomFieldsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterlabel: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> CustomFieldList | None: """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields Args: - include (Union[Unset, ListCustomFieldsInclude]): - sort (Union[Unset, ListCustomFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filterlabel (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListCustomFieldsInclude | Unset): + sort (ListCustomFieldsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filterlabel (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py b/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py index bd9635d7..6c03fcb7 100644 --- a/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/custom_fields/{id}", + "url": "/v1/custom_fields/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CustomFieldResponse, ErrorsList]] + Response[CustomFieldResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CustomFieldResponse, ErrorsList] + CustomFieldResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/create_incident_custom_field_selection.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/create_incident_custom_field_selection.py index c8df48b9..656ce720 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/create_incident_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/create_incident_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/custom_field_selections", + "url": "/v1/incidents/{incident_id}/custom_field_selections".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -86,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -121,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return sync_detailed( @@ -151,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -184,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/delete_incident_custom_field_selection.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/delete_incident_custom_field_selection.py index 649c250e..b96d8ac0 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/delete_incident_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/delete_incident_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_custom_field_selections/{id}", + "url": "/v1/incident_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -69,7 +73,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -101,7 +105,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -158,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/get_incident_custom_field_selection.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/get_incident_custom_field_selection.py index 2eb7fe16..51ee55a3 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/get_incident_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/get_incident_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_custom_field_selections/{id}", + "url": "/v1/incident_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -69,7 +73,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -101,7 +105,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -158,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/list_incident_custom_field_selections.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/list_incident_custom_field_selections.py index d57c8279..5e6f60d6 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/list_incident_custom_field_selections.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/list_incident_custom_field_selections.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/custom_field_selections", + "url": "/v1/incidents/{incident_id}/custom_field_selections".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentCustomFieldSelectionList]: """[DEPRECATED] List incident custom field selections @@ -74,9 +78,9 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentCustomFieldSelectionList | None: """[DEPRECATED] List incident custom field selections @@ -114,9 +118,9 @@ def sync( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentCustomFieldSelectionList]: """[DEPRECATED] List incident custom field selections @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentCustomFieldSelectionList | None: """[DEPRECATED] List incident custom field selections @@ -187,9 +191,9 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/update_incident_custom_field_selection.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/update_incident_custom_field_selection.py index 7269c699..b94030b8 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/update_incident_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/update_incident_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_custom_field_selections/{id}", + "url": "/v1/incident_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -116,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return sync_detailed( @@ -146,7 +149,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentCustomFieldSelectionResponse]] + Response[ErrorsList | IncidentCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -179,7 +182,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentCustomFieldSelectionResponse] + ErrorsList | IncidentCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/create_workflow_custom_field_selection.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/create_workflow_custom_field_selection.py index 5e0751b7..60ac3c5d 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/create_workflow_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/create_workflow_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/workflows/{workflow_id}/custom_field_selections", + "url": "/v1/workflows/{workflow_id}/custom_field_selections".format( + workflow_id=quote(str(workflow_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -116,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return sync_detailed( @@ -146,7 +149,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -179,7 +182,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/delete_workflow_custom_field_selection.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/delete_workflow_custom_field_selection.py index 6a1c1aed..c41ac11d 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/delete_workflow_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/delete_workflow_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/workflow_custom_field_selections/{id}", + "url": "/v1/workflow_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -69,7 +73,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -101,7 +105,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -158,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/get_workflow_custom_field_selection.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/get_workflow_custom_field_selection.py index 01b037e7..30f721e6 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/get_workflow_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/get_workflow_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflow_custom_field_selections/{id}", + "url": "/v1/workflow_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -69,7 +73,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -101,7 +105,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -158,7 +162,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/list_workflow_custom_field_selections.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/list_workflow_custom_field_selections.py index b023d80d..764381f7 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/list_workflow_custom_field_selections.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/list_workflow_custom_field_selections.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( workflow_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/custom_field_selections", + "url": "/v1/workflows/{workflow_id}/custom_field_selections".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[WorkflowCustomFieldSelectionList]: """[DEPRECATED] List workflow custom field selections @@ -74,9 +78,9 @@ def sync_detailed( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> WorkflowCustomFieldSelectionList | None: """[DEPRECATED] List workflow custom field selections @@ -114,9 +118,9 @@ def sync( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[WorkflowCustomFieldSelectionList]: """[DEPRECATED] List workflow custom field selections @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> WorkflowCustomFieldSelectionList | None: """[DEPRECATED] List workflow custom field selections @@ -187,9 +191,9 @@ async def asyncio( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/update_workflow_custom_field_selection.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/update_workflow_custom_field_selection.py index 78517bb2..5f683704 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/update_workflow_custom_field_selection.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/update_workflow_custom_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/workflow_custom_field_selections/{id}", + "url": "/v1/workflow_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -116,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return sync_detailed( @@ -146,7 +149,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowCustomFieldSelectionResponse]] + Response[ErrorsList | WorkflowCustomFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -179,7 +182,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowCustomFieldSelectionResponse] + ErrorsList | WorkflowCustomFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/edge_connector_actions/create_edge_connector_action.py b/rootly_sdk/api/edge_connector_actions/create_edge_connector_action.py index 29ca9bbd..2fab426e 100644 --- a/rootly_sdk/api/edge_connector_actions/create_edge_connector_action.py +++ b/rootly_sdk/api/edge_connector_actions/create_edge_connector_action.py @@ -1,27 +1,31 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.create_edge_connector_action_body import CreateEdgeConnectorActionBody -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( edge_connector_id: str, *, - body: CreateEdgeConnectorActionBody, + body: CreateEdgeConnectorActionBody | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/edge_connectors/{edge_connector_id}/actions", + "url": "/v1/edge_connectors/{edge_connector_id}/actions".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -55,13 +59,13 @@ def sync_detailed( edge_connector_id: str, *, client: AuthenticatedClient, - body: CreateEdgeConnectorActionBody, + body: CreateEdgeConnectorActionBody | Unset = UNSET, ) -> Response[Any]: """Create edge connector action Args: edge_connector_id (str): - body (CreateEdgeConnectorActionBody): + body (CreateEdgeConnectorActionBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -87,13 +91,13 @@ async def asyncio_detailed( edge_connector_id: str, *, client: AuthenticatedClient, - body: CreateEdgeConnectorActionBody, + body: CreateEdgeConnectorActionBody | Unset = UNSET, ) -> Response[Any]: """Create edge connector action Args: edge_connector_id (str): - body (CreateEdgeConnectorActionBody): + body (CreateEdgeConnectorActionBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/edge_connector_actions/delete_edge_connector_action.py b/rootly_sdk/api/edge_connector_actions/delete_edge_connector_action.py index 5ec477b2..bcad29a3 100644 --- a/rootly_sdk/api/edge_connector_actions/delete_edge_connector_action.py +++ b/rootly_sdk/api/edge_connector_actions/delete_edge_connector_action.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -11,11 +12,15 @@ def _get_kwargs( edge_connector_id: str, - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/edge_connectors/{edge_connector_id}/actions/{id}", + "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + id=quote(str(id), safe=""), + ), } return _kwargs @@ -42,7 +47,7 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[Any]: @@ -50,7 +55,7 @@ def sync_detailed( Args: edge_connector_id (str): - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -74,7 +79,7 @@ def sync_detailed( async def asyncio_detailed( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[Any]: @@ -82,7 +87,7 @@ async def asyncio_detailed( Args: edge_connector_id (str): - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/edge_connector_actions/get_edge_connector_action.py b/rootly_sdk/api/edge_connector_actions/get_edge_connector_action.py index 880d1923..35449bd3 100644 --- a/rootly_sdk/api/edge_connector_actions/get_edge_connector_action.py +++ b/rootly_sdk/api/edge_connector_actions/get_edge_connector_action.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -11,11 +12,15 @@ def _get_kwargs( edge_connector_id: str, - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/edge_connectors/{edge_connector_id}/actions/{id}", + "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + id=quote(str(id), safe=""), + ), } return _kwargs @@ -45,7 +50,7 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[Any]: @@ -53,7 +58,7 @@ def sync_detailed( Args: edge_connector_id (str): - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -77,7 +82,7 @@ def sync_detailed( async def asyncio_detailed( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[Any]: @@ -85,7 +90,7 @@ async def asyncio_detailed( Args: edge_connector_id (str): - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/edge_connector_actions/list_edge_connector_actions.py b/rootly_sdk/api/edge_connector_actions/list_edge_connector_actions.py index 28079f6d..ac27ce42 100644 --- a/rootly_sdk/api/edge_connector_actions/list_edge_connector_actions.py +++ b/rootly_sdk/api/edge_connector_actions/list_edge_connector_actions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -11,9 +12,12 @@ def _get_kwargs( edge_connector_id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/edge_connectors/{edge_connector_id}/actions", + "url": "/v1/edge_connectors/{edge_connector_id}/actions".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + ), } return _kwargs diff --git a/rootly_sdk/api/edge_connector_actions/update_edge_connector_action.py b/rootly_sdk/api/edge_connector_actions/update_edge_connector_action.py index cf2b03a1..9be920e7 100644 --- a/rootly_sdk/api/edge_connector_actions/update_edge_connector_action.py +++ b/rootly_sdk/api/edge_connector_actions/update_edge_connector_action.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -7,23 +8,27 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.update_edge_connector_action_body import UpdateEdgeConnectorActionBody -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, - body: UpdateEdgeConnectorActionBody, + body: UpdateEdgeConnectorActionBody | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/edge_connectors/{edge_connector_id}/actions/{id}", + "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + id=quote(str(id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -52,17 +57,17 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - body: UpdateEdgeConnectorActionBody, + body: UpdateEdgeConnectorActionBody | Unset = UNSET, ) -> Response[Any]: """Update edge connector action Args: edge_connector_id (str): - id (Union[UUID, str]): - body (UpdateEdgeConnectorActionBody): + id (str | UUID): + body (UpdateEdgeConnectorActionBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -87,17 +92,17 @@ def sync_detailed( async def asyncio_detailed( edge_connector_id: str, - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - body: UpdateEdgeConnectorActionBody, + body: UpdateEdgeConnectorActionBody | Unset = UNSET, ) -> Response[Any]: """Update edge connector action Args: edge_connector_id (str): - id (Union[UUID, str]): - body (UpdateEdgeConnectorActionBody): + id (str | UUID): + body (UpdateEdgeConnectorActionBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/edge_connectors/create_edge_connector.py b/rootly_sdk/api/edge_connectors/create_edge_connector.py index 31971c77..4fd4237e 100644 --- a/rootly_sdk/api/edge_connectors/create_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/create_edge_connector.py @@ -6,12 +6,12 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.create_edge_connector_body import CreateEdgeConnectorBody -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( *, - body: CreateEdgeConnectorBody, + body: CreateEdgeConnectorBody | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -20,7 +20,8 @@ def _get_kwargs( "url": "/v1/edge_connectors", } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -53,12 +54,12 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - body: CreateEdgeConnectorBody, + body: CreateEdgeConnectorBody | Unset = UNSET, ) -> Response[Any]: """Create edge connector Args: - body (CreateEdgeConnectorBody): + body (CreateEdgeConnectorBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -82,12 +83,12 @@ def sync_detailed( async def asyncio_detailed( *, client: AuthenticatedClient, - body: CreateEdgeConnectorBody, + body: CreateEdgeConnectorBody | Unset = UNSET, ) -> Response[Any]: """Create edge connector Args: - body (CreateEdgeConnectorBody): + body (CreateEdgeConnectorBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/edge_connectors/delete_edge_connector.py b/rootly_sdk/api/edge_connectors/delete_edge_connector.py index 7f472c71..a289f349 100644 --- a/rootly_sdk/api/edge_connectors/delete_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/delete_edge_connector.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -11,9 +12,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/edge_connectors/{id}", + "url": "/v1/edge_connectors/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs diff --git a/rootly_sdk/api/edge_connectors/get_edge_connector.py b/rootly_sdk/api/edge_connectors/get_edge_connector.py index b1667ef7..ce73bfe0 100644 --- a/rootly_sdk/api/edge_connectors/get_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/get_edge_connector.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -11,9 +12,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/edge_connectors/{id}", + "url": "/v1/edge_connectors/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs diff --git a/rootly_sdk/api/edge_connectors/list_edge_connectors.py b/rootly_sdk/api/edge_connectors/list_edge_connectors.py index 1e7b1c39..e24a0844 100644 --- a/rootly_sdk/api/edge_connectors/list_edge_connectors.py +++ b/rootly_sdk/api/edge_connectors/list_edge_connectors.py @@ -10,11 +10,12 @@ def _get_kwargs( *, - page: Unset | int = UNSET, - per_page: Unset | int = UNSET, - status: Unset | str = UNSET, - name: Unset | str = UNSET, + page: int | Unset = UNSET, + per_page: int | Unset = UNSET, + status: str | Unset = UNSET, + name: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page"] = page @@ -58,18 +59,18 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - page: Unset | int = UNSET, - per_page: Unset | int = UNSET, - status: Unset | str = UNSET, - name: Unset | str = UNSET, + page: int | Unset = UNSET, + per_page: int | Unset = UNSET, + status: str | Unset = UNSET, + name: str | Unset = UNSET, ) -> Response[Any]: """List edge connectors Args: - page (Union[Unset, int]): - per_page (Union[Unset, int]): - status (Union[Unset, str]): - name (Union[Unset, str]): + page (int | Unset): + per_page (int | Unset): + status (str | Unset): + name (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -96,18 +97,18 @@ def sync_detailed( async def asyncio_detailed( *, client: AuthenticatedClient, - page: Unset | int = UNSET, - per_page: Unset | int = UNSET, - status: Unset | str = UNSET, - name: Unset | str = UNSET, + page: int | Unset = UNSET, + per_page: int | Unset = UNSET, + status: str | Unset = UNSET, + name: str | Unset = UNSET, ) -> Response[Any]: """List edge connectors Args: - page (Union[Unset, int]): - per_page (Union[Unset, int]): - status (Union[Unset, str]): - name (Union[Unset, str]): + page (int | Unset): + per_page (int | Unset): + status (str | Unset): + name (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/edge_connectors/update_edge_connector.py b/rootly_sdk/api/edge_connectors/update_edge_connector.py index 1c7b0e27..df27a0bb 100644 --- a/rootly_sdk/api/edge_connectors/update_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/update_edge_connector.py @@ -1,27 +1,31 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.update_edge_connector_body import UpdateEdgeConnectorBody -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( id: str, *, - body: UpdateEdgeConnectorBody, + body: UpdateEdgeConnectorBody | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "patch", - "url": f"/v1/edge_connectors/{id}", + "url": "/v1/edge_connectors/{id}".format( + id=quote(str(id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -55,13 +59,13 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateEdgeConnectorBody, + body: UpdateEdgeConnectorBody | Unset = UNSET, ) -> Response[Any]: """Update edge connector Args: id (str): - body (UpdateEdgeConnectorBody): + body (UpdateEdgeConnectorBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -87,13 +91,13 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateEdgeConnectorBody, + body: UpdateEdgeConnectorBody | Unset = UNSET, ) -> Response[Any]: """Update edge connector Args: id (str): - body (UpdateEdgeConnectorBody): + body (UpdateEdgeConnectorBody | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/environments/create_environment.py b/rootly_sdk/api/environments/create_environment.py index caf794c0..a12a138c 100644 --- a/rootly_sdk/api/environments/create_environment.py +++ b/rootly_sdk/api/environments/create_environment.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/functionalities/create_functionality_catalog_field.py b/rootly_sdk/api/environments/create_environment_catalog_property.py similarity index 66% rename from rootly_sdk/api/functionalities/create_functionality_catalog_field.py rename to rootly_sdk/api/environments/create_environment_catalog_property.py index 6786c23a..d3a415ba 100644 --- a/rootly_sdk/api/functionalities/create_functionality_catalog_field.py +++ b/rootly_sdk/api/environments/create_environment_catalog_property.py @@ -5,21 +5,21 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse +from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField +from ...models.new_catalog_property import NewCatalogProperty from ...types import Response def _get_kwargs( *, - body: NewCatalogField, + body: NewCatalogProperty, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/functionalities/fields", + "url": "/v1/environments/properties", } _kwargs["json"] = body.to_dict() @@ -32,9 +32,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> CatalogPropertyResponse | ErrorsList | None: if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) + response_201 = CatalogPropertyResponse.from_dict(response.json()) return response_201 @@ -56,7 +56,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,21 +68,21 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,21 +99,21 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return sync_detailed( @@ -125,21 +125,21 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,21 +154,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/environments/delete_environment.py b/rootly_sdk/api/environments/delete_environment.py index ef4496ee..48221a57 100644 --- a/rootly_sdk/api/environments/delete_environment.py +++ b/rootly_sdk/api/environments/delete_environment.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/environments/{id}", + "url": "/v1/environments/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[EnvironmentResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> EnvironmentResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Delete a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[EnvironmentResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> EnvironmentResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/environments/get_environment.py b/rootly_sdk/api/environments/get_environment.py index 8481d2d2..2fb16213 100644 --- a/rootly_sdk/api/environments/get_environment.py +++ b/rootly_sdk/api/environments/get_environment.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/environments/{id}", + "url": "/v1/environments/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[EnvironmentResponse | ErrorsList]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> EnvironmentResponse | ErrorsList | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[EnvironmentResponse | ErrorsList]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> EnvironmentResponse | ErrorsList | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/environments/list_environment_catalog_fields.py b/rootly_sdk/api/environments/list_environment_catalog_fields.py deleted file mode 100644 index 89150c46..00000000 --- a/rootly_sdk/api/environments/list_environment_catalog_fields.py +++ /dev/null @@ -1,327 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_environment_catalog_fields_include import ( - ListEnvironmentCatalogFieldsInclude, -) -from ...models.list_environment_catalog_fields_sort import ( - ListEnvironmentCatalogFieldsSort, -) -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - include: Unset | ListEnvironmentCatalogFieldsInclude = UNSET, - sort: Unset | ListEnvironmentCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/environments/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListEnvironmentCatalogFieldsInclude = UNSET, - sort: Unset | ListEnvironmentCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Environment Catalog Fields - - Args: - include (Union[Unset, ListEnvironmentCatalogFieldsInclude]): - sort (Union[Unset, ListEnvironmentCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - include: Unset | ListEnvironmentCatalogFieldsInclude = UNSET, - sort: Unset | ListEnvironmentCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Environment Catalog Fields - - Args: - include (Union[Unset, ListEnvironmentCatalogFieldsInclude]): - sort (Union[Unset, ListEnvironmentCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListEnvironmentCatalogFieldsInclude = UNSET, - sort: Unset | ListEnvironmentCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Environment Catalog Fields - - Args: - include (Union[Unset, ListEnvironmentCatalogFieldsInclude]): - sort (Union[Unset, ListEnvironmentCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - include: Unset | ListEnvironmentCatalogFieldsInclude = UNSET, - sort: Unset | ListEnvironmentCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Environment Catalog Fields - - Args: - include (Union[Unset, ListEnvironmentCatalogFieldsInclude]): - sort (Union[Unset, ListEnvironmentCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/environments/list_environment_catalog_properties.py b/rootly_sdk/api/environments/list_environment_catalog_properties.py new file mode 100644 index 00000000..cb526165 --- /dev/null +++ b/rootly_sdk/api/environments/list_environment_catalog_properties.py @@ -0,0 +1,328 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_list import CatalogPropertyList +from ...models.list_environment_catalog_properties_include import ( + ListEnvironmentCatalogPropertiesInclude, +) +from ...models.list_environment_catalog_properties_sort import ( + ListEnvironmentCatalogPropertiesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListEnvironmentCatalogPropertiesInclude | Unset = UNSET, + sort: ListEnvironmentCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[kind]"] = filterkind + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/environments/properties", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogPropertyList | None: + if response.status_code == 200: + response_200 = CatalogPropertyList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListEnvironmentCatalogPropertiesInclude | Unset = UNSET, + sort: ListEnvironmentCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Environment Catalog Properties + + Args: + include (ListEnvironmentCatalogPropertiesInclude | Unset): + sort (ListEnvironmentCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListEnvironmentCatalogPropertiesInclude | Unset = UNSET, + sort: ListEnvironmentCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Environment Catalog Properties + + Args: + include (ListEnvironmentCatalogPropertiesInclude | Unset): + sort (ListEnvironmentCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListEnvironmentCatalogPropertiesInclude | Unset = UNSET, + sort: ListEnvironmentCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Environment Catalog Properties + + Args: + include (ListEnvironmentCatalogPropertiesInclude | Unset): + sort (ListEnvironmentCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListEnvironmentCatalogPropertiesInclude | Unset = UNSET, + sort: ListEnvironmentCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Environment Catalog Properties + + Args: + include (ListEnvironmentCatalogPropertiesInclude | Unset): + sort (ListEnvironmentCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/environments/list_environments.py b/rootly_sdk/api/environments/list_environments.py index 7b07c54f..00b27f3b 100644 --- a/rootly_sdk/api/environments/list_environments.py +++ b/rootly_sdk/api/environments/list_environments.py @@ -11,19 +11,20 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -85,36 +86,36 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[EnvironmentList]: """List environments List environments Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -149,36 +150,36 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> EnvironmentList | None: """List environments List environments Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -208,36 +209,36 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[EnvironmentList]: """List environments List environments Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,36 +271,36 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> EnvironmentList | None: """List environments List environments Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/environments/update_environment.py b/rootly_sdk/api/environments/update_environment.py index 9c168e2a..6e9348d0 100644 --- a/rootly_sdk/api/environments/update_environment.py +++ b/rootly_sdk/api/environments/update_environment.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateEnvironment, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/environments/{id}", + "url": "/v1/environments/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateEnvironment): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, @@ -107,7 +110,7 @@ def sync( Update a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateEnvironment): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateEnvironment): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[EnvironmentResponse, ErrorsList]] + Response[EnvironmentResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, @@ -168,7 +171,7 @@ async def asyncio( Update a specific environment by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateEnvironment): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[EnvironmentResponse, ErrorsList] + EnvironmentResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/escalation_levels/delete_escalation_level.py b/rootly_sdk/api/escalation_levels/delete_escalation_level.py index 88675392..957eb67f 100644 --- a/rootly_sdk/api/escalation_levels/delete_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/delete_escalation_level.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/escalation_levels/{id}", + "url": "/v1/escalation_levels/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return ( diff --git a/rootly_sdk/api/escalation_levels/get_escalation_level.py b/rootly_sdk/api/escalation_levels/get_escalation_level.py index b60bf742..b8da372a 100644 --- a/rootly_sdk/api/escalation_levels/get_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/get_escalation_level.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/escalation_levels/{id}", + "url": "/v1/escalation_levels/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return ( diff --git a/rootly_sdk/api/escalation_levels/update_escalation_level.py b/rootly_sdk/api/escalation_levels/update_escalation_level.py index 8a2a4146..880d0415 100644 --- a/rootly_sdk/api/escalation_levels/update_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/update_escalation_level.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/escalation_levels/{id}", + "url": "/v1/escalation_levels/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return ( diff --git a/rootly_sdk/api/escalation_levels_path/create_escalation_level_paths.py b/rootly_sdk/api/escalation_levels_path/create_escalation_level_paths.py index cf7dcc78..9527978d 100644 --- a/rootly_sdk/api/escalation_levels_path/create_escalation_level_paths.py +++ b/rootly_sdk/api/escalation_levels_path/create_escalation_level_paths.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels", + "url": "/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels".format( + escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return ( diff --git a/rootly_sdk/api/escalation_levels_path/list_escalation_levels_paths.py b/rootly_sdk/api/escalation_levels_path/list_escalation_levels_paths.py index b5aa0f32..362d2739 100644 --- a/rootly_sdk/api/escalation_levels_path/list_escalation_levels_paths.py +++ b/rootly_sdk/api/escalation_levels_path/list_escalation_levels_paths.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( escalation_policy_path_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels", + "url": "/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels".format( + escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( escalation_policy_path_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyLevelList]: """List escalation levels for an Escalation Path @@ -74,9 +78,9 @@ def sync_detailed( Args: escalation_policy_path_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( escalation_policy_path_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyLevelList | None: """List escalation levels for an Escalation Path @@ -114,9 +118,9 @@ def sync( Args: escalation_policy_path_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( escalation_policy_path_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyLevelList]: """List escalation levels for an Escalation Path @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: escalation_policy_path_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( escalation_policy_path_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyLevelList | None: """List escalation levels for an Escalation Path @@ -187,9 +191,9 @@ async def asyncio( Args: escalation_policy_path_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py b/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py index 98b5d182..4132bf34 100644 --- a/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py +++ b/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/escalation_policies/{escalation_policy_id}/escalation_levels", + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".format( + escalation_policy_id=quote(str(escalation_policy_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyLevelResponse]] + Response[ErrorsList | EscalationPolicyLevelResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyLevelResponse] + ErrorsList | EscalationPolicyLevelResponse """ return ( diff --git a/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py b/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py index d0911eef..b6baf965 100644 --- a/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py +++ b/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( escalation_policy_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/escalation_policies/{escalation_policy_id}/escalation_levels", + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".format( + escalation_policy_id=quote(str(escalation_policy_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyLevelList]: """List escalation levels for an Escalation Policy @@ -74,9 +78,9 @@ def sync_detailed( Args: escalation_policy_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyLevelList | None: """List escalation levels for an Escalation Policy @@ -114,9 +118,9 @@ def sync( Args: escalation_policy_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyLevelList]: """List escalation levels for an Escalation Policy @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: escalation_policy_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyLevelList | None: """List escalation levels for an Escalation Policy @@ -187,9 +191,9 @@ async def asyncio( Args: escalation_policy_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/escalation_paths/delete_escalation_path.py b/rootly_sdk/api/escalation_paths/delete_escalation_path.py index f7fd6f89..8162cca8 100644 --- a/rootly_sdk/api/escalation_paths/delete_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/delete_escalation_path.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/escalation_paths/{id}", + "url": "/v1/escalation_paths/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyPathResponse]] + Response[ErrorsList | EscalationPolicyPathResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyPathResponse] + ErrorsList | EscalationPolicyPathResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyPathResponse]] + Response[ErrorsList | EscalationPolicyPathResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyPathResponse] + ErrorsList | EscalationPolicyPathResponse """ return ( diff --git a/rootly_sdk/api/escalation_paths/get_escalation_path.py b/rootly_sdk/api/escalation_paths/get_escalation_path.py index 98762af3..1735ff2f 100644 --- a/rootly_sdk/api/escalation_paths/get_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/get_escalation_path.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,11 +15,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetEscalationPathInclude = UNSET, + include: GetEscalationPathInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/escalation_paths/{id}", + "url": "/v1/escalation_paths/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -69,7 +73,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPathInclude = UNSET, + include: GetEscalationPathInclude | Unset = UNSET, ) -> Response[ErrorsList | EscalationPolicyPathResponse]: """Retrieves an escalation path @@ -77,14 +81,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetEscalationPathInclude]): + include (GetEscalationPathInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyPathResponse]] + Response[ErrorsList | EscalationPolicyPathResponse] """ kwargs = _get_kwargs( @@ -103,7 +107,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPathInclude = UNSET, + include: GetEscalationPathInclude | Unset = UNSET, ) -> ErrorsList | EscalationPolicyPathResponse | None: """Retrieves an escalation path @@ -111,14 +115,14 @@ def sync( Args: id (str): - include (Union[Unset, GetEscalationPathInclude]): + include (GetEscalationPathInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyPathResponse] + ErrorsList | EscalationPolicyPathResponse """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPathInclude = UNSET, + include: GetEscalationPathInclude | Unset = UNSET, ) -> Response[ErrorsList | EscalationPolicyPathResponse]: """Retrieves an escalation path @@ -140,14 +144,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetEscalationPathInclude]): + include (GetEscalationPathInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyPathResponse]] + Response[ErrorsList | EscalationPolicyPathResponse] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPathInclude = UNSET, + include: GetEscalationPathInclude | Unset = UNSET, ) -> ErrorsList | EscalationPolicyPathResponse | None: """Retrieves an escalation path @@ -172,14 +176,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetEscalationPathInclude]): + include (GetEscalationPathInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyPathResponse] + ErrorsList | EscalationPolicyPathResponse """ return ( diff --git a/rootly_sdk/api/escalation_paths/list_escalation_paths.py b/rootly_sdk/api/escalation_paths/list_escalation_paths.py index 031b0414..9f958994 100644 --- a/rootly_sdk/api/escalation_paths/list_escalation_paths.py +++ b/rootly_sdk/api/escalation_paths/list_escalation_paths.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,13 +14,14 @@ def _get_kwargs( escalation_policy_id: str, *, - include: Unset | ListEscalationPathsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPathsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -33,7 +35,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/escalation_policies/{escalation_policy_id}/escalation_paths", + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_paths".format( + escalation_policy_id=quote(str(escalation_policy_id), safe=""), + ), "params": params, } @@ -69,9 +73,9 @@ def sync_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | ListEscalationPathsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPathsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyPathList]: """List escalation paths @@ -79,9 +83,9 @@ def sync_detailed( Args: escalation_policy_id (str): - include (Union[Unset, ListEscalationPathsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPathsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,9 +113,9 @@ def sync( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | ListEscalationPathsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPathsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyPathList | None: """List escalation paths @@ -119,9 +123,9 @@ def sync( Args: escalation_policy_id (str): - include (Union[Unset, ListEscalationPathsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPathsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -144,9 +148,9 @@ async def asyncio_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | ListEscalationPathsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPathsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyPathList]: """List escalation paths @@ -154,9 +158,9 @@ async def asyncio_detailed( Args: escalation_policy_id (str): - include (Union[Unset, ListEscalationPathsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPathsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -182,9 +186,9 @@ async def asyncio( escalation_policy_id: str, *, client: AuthenticatedClient, - include: Unset | ListEscalationPathsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPathsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyPathList | None: """List escalation paths @@ -192,9 +196,9 @@ async def asyncio( Args: escalation_policy_id (str): - include (Union[Unset, ListEscalationPathsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPathsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/escalation_policies/create_escalation_policy.py b/rootly_sdk/api/escalation_policies/create_escalation_policy.py index 74416a48..714b4503 100644 --- a/rootly_sdk/api/escalation_policies/create_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/create_escalation_policy.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return ( diff --git a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py index e07ef4de..2c40b934 100644 --- a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/escalation_policies/{id}", + "url": "/v1/escalation_policies/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return ( diff --git a/rootly_sdk/api/escalation_policies/get_escalation_policy.py b/rootly_sdk/api/escalation_policies/get_escalation_policy.py index c19bfb44..e17a0ca0 100644 --- a/rootly_sdk/api/escalation_policies/get_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/get_escalation_policy.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,11 +15,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetEscalationPolicyInclude = UNSET, + include: GetEscalationPolicyInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/escalation_policies/{id}", + "url": "/v1/escalation_policies/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -69,7 +73,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPolicyInclude = UNSET, + include: GetEscalationPolicyInclude | Unset = UNSET, ) -> Response[ErrorsList | EscalationPolicyResponse]: """Retrieves an escalation policy @@ -77,14 +81,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetEscalationPolicyInclude]): + include (GetEscalationPolicyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -103,7 +107,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPolicyInclude = UNSET, + include: GetEscalationPolicyInclude | Unset = UNSET, ) -> ErrorsList | EscalationPolicyResponse | None: """Retrieves an escalation policy @@ -111,14 +115,14 @@ def sync( Args: id (str): - include (Union[Unset, GetEscalationPolicyInclude]): + include (GetEscalationPolicyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPolicyInclude = UNSET, + include: GetEscalationPolicyInclude | Unset = UNSET, ) -> Response[ErrorsList | EscalationPolicyResponse]: """Retrieves an escalation policy @@ -140,14 +144,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetEscalationPolicyInclude]): + include (GetEscalationPolicyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetEscalationPolicyInclude = UNSET, + include: GetEscalationPolicyInclude | Unset = UNSET, ) -> ErrorsList | EscalationPolicyResponse | None: """Retrieves an escalation policy @@ -172,14 +176,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetEscalationPolicyInclude]): + include (GetEscalationPolicyInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return ( diff --git a/rootly_sdk/api/escalation_policies/list_escalation_policies.py b/rootly_sdk/api/escalation_policies/list_escalation_policies.py index a20e69fe..f30361c9 100644 --- a/rootly_sdk/api/escalation_policies/list_escalation_policies.py +++ b/rootly_sdk/api/escalation_policies/list_escalation_policies.py @@ -14,19 +14,20 @@ def _get_kwargs( *, - include: Unset | ListEscalationPoliciesInclude = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPoliciesInclude | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -85,30 +86,30 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListEscalationPoliciesInclude = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPoliciesInclude | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyList]: """List escalation policies List escalation policies Args: - include (Union[Unset, ListEscalationPoliciesInclude]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPoliciesInclude | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,30 +141,30 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListEscalationPoliciesInclude = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPoliciesInclude | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyList | None: """List escalation policies List escalation policies Args: - include (Union[Unset, ListEscalationPoliciesInclude]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPoliciesInclude | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,30 +191,30 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListEscalationPoliciesInclude = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPoliciesInclude | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[EscalationPolicyList]: """List escalation policies List escalation policies Args: - include (Union[Unset, ListEscalationPoliciesInclude]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPoliciesInclude | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -243,30 +244,30 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListEscalationPoliciesInclude = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListEscalationPoliciesInclude | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> EscalationPolicyList | None: """List escalation policies List escalation policies Args: - include (Union[Unset, ListEscalationPoliciesInclude]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListEscalationPoliciesInclude | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/escalation_policies/update_escalation_policy.py b/rootly_sdk/api/escalation_policies/update_escalation_policy.py index 11db6e82..d779d41b 100644 --- a/rootly_sdk/api/escalation_policies/update_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/update_escalation_policy.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/escalation_policies/{id}", + "url": "/v1/escalation_policies/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, EscalationPolicyResponse]] + Response[ErrorsList | EscalationPolicyResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, EscalationPolicyResponse] + ErrorsList | EscalationPolicyResponse """ return ( diff --git a/rootly_sdk/api/form_field_options/create_form_field_option.py b/rootly_sdk/api/form_field_options/create_form_field_option.py index 292bf1c9..f403634b 100644 --- a/rootly_sdk/api/form_field_options/create_form_field_option.py +++ b/rootly_sdk/api/form_field_options/create_form_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/form_fields/{form_field_id}/options", + "url": "/v1/form_fields/{form_field_id}/options".format( + form_field_id=quote(str(form_field_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return ( diff --git a/rootly_sdk/api/form_field_options/delete_form_field_option.py b/rootly_sdk/api/form_field_options/delete_form_field_option.py index b7ff0f29..7475c4c1 100644 --- a/rootly_sdk/api/form_field_options/delete_form_field_option.py +++ b/rootly_sdk/api/form_field_options/delete_form_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_field_options/{id}", + "url": "/v1/form_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return ( diff --git a/rootly_sdk/api/form_field_options/get_form_field_option.py b/rootly_sdk/api/form_field_options/get_form_field_option.py index 0cf1dfbc..6b07adca 100644 --- a/rootly_sdk/api/form_field_options/get_form_field_option.py +++ b/rootly_sdk/api/form_field_options/get_form_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_field_options/{id}", + "url": "/v1/form_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return ( diff --git a/rootly_sdk/api/form_field_options/list_form_field_options.py b/rootly_sdk/api/form_field_options/list_form_field_options.py index 08cd3f56..9acb8d0b 100644 --- a/rootly_sdk/api/form_field_options/list_form_field_options.py +++ b/rootly_sdk/api/form_field_options/list_form_field_options.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,12 +13,13 @@ def _get_kwargs( form_field_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -34,7 +36,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_fields/{form_field_id}/options", + "url": "/v1/form_fields/{form_field_id}/options".format( + form_field_id=quote(str(form_field_id), safe=""), + ), "params": params, } @@ -66,11 +70,11 @@ def sync_detailed( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> Response[FormFieldOptionList]: """List FormField Options @@ -78,11 +82,11 @@ def sync_detailed( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -112,11 +116,11 @@ def sync( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> FormFieldOptionList | None: """List FormField Options @@ -124,11 +128,11 @@ def sync( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,11 +157,11 @@ async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> Response[FormFieldOptionList]: """List FormField Options @@ -165,11 +169,11 @@ async def asyncio_detailed( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -197,11 +201,11 @@ async def asyncio( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtervalue: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtervalue: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, ) -> FormFieldOptionList | None: """List FormField Options @@ -209,11 +213,11 @@ async def asyncio( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtervalue (Union[Unset, str]): - filtercolor (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtervalue (str | Unset): + filtercolor (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_field_options/update_form_field_option.py b/rootly_sdk/api/form_field_options/update_form_field_option.py index 80c84c48..246e39f3 100644 --- a/rootly_sdk/api/form_field_options/update_form_field_option.py +++ b/rootly_sdk/api/form_field_options/update_form_field_option.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_field_options/{id}", + "url": "/v1/form_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldOptionResponse]] + Response[ErrorsList | FormFieldOptionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldOptionResponse] + ErrorsList | FormFieldOptionResponse """ return ( diff --git a/rootly_sdk/api/form_field_placement_conditions/create_form_field_placement_condition.py b/rootly_sdk/api/form_field_placement_conditions/create_form_field_placement_condition.py index 11a876d3..014965e1 100644 --- a/rootly_sdk/api/form_field_placement_conditions/create_form_field_placement_condition.py +++ b/rootly_sdk/api/form_field_placement_conditions/create_form_field_placement_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/form_field_placements/{form_field_placement_id}/conditions", + "url": "/v1/form_field_placements/{form_field_placement_id}/conditions".format( + form_field_placement_id=quote(str(form_field_placement_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return ( diff --git a/rootly_sdk/api/form_field_placement_conditions/delete_form_field_placement_condition.py b/rootly_sdk/api/form_field_placement_conditions/delete_form_field_placement_condition.py index 39538b58..568253ab 100644 --- a/rootly_sdk/api/form_field_placement_conditions/delete_form_field_placement_condition.py +++ b/rootly_sdk/api/form_field_placement_conditions/delete_form_field_placement_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_field_placement_conditions/{id}", + "url": "/v1/form_field_placement_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return ( diff --git a/rootly_sdk/api/form_field_placement_conditions/get_form_field_placement_condition.py b/rootly_sdk/api/form_field_placement_conditions/get_form_field_placement_condition.py index 5a711a1c..8d6e2170 100644 --- a/rootly_sdk/api/form_field_placement_conditions/get_form_field_placement_condition.py +++ b/rootly_sdk/api/form_field_placement_conditions/get_form_field_placement_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_field_placement_conditions/{id}", + "url": "/v1/form_field_placement_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return ( diff --git a/rootly_sdk/api/form_field_placement_conditions/list_form_field_placement_conditions.py b/rootly_sdk/api/form_field_placement_conditions/list_form_field_placement_conditions.py index b7b9946d..5730bb1d 100644 --- a/rootly_sdk/api/form_field_placement_conditions/list_form_field_placement_conditions.py +++ b/rootly_sdk/api/form_field_placement_conditions/list_form_field_placement_conditions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( form_field_placement_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_field_placements/{form_field_placement_id}/conditions", + "url": "/v1/form_field_placements/{form_field_placement_id}/conditions".format( + form_field_placement_id=quote(str(form_field_placement_id), safe=""), + ), "params": params, } @@ -67,10 +71,10 @@ def sync_detailed( form_field_placement_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> Response[FormFieldPlacementConditionList]: """List Form Set Conditions @@ -78,10 +82,10 @@ def sync_detailed( Args: form_field_placement_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -110,10 +114,10 @@ def sync( form_field_placement_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> FormFieldPlacementConditionList | None: """List Form Set Conditions @@ -121,10 +125,10 @@ def sync( Args: form_field_placement_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,10 +152,10 @@ async def asyncio_detailed( form_field_placement_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> Response[FormFieldPlacementConditionList]: """List Form Set Conditions @@ -159,10 +163,10 @@ async def asyncio_detailed( Args: form_field_placement_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,10 +193,10 @@ async def asyncio( form_field_placement_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> FormFieldPlacementConditionList | None: """List Form Set Conditions @@ -200,10 +204,10 @@ async def asyncio( Args: form_field_placement_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_field_placement_conditions/update_form_field_placement_condition.py b/rootly_sdk/api/form_field_placement_conditions/update_form_field_placement_condition.py index 66a45fc6..a9fe050c 100644 --- a/rootly_sdk/api/form_field_placement_conditions/update_form_field_placement_condition.py +++ b/rootly_sdk/api/form_field_placement_conditions/update_form_field_placement_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_field_placement_conditions/{id}", + "url": "/v1/form_field_placement_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementConditionResponse]] + Response[ErrorsList | FormFieldPlacementConditionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementConditionResponse] + ErrorsList | FormFieldPlacementConditionResponse """ return ( diff --git a/rootly_sdk/api/form_field_placements/create_form_field_placement.py b/rootly_sdk/api/form_field_placements/create_form_field_placement.py index 6e198d96..247a26a7 100644 --- a/rootly_sdk/api/form_field_placements/create_form_field_placement.py +++ b/rootly_sdk/api/form_field_placements/create_form_field_placement.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/form_fields/{form_field_id}/placements", + "url": "/v1/form_fields/{form_field_id}/placements".format( + form_field_id=quote(str(form_field_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return ( diff --git a/rootly_sdk/api/form_field_placements/delete_form_field_placement.py b/rootly_sdk/api/form_field_placements/delete_form_field_placement.py index 424e34e1..424eeaa0 100644 --- a/rootly_sdk/api/form_field_placements/delete_form_field_placement.py +++ b/rootly_sdk/api/form_field_placements/delete_form_field_placement.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_field_placements/{id}", + "url": "/v1/form_field_placements/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return ( diff --git a/rootly_sdk/api/form_field_placements/get_form_field_placement.py b/rootly_sdk/api/form_field_placements/get_form_field_placement.py index 18e171f2..0d9e7d4e 100644 --- a/rootly_sdk/api/form_field_placements/get_form_field_placement.py +++ b/rootly_sdk/api/form_field_placements/get_form_field_placement.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_field_placements/{id}", + "url": "/v1/form_field_placements/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return ( diff --git a/rootly_sdk/api/form_field_placements/list_form_field_placements.py b/rootly_sdk/api/form_field_placements/list_form_field_placements.py index 11bb34cc..cfc35101 100644 --- a/rootly_sdk/api/form_field_placements/list_form_field_placements.py +++ b/rootly_sdk/api/form_field_placements/list_form_field_placements.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( form_field_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_fields/{form_field_id}/placements", + "url": "/v1/form_fields/{form_field_id}/placements".format( + form_field_id=quote(str(form_field_id), safe=""), + ), "params": params, } @@ -65,10 +69,10 @@ def sync_detailed( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> Response[FormFieldPlacementList]: """List Form Field Placements @@ -76,10 +80,10 @@ def sync_detailed( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -108,10 +112,10 @@ def sync( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> FormFieldPlacementList | None: """List Form Field Placements @@ -119,10 +123,10 @@ def sync( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,10 +150,10 @@ async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> Response[FormFieldPlacementList]: """List Form Field Placements @@ -157,10 +161,10 @@ async def asyncio_detailed( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,10 +191,10 @@ async def asyncio( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> FormFieldPlacementList | None: """List Form Field Placements @@ -198,10 +202,10 @@ async def asyncio( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_field_placements/update_form_field_placement.py b/rootly_sdk/api/form_field_placements/update_form_field_placement.py index ae8a4419..441e2ba2 100644 --- a/rootly_sdk/api/form_field_placements/update_form_field_placement.py +++ b/rootly_sdk/api/form_field_placements/update_form_field_placement.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_field_placements/{id}", + "url": "/v1/form_field_placements/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPlacementResponse]] + Response[ErrorsList | FormFieldPlacementResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPlacementResponse] + ErrorsList | FormFieldPlacementResponse """ return ( diff --git a/rootly_sdk/api/form_field_positions/create_form_field_position.py b/rootly_sdk/api/form_field_positions/create_form_field_position.py index ff42d3ee..efd7a94f 100644 --- a/rootly_sdk/api/form_field_positions/create_form_field_position.py +++ b/rootly_sdk/api/form_field_positions/create_form_field_position.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/form_fields/{form_field_id}/positions", + "url": "/v1/form_fields/{form_field_id}/positions".format( + form_field_id=quote(str(form_field_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return ( diff --git a/rootly_sdk/api/form_field_positions/delete_form_field_position.py b/rootly_sdk/api/form_field_positions/delete_form_field_position.py index c4649baf..e4c0d5a2 100644 --- a/rootly_sdk/api/form_field_positions/delete_form_field_position.py +++ b/rootly_sdk/api/form_field_positions/delete_form_field_position.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_field_positions/{id}", + "url": "/v1/form_field_positions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return ( diff --git a/rootly_sdk/api/form_field_positions/get_form_field_position.py b/rootly_sdk/api/form_field_positions/get_form_field_position.py index c99f14ad..999abfae 100644 --- a/rootly_sdk/api/form_field_positions/get_form_field_position.py +++ b/rootly_sdk/api/form_field_positions/get_form_field_position.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_field_positions/{id}", + "url": "/v1/form_field_positions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return ( diff --git a/rootly_sdk/api/form_field_positions/list_form_field_positions.py b/rootly_sdk/api/form_field_positions/list_form_field_positions.py index d29efabe..cb81b62a 100644 --- a/rootly_sdk/api/form_field_positions/list_form_field_positions.py +++ b/rootly_sdk/api/form_field_positions/list_form_field_positions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( form_field_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_fields/{form_field_id}/positions", + "url": "/v1/form_fields/{form_field_id}/positions".format( + form_field_id=quote(str(form_field_id), safe=""), + ), "params": params, } @@ -65,10 +69,10 @@ def sync_detailed( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform: str | Unset = UNSET, ) -> Response[FormFieldPositionList]: """List FormField Position @@ -76,10 +80,10 @@ def sync_detailed( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -108,10 +112,10 @@ def sync( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform: str | Unset = UNSET, ) -> FormFieldPositionList | None: """List FormField Position @@ -119,10 +123,10 @@ def sync( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,10 +150,10 @@ async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform: str | Unset = UNSET, ) -> Response[FormFieldPositionList]: """List FormField Position @@ -157,10 +161,10 @@ async def asyncio_detailed( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,10 +191,10 @@ async def asyncio( form_field_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform: str | Unset = UNSET, ) -> FormFieldPositionList | None: """List FormField Position @@ -198,10 +202,10 @@ async def asyncio( Args: form_field_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_field_positions/update_form_field_position.py b/rootly_sdk/api/form_field_positions/update_form_field_position.py index e2dfea6c..3500e73b 100644 --- a/rootly_sdk/api/form_field_positions/update_form_field_position.py +++ b/rootly_sdk/api/form_field_positions/update_form_field_position.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_field_positions/{id}", + "url": "/v1/form_field_positions/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldPositionResponse]] + Response[ErrorsList | FormFieldPositionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldPositionResponse] + ErrorsList | FormFieldPositionResponse """ return ( diff --git a/rootly_sdk/api/form_fields/create_form_field.py b/rootly_sdk/api/form_fields/create_form_field.py index 22ff4b11..c2069472 100644 --- a/rootly_sdk/api/form_fields/create_form_field.py +++ b/rootly_sdk/api/form_fields/create_form_field.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return ( diff --git a/rootly_sdk/api/form_fields/delete_form_field.py b/rootly_sdk/api/form_fields/delete_form_field.py index 7fd167da..40362583 100644 --- a/rootly_sdk/api/form_fields/delete_form_field.py +++ b/rootly_sdk/api/form_fields/delete_form_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_fields/{id}", + "url": "/v1/form_fields/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FormFieldResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FormFieldResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FormFieldResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FormFieldResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return ( diff --git a/rootly_sdk/api/form_fields/get_form_field.py b/rootly_sdk/api/form_fields/get_form_field.py index f491ac34..b6fcd5f0 100644 --- a/rootly_sdk/api/form_fields/get_form_field.py +++ b/rootly_sdk/api/form_fields/get_form_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,13 +14,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - include: Unset | GetFormFieldInclude = UNSET, + include: GetFormFieldInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_fields/{id}", + "url": "/v1/form_fields/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -67,25 +71,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetFormFieldInclude = UNSET, + include: GetFormFieldInclude | Unset = UNSET, ) -> Response[ErrorsList | FormFieldResponse]: """Retrieves a Form Field Retrieves a specific form_field by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetFormFieldInclude]): + id (str | UUID): + include (GetFormFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -101,25 +105,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetFormFieldInclude = UNSET, + include: GetFormFieldInclude | Unset = UNSET, ) -> ErrorsList | FormFieldResponse | None: """Retrieves a Form Field Retrieves a specific form_field by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetFormFieldInclude]): + id (str | UUID): + include (GetFormFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return sync_detailed( @@ -130,25 +134,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetFormFieldInclude = UNSET, + include: GetFormFieldInclude | Unset = UNSET, ) -> Response[ErrorsList | FormFieldResponse]: """Retrieves a Form Field Retrieves a specific form_field by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetFormFieldInclude]): + id (str | UUID): + include (GetFormFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -162,25 +166,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetFormFieldInclude = UNSET, + include: GetFormFieldInclude | Unset = UNSET, ) -> ErrorsList | FormFieldResponse | None: """Retrieves a Form Field Retrieves a specific form_field by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetFormFieldInclude]): + id (str | UUID): + include (GetFormFieldInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return ( diff --git a/rootly_sdk/api/form_fields/list_form_fields.py b/rootly_sdk/api/form_fields/list_form_fields.py index 5d1d3c47..71e05703 100644 --- a/rootly_sdk/api/form_fields/list_form_fields.py +++ b/rootly_sdk/api/form_fields/list_form_fields.py @@ -12,22 +12,23 @@ def _get_kwargs( *, - include: Unset | ListFormFieldsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListFormFieldsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -90,36 +91,36 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListFormFieldsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListFormFieldsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[FormFieldList]: """List Form Fields List form_fields Args: - include (Union[Unset, ListFormFieldsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListFormFieldsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,36 +155,36 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListFormFieldsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListFormFieldsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> FormFieldList | None: """List Form Fields List form_fields Args: - include (Union[Unset, ListFormFieldsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListFormFieldsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -213,36 +214,36 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListFormFieldsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListFormFieldsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[FormFieldList]: """List Form Fields List form_fields Args: - include (Union[Unset, ListFormFieldsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListFormFieldsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -275,36 +276,36 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListFormFieldsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListFormFieldsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> FormFieldList | None: """List Form Fields List form_fields Args: - include (Union[Unset, ListFormFieldsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListFormFieldsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_fields/update_form_field.py b/rootly_sdk/api/form_fields/update_form_field.py index ea2f4249..2aa102db 100644 --- a/rootly_sdk/api/form_fields/update_form_field.py +++ b/rootly_sdk/api/form_fields/update_form_field.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateFormField, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_fields/{id}", + "url": "/v1/form_fields/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormField): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, @@ -107,7 +110,7 @@ def sync( Update a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormField): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormField): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormFieldResponse]] + Response[ErrorsList | FormFieldResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, @@ -168,7 +171,7 @@ async def asyncio( Update a specific form_field by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormField): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormFieldResponse] + ErrorsList | FormFieldResponse """ return ( diff --git a/rootly_sdk/api/form_set_conditions/create_form_set_condition.py b/rootly_sdk/api/form_set_conditions/create_form_set_condition.py index 6a3f278c..09e9bfec 100644 --- a/rootly_sdk/api/form_set_conditions/create_form_set_condition.py +++ b/rootly_sdk/api/form_set_conditions/create_form_set_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/form_sets/{form_set_id}/conditions", + "url": "/v1/form_sets/{form_set_id}/conditions".format( + form_set_id=quote(str(form_set_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return ( diff --git a/rootly_sdk/api/form_set_conditions/delete_form_set_condition.py b/rootly_sdk/api/form_set_conditions/delete_form_set_condition.py index 9fe830e3..ba34efc2 100644 --- a/rootly_sdk/api/form_set_conditions/delete_form_set_condition.py +++ b/rootly_sdk/api/form_set_conditions/delete_form_set_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_set_conditions/{id}", + "url": "/v1/form_set_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return ( diff --git a/rootly_sdk/api/form_set_conditions/get_form_set_condition.py b/rootly_sdk/api/form_set_conditions/get_form_set_condition.py index 08b6d6aa..e84846b0 100644 --- a/rootly_sdk/api/form_set_conditions/get_form_set_condition.py +++ b/rootly_sdk/api/form_set_conditions/get_form_set_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_set_conditions/{id}", + "url": "/v1/form_set_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return ( diff --git a/rootly_sdk/api/form_set_conditions/list_form_set_conditions.py b/rootly_sdk/api/form_set_conditions/list_form_set_conditions.py index 8d9548f1..c12eaca5 100644 --- a/rootly_sdk/api/form_set_conditions/list_form_set_conditions.py +++ b/rootly_sdk/api/form_set_conditions/list_form_set_conditions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( form_set_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_sets/{form_set_id}/conditions", + "url": "/v1/form_sets/{form_set_id}/conditions".format( + form_set_id=quote(str(form_set_id), safe=""), + ), "params": params, } @@ -65,10 +69,10 @@ def sync_detailed( form_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> Response[FormSetConditionList]: """List Form Set Conditions @@ -76,10 +80,10 @@ def sync_detailed( Args: form_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -108,10 +112,10 @@ def sync( form_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> FormSetConditionList | None: """List Form Set Conditions @@ -119,10 +123,10 @@ def sync( Args: form_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,10 +150,10 @@ async def asyncio_detailed( form_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> Response[FormSetConditionList]: """List Form Set Conditions @@ -157,10 +161,10 @@ async def asyncio_detailed( Args: form_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,10 +191,10 @@ async def asyncio( form_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterform_field_id: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterform_field_id: str | Unset = UNSET, ) -> FormSetConditionList | None: """List Form Set Conditions @@ -198,10 +202,10 @@ async def asyncio( Args: form_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterform_field_id (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterform_field_id (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_set_conditions/update_form_set_condition.py b/rootly_sdk/api/form_set_conditions/update_form_set_condition.py index f0a6a415..e1ad30f4 100644 --- a/rootly_sdk/api/form_set_conditions/update_form_set_condition.py +++ b/rootly_sdk/api/form_set_conditions/update_form_set_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_set_conditions/{id}", + "url": "/v1/form_set_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetConditionResponse]] + Response[ErrorsList | FormSetConditionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetConditionResponse] + ErrorsList | FormSetConditionResponse """ return ( diff --git a/rootly_sdk/api/form_sets/create_form_set.py b/rootly_sdk/api/form_sets/create_form_set.py index 23414b97..b1132cef 100644 --- a/rootly_sdk/api/form_sets/create_form_set.py +++ b/rootly_sdk/api/form_sets/create_form_set.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return ( diff --git a/rootly_sdk/api/form_sets/delete_form_set.py b/rootly_sdk/api/form_sets/delete_form_set.py index 9fe2a6fc..8f5e77e5 100644 --- a/rootly_sdk/api/form_sets/delete_form_set.py +++ b/rootly_sdk/api/form_sets/delete_form_set.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/form_sets/{id}", + "url": "/v1/form_sets/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FormSetResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FormSetResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FormSetResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FormSetResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return ( diff --git a/rootly_sdk/api/form_sets/get_form_set.py b/rootly_sdk/api/form_sets/get_form_set.py index c1f524ab..6028ddb4 100644 --- a/rootly_sdk/api/form_sets/get_form_set.py +++ b/rootly_sdk/api/form_sets/get_form_set.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/form_sets/{id}", + "url": "/v1/form_sets/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FormSetResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FormSetResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FormSetResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FormSetResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return ( diff --git a/rootly_sdk/api/form_sets/list_form_sets.py b/rootly_sdk/api/form_sets/list_form_sets.py index 03441b76..794d9d24 100644 --- a/rootly_sdk/api/form_sets/list_form_sets.py +++ b/rootly_sdk/api/form_sets/list_form_sets.py @@ -11,16 +11,17 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filteris_default: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_default: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -76,30 +77,30 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filteris_default: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_default: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[FormSetList]: """List Form Sets List form_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filteris_default (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filteris_default (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,30 +132,30 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filteris_default: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_default: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> FormSetList | None: """List Form Sets List form_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filteris_default (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filteris_default (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,30 +182,30 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filteris_default: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_default: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[FormSetList]: """List Form Sets List form_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filteris_default (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filteris_default (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -234,30 +235,30 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filteris_default: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filteris_default: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> FormSetList | None: """List Form Sets List form_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filteris_default (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filteris_default (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/form_sets/update_form_set.py b/rootly_sdk/api/form_sets/update_form_set.py index bb60765d..1fd4b788 100644 --- a/rootly_sdk/api/form_sets/update_form_set.py +++ b/rootly_sdk/api/form_sets/update_form_set.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateFormSet, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/form_sets/{id}", + "url": "/v1/form_sets/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormSet): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, @@ -107,7 +110,7 @@ def sync( Update a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormSet): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormSet): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FormSetResponse]] + Response[ErrorsList | FormSetResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, @@ -168,7 +171,7 @@ async def asyncio( Update a specific form_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFormSet): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FormSetResponse] + ErrorsList | FormSetResponse """ return ( diff --git a/rootly_sdk/api/functionalities/create_functionality.py b/rootly_sdk/api/functionalities/create_functionality.py index 182d32f4..1f7ef099 100644 --- a/rootly_sdk/api/functionalities/create_functionality.py +++ b/rootly_sdk/api/functionalities/create_functionality.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return ( diff --git a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py new file mode 100644 index 00000000..ffaecab2 --- /dev/null +++ b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_response import CatalogPropertyResponse +from ...models.errors_list import ErrorsList +from ...models.new_catalog_property import NewCatalogProperty +from ...types import Response + + +def _get_kwargs( + *, + body: NewCatalogProperty, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/functionalities/properties", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogPropertyResponse | ErrorsList | None: + if response.status_code == 201: + response_201 = CatalogPropertyResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/delete_functionality.py b/rootly_sdk/api/functionalities/delete_functionality.py index 8859e976..fe3cb866 100644 --- a/rootly_sdk/api/functionalities/delete_functionality.py +++ b/rootly_sdk/api/functionalities/delete_functionality.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/functionalities/{id}", + "url": "/v1/functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FunctionalityResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FunctionalityResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FunctionalityResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FunctionalityResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return ( diff --git a/rootly_sdk/api/functionalities/get_functionality.py b/rootly_sdk/api/functionalities/get_functionality.py index 18143e81..746c5e60 100644 --- a/rootly_sdk/api/functionalities/get_functionality.py +++ b/rootly_sdk/api/functionalities/get_functionality.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/functionalities/{id}", + "url": "/v1/functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FunctionalityResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FunctionalityResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | FunctionalityResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | FunctionalityResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return ( diff --git a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py index 26df4c9a..0ebccfaf 100644 --- a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,10 +13,11 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, period: str, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["period"] = period @@ -24,7 +26,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/functionalities/{id}/incidents_chart", + "url": "/v1/functionalities/{id}/incidents_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -62,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -72,7 +76,7 @@ def sync_detailed( Get functionality incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -80,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentsChartResponse]] + Response[ErrorsList | IncidentsChartResponse] """ kwargs = _get_kwargs( @@ -96,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -106,7 +110,7 @@ def sync( Get functionality incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -114,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentsChartResponse] + ErrorsList | IncidentsChartResponse """ return sync_detailed( @@ -125,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -135,7 +139,7 @@ async def asyncio_detailed( Get functionality incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -143,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentsChartResponse]] + Response[ErrorsList | IncidentsChartResponse] """ kwargs = _get_kwargs( @@ -157,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -167,7 +171,7 @@ async def asyncio( Get functionality incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -175,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentsChartResponse] + ErrorsList | IncidentsChartResponse """ return ( diff --git a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py index 3ed7b9fd..6fa744af 100644 --- a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,10 +13,11 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["period"] = period @@ -24,7 +26,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/functionalities/{id}/uptime_chart", + "url": "/v1/functionalities/{id}/uptime_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -62,25 +66,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> Response[ErrorsList | UptimeChartResponse]: """Get functionality uptime chart Get functionality uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UptimeChartResponse]] + Response[ErrorsList | UptimeChartResponse] """ kwargs = _get_kwargs( @@ -96,25 +100,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> ErrorsList | UptimeChartResponse | None: """Get functionality uptime chart Get functionality uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UptimeChartResponse] + ErrorsList | UptimeChartResponse """ return sync_detailed( @@ -125,25 +129,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> Response[ErrorsList | UptimeChartResponse]: """Get functionality uptime chart Get functionality uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UptimeChartResponse]] + Response[ErrorsList | UptimeChartResponse] """ kwargs = _get_kwargs( @@ -157,25 +161,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> ErrorsList | UptimeChartResponse | None: """Get functionality uptime chart Get functionality uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UptimeChartResponse] + ErrorsList | UptimeChartResponse """ return ( diff --git a/rootly_sdk/api/functionalities/list_functionalities.py b/rootly_sdk/api/functionalities/list_functionalities.py index 5e5d37b7..173cc880 100644 --- a/rootly_sdk/api/functionalities/list_functionalities.py +++ b/rootly_sdk/api/functionalities/list_functionalities.py @@ -11,22 +11,23 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -94,42 +95,42 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[FunctionalityList]: """List functionalities List functionalities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,42 +168,42 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> FunctionalityList | None: """List functionalities List functionalities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -235,42 +236,42 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[FunctionalityList]: """List functionalities List functionalities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -306,42 +307,42 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> FunctionalityList | None: """List functionalities List functionalities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/functionalities/list_functionality_catalog_fields.py b/rootly_sdk/api/functionalities/list_functionality_catalog_fields.py deleted file mode 100644 index 3d146302..00000000 --- a/rootly_sdk/api/functionalities/list_functionality_catalog_fields.py +++ /dev/null @@ -1,327 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_functionality_catalog_fields_include import ( - ListFunctionalityCatalogFieldsInclude, -) -from ...models.list_functionality_catalog_fields_sort import ( - ListFunctionalityCatalogFieldsSort, -) -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - include: Unset | ListFunctionalityCatalogFieldsInclude = UNSET, - sort: Unset | ListFunctionalityCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/functionalities/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListFunctionalityCatalogFieldsInclude = UNSET, - sort: Unset | ListFunctionalityCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Functionality Catalog Fields - - Args: - include (Union[Unset, ListFunctionalityCatalogFieldsInclude]): - sort (Union[Unset, ListFunctionalityCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - include: Unset | ListFunctionalityCatalogFieldsInclude = UNSET, - sort: Unset | ListFunctionalityCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Functionality Catalog Fields - - Args: - include (Union[Unset, ListFunctionalityCatalogFieldsInclude]): - sort (Union[Unset, ListFunctionalityCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListFunctionalityCatalogFieldsInclude = UNSET, - sort: Unset | ListFunctionalityCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Functionality Catalog Fields - - Args: - include (Union[Unset, ListFunctionalityCatalogFieldsInclude]): - sort (Union[Unset, ListFunctionalityCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - include: Unset | ListFunctionalityCatalogFieldsInclude = UNSET, - sort: Unset | ListFunctionalityCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Functionality Catalog Fields - - Args: - include (Union[Unset, ListFunctionalityCatalogFieldsInclude]): - sort (Union[Unset, ListFunctionalityCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py new file mode 100644 index 00000000..80b13adb --- /dev/null +++ b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py @@ -0,0 +1,328 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_list import CatalogPropertyList +from ...models.list_functionality_catalog_properties_include import ( + ListFunctionalityCatalogPropertiesInclude, +) +from ...models.list_functionality_catalog_properties_sort import ( + ListFunctionalityCatalogPropertiesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListFunctionalityCatalogPropertiesInclude | Unset = UNSET, + sort: ListFunctionalityCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[kind]"] = filterkind + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/functionalities/properties", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogPropertyList | None: + if response.status_code == 200: + response_200 = CatalogPropertyList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListFunctionalityCatalogPropertiesInclude | Unset = UNSET, + sort: ListFunctionalityCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Functionality Catalog Properties + + Args: + include (ListFunctionalityCatalogPropertiesInclude | Unset): + sort (ListFunctionalityCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListFunctionalityCatalogPropertiesInclude | Unset = UNSET, + sort: ListFunctionalityCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Functionality Catalog Properties + + Args: + include (ListFunctionalityCatalogPropertiesInclude | Unset): + sort (ListFunctionalityCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListFunctionalityCatalogPropertiesInclude | Unset = UNSET, + sort: ListFunctionalityCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Functionality Catalog Properties + + Args: + include (ListFunctionalityCatalogPropertiesInclude | Unset): + sort (ListFunctionalityCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListFunctionalityCatalogPropertiesInclude | Unset = UNSET, + sort: ListFunctionalityCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Functionality Catalog Properties + + Args: + include (ListFunctionalityCatalogPropertiesInclude | Unset): + sort (ListFunctionalityCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/update_functionality.py b/rootly_sdk/api/functionalities/update_functionality.py index 9806eae2..5098e9df 100644 --- a/rootly_sdk/api/functionalities/update_functionality.py +++ b/rootly_sdk/api/functionalities/update_functionality.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateFunctionality, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/functionalities/{id}", + "url": "/v1/functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFunctionality): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, @@ -107,7 +110,7 @@ def sync( Update a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFunctionality): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFunctionality): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, FunctionalityResponse]] + Response[ErrorsList | FunctionalityResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, @@ -168,7 +171,7 @@ async def asyncio( Update a specific functionality by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateFunctionality): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, FunctionalityResponse] + ErrorsList | FunctionalityResponse """ return ( diff --git a/rootly_sdk/api/heartbeats/create_heartbeat.py b/rootly_sdk/api/heartbeats/create_heartbeat.py index 04e60cb0..c03eed95 100644 --- a/rootly_sdk/api/heartbeats/create_heartbeat.py +++ b/rootly_sdk/api/heartbeats/create_heartbeat.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return ( diff --git a/rootly_sdk/api/heartbeats/delete_heartbeat.py b/rootly_sdk/api/heartbeats/delete_heartbeat.py index 2e74ade2..674106f9 100644 --- a/rootly_sdk/api/heartbeats/delete_heartbeat.py +++ b/rootly_sdk/api/heartbeats/delete_heartbeat.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/heartbeats/{id}", + "url": "/v1/heartbeats/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | HeartbeatResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | HeartbeatResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | HeartbeatResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | HeartbeatResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return ( diff --git a/rootly_sdk/api/heartbeats/get_heartbeat.py b/rootly_sdk/api/heartbeats/get_heartbeat.py index a18d703d..8ab9ac45 100644 --- a/rootly_sdk/api/heartbeats/get_heartbeat.py +++ b/rootly_sdk/api/heartbeats/get_heartbeat.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/heartbeats/{id}", + "url": "/v1/heartbeats/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | HeartbeatResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | HeartbeatResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | HeartbeatResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | HeartbeatResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return ( diff --git a/rootly_sdk/api/heartbeats/list_heartbeats.py b/rootly_sdk/api/heartbeats/list_heartbeats.py index 585c0f32..19af7d67 100644 --- a/rootly_sdk/api/heartbeats/list_heartbeats.py +++ b/rootly_sdk/api/heartbeats/list_heartbeats.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -79,32 +80,32 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[HeartbeatList]: """List heartbeats List heartbeats Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,32 +138,32 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> HeartbeatList | None: """List heartbeats List heartbeats Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,32 +191,32 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[HeartbeatList]: """List heartbeats List heartbeats Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,32 +247,32 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> HeartbeatList | None: """List heartbeats List heartbeats Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/heartbeats/ping_heartbeat.py b/rootly_sdk/api/heartbeats/ping_heartbeat.py index 557cc949..786ca9cc 100644 --- a/rootly_sdk/api/heartbeats/ping_heartbeat.py +++ b/rootly_sdk/api/heartbeats/ping_heartbeat.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any, cast +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( heartbeat_id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/heartbeats/{heartbeat_id}/ping", + "url": "/v1/heartbeats/{heartbeat_id}/ping".format( + heartbeat_id=quote(str(heartbeat_id), safe=""), + ), } return _kwargs @@ -62,7 +66,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -93,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -119,7 +123,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -148,7 +152,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/heartbeats/update_heartbeat.py b/rootly_sdk/api/heartbeats/update_heartbeat.py index 76cd6f90..533b0dfb 100644 --- a/rootly_sdk/api/heartbeats/update_heartbeat.py +++ b/rootly_sdk/api/heartbeats/update_heartbeat.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateHeartbeat, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/heartbeats/{id}", + "url": "/v1/heartbeats/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -68,7 +71,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, @@ -78,7 +81,7 @@ def sync_detailed( Update a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateHeartbeat): Raises: @@ -86,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -102,7 +105,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, @@ -112,7 +115,7 @@ def sync( Update a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateHeartbeat): Raises: @@ -120,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return sync_detailed( @@ -131,7 +134,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, @@ -141,7 +144,7 @@ async def asyncio_detailed( Update a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateHeartbeat): Raises: @@ -149,7 +152,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, HeartbeatResponse]] + Response[ErrorsList | HeartbeatResponse] """ kwargs = _get_kwargs( @@ -163,7 +166,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, @@ -173,7 +176,7 @@ async def asyncio( Update a specific heartbeat by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateHeartbeat): Raises: @@ -181,7 +184,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, HeartbeatResponse] + ErrorsList | HeartbeatResponse """ return ( diff --git a/rootly_sdk/api/incident_action_items/create_incident_action_item.py b/rootly_sdk/api/incident_action_items/create_incident_action_item.py index a8e52752..8eefa46c 100644 --- a/rootly_sdk/api/incident_action_items/create_incident_action_item.py +++ b/rootly_sdk/api/incident_action_items/create_incident_action_item.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/action_items", + "url": "/v1/incidents/{incident_id}/action_items".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return ( diff --git a/rootly_sdk/api/incident_action_items/delete_incident_action_item.py b/rootly_sdk/api/incident_action_items/delete_incident_action_item.py index 2ed1c40a..3c58343a 100644 --- a/rootly_sdk/api/incident_action_items/delete_incident_action_item.py +++ b/rootly_sdk/api/incident_action_items/delete_incident_action_item.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/action_items/{id}", + "url": "/v1/action_items/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return ( diff --git a/rootly_sdk/api/incident_action_items/get_incident_action_items.py b/rootly_sdk/api/incident_action_items/get_incident_action_items.py index 6dd4bc1c..978d0899 100644 --- a/rootly_sdk/api/incident_action_items/get_incident_action_items.py +++ b/rootly_sdk/api/incident_action_items/get_incident_action_items.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/action_items/{id}", + "url": "/v1/action_items/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return ( diff --git a/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py b/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py index 9028c22e..3e7f1a04 100644 --- a/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py +++ b/rootly_sdk/api/incident_action_items/list_all_incident_action_items.py @@ -11,27 +11,28 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filterpriority: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterincident_status: Unset | str = UNSET, - filterincident_created_atgt: Unset | str = UNSET, - filterincident_created_atgte: Unset | str = UNSET, - filterincident_created_atlt: Unset | str = UNSET, - filterincident_created_atlte: Unset | str = UNSET, - filterdue_dategt: Unset | str = UNSET, - filterdue_dategte: Unset | str = UNSET, - filterdue_datelt: Unset | str = UNSET, - filterdue_datelte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterpriority: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterincident_status: str | Unset = UNSET, + filterincident_created_atgt: str | Unset = UNSET, + filterincident_created_atgte: str | Unset = UNSET, + filterincident_created_atlt: str | Unset = UNSET, + filterincident_created_atlte: str | Unset = UNSET, + filterdue_dategt: str | Unset = UNSET, + filterdue_dategte: str | Unset = UNSET, + filterdue_datelt: str | Unset = UNSET, + filterdue_datelte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -111,52 +112,52 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filterpriority: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterincident_status: Unset | str = UNSET, - filterincident_created_atgt: Unset | str = UNSET, - filterincident_created_atgte: Unset | str = UNSET, - filterincident_created_atlt: Unset | str = UNSET, - filterincident_created_atlte: Unset | str = UNSET, - filterdue_dategt: Unset | str = UNSET, - filterdue_dategte: Unset | str = UNSET, - filterdue_datelt: Unset | str = UNSET, - filterdue_datelte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterpriority: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterincident_status: str | Unset = UNSET, + filterincident_created_atgt: str | Unset = UNSET, + filterincident_created_atgte: str | Unset = UNSET, + filterincident_created_atlt: str | Unset = UNSET, + filterincident_created_atlte: str | Unset = UNSET, + filterdue_dategt: str | Unset = UNSET, + filterdue_dategte: str | Unset = UNSET, + filterdue_datelt: str | Unset = UNSET, + filterdue_datelte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentActionItemList]: """List all action items for an organization List all action items for an organization Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filterpriority (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterincident_status (Union[Unset, str]): - filterincident_created_atgt (Union[Unset, str]): - filterincident_created_atgte (Union[Unset, str]): - filterincident_created_atlt (Union[Unset, str]): - filterincident_created_atlte (Union[Unset, str]): - filterdue_dategt (Union[Unset, str]): - filterdue_dategte (Union[Unset, str]): - filterdue_datelt (Union[Unset, str]): - filterdue_datelte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filterpriority (str | Unset): + filterstatus (str | Unset): + filterincident_status (str | Unset): + filterincident_created_atgt (str | Unset): + filterincident_created_atgte (str | Unset): + filterincident_created_atlt (str | Unset): + filterincident_created_atlte (str | Unset): + filterdue_dategt (str | Unset): + filterdue_dategte (str | Unset): + filterdue_datelt (str | Unset): + filterdue_datelte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,52 +200,52 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filterpriority: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterincident_status: Unset | str = UNSET, - filterincident_created_atgt: Unset | str = UNSET, - filterincident_created_atgte: Unset | str = UNSET, - filterincident_created_atlt: Unset | str = UNSET, - filterincident_created_atlte: Unset | str = UNSET, - filterdue_dategt: Unset | str = UNSET, - filterdue_dategte: Unset | str = UNSET, - filterdue_datelt: Unset | str = UNSET, - filterdue_datelte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterpriority: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterincident_status: str | Unset = UNSET, + filterincident_created_atgt: str | Unset = UNSET, + filterincident_created_atgte: str | Unset = UNSET, + filterincident_created_atlt: str | Unset = UNSET, + filterincident_created_atlte: str | Unset = UNSET, + filterdue_dategt: str | Unset = UNSET, + filterdue_dategte: str | Unset = UNSET, + filterdue_datelt: str | Unset = UNSET, + filterdue_datelte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentActionItemList | None: """List all action items for an organization List all action items for an organization Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filterpriority (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterincident_status (Union[Unset, str]): - filterincident_created_atgt (Union[Unset, str]): - filterincident_created_atgte (Union[Unset, str]): - filterincident_created_atlt (Union[Unset, str]): - filterincident_created_atlte (Union[Unset, str]): - filterdue_dategt (Union[Unset, str]): - filterdue_dategte (Union[Unset, str]): - filterdue_datelt (Union[Unset, str]): - filterdue_datelte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filterpriority (str | Unset): + filterstatus (str | Unset): + filterincident_status (str | Unset): + filterincident_created_atgt (str | Unset): + filterincident_created_atgte (str | Unset): + filterincident_created_atlt (str | Unset): + filterincident_created_atlte (str | Unset): + filterdue_dategt (str | Unset): + filterdue_dategte (str | Unset): + filterdue_datelt (str | Unset): + filterdue_datelte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -282,52 +283,52 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filterpriority: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterincident_status: Unset | str = UNSET, - filterincident_created_atgt: Unset | str = UNSET, - filterincident_created_atgte: Unset | str = UNSET, - filterincident_created_atlt: Unset | str = UNSET, - filterincident_created_atlte: Unset | str = UNSET, - filterdue_dategt: Unset | str = UNSET, - filterdue_dategte: Unset | str = UNSET, - filterdue_datelt: Unset | str = UNSET, - filterdue_datelte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterpriority: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterincident_status: str | Unset = UNSET, + filterincident_created_atgt: str | Unset = UNSET, + filterincident_created_atgte: str | Unset = UNSET, + filterincident_created_atlt: str | Unset = UNSET, + filterincident_created_atlte: str | Unset = UNSET, + filterdue_dategt: str | Unset = UNSET, + filterdue_dategte: str | Unset = UNSET, + filterdue_datelt: str | Unset = UNSET, + filterdue_datelte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentActionItemList]: """List all action items for an organization List all action items for an organization Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filterpriority (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterincident_status (Union[Unset, str]): - filterincident_created_atgt (Union[Unset, str]): - filterincident_created_atgte (Union[Unset, str]): - filterincident_created_atlt (Union[Unset, str]): - filterincident_created_atlte (Union[Unset, str]): - filterdue_dategt (Union[Unset, str]): - filterdue_dategte (Union[Unset, str]): - filterdue_datelt (Union[Unset, str]): - filterdue_datelte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filterpriority (str | Unset): + filterstatus (str | Unset): + filterincident_status (str | Unset): + filterincident_created_atgt (str | Unset): + filterincident_created_atgte (str | Unset): + filterincident_created_atlt (str | Unset): + filterincident_created_atlte (str | Unset): + filterdue_dategt (str | Unset): + filterdue_dategte (str | Unset): + filterdue_datelt (str | Unset): + filterdue_datelte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -368,52 +369,52 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filterpriority: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterincident_status: Unset | str = UNSET, - filterincident_created_atgt: Unset | str = UNSET, - filterincident_created_atgte: Unset | str = UNSET, - filterincident_created_atlt: Unset | str = UNSET, - filterincident_created_atlte: Unset | str = UNSET, - filterdue_dategt: Unset | str = UNSET, - filterdue_dategte: Unset | str = UNSET, - filterdue_datelt: Unset | str = UNSET, - filterdue_datelte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterpriority: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterincident_status: str | Unset = UNSET, + filterincident_created_atgt: str | Unset = UNSET, + filterincident_created_atgte: str | Unset = UNSET, + filterincident_created_atlt: str | Unset = UNSET, + filterincident_created_atlte: str | Unset = UNSET, + filterdue_dategt: str | Unset = UNSET, + filterdue_dategte: str | Unset = UNSET, + filterdue_datelt: str | Unset = UNSET, + filterdue_datelte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentActionItemList | None: """List all action items for an organization List all action items for an organization Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filterpriority (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterincident_status (Union[Unset, str]): - filterincident_created_atgt (Union[Unset, str]): - filterincident_created_atgte (Union[Unset, str]): - filterincident_created_atlt (Union[Unset, str]): - filterincident_created_atlte (Union[Unset, str]): - filterdue_dategt (Union[Unset, str]): - filterdue_dategte (Union[Unset, str]): - filterdue_datelt (Union[Unset, str]): - filterdue_datelte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filterpriority (str | Unset): + filterstatus (str | Unset): + filterincident_status (str | Unset): + filterincident_created_atgt (str | Unset): + filterincident_created_atgte (str | Unset): + filterincident_created_atlt (str | Unset): + filterincident_created_atlte (str | Unset): + filterdue_dategt (str | Unset): + filterdue_dategte (str | Unset): + filterdue_datelt (str | Unset): + filterdue_datelte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_action_items/list_incident_action_items.py b/rootly_sdk/api/incident_action_items/list_incident_action_items.py index 9ea3c16e..da0cf81e 100644 --- a/rootly_sdk/api/incident_action_items/list_incident_action_items.py +++ b/rootly_sdk/api/incident_action_items/list_incident_action_items.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/action_items", + "url": "/v1/incidents/{incident_id}/action_items".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -62,9 +66,9 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentActionItemList]: """List incident action items @@ -72,9 +76,9 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,9 +106,9 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentActionItemList | None: """List incident action items @@ -112,9 +116,9 @@ def sync( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,9 +141,9 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentActionItemList]: """List incident action items @@ -147,9 +151,9 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,9 +179,9 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentActionItemList | None: """List incident action items @@ -185,9 +189,9 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_action_items/update_incident_action_item.py b/rootly_sdk/api/incident_action_items/update_incident_action_item.py index 9c0b7bbf..709c5962 100644 --- a/rootly_sdk/api/incident_action_items/update_incident_action_item.py +++ b/rootly_sdk/api/incident_action_items/update_incident_action_item.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/action_items/{id}", + "url": "/v1/action_items/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentActionItemResponse]] + Response[ErrorsList | IncidentActionItemResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentActionItemResponse] + ErrorsList | IncidentActionItemResponse """ return ( diff --git a/rootly_sdk/api/incident_event_functionalities/create_incident_event_functionality.py b/rootly_sdk/api/incident_event_functionalities/create_incident_event_functionality.py index 736aae39..44067ca5 100644 --- a/rootly_sdk/api/incident_event_functionalities/create_incident_event_functionality.py +++ b/rootly_sdk/api/incident_event_functionalities/create_incident_event_functionality.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/events/{incident_event_id}/functionalities", + "url": "/v1/events/{incident_event_id}/functionalities".format( + incident_event_id=quote(str(incident_event_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return ( diff --git a/rootly_sdk/api/incident_event_functionalities/delete_incident_event_functionality.py b/rootly_sdk/api/incident_event_functionalities/delete_incident_event_functionality.py index fa9b8b75..31be22c6 100644 --- a/rootly_sdk/api/incident_event_functionalities/delete_incident_event_functionality.py +++ b/rootly_sdk/api/incident_event_functionalities/delete_incident_event_functionality.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_event_functionalities/{id}", + "url": "/v1/incident_event_functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return ( diff --git a/rootly_sdk/api/incident_event_functionalities/get_incident_event_functionalities.py b/rootly_sdk/api/incident_event_functionalities/get_incident_event_functionalities.py index bcbd76ae..5b698657 100644 --- a/rootly_sdk/api/incident_event_functionalities/get_incident_event_functionalities.py +++ b/rootly_sdk/api/incident_event_functionalities/get_incident_event_functionalities.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_event_functionalities/{id}", + "url": "/v1/incident_event_functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return ( diff --git a/rootly_sdk/api/incident_event_functionalities/list_incident_event_functionalities.py b/rootly_sdk/api/incident_event_functionalities/list_incident_event_functionalities.py index 3676b424..805eeb7a 100644 --- a/rootly_sdk/api/incident_event_functionalities/list_incident_event_functionalities.py +++ b/rootly_sdk/api/incident_event_functionalities/list_incident_event_functionalities.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_event_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/events/{incident_event_id}/functionalities", + "url": "/v1/events/{incident_event_id}/functionalities".format( + incident_event_id=quote(str(incident_event_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentEventFunctionalityList]: """List incident event functionalities @@ -74,9 +78,9 @@ def sync_detailed( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentEventFunctionalityList | None: """List incident event functionalities @@ -114,9 +118,9 @@ def sync( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentEventFunctionalityList]: """List incident event functionalities @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentEventFunctionalityList | None: """List incident event functionalities @@ -187,9 +191,9 @@ async def asyncio( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_event_functionalities/update_incident_event_functionality.py b/rootly_sdk/api/incident_event_functionalities/update_incident_event_functionality.py index 09b0e16e..3f2bf2b7 100644 --- a/rootly_sdk/api/incident_event_functionalities/update_incident_event_functionality.py +++ b/rootly_sdk/api/incident_event_functionalities/update_incident_event_functionality.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_event_functionalities/{id}", + "url": "/v1/incident_event_functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventFunctionalityResponse]] + Response[ErrorsList | IncidentEventFunctionalityResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventFunctionalityResponse] + ErrorsList | IncidentEventFunctionalityResponse """ return ( diff --git a/rootly_sdk/api/incident_event_services/create_incident_event_service.py b/rootly_sdk/api/incident_event_services/create_incident_event_service.py index 8cbda389..e1b7f48f 100644 --- a/rootly_sdk/api/incident_event_services/create_incident_event_service.py +++ b/rootly_sdk/api/incident_event_services/create_incident_event_service.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/events/{incident_event_id}/services", + "url": "/v1/events/{incident_event_id}/services".format( + incident_event_id=quote(str(incident_event_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return ( diff --git a/rootly_sdk/api/incident_event_services/delete_incident_event_service.py b/rootly_sdk/api/incident_event_services/delete_incident_event_service.py index ae2f92e5..e4ce309c 100644 --- a/rootly_sdk/api/incident_event_services/delete_incident_event_service.py +++ b/rootly_sdk/api/incident_event_services/delete_incident_event_service.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_event_services/{id}", + "url": "/v1/incident_event_services/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return ( diff --git a/rootly_sdk/api/incident_event_services/get_incident_event_services.py b/rootly_sdk/api/incident_event_services/get_incident_event_services.py index fc9396a8..83c948c2 100644 --- a/rootly_sdk/api/incident_event_services/get_incident_event_services.py +++ b/rootly_sdk/api/incident_event_services/get_incident_event_services.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_event_services/{id}", + "url": "/v1/incident_event_services/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return ( diff --git a/rootly_sdk/api/incident_event_services/list_incident_event_services.py b/rootly_sdk/api/incident_event_services/list_incident_event_services.py index 2301da6a..5087b62e 100644 --- a/rootly_sdk/api/incident_event_services/list_incident_event_services.py +++ b/rootly_sdk/api/incident_event_services/list_incident_event_services.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_event_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/events/{incident_event_id}/services", + "url": "/v1/events/{incident_event_id}/services".format( + incident_event_id=quote(str(incident_event_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentEventServiceList]: """List incident event services @@ -74,9 +78,9 @@ def sync_detailed( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentEventServiceList | None: """List incident event services @@ -114,9 +118,9 @@ def sync( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentEventServiceList]: """List incident event services @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( incident_event_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentEventServiceList | None: """List incident event services @@ -187,9 +191,9 @@ async def asyncio( Args: incident_event_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_event_services/update_incident_event_service.py b/rootly_sdk/api/incident_event_services/update_incident_event_service.py index be5fe06a..11e2528f 100644 --- a/rootly_sdk/api/incident_event_services/update_incident_event_service.py +++ b/rootly_sdk/api/incident_event_services/update_incident_event_service.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_event_services/{id}", + "url": "/v1/incident_event_services/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventServiceResponse]] + Response[ErrorsList | IncidentEventServiceResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventServiceResponse] + ErrorsList | IncidentEventServiceResponse """ return ( diff --git a/rootly_sdk/api/incident_events/create_incident_event.py b/rootly_sdk/api/incident_events/create_incident_event.py index 218606b0..443576f9 100644 --- a/rootly_sdk/api/incident_events/create_incident_event.py +++ b/rootly_sdk/api/incident_events/create_incident_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/events", + "url": "/v1/incidents/{incident_id}/events".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return ( diff --git a/rootly_sdk/api/incident_events/delete_incident_event.py b/rootly_sdk/api/incident_events/delete_incident_event.py index 9fda3db4..906602f5 100644 --- a/rootly_sdk/api/incident_events/delete_incident_event.py +++ b/rootly_sdk/api/incident_events/delete_incident_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/events/{id}", + "url": "/v1/events/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return ( diff --git a/rootly_sdk/api/incident_events/get_incident_events.py b/rootly_sdk/api/incident_events/get_incident_events.py index df761f0d..092a2816 100644 --- a/rootly_sdk/api/incident_events/get_incident_events.py +++ b/rootly_sdk/api/incident_events/get_incident_events.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/events/{id}", + "url": "/v1/events/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return ( diff --git a/rootly_sdk/api/incident_events/list_incident_events.py b/rootly_sdk/api/incident_events/list_incident_events.py index 84b2c44f..ddd02177 100644 --- a/rootly_sdk/api/incident_events/list_incident_events.py +++ b/rootly_sdk/api/incident_events/list_incident_events.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/events", + "url": "/v1/incidents/{incident_id}/events".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -60,9 +64,9 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentEventList]: """List incident events @@ -70,9 +74,9 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,9 +104,9 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentEventList | None: """List incident events @@ -110,9 +114,9 @@ def sync( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,9 +139,9 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentEventList]: """List incident events @@ -145,9 +149,9 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,9 +177,9 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentEventList | None: """List incident events @@ -183,9 +187,9 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_events/update_incident_event.py b/rootly_sdk/api/incident_events/update_incident_event.py index bc6dd20a..6e364970 100644 --- a/rootly_sdk/api/incident_events/update_incident_event.py +++ b/rootly_sdk/api/incident_events/update_incident_event.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/events/{id}", + "url": "/v1/events/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentEventResponse]] + Response[ErrorsList | IncidentEventResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentEventResponse] + ErrorsList | IncidentEventResponse """ return ( diff --git a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py index 6b3767bd..3a29fbc2 100644 --- a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/feedbacks", + "url": "/v1/incidents/{incident_id}/feedbacks".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFeedbackResponse]] + Response[ErrorsList | IncidentFeedbackResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFeedbackResponse] + ErrorsList | IncidentFeedbackResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFeedbackResponse]] + Response[ErrorsList | IncidentFeedbackResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFeedbackResponse] + ErrorsList | IncidentFeedbackResponse """ return ( diff --git a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py index 8e53814d..6c834602 100644 --- a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/feedbacks/{id}", + "url": "/v1/feedbacks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFeedbackResponse]] + Response[ErrorsList | IncidentFeedbackResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFeedbackResponse] + ErrorsList | IncidentFeedbackResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFeedbackResponse]] + Response[ErrorsList | IncidentFeedbackResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFeedbackResponse] + ErrorsList | IncidentFeedbackResponse """ return ( diff --git a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py index 3efafc21..e9606100 100644 --- a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/feedbacks", + "url": "/v1/incidents/{incident_id}/feedbacks".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -62,9 +66,9 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentFeedbackList]: """List incident feedbacks @@ -72,9 +76,9 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,9 +106,9 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentFeedbackList | None: """List incident feedbacks @@ -112,9 +116,9 @@ def sync( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,9 +141,9 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentFeedbackList]: """List incident feedbacks @@ -147,9 +151,9 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,9 +179,9 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentFeedbackList | None: """List incident feedbacks @@ -185,9 +189,9 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py index e23f16ea..95e97705 100644 --- a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/feedbacks/{id}", + "url": "/v1/feedbacks/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFeedbackResponse]] + Response[ErrorsList | IncidentFeedbackResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFeedbackResponse] + ErrorsList | IncidentFeedbackResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFeedbackResponse]] + Response[ErrorsList | IncidentFeedbackResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFeedbackResponse] + ErrorsList | IncidentFeedbackResponse """ return ( diff --git a/rootly_sdk/api/incident_form_field_selections/create_incident_form_field_selection.py b/rootly_sdk/api/incident_form_field_selections/create_incident_form_field_selection.py index acce98af..a24a4d0c 100644 --- a/rootly_sdk/api/incident_form_field_selections/create_incident_form_field_selection.py +++ b/rootly_sdk/api/incident_form_field_selections/create_incident_form_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/form_field_selections", + "url": "/v1/incidents/{incident_id}/form_field_selections".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/incident_form_field_selections/delete_incident_form_field_selection.py b/rootly_sdk/api/incident_form_field_selections/delete_incident_form_field_selection.py index 657ef26a..e1158bcf 100644 --- a/rootly_sdk/api/incident_form_field_selections/delete_incident_form_field_selection.py +++ b/rootly_sdk/api/incident_form_field_selections/delete_incident_form_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_form_field_selections/{id}", + "url": "/v1/incident_form_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/incident_form_field_selections/get_incident_form_field_selection.py b/rootly_sdk/api/incident_form_field_selections/get_incident_form_field_selection.py index 73f16e1f..7649c119 100644 --- a/rootly_sdk/api/incident_form_field_selections/get_incident_form_field_selection.py +++ b/rootly_sdk/api/incident_form_field_selections/get_incident_form_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_form_field_selections/{id}", + "url": "/v1/incident_form_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/incident_form_field_selections/list_incident_form_field_selections.py b/rootly_sdk/api/incident_form_field_selections/list_incident_form_field_selections.py index 2cc3ecde..8da161a7 100644 --- a/rootly_sdk/api/incident_form_field_selections/list_incident_form_field_selections.py +++ b/rootly_sdk/api/incident_form_field_selections/list_incident_form_field_selections.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/form_field_selections", + "url": "/v1/incidents/{incident_id}/form_field_selections".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentFormFieldSelectionList]: """List incident form field selections @@ -74,9 +78,9 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentFormFieldSelectionList | None: """List incident form field selections @@ -114,9 +118,9 @@ def sync( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentFormFieldSelectionList]: """List incident form field selections @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentFormFieldSelectionList | None: """List incident form field selections @@ -187,9 +191,9 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_form_field_selections/update_incident_form_field_selection.py b/rootly_sdk/api/incident_form_field_selections/update_incident_form_field_selection.py index bf3ff766..8d933d3b 100644 --- a/rootly_sdk/api/incident_form_field_selections/update_incident_form_field_selection.py +++ b/rootly_sdk/api/incident_form_field_selections/update_incident_form_field_selection.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_form_field_selections/{id}", + "url": "/v1/incident_form_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentFormFieldSelectionResponse]] + Response[ErrorsList | IncidentFormFieldSelectionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentFormFieldSelectionResponse] + ErrorsList | IncidentFormFieldSelectionResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_booleans/create_incident_permission_set_boolean.py b/rootly_sdk/api/incident_permission_set_booleans/create_incident_permission_set_boolean.py index 5ef2ca88..b2923285 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/create_incident_permission_set_boolean.py +++ b/rootly_sdk/api/incident_permission_set_booleans/create_incident_permission_set_boolean.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incident_permission_sets/{incident_permission_set_id}/booleans", + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/booleans".format( + incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_booleans/delete_incident_permission_set_boolean.py b/rootly_sdk/api/incident_permission_set_booleans/delete_incident_permission_set_boolean.py index d9af5506..2597380c 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/delete_incident_permission_set_boolean.py +++ b/rootly_sdk/api/incident_permission_set_booleans/delete_incident_permission_set_boolean.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_permission_set_booleans/{id}", + "url": "/v1/incident_permission_set_booleans/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_booleans/get_incident_permission_set_boolean.py b/rootly_sdk/api/incident_permission_set_booleans/get_incident_permission_set_boolean.py index 3d982670..fd412645 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/get_incident_permission_set_boolean.py +++ b/rootly_sdk/api/incident_permission_set_booleans/get_incident_permission_set_boolean.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_permission_set_booleans/{id}", + "url": "/v1/incident_permission_set_booleans/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_booleans/list_incident_permission_set_booleans.py b/rootly_sdk/api/incident_permission_set_booleans/list_incident_permission_set_booleans.py index 19f86eaa..4f640b28 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/list_incident_permission_set_booleans.py +++ b/rootly_sdk/api/incident_permission_set_booleans/list_incident_permission_set_booleans.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,16 +13,17 @@ def _get_kwargs( incident_permission_set_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -46,7 +48,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_permission_sets/{incident_permission_set_id}/booleans", + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/booleans".format( + incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), + ), "params": params, } @@ -82,15 +86,15 @@ def sync_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPermissionSetBooleanList]: """List incident_permission_set_booleans @@ -98,15 +102,15 @@ def sync_detailed( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,15 +144,15 @@ def sync( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPermissionSetBooleanList | None: """List incident_permission_set_booleans @@ -156,15 +160,15 @@ def sync( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,15 +197,15 @@ async def asyncio_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPermissionSetBooleanList]: """List incident_permission_set_booleans @@ -209,15 +213,15 @@ async def asyncio_detailed( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -249,15 +253,15 @@ async def asyncio( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPermissionSetBooleanList | None: """List incident_permission_set_booleans @@ -265,15 +269,15 @@ async def asyncio( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_permission_set_booleans/update_incident_permission_set_boolean.py b/rootly_sdk/api/incident_permission_set_booleans/update_incident_permission_set_boolean.py index dfb06a52..cd4630de 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/update_incident_permission_set_boolean.py +++ b/rootly_sdk/api/incident_permission_set_booleans/update_incident_permission_set_boolean.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_permission_set_booleans/{id}", + "url": "/v1/incident_permission_set_booleans/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetBooleanResponse]] + Response[ErrorsList | IncidentPermissionSetBooleanResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetBooleanResponse] + ErrorsList | IncidentPermissionSetBooleanResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_resources/create_incident_permission_set_resource.py b/rootly_sdk/api/incident_permission_set_resources/create_incident_permission_set_resource.py index eed644e9..1c90322b 100644 --- a/rootly_sdk/api/incident_permission_set_resources/create_incident_permission_set_resource.py +++ b/rootly_sdk/api/incident_permission_set_resources/create_incident_permission_set_resource.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incident_permission_sets/{incident_permission_set_id}/resources", + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/resources".format( + incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_resources/delete_incident_permission_set_resource.py b/rootly_sdk/api/incident_permission_set_resources/delete_incident_permission_set_resource.py index 509b5486..b0df5cea 100644 --- a/rootly_sdk/api/incident_permission_set_resources/delete_incident_permission_set_resource.py +++ b/rootly_sdk/api/incident_permission_set_resources/delete_incident_permission_set_resource.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_permission_set_resources/{id}", + "url": "/v1/incident_permission_set_resources/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_resources/get_incident_permission_set_resource.py b/rootly_sdk/api/incident_permission_set_resources/get_incident_permission_set_resource.py index 95a6d9f9..3ecc6bcb 100644 --- a/rootly_sdk/api/incident_permission_set_resources/get_incident_permission_set_resource.py +++ b/rootly_sdk/api/incident_permission_set_resources/get_incident_permission_set_resource.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_permission_set_resources/{id}", + "url": "/v1/incident_permission_set_resources/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_set_resources/list_incident_permission_set_resources.py b/rootly_sdk/api/incident_permission_set_resources/list_incident_permission_set_resources.py index d3468228..7be18300 100644 --- a/rootly_sdk/api/incident_permission_set_resources/list_incident_permission_set_resources.py +++ b/rootly_sdk/api/incident_permission_set_resources/list_incident_permission_set_resources.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,16 +13,17 @@ def _get_kwargs( incident_permission_set_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -46,7 +48,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_permission_sets/{incident_permission_set_id}/resources", + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/resources".format( + incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), + ), "params": params, } @@ -82,15 +86,15 @@ def sync_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPermissionSetResourceList]: """List incident_permission_set_resources @@ -98,15 +102,15 @@ def sync_detailed( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -140,15 +144,15 @@ def sync( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPermissionSetResourceList | None: """List incident_permission_set_resources @@ -156,15 +160,15 @@ def sync( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -193,15 +197,15 @@ async def asyncio_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPermissionSetResourceList]: """List incident_permission_set_resources @@ -209,15 +213,15 @@ async def asyncio_detailed( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -249,15 +253,15 @@ async def asyncio( incident_permission_set_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPermissionSetResourceList | None: """List incident_permission_set_resources @@ -265,15 +269,15 @@ async def asyncio( Args: incident_permission_set_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_permission_set_resources/update_incident_permission_set_resource.py b/rootly_sdk/api/incident_permission_set_resources/update_incident_permission_set_resource.py index 836110ab..9448553c 100644 --- a/rootly_sdk/api/incident_permission_set_resources/update_incident_permission_set_resource.py +++ b/rootly_sdk/api/incident_permission_set_resources/update_incident_permission_set_resource.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_permission_set_resources/{id}", + "url": "/v1/incident_permission_set_resources/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResourceResponse]] + Response[ErrorsList | IncidentPermissionSetResourceResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResourceResponse] + ErrorsList | IncidentPermissionSetResourceResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_sets/create_incident_permission_set.py b/rootly_sdk/api/incident_permission_sets/create_incident_permission_set.py index 3ca7465c..72ee39ce 100644 --- a/rootly_sdk/api/incident_permission_sets/create_incident_permission_set.py +++ b/rootly_sdk/api/incident_permission_sets/create_incident_permission_set.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_sets/delete_incident_permission_set.py b/rootly_sdk/api/incident_permission_sets/delete_incident_permission_set.py index c918492e..e4a987ec 100644 --- a/rootly_sdk/api/incident_permission_sets/delete_incident_permission_set.py +++ b/rootly_sdk/api/incident_permission_sets/delete_incident_permission_set.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_permission_sets/{id}", + "url": "/v1/incident_permission_sets/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentPermissionSetResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentPermissionSetResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentPermissionSetResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentPermissionSetResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_sets/get_incident_permission_set.py b/rootly_sdk/api/incident_permission_sets/get_incident_permission_set.py index b04192d0..6ceccff2 100644 --- a/rootly_sdk/api/incident_permission_sets/get_incident_permission_set.py +++ b/rootly_sdk/api/incident_permission_sets/get_incident_permission_set.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_permission_sets/{id}", + "url": "/v1/incident_permission_sets/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentPermissionSetResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentPermissionSetResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentPermissionSetResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentPermissionSetResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return ( diff --git a/rootly_sdk/api/incident_permission_sets/list_incident_permission_sets.py b/rootly_sdk/api/incident_permission_sets/list_incident_permission_sets.py index 6d7617d7..cd7a2c18 100644 --- a/rootly_sdk/api/incident_permission_sets/list_incident_permission_sets.py +++ b/rootly_sdk/api/incident_permission_sets/list_incident_permission_sets.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -86,34 +87,34 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPermissionSetList]: """List incident_permission_sets List incident_permission_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,34 +148,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPermissionSetList | None: """List incident_permission_sets List incident_permission_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -203,34 +204,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPermissionSetList]: """List incident_permission_sets List incident_permission_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -262,34 +263,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPermissionSetList | None: """List incident_permission_sets List incident_permission_sets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_permission_sets/update_incident_permission_set.py b/rootly_sdk/api/incident_permission_sets/update_incident_permission_set.py index c3e19cac..32f42235 100644 --- a/rootly_sdk/api/incident_permission_sets/update_incident_permission_set.py +++ b/rootly_sdk/api/incident_permission_sets/update_incident_permission_set.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateIncidentPermissionSet, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_permission_sets/{id}", + "url": "/v1/incident_permission_sets/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPermissionSet): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, @@ -107,7 +110,7 @@ def sync( Update a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPermissionSet): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPermissionSet): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPermissionSetResponse]] + Response[ErrorsList | IncidentPermissionSetResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, @@ -168,7 +171,7 @@ async def asyncio( Update a specific incident_permission_set by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPermissionSet): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPermissionSetResponse] + ErrorsList | IncidentPermissionSetResponse """ return ( diff --git a/rootly_sdk/api/incident_retrospective_steps/get_incident_retrospective_step.py b/rootly_sdk/api/incident_retrospective_steps/get_incident_retrospective_step.py index f9ea28aa..ab0153d1 100644 --- a/rootly_sdk/api/incident_retrospective_steps/get_incident_retrospective_step.py +++ b/rootly_sdk/api/incident_retrospective_steps/get_incident_retrospective_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_retrospective_steps/{id}", + "url": "/v1/incident_retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRetrospectiveStepResponse]] + Response[ErrorsList | IncidentRetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRetrospectiveStepResponse] + ErrorsList | IncidentRetrospectiveStepResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRetrospectiveStepResponse]] + Response[ErrorsList | IncidentRetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRetrospectiveStepResponse] + ErrorsList | IncidentRetrospectiveStepResponse """ return ( diff --git a/rootly_sdk/api/incident_retrospective_steps/update_incident_retrospective_step.py b/rootly_sdk/api/incident_retrospective_steps/update_incident_retrospective_step.py index 12aec1a9..8956c7c5 100644 --- a/rootly_sdk/api/incident_retrospective_steps/update_incident_retrospective_step.py +++ b/rootly_sdk/api/incident_retrospective_steps/update_incident_retrospective_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_retrospective_steps/{id}", + "url": "/v1/incident_retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRetrospectiveStepResponse]] + Response[ErrorsList | IncidentRetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRetrospectiveStepResponse] + ErrorsList | IncidentRetrospectiveStepResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRetrospectiveStepResponse]] + Response[ErrorsList | IncidentRetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRetrospectiveStepResponse] + ErrorsList | IncidentRetrospectiveStepResponse """ return ( diff --git a/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py b/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py index 8aa4c16c..1c183c5c 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py @@ -11,44 +11,45 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtertype: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filtercauses: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtertype: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filtercauses: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -162,86 +163,86 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtertype: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filtercauses: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtertype: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filtercauses: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPostMortemList]: """List incident retrospectives List incident retrospectives Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtertype (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filtercauses (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatus (str | Unset): + filterseverity (str | Unset): + filtertype (str | Unset): + filteruser_id (int | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filtercauses (str | Unset): + filtercause_ids (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -301,86 +302,86 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtertype: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filtercauses: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtertype: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filtercauses: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPostMortemList | None: """List incident retrospectives List incident retrospectives Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtertype (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filtercauses (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatus (str | Unset): + filterseverity (str | Unset): + filtertype (str | Unset): + filteruser_id (int | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filtercauses (str | Unset): + filtercause_ids (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -435,86 +436,86 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtertype: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filtercauses: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtertype: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filtercauses: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentPostMortemList]: """List incident retrospectives List incident retrospectives Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtertype (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filtercauses (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatus (str | Unset): + filterseverity (str | Unset): + filtertype (str | Unset): + filteruser_id (int | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filtercauses (str | Unset): + filtercause_ids (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -572,86 +573,86 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtertype: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filtercauses: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtertype: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filtercauses: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentPostMortemList | None: """List incident retrospectives List incident retrospectives Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtertype (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filtercauses (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterstatus (str | Unset): + filterseverity (str | Unset): + filtertype (str | Unset): + filteruser_id (int | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filtercauses (str | Unset): + filtercause_ids (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py index 44d0276b..0914afba 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/post_mortems/{id}", + "url": "/v1/post_mortems/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentPostMortemResponse]: @@ -62,14 +66,14 @@ def sync_detailed( List incidents retrospectives Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPostMortemResponse]] + Response[ErrorsList | IncidentPostMortemResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentPostMortemResponse | None: @@ -93,14 +97,14 @@ def sync( List incidents retrospectives Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPostMortemResponse] + ErrorsList | IncidentPostMortemResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentPostMortemResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( List incidents retrospectives Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPostMortemResponse]] + Response[ErrorsList | IncidentPostMortemResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentPostMortemResponse | None: @@ -148,14 +152,14 @@ async def asyncio( List incidents retrospectives Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPostMortemResponse] + ErrorsList | IncidentPostMortemResponse """ return ( diff --git a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py index 7eb66270..226bb3b4 100644 --- a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateIncidentPostMortem, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/post_mortems/{id}", + "url": "/v1/post_mortems/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific incident retrospective by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPostMortem): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPostMortemResponse]] + Response[ErrorsList | IncidentPostMortemResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, @@ -107,7 +110,7 @@ def sync( Update a specific incident retrospective by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPostMortem): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPostMortemResponse] + ErrorsList | IncidentPostMortemResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific incident retrospective by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPostMortem): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentPostMortemResponse]] + Response[ErrorsList | IncidentPostMortemResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, @@ -168,7 +171,7 @@ async def asyncio( Update a specific incident retrospective by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentPostMortem): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentPostMortemResponse] + ErrorsList | IncidentPostMortemResponse """ return ( diff --git a/rootly_sdk/api/incident_role_tasks/create_incident_role_task.py b/rootly_sdk/api/incident_role_tasks/create_incident_role_task.py index 855f016c..ee4e706e 100644 --- a/rootly_sdk/api/incident_role_tasks/create_incident_role_task.py +++ b/rootly_sdk/api/incident_role_tasks/create_incident_role_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incident_roles/{incident_role_id}/incident_role_tasks", + "url": "/v1/incident_roles/{incident_role_id}/incident_role_tasks".format( + incident_role_id=quote(str(incident_role_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return ( diff --git a/rootly_sdk/api/incident_role_tasks/delete_incident_role_task.py b/rootly_sdk/api/incident_role_tasks/delete_incident_role_task.py index 9fb114a0..d4271588 100644 --- a/rootly_sdk/api/incident_role_tasks/delete_incident_role_task.py +++ b/rootly_sdk/api/incident_role_tasks/delete_incident_role_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_role_tasks/{id}", + "url": "/v1/incident_role_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return ( diff --git a/rootly_sdk/api/incident_role_tasks/get_incident_role_task.py b/rootly_sdk/api/incident_role_tasks/get_incident_role_task.py index 76609b7c..8c240008 100644 --- a/rootly_sdk/api/incident_role_tasks/get_incident_role_task.py +++ b/rootly_sdk/api/incident_role_tasks/get_incident_role_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_role_tasks/{id}", + "url": "/v1/incident_role_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return ( diff --git a/rootly_sdk/api/incident_role_tasks/list_incident_role_tasks.py b/rootly_sdk/api/incident_role_tasks/list_incident_role_tasks.py index 610fa1ef..c5d8a805 100644 --- a/rootly_sdk/api/incident_role_tasks/list_incident_role_tasks.py +++ b/rootly_sdk/api/incident_role_tasks/list_incident_role_tasks.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_role_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_roles/{incident_role_id}/incident_role_tasks", + "url": "/v1/incident_roles/{incident_role_id}/incident_role_tasks".format( + incident_role_id=quote(str(incident_role_id), safe=""), + ), "params": params, } @@ -62,9 +66,9 @@ def sync_detailed( incident_role_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentRoleTaskList]: """List incident role tasks @@ -72,9 +76,9 @@ def sync_detailed( Args: incident_role_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,9 +106,9 @@ def sync( incident_role_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentRoleTaskList | None: """List incident role tasks @@ -112,9 +116,9 @@ def sync( Args: incident_role_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,9 +141,9 @@ async def asyncio_detailed( incident_role_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentRoleTaskList]: """List incident role tasks @@ -147,9 +151,9 @@ async def asyncio_detailed( Args: incident_role_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,9 +179,9 @@ async def asyncio( incident_role_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentRoleTaskList | None: """List incident role tasks @@ -185,9 +189,9 @@ async def asyncio( Args: incident_role_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_role_tasks/update_incident_role_task.py b/rootly_sdk/api/incident_role_tasks/update_incident_role_task.py index 0ac5e71f..0ab3fb0a 100644 --- a/rootly_sdk/api/incident_role_tasks/update_incident_role_task.py +++ b/rootly_sdk/api/incident_role_tasks/update_incident_role_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_role_tasks/{id}", + "url": "/v1/incident_role_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleTaskResponse]] + Response[ErrorsList | IncidentRoleTaskResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleTaskResponse] + ErrorsList | IncidentRoleTaskResponse """ return ( diff --git a/rootly_sdk/api/incident_roles/create_incident_role.py b/rootly_sdk/api/incident_roles/create_incident_role.py index a3244bb6..6b747e39 100644 --- a/rootly_sdk/api/incident_roles/create_incident_role.py +++ b/rootly_sdk/api/incident_roles/create_incident_role.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return ( diff --git a/rootly_sdk/api/incident_roles/delete_incident_role.py b/rootly_sdk/api/incident_roles/delete_incident_role.py index 36721535..82e614df 100644 --- a/rootly_sdk/api/incident_roles/delete_incident_role.py +++ b/rootly_sdk/api/incident_roles/delete_incident_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_roles/{id}", + "url": "/v1/incident_roles/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentRoleResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentRoleResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentRoleResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentRoleResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return ( diff --git a/rootly_sdk/api/incident_roles/get_incident_role.py b/rootly_sdk/api/incident_roles/get_incident_role.py index 8ec86036..17763838 100644 --- a/rootly_sdk/api/incident_roles/get_incident_role.py +++ b/rootly_sdk/api/incident_roles/get_incident_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_roles/{id}", + "url": "/v1/incident_roles/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentRoleResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentRoleResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentRoleResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentRoleResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return ( diff --git a/rootly_sdk/api/incident_roles/list_incident_roles.py b/rootly_sdk/api/incident_roles/list_incident_roles.py index ed3334ea..d89b6966 100644 --- a/rootly_sdk/api/incident_roles/list_incident_roles.py +++ b/rootly_sdk/api/incident_roles/list_incident_roles.py @@ -11,22 +11,20 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: - params: dict[str, Any] = {} - params["include"] = include + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -85,36 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentRoleList]: """List incident roles List incident roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -125,7 +121,6 @@ def sync_detailed( """ kwargs = _get_kwargs( - include=include, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -149,36 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentRoleList | None: """List incident roles List incident roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,7 +183,6 @@ def sync( return sync_detailed( client=client, - include=include, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -208,36 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentRoleList]: """List incident roles List incident roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,7 +238,6 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - include=include, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, @@ -270,36 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentRoleList | None: """List incident roles List incident roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -312,7 +299,6 @@ async def asyncio( return ( await asyncio_detailed( client=client, - include=include, pagenumber=pagenumber, pagesize=pagesize, filtersearch=filtersearch, diff --git a/rootly_sdk/api/incident_roles/update_incident_role.py b/rootly_sdk/api/incident_roles/update_incident_role.py index d65d7d9c..e9c102f3 100644 --- a/rootly_sdk/api/incident_roles/update_incident_role.py +++ b/rootly_sdk/api/incident_roles/update_incident_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateIncidentRole, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_roles/{id}", + "url": "/v1/incident_roles/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentRole): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, @@ -107,7 +110,7 @@ def sync( Update a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentRole): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentRole): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentRoleResponse]] + Response[ErrorsList | IncidentRoleResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, @@ -168,7 +171,7 @@ async def asyncio( Update a specific incident_role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentRole): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentRoleResponse] + ErrorsList | IncidentRoleResponse """ return ( diff --git a/rootly_sdk/api/incident_status_page_events/create_incident_status_page.py b/rootly_sdk/api/incident_status_page_events/create_incident_status_page.py index f046af4c..8372e2da 100644 --- a/rootly_sdk/api/incident_status_page_events/create_incident_status_page.py +++ b/rootly_sdk/api/incident_status_page_events/create_incident_status_page.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/status-page-events", + "url": "/v1/incidents/{incident_id}/status-page-events".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return ( diff --git a/rootly_sdk/api/incident_status_page_events/delete_incident_status_page.py b/rootly_sdk/api/incident_status_page_events/delete_incident_status_page.py index 36058d66..8dd1c6e7 100644 --- a/rootly_sdk/api/incident_status_page_events/delete_incident_status_page.py +++ b/rootly_sdk/api/incident_status_page_events/delete_incident_status_page.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/status-page-events/{id}", + "url": "/v1/status-page-events/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return ( diff --git a/rootly_sdk/api/incident_status_page_events/get_incident_status_pages.py b/rootly_sdk/api/incident_status_page_events/get_incident_status_pages.py index eb52a159..d7df3eea 100644 --- a/rootly_sdk/api/incident_status_page_events/get_incident_status_pages.py +++ b/rootly_sdk/api/incident_status_page_events/get_incident_status_pages.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/status-page-events/{id}", + "url": "/v1/status-page-events/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return ( diff --git a/rootly_sdk/api/incident_status_page_events/list_incident_status_pages.py b/rootly_sdk/api/incident_status_page_events/list_incident_status_pages.py index 104d288b..e247949f 100644 --- a/rootly_sdk/api/incident_status_page_events/list_incident_status_pages.py +++ b/rootly_sdk/api/incident_status_page_events/list_incident_status_pages.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( incident_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/status-page-events", + "url": "/v1/incidents/{incident_id}/status-page-events".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentStatusPageEventList]: """List incident status page events @@ -74,9 +78,9 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentStatusPageEventList | None: """List incident status page events @@ -114,9 +118,9 @@ def sync( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[IncidentStatusPageEventList]: """List incident status page events @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> IncidentStatusPageEventList | None: """List incident status page events @@ -187,9 +191,9 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_status_page_events/update_incident_status_page.py b/rootly_sdk/api/incident_status_page_events/update_incident_status_page.py index 6b544116..acd3ab5f 100644 --- a/rootly_sdk/api/incident_status_page_events/update_incident_status_page.py +++ b/rootly_sdk/api/incident_status_page_events/update_incident_status_page.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/status-page-events/{id}", + "url": "/v1/status-page-events/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentStatusPageEventResponse]] + Response[ErrorsList | IncidentStatusPageEventResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentStatusPageEventResponse] + ErrorsList | IncidentStatusPageEventResponse """ return ( diff --git a/rootly_sdk/api/incident_sub_statuses/create_incident_sub_status.py b/rootly_sdk/api/incident_sub_statuses/create_incident_sub_status.py index eff7cccb..005343b0 100644 --- a/rootly_sdk/api/incident_sub_statuses/create_incident_sub_status.py +++ b/rootly_sdk/api/incident_sub_statuses/create_incident_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{incident_id}/sub_statuses", + "url": "/v1/incidents/{incident_id}/sub_statuses".format( + incident_id=quote(str(incident_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentSubStatusResponse]] + Response[ErrorsList | IncidentSubStatusResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentSubStatusResponse] + ErrorsList | IncidentSubStatusResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentSubStatusResponse]] + Response[ErrorsList | IncidentSubStatusResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentSubStatusResponse] + ErrorsList | IncidentSubStatusResponse """ return ( diff --git a/rootly_sdk/api/incident_sub_statuses/delete_incident_sub_status.py b/rootly_sdk/api/incident_sub_statuses/delete_incident_sub_status.py index a0050da0..d0ede7b9 100644 --- a/rootly_sdk/api/incident_sub_statuses/delete_incident_sub_status.py +++ b/rootly_sdk/api/incident_sub_statuses/delete_incident_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_sub_statuses/{id}", + "url": "/v1/incident_sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentSubStatusResponse]] + Response[ErrorsList | IncidentSubStatusResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentSubStatusResponse] + ErrorsList | IncidentSubStatusResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentSubStatusResponse]] + Response[ErrorsList | IncidentSubStatusResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentSubStatusResponse] + ErrorsList | IncidentSubStatusResponse """ return ( diff --git a/rootly_sdk/api/incident_sub_statuses/get_incident_sub_status.py b/rootly_sdk/api/incident_sub_statuses/get_incident_sub_status.py index e08c4dd9..8c79545a 100644 --- a/rootly_sdk/api/incident_sub_statuses/get_incident_sub_status.py +++ b/rootly_sdk/api/incident_sub_statuses/get_incident_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,11 +14,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetIncidentSubStatusInclude = UNSET, + include: GetIncidentSubStatusInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -27,7 +29,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_sub_statuses/{id}", + "url": "/v1/incident_sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -63,7 +67,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetIncidentSubStatusInclude = UNSET, + include: GetIncidentSubStatusInclude | Unset = UNSET, ) -> Response[IncidentSubStatusResponse]: """Retrieves incident_sub_status @@ -71,7 +75,7 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetIncidentSubStatusInclude]): + include (GetIncidentSubStatusInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -97,7 +101,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetIncidentSubStatusInclude = UNSET, + include: GetIncidentSubStatusInclude | Unset = UNSET, ) -> IncidentSubStatusResponse | None: """Retrieves incident_sub_status @@ -105,7 +109,7 @@ def sync( Args: id (str): - include (Union[Unset, GetIncidentSubStatusInclude]): + include (GetIncidentSubStatusInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,7 +130,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetIncidentSubStatusInclude = UNSET, + include: GetIncidentSubStatusInclude | Unset = UNSET, ) -> Response[IncidentSubStatusResponse]: """Retrieves incident_sub_status @@ -134,7 +138,7 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetIncidentSubStatusInclude]): + include (GetIncidentSubStatusInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -158,7 +162,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetIncidentSubStatusInclude = UNSET, + include: GetIncidentSubStatusInclude | Unset = UNSET, ) -> IncidentSubStatusResponse | None: """Retrieves incident_sub_status @@ -166,7 +170,7 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetIncidentSubStatusInclude]): + include (GetIncidentSubStatusInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_sub_statuses/list_incident_sub_statuses.py b/rootly_sdk/api/incident_sub_statuses/list_incident_sub_statuses.py index fb6483d6..9baf07e2 100644 --- a/rootly_sdk/api/incident_sub_statuses/list_incident_sub_statuses.py +++ b/rootly_sdk/api/incident_sub_statuses/list_incident_sub_statuses.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,25 +17,26 @@ def _get_kwargs( incident_id: str, *, - include: Unset | ListIncidentSubStatusesInclude = UNSET, - sort: Unset | ListIncidentSubStatusesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filterassigned_atgt: Unset | str = UNSET, - filterassigned_atgte: Unset | str = UNSET, - filterassigned_atlt: Unset | str = UNSET, - filterassigned_atlte: Unset | str = UNSET, + include: ListIncidentSubStatusesInclude | Unset = UNSET, + sort: ListIncidentSubStatusesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filterassigned_atgt: str | Unset = UNSET, + filterassigned_atgte: str | Unset = UNSET, + filterassigned_atlt: str | Unset = UNSET, + filterassigned_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -58,7 +60,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{incident_id}/sub_statuses", + "url": "/v1/incidents/{incident_id}/sub_statuses".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } @@ -92,15 +96,15 @@ def sync_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentSubStatusesInclude = UNSET, - sort: Unset | ListIncidentSubStatusesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filterassigned_atgt: Unset | str = UNSET, - filterassigned_atgte: Unset | str = UNSET, - filterassigned_atlt: Unset | str = UNSET, - filterassigned_atlte: Unset | str = UNSET, + include: ListIncidentSubStatusesInclude | Unset = UNSET, + sort: ListIncidentSubStatusesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filterassigned_atgt: str | Unset = UNSET, + filterassigned_atgte: str | Unset = UNSET, + filterassigned_atlt: str | Unset = UNSET, + filterassigned_atlte: str | Unset = UNSET, ) -> Response[IncidentSubStatusList]: """List incident_sub_statuses @@ -108,15 +112,15 @@ def sync_detailed( Args: incident_id (str): - include (Union[Unset, ListIncidentSubStatusesInclude]): - sort (Union[Unset, ListIncidentSubStatusesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filterassigned_atgt (Union[Unset, str]): - filterassigned_atgte (Union[Unset, str]): - filterassigned_atlt (Union[Unset, str]): - filterassigned_atlte (Union[Unset, str]): + include (ListIncidentSubStatusesInclude | Unset): + sort (ListIncidentSubStatusesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filterassigned_atgt (str | Unset): + filterassigned_atgte (str | Unset): + filterassigned_atlt (str | Unset): + filterassigned_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,15 +154,15 @@ def sync( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentSubStatusesInclude = UNSET, - sort: Unset | ListIncidentSubStatusesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filterassigned_atgt: Unset | str = UNSET, - filterassigned_atgte: Unset | str = UNSET, - filterassigned_atlt: Unset | str = UNSET, - filterassigned_atlte: Unset | str = UNSET, + include: ListIncidentSubStatusesInclude | Unset = UNSET, + sort: ListIncidentSubStatusesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filterassigned_atgt: str | Unset = UNSET, + filterassigned_atgte: str | Unset = UNSET, + filterassigned_atlt: str | Unset = UNSET, + filterassigned_atlte: str | Unset = UNSET, ) -> IncidentSubStatusList | None: """List incident_sub_statuses @@ -166,15 +170,15 @@ def sync( Args: incident_id (str): - include (Union[Unset, ListIncidentSubStatusesInclude]): - sort (Union[Unset, ListIncidentSubStatusesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filterassigned_atgt (Union[Unset, str]): - filterassigned_atgte (Union[Unset, str]): - filterassigned_atlt (Union[Unset, str]): - filterassigned_atlte (Union[Unset, str]): + include (ListIncidentSubStatusesInclude | Unset): + sort (ListIncidentSubStatusesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filterassigned_atgt (str | Unset): + filterassigned_atgte (str | Unset): + filterassigned_atlt (str | Unset): + filterassigned_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -203,15 +207,15 @@ async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentSubStatusesInclude = UNSET, - sort: Unset | ListIncidentSubStatusesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filterassigned_atgt: Unset | str = UNSET, - filterassigned_atgte: Unset | str = UNSET, - filterassigned_atlt: Unset | str = UNSET, - filterassigned_atlte: Unset | str = UNSET, + include: ListIncidentSubStatusesInclude | Unset = UNSET, + sort: ListIncidentSubStatusesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filterassigned_atgt: str | Unset = UNSET, + filterassigned_atgte: str | Unset = UNSET, + filterassigned_atlt: str | Unset = UNSET, + filterassigned_atlte: str | Unset = UNSET, ) -> Response[IncidentSubStatusList]: """List incident_sub_statuses @@ -219,15 +223,15 @@ async def asyncio_detailed( Args: incident_id (str): - include (Union[Unset, ListIncidentSubStatusesInclude]): - sort (Union[Unset, ListIncidentSubStatusesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filterassigned_atgt (Union[Unset, str]): - filterassigned_atgte (Union[Unset, str]): - filterassigned_atlt (Union[Unset, str]): - filterassigned_atlte (Union[Unset, str]): + include (ListIncidentSubStatusesInclude | Unset): + sort (ListIncidentSubStatusesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filterassigned_atgt (str | Unset): + filterassigned_atgte (str | Unset): + filterassigned_atlt (str | Unset): + filterassigned_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -259,15 +263,15 @@ async def asyncio( incident_id: str, *, client: AuthenticatedClient, - include: Unset | ListIncidentSubStatusesInclude = UNSET, - sort: Unset | ListIncidentSubStatusesSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filterassigned_atgt: Unset | str = UNSET, - filterassigned_atgte: Unset | str = UNSET, - filterassigned_atlt: Unset | str = UNSET, - filterassigned_atlte: Unset | str = UNSET, + include: ListIncidentSubStatusesInclude | Unset = UNSET, + sort: ListIncidentSubStatusesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filterassigned_atgt: str | Unset = UNSET, + filterassigned_atgte: str | Unset = UNSET, + filterassigned_atlt: str | Unset = UNSET, + filterassigned_atlte: str | Unset = UNSET, ) -> IncidentSubStatusList | None: """List incident_sub_statuses @@ -275,15 +279,15 @@ async def asyncio( Args: incident_id (str): - include (Union[Unset, ListIncidentSubStatusesInclude]): - sort (Union[Unset, ListIncidentSubStatusesSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filterassigned_atgt (Union[Unset, str]): - filterassigned_atgte (Union[Unset, str]): - filterassigned_atlt (Union[Unset, str]): - filterassigned_atlte (Union[Unset, str]): + include (ListIncidentSubStatusesInclude | Unset): + sort (ListIncidentSubStatusesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filterassigned_atgt (str | Unset): + filterassigned_atgte (str | Unset): + filterassigned_atlt (str | Unset): + filterassigned_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_sub_statuses/update_incident_sub_status.py b/rootly_sdk/api/incident_sub_statuses/update_incident_sub_status.py index 767df1f8..a2e84f7f 100644 --- a/rootly_sdk/api/incident_sub_statuses/update_incident_sub_status.py +++ b/rootly_sdk/api/incident_sub_statuses/update_incident_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -19,7 +20,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_sub_statuses/{id}", + "url": "/v1/incident_sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/rootly_sdk/api/incident_types/create_incident_type.py b/rootly_sdk/api/incident_types/create_incident_type.py index 850d7886..d54679eb 100644 --- a/rootly_sdk/api/incident_types/create_incident_type.py +++ b/rootly_sdk/api/incident_types/create_incident_type.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return ( diff --git a/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py b/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py new file mode 100644 index 00000000..7a8b50ab --- /dev/null +++ b/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_response import CatalogPropertyResponse +from ...models.errors_list import ErrorsList +from ...models.new_catalog_property import NewCatalogProperty +from ...types import Response + + +def _get_kwargs( + *, + body: NewCatalogProperty, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/incident_types/properties", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogPropertyResponse | ErrorsList | None: + if response.status_code == 201: + response_201 = CatalogPropertyResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyResponse | ErrorsList + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyResponse | ErrorsList] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property + + Creates a new Catalog Property from provided data + + Args: + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyResponse | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_types/delete_incident_type.py b/rootly_sdk/api/incident_types/delete_incident_type.py index 5318328f..c6f0addd 100644 --- a/rootly_sdk/api/incident_types/delete_incident_type.py +++ b/rootly_sdk/api/incident_types/delete_incident_type.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incident_types/{id}", + "url": "/v1/incident_types/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentTypeResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentTypeResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentTypeResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentTypeResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return ( diff --git a/rootly_sdk/api/incident_types/get_incident_type.py b/rootly_sdk/api/incident_types/get_incident_type.py index 48476201..598b47e2 100644 --- a/rootly_sdk/api/incident_types/get_incident_type.py +++ b/rootly_sdk/api/incident_types/get_incident_type.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incident_types/{id}", + "url": "/v1/incident_types/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentTypeResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentTypeResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentTypeResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentTypeResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return ( diff --git a/rootly_sdk/api/incident_types/list_incident_type_catalog_fields.py b/rootly_sdk/api/incident_types/list_incident_type_catalog_fields.py deleted file mode 100644 index f012d5f8..00000000 --- a/rootly_sdk/api/incident_types/list_incident_type_catalog_fields.py +++ /dev/null @@ -1,327 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_incident_type_catalog_fields_include import ( - ListIncidentTypeCatalogFieldsInclude, -) -from ...models.list_incident_type_catalog_fields_sort import ( - ListIncidentTypeCatalogFieldsSort, -) -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - include: Unset | ListIncidentTypeCatalogFieldsInclude = UNSET, - sort: Unset | ListIncidentTypeCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/incident_types/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListIncidentTypeCatalogFieldsInclude = UNSET, - sort: Unset | ListIncidentTypeCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List IncidentType Catalog Fields - - Args: - include (Union[Unset, ListIncidentTypeCatalogFieldsInclude]): - sort (Union[Unset, ListIncidentTypeCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - include: Unset | ListIncidentTypeCatalogFieldsInclude = UNSET, - sort: Unset | ListIncidentTypeCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List IncidentType Catalog Fields - - Args: - include (Union[Unset, ListIncidentTypeCatalogFieldsInclude]): - sort (Union[Unset, ListIncidentTypeCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListIncidentTypeCatalogFieldsInclude = UNSET, - sort: Unset | ListIncidentTypeCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List IncidentType Catalog Fields - - Args: - include (Union[Unset, ListIncidentTypeCatalogFieldsInclude]): - sort (Union[Unset, ListIncidentTypeCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - include: Unset | ListIncidentTypeCatalogFieldsInclude = UNSET, - sort: Unset | ListIncidentTypeCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List IncidentType Catalog Fields - - Args: - include (Union[Unset, ListIncidentTypeCatalogFieldsInclude]): - sort (Union[Unset, ListIncidentTypeCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py b/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py new file mode 100644 index 00000000..322d4536 --- /dev/null +++ b/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py @@ -0,0 +1,328 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_list import CatalogPropertyList +from ...models.list_incident_type_catalog_properties_include import ( + ListIncidentTypeCatalogPropertiesInclude, +) +from ...models.list_incident_type_catalog_properties_sort import ( + ListIncidentTypeCatalogPropertiesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListIncidentTypeCatalogPropertiesInclude | Unset = UNSET, + sort: ListIncidentTypeCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[kind]"] = filterkind + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/incident_types/properties", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogPropertyList | None: + if response.status_code == 200: + response_200 = CatalogPropertyList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListIncidentTypeCatalogPropertiesInclude | Unset = UNSET, + sort: ListIncidentTypeCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List IncidentType Catalog Properties + + Args: + include (ListIncidentTypeCatalogPropertiesInclude | Unset): + sort (ListIncidentTypeCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListIncidentTypeCatalogPropertiesInclude | Unset = UNSET, + sort: ListIncidentTypeCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List IncidentType Catalog Properties + + Args: + include (ListIncidentTypeCatalogPropertiesInclude | Unset): + sort (ListIncidentTypeCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListIncidentTypeCatalogPropertiesInclude | Unset = UNSET, + sort: ListIncidentTypeCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List IncidentType Catalog Properties + + Args: + include (ListIncidentTypeCatalogPropertiesInclude | Unset): + sort (ListIncidentTypeCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListIncidentTypeCatalogPropertiesInclude | Unset = UNSET, + sort: ListIncidentTypeCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List IncidentType Catalog Properties + + Args: + include (ListIncidentTypeCatalogPropertiesInclude | Unset): + sort (ListIncidentTypeCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/incident_types/list_incident_types.py b/rootly_sdk/api/incident_types/list_incident_types.py index 02c5e338..6dc328d1 100644 --- a/rootly_sdk/api/incident_types/list_incident_types.py +++ b/rootly_sdk/api/incident_types/list_incident_types.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -82,34 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentTypeList]: """List incident types List incident types Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,34 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentTypeList | None: """List incident types List incident types Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,34 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[IncidentTypeList]: """List incident types List incident types Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,34 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> IncidentTypeList | None: """List incident types List incident types Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/incident_types/update_incident_type.py b/rootly_sdk/api/incident_types/update_incident_type.py index ba3f07cd..3df712c1 100644 --- a/rootly_sdk/api/incident_types/update_incident_type.py +++ b/rootly_sdk/api/incident_types/update_incident_type.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateIncidentType, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incident_types/{id}", + "url": "/v1/incident_types/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentType): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, @@ -107,7 +110,7 @@ def sync( Update a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentType): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentType): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentTypeResponse]] + Response[ErrorsList | IncidentTypeResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, @@ -168,7 +171,7 @@ async def asyncio( Update a specific incident_type by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncidentType): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentTypeResponse] + ErrorsList | IncidentTypeResponse """ return ( diff --git a/rootly_sdk/api/incidents/add_subscribers_to_incident.py b/rootly_sdk/api/incidents/add_subscribers_to_incident.py index 28cc4647..d652ab8a 100644 --- a/rootly_sdk/api/incidents/add_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/add_subscribers_to_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: AddSubscribers, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{id}/add_subscribers", + "url": "/v1/incidents/{id}/add_subscribers".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, @@ -73,7 +76,7 @@ def sync_detailed( Add subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AddSubscribers): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, @@ -107,7 +110,7 @@ def sync( Add subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AddSubscribers): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, @@ -136,7 +139,7 @@ async def asyncio_detailed( Add subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AddSubscribers): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, @@ -168,7 +171,7 @@ async def asyncio( Add subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AddSubscribers): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/assign_user_to_incident.py b/rootly_sdk/api/incidents/assign_user_to_incident.py index 85f5d763..183ed7ec 100644 --- a/rootly_sdk/api/incidents/assign_user_to_incident.py +++ b/rootly_sdk/api/incidents/assign_user_to_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: AssignRoleToUser, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/incidents/{id}/assign_role_to_user", + "url": "/v1/incidents/{id}/assign_role_to_user".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, @@ -73,7 +76,7 @@ def sync_detailed( Assign user to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AssignRoleToUser): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, @@ -107,7 +110,7 @@ def sync( Assign user to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AssignRoleToUser): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, @@ -136,7 +139,7 @@ async def asyncio_detailed( Assign user to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AssignRoleToUser): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, @@ -168,7 +171,7 @@ async def asyncio( Assign user to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (AssignRoleToUser): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/cancel_incident.py b/rootly_sdk/api/incidents/cancel_incident.py index 127e505a..acdcb056 100644 --- a/rootly_sdk/api/incidents/cancel_incident.py +++ b/rootly_sdk/api/incidents/cancel_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: CancelIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}/cancel", + "url": "/v1/incidents/{id}/cancel".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, @@ -73,7 +76,7 @@ def sync_detailed( Cancel a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (CancelIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, @@ -107,7 +110,7 @@ def sync( Cancel a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (CancelIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Cancel a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (CancelIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, @@ -168,7 +171,7 @@ async def asyncio( Cancel a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (CancelIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/create_incident.py b/rootly_sdk/api/incidents/create_incident.py index 8150ea17..5e580107 100644 --- a/rootly_sdk/api/incidents/create_incident.py +++ b/rootly_sdk/api/incidents/create_incident.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/delete_incident.py b/rootly_sdk/api/incidents/delete_incident.py index b39d249e..93326984 100644 --- a/rootly_sdk/api/incidents/delete_incident.py +++ b/rootly_sdk/api/incidents/delete_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incidents/{id}", + "url": "/v1/incidents/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | IncidentResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | IncidentResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/detach_from_parent_incident.py b/rootly_sdk/api/incidents/detach_from_parent_incident.py new file mode 100644 index 00000000..97f2e681 --- /dev/null +++ b/rootly_sdk/api/incidents/detach_from_parent_incident.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.incident_response import IncidentResponse +from ...types import Response + + +def _get_kwargs( + id: str | UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/incidents/{id}/detach_from_parent".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ErrorsList | IncidentResponse | None: + if response.status_code == 200: + response_200 = IncidentResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if response.status_code == 422: + response_422 = cast(Any, None) + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ErrorsList | IncidentResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[Any | ErrorsList | IncidentResponse]: + """Detach an incident from its parent + + Detach a sub-incident from its parent incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList | IncidentResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Any | ErrorsList | IncidentResponse | None: + """Detach an incident from its parent + + Detach a sub-incident from its parent incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList | IncidentResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[Any | ErrorsList | IncidentResponse]: + """Detach an incident from its parent + + Detach a sub-incident from its parent incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList | IncidentResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Any | ErrorsList | IncidentResponse | None: + """Detach an incident from its parent + + Detach a sub-incident from its parent incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList | IncidentResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/get_incident.py b/rootly_sdk/api/incidents/get_incident.py index 86bea102..60b93b84 100644 --- a/rootly_sdk/api/incidents/get_incident.py +++ b/rootly_sdk/api/incidents/get_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,13 +14,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - include: Unset | GetIncidentInclude = UNSET, + include: GetIncidentInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/incidents/{id}", + "url": "/v1/incidents/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -67,25 +71,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetIncidentInclude = UNSET, + include: GetIncidentInclude | Unset = UNSET, ) -> Response[ErrorsList | IncidentResponse]: """Retrieves an incident Retrieves a specific incident by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetIncidentInclude]): + id (str | UUID): + include (GetIncidentInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -101,25 +105,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetIncidentInclude = UNSET, + include: GetIncidentInclude | Unset = UNSET, ) -> ErrorsList | IncidentResponse | None: """Retrieves an incident Retrieves a specific incident by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetIncidentInclude]): + id (str | UUID): + include (GetIncidentInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -130,25 +134,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetIncidentInclude = UNSET, + include: GetIncidentInclude | Unset = UNSET, ) -> Response[ErrorsList | IncidentResponse]: """Retrieves an incident Retrieves a specific incident by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetIncidentInclude]): + id (str | UUID): + include (GetIncidentInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -162,25 +166,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetIncidentInclude = UNSET, + include: GetIncidentInclude | Unset = UNSET, ) -> ErrorsList | IncidentResponse | None: """Retrieves an incident Retrieves a specific incident by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetIncidentInclude]): + id (str | UUID): + include (GetIncidentInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/list_incidents.py b/rootly_sdk/api/incidents/list_incidents.py index 724a2a21..7def7400 100644 --- a/rootly_sdk/api/incidents/list_incidents.py +++ b/rootly_sdk/api/incidents/list_incidents.py @@ -13,71 +13,73 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterprivate: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filterseverity: Unset | str = UNSET, - filterseverity_id: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterfunctionality_names: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterservice_names: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filterteam_names: Unset | str = UNSET, - filtercause: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercustom_field_selected_option_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterupdated_atgt: Unset | str = UNSET, - filterupdated_atgte: Unset | str = UNSET, - filterupdated_atlt: Unset | str = UNSET, - filterupdated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterdetected_atgt: Unset | str = UNSET, - filterdetected_atgte: Unset | str = UNSET, - filterdetected_atlt: Unset | str = UNSET, - filterdetected_atlte: Unset | str = UNSET, - filteracknowledged_atgt: Unset | str = UNSET, - filteracknowledged_atgte: Unset | str = UNSET, - filteracknowledged_atlt: Unset | str = UNSET, - filteracknowledged_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - filterclosed_atgt: Unset | str = UNSET, - filterclosed_atgte: Unset | str = UNSET, - filterclosed_atlt: Unset | str = UNSET, - filterclosed_atlte: Unset | str = UNSET, - filterin_triage_atgt: Unset | str = UNSET, - filterin_triage_atgte: Unset | str = UNSET, - filterin_triage_atlt: Unset | str = UNSET, - filterin_triage_atlte: Unset | str = UNSET, - sort: Unset | ListIncidentsSort = UNSET, - include: Unset | ListIncidentsInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterprivate: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filterseverity_id: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterfunctionality_names: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterservice_names: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filterteam_names: str | Unset = UNSET, + filtercause: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercustom_field_selected_option_ids: str | Unset = UNSET, + filterslack_channel_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterdetected_atgt: str | Unset = UNSET, + filterdetected_atgte: str | Unset = UNSET, + filterdetected_atlt: str | Unset = UNSET, + filterdetected_atlte: str | Unset = UNSET, + filteracknowledged_atgt: str | Unset = UNSET, + filteracknowledged_atgte: str | Unset = UNSET, + filteracknowledged_atlt: str | Unset = UNSET, + filteracknowledged_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + filterclosed_atgt: str | Unset = UNSET, + filterclosed_atgte: str | Unset = UNSET, + filterclosed_atlt: str | Unset = UNSET, + filterclosed_atlte: str | Unset = UNSET, + filterin_triage_atgt: str | Unset = UNSET, + filterin_triage_atgte: str | Unset = UNSET, + filterin_triage_atlt: str | Unset = UNSET, + filterin_triage_atlte: str | Unset = UNSET, + sort: ListIncidentsSort | Unset = UNSET, + include: ListIncidentsInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -132,6 +134,8 @@ def _get_kwargs( params["filter[custom_field_selected_option_ids]"] = filtercustom_field_selected_option_ids + params["filter[slack_channel_id]"] = filterslack_channel_id + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -204,13 +208,13 @@ def _get_kwargs( params["filter[in_triage_at][lte]"] = filterin_triage_atlte - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort params["sort"] = json_sort - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -251,140 +255,142 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterprivate: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filterseverity: Unset | str = UNSET, - filterseverity_id: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterfunctionality_names: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterservice_names: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filterteam_names: Unset | str = UNSET, - filtercause: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercustom_field_selected_option_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterupdated_atgt: Unset | str = UNSET, - filterupdated_atgte: Unset | str = UNSET, - filterupdated_atlt: Unset | str = UNSET, - filterupdated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterdetected_atgt: Unset | str = UNSET, - filterdetected_atgte: Unset | str = UNSET, - filterdetected_atlt: Unset | str = UNSET, - filterdetected_atlte: Unset | str = UNSET, - filteracknowledged_atgt: Unset | str = UNSET, - filteracknowledged_atgte: Unset | str = UNSET, - filteracknowledged_atlt: Unset | str = UNSET, - filteracknowledged_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - filterclosed_atgt: Unset | str = UNSET, - filterclosed_atgte: Unset | str = UNSET, - filterclosed_atlt: Unset | str = UNSET, - filterclosed_atlte: Unset | str = UNSET, - filterin_triage_atgt: Unset | str = UNSET, - filterin_triage_atgte: Unset | str = UNSET, - filterin_triage_atlt: Unset | str = UNSET, - filterin_triage_atlte: Unset | str = UNSET, - sort: Unset | ListIncidentsSort = UNSET, - include: Unset | ListIncidentsInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterprivate: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filterseverity_id: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterfunctionality_names: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterservice_names: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filterteam_names: str | Unset = UNSET, + filtercause: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercustom_field_selected_option_ids: str | Unset = UNSET, + filterslack_channel_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterdetected_atgt: str | Unset = UNSET, + filterdetected_atgte: str | Unset = UNSET, + filterdetected_atlt: str | Unset = UNSET, + filterdetected_atlte: str | Unset = UNSET, + filteracknowledged_atgt: str | Unset = UNSET, + filteracknowledged_atgte: str | Unset = UNSET, + filteracknowledged_atlt: str | Unset = UNSET, + filteracknowledged_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + filterclosed_atgt: str | Unset = UNSET, + filterclosed_atgte: str | Unset = UNSET, + filterclosed_atlt: str | Unset = UNSET, + filterclosed_atlte: str | Unset = UNSET, + filterin_triage_atgt: str | Unset = UNSET, + filterin_triage_atgte: str | Unset = UNSET, + filterin_triage_atlt: str | Unset = UNSET, + filterin_triage_atlte: str | Unset = UNSET, + sort: ListIncidentsSort | Unset = UNSET, + include: ListIncidentsInclude | Unset = UNSET, ) -> Response[IncidentList]: """List incidents List incidents Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterprivate (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filterseverity (Union[Unset, str]): - filterseverity_id (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterfunctionality_names (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterservice_names (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filterteam_names (Union[Unset, str]): - filtercause (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercustom_field_selected_option_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterupdated_atgt (Union[Unset, str]): - filterupdated_atgte (Union[Unset, str]): - filterupdated_atlt (Union[Unset, str]): - filterupdated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterdetected_atgt (Union[Unset, str]): - filterdetected_atgte (Union[Unset, str]): - filterdetected_atlt (Union[Unset, str]): - filterdetected_atlte (Union[Unset, str]): - filteracknowledged_atgt (Union[Unset, str]): - filteracknowledged_atgte (Union[Unset, str]): - filteracknowledged_atlt (Union[Unset, str]): - filteracknowledged_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - filterclosed_atgt (Union[Unset, str]): - filterclosed_atgte (Union[Unset, str]): - filterclosed_atlt (Union[Unset, str]): - filterclosed_atlte (Union[Unset, str]): - filterin_triage_atgt (Union[Unset, str]): - filterin_triage_atgte (Union[Unset, str]): - filterin_triage_atlt (Union[Unset, str]): - filterin_triage_atlte (Union[Unset, str]): - sort (Union[Unset, ListIncidentsSort]): - include (Union[Unset, ListIncidentsInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterkind (str | Unset): + filterstatus (str | Unset): + filterprivate (str | Unset): + filteruser_id (int | Unset): + filterseverity (str | Unset): + filterseverity_id (str | Unset): + filterlabels (str | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterfunctionality_names (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterservice_names (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filterteam_names (str | Unset): + filtercause (str | Unset): + filtercause_ids (str | Unset): + filtercustom_field_selected_option_ids (str | Unset): + filterslack_channel_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterdetected_atgt (str | Unset): + filterdetected_atgte (str | Unset): + filterdetected_atlt (str | Unset): + filterdetected_atlte (str | Unset): + filteracknowledged_atgt (str | Unset): + filteracknowledged_atgte (str | Unset): + filteracknowledged_atlt (str | Unset): + filteracknowledged_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + filterclosed_atgt (str | Unset): + filterclosed_atgte (str | Unset): + filterclosed_atlt (str | Unset): + filterclosed_atlte (str | Unset): + filterin_triage_atgt (str | Unset): + filterin_triage_atgte (str | Unset): + filterin_triage_atlt (str | Unset): + filterin_triage_atlte (str | Unset): + sort (ListIncidentsSort | Unset): + include (ListIncidentsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -421,6 +427,7 @@ def sync_detailed( filtercause=filtercause, filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -471,140 +478,142 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterprivate: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filterseverity: Unset | str = UNSET, - filterseverity_id: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterfunctionality_names: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterservice_names: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filterteam_names: Unset | str = UNSET, - filtercause: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercustom_field_selected_option_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterupdated_atgt: Unset | str = UNSET, - filterupdated_atgte: Unset | str = UNSET, - filterupdated_atlt: Unset | str = UNSET, - filterupdated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterdetected_atgt: Unset | str = UNSET, - filterdetected_atgte: Unset | str = UNSET, - filterdetected_atlt: Unset | str = UNSET, - filterdetected_atlte: Unset | str = UNSET, - filteracknowledged_atgt: Unset | str = UNSET, - filteracknowledged_atgte: Unset | str = UNSET, - filteracknowledged_atlt: Unset | str = UNSET, - filteracknowledged_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - filterclosed_atgt: Unset | str = UNSET, - filterclosed_atgte: Unset | str = UNSET, - filterclosed_atlt: Unset | str = UNSET, - filterclosed_atlte: Unset | str = UNSET, - filterin_triage_atgt: Unset | str = UNSET, - filterin_triage_atgte: Unset | str = UNSET, - filterin_triage_atlt: Unset | str = UNSET, - filterin_triage_atlte: Unset | str = UNSET, - sort: Unset | ListIncidentsSort = UNSET, - include: Unset | ListIncidentsInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterprivate: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filterseverity_id: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterfunctionality_names: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterservice_names: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filterteam_names: str | Unset = UNSET, + filtercause: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercustom_field_selected_option_ids: str | Unset = UNSET, + filterslack_channel_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterdetected_atgt: str | Unset = UNSET, + filterdetected_atgte: str | Unset = UNSET, + filterdetected_atlt: str | Unset = UNSET, + filterdetected_atlte: str | Unset = UNSET, + filteracknowledged_atgt: str | Unset = UNSET, + filteracknowledged_atgte: str | Unset = UNSET, + filteracknowledged_atlt: str | Unset = UNSET, + filteracknowledged_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + filterclosed_atgt: str | Unset = UNSET, + filterclosed_atgte: str | Unset = UNSET, + filterclosed_atlt: str | Unset = UNSET, + filterclosed_atlte: str | Unset = UNSET, + filterin_triage_atgt: str | Unset = UNSET, + filterin_triage_atgte: str | Unset = UNSET, + filterin_triage_atlt: str | Unset = UNSET, + filterin_triage_atlte: str | Unset = UNSET, + sort: ListIncidentsSort | Unset = UNSET, + include: ListIncidentsInclude | Unset = UNSET, ) -> IncidentList | None: """List incidents List incidents Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterprivate (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filterseverity (Union[Unset, str]): - filterseverity_id (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterfunctionality_names (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterservice_names (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filterteam_names (Union[Unset, str]): - filtercause (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercustom_field_selected_option_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterupdated_atgt (Union[Unset, str]): - filterupdated_atgte (Union[Unset, str]): - filterupdated_atlt (Union[Unset, str]): - filterupdated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterdetected_atgt (Union[Unset, str]): - filterdetected_atgte (Union[Unset, str]): - filterdetected_atlt (Union[Unset, str]): - filterdetected_atlte (Union[Unset, str]): - filteracknowledged_atgt (Union[Unset, str]): - filteracknowledged_atgte (Union[Unset, str]): - filteracknowledged_atlt (Union[Unset, str]): - filteracknowledged_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - filterclosed_atgt (Union[Unset, str]): - filterclosed_atgte (Union[Unset, str]): - filterclosed_atlt (Union[Unset, str]): - filterclosed_atlte (Union[Unset, str]): - filterin_triage_atgt (Union[Unset, str]): - filterin_triage_atgte (Union[Unset, str]): - filterin_triage_atlt (Union[Unset, str]): - filterin_triage_atlte (Union[Unset, str]): - sort (Union[Unset, ListIncidentsSort]): - include (Union[Unset, ListIncidentsInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterkind (str | Unset): + filterstatus (str | Unset): + filterprivate (str | Unset): + filteruser_id (int | Unset): + filterseverity (str | Unset): + filterseverity_id (str | Unset): + filterlabels (str | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterfunctionality_names (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterservice_names (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filterteam_names (str | Unset): + filtercause (str | Unset): + filtercause_ids (str | Unset): + filtercustom_field_selected_option_ids (str | Unset): + filterslack_channel_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterdetected_atgt (str | Unset): + filterdetected_atgte (str | Unset): + filterdetected_atlt (str | Unset): + filterdetected_atlte (str | Unset): + filteracknowledged_atgt (str | Unset): + filteracknowledged_atgte (str | Unset): + filteracknowledged_atlt (str | Unset): + filteracknowledged_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + filterclosed_atgt (str | Unset): + filterclosed_atgte (str | Unset): + filterclosed_atlt (str | Unset): + filterclosed_atlte (str | Unset): + filterin_triage_atgt (str | Unset): + filterin_triage_atgte (str | Unset): + filterin_triage_atlt (str | Unset): + filterin_triage_atlte (str | Unset): + sort (ListIncidentsSort | Unset): + include (ListIncidentsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -642,6 +651,7 @@ def sync( filtercause=filtercause, filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -686,140 +696,142 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterprivate: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filterseverity: Unset | str = UNSET, - filterseverity_id: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterfunctionality_names: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterservice_names: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filterteam_names: Unset | str = UNSET, - filtercause: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercustom_field_selected_option_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterupdated_atgt: Unset | str = UNSET, - filterupdated_atgte: Unset | str = UNSET, - filterupdated_atlt: Unset | str = UNSET, - filterupdated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterdetected_atgt: Unset | str = UNSET, - filterdetected_atgte: Unset | str = UNSET, - filterdetected_atlt: Unset | str = UNSET, - filterdetected_atlte: Unset | str = UNSET, - filteracknowledged_atgt: Unset | str = UNSET, - filteracknowledged_atgte: Unset | str = UNSET, - filteracknowledged_atlt: Unset | str = UNSET, - filteracknowledged_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - filterclosed_atgt: Unset | str = UNSET, - filterclosed_atgte: Unset | str = UNSET, - filterclosed_atlt: Unset | str = UNSET, - filterclosed_atlte: Unset | str = UNSET, - filterin_triage_atgt: Unset | str = UNSET, - filterin_triage_atgte: Unset | str = UNSET, - filterin_triage_atlt: Unset | str = UNSET, - filterin_triage_atlte: Unset | str = UNSET, - sort: Unset | ListIncidentsSort = UNSET, - include: Unset | ListIncidentsInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterprivate: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filterseverity_id: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterfunctionality_names: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterservice_names: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filterteam_names: str | Unset = UNSET, + filtercause: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercustom_field_selected_option_ids: str | Unset = UNSET, + filterslack_channel_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterdetected_atgt: str | Unset = UNSET, + filterdetected_atgte: str | Unset = UNSET, + filterdetected_atlt: str | Unset = UNSET, + filterdetected_atlte: str | Unset = UNSET, + filteracknowledged_atgt: str | Unset = UNSET, + filteracknowledged_atgte: str | Unset = UNSET, + filteracknowledged_atlt: str | Unset = UNSET, + filteracknowledged_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + filterclosed_atgt: str | Unset = UNSET, + filterclosed_atgte: str | Unset = UNSET, + filterclosed_atlt: str | Unset = UNSET, + filterclosed_atlte: str | Unset = UNSET, + filterin_triage_atgt: str | Unset = UNSET, + filterin_triage_atgte: str | Unset = UNSET, + filterin_triage_atlt: str | Unset = UNSET, + filterin_triage_atlte: str | Unset = UNSET, + sort: ListIncidentsSort | Unset = UNSET, + include: ListIncidentsInclude | Unset = UNSET, ) -> Response[IncidentList]: """List incidents List incidents Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterprivate (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filterseverity (Union[Unset, str]): - filterseverity_id (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterfunctionality_names (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterservice_names (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filterteam_names (Union[Unset, str]): - filtercause (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercustom_field_selected_option_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterupdated_atgt (Union[Unset, str]): - filterupdated_atgte (Union[Unset, str]): - filterupdated_atlt (Union[Unset, str]): - filterupdated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterdetected_atgt (Union[Unset, str]): - filterdetected_atgte (Union[Unset, str]): - filterdetected_atlt (Union[Unset, str]): - filterdetected_atlte (Union[Unset, str]): - filteracknowledged_atgt (Union[Unset, str]): - filteracknowledged_atgte (Union[Unset, str]): - filteracknowledged_atlt (Union[Unset, str]): - filteracknowledged_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - filterclosed_atgt (Union[Unset, str]): - filterclosed_atgte (Union[Unset, str]): - filterclosed_atlt (Union[Unset, str]): - filterclosed_atlte (Union[Unset, str]): - filterin_triage_atgt (Union[Unset, str]): - filterin_triage_atgte (Union[Unset, str]): - filterin_triage_atlt (Union[Unset, str]): - filterin_triage_atlte (Union[Unset, str]): - sort (Union[Unset, ListIncidentsSort]): - include (Union[Unset, ListIncidentsInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterkind (str | Unset): + filterstatus (str | Unset): + filterprivate (str | Unset): + filteruser_id (int | Unset): + filterseverity (str | Unset): + filterseverity_id (str | Unset): + filterlabels (str | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterfunctionality_names (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterservice_names (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filterteam_names (str | Unset): + filtercause (str | Unset): + filtercause_ids (str | Unset): + filtercustom_field_selected_option_ids (str | Unset): + filterslack_channel_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterdetected_atgt (str | Unset): + filterdetected_atgte (str | Unset): + filterdetected_atlt (str | Unset): + filterdetected_atlte (str | Unset): + filteracknowledged_atgt (str | Unset): + filteracknowledged_atgte (str | Unset): + filteracknowledged_atlt (str | Unset): + filteracknowledged_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + filterclosed_atgt (str | Unset): + filterclosed_atgte (str | Unset): + filterclosed_atlt (str | Unset): + filterclosed_atlte (str | Unset): + filterin_triage_atgt (str | Unset): + filterin_triage_atgte (str | Unset): + filterin_triage_atlt (str | Unset): + filterin_triage_atlte (str | Unset): + sort (ListIncidentsSort | Unset): + include (ListIncidentsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -856,6 +868,7 @@ async def asyncio_detailed( filtercause=filtercause, filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, @@ -904,140 +917,142 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterstatus: Unset | str = UNSET, - filterprivate: Unset | str = UNSET, - filteruser_id: Unset | int = UNSET, - filterseverity: Unset | str = UNSET, - filterseverity_id: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filtertypes: Unset | str = UNSET, - filtertype_ids: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterenvironment_ids: Unset | str = UNSET, - filterfunctionalities: Unset | str = UNSET, - filterfunctionality_ids: Unset | str = UNSET, - filterfunctionality_names: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterservice_ids: Unset | str = UNSET, - filterservice_names: Unset | str = UNSET, - filterteams: Unset | str = UNSET, - filterteam_ids: Unset | str = UNSET, - filterteam_names: Unset | str = UNSET, - filtercause: Unset | str = UNSET, - filtercause_ids: Unset | str = UNSET, - filtercustom_field_selected_option_ids: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - filterupdated_atgt: Unset | str = UNSET, - filterupdated_atgte: Unset | str = UNSET, - filterupdated_atlt: Unset | str = UNSET, - filterupdated_atlte: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterdetected_atgt: Unset | str = UNSET, - filterdetected_atgte: Unset | str = UNSET, - filterdetected_atlt: Unset | str = UNSET, - filterdetected_atlte: Unset | str = UNSET, - filteracknowledged_atgt: Unset | str = UNSET, - filteracknowledged_atgte: Unset | str = UNSET, - filteracknowledged_atlt: Unset | str = UNSET, - filteracknowledged_atlte: Unset | str = UNSET, - filtermitigated_atgt: Unset | str = UNSET, - filtermitigated_atgte: Unset | str = UNSET, - filtermitigated_atlt: Unset | str = UNSET, - filtermitigated_atlte: Unset | str = UNSET, - filterresolved_atgt: Unset | str = UNSET, - filterresolved_atgte: Unset | str = UNSET, - filterresolved_atlt: Unset | str = UNSET, - filterresolved_atlte: Unset | str = UNSET, - filterclosed_atgt: Unset | str = UNSET, - filterclosed_atgte: Unset | str = UNSET, - filterclosed_atlt: Unset | str = UNSET, - filterclosed_atlte: Unset | str = UNSET, - filterin_triage_atgt: Unset | str = UNSET, - filterin_triage_atgte: Unset | str = UNSET, - filterin_triage_atlt: Unset | str = UNSET, - filterin_triage_atlte: Unset | str = UNSET, - sort: Unset | ListIncidentsSort = UNSET, - include: Unset | ListIncidentsInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filterprivate: str | Unset = UNSET, + filteruser_id: int | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filterseverity_id: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filtertypes: str | Unset = UNSET, + filtertype_ids: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterenvironment_ids: str | Unset = UNSET, + filterfunctionalities: str | Unset = UNSET, + filterfunctionality_ids: str | Unset = UNSET, + filterfunctionality_names: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filterservice_names: str | Unset = UNSET, + filterteams: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, + filterteam_names: str | Unset = UNSET, + filtercause: str | Unset = UNSET, + filtercause_ids: str | Unset = UNSET, + filtercustom_field_selected_option_ids: str | Unset = UNSET, + filterslack_channel_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + filterupdated_atgt: str | Unset = UNSET, + filterupdated_atgte: str | Unset = UNSET, + filterupdated_atlt: str | Unset = UNSET, + filterupdated_atlte: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterdetected_atgt: str | Unset = UNSET, + filterdetected_atgte: str | Unset = UNSET, + filterdetected_atlt: str | Unset = UNSET, + filterdetected_atlte: str | Unset = UNSET, + filteracknowledged_atgt: str | Unset = UNSET, + filteracknowledged_atgte: str | Unset = UNSET, + filteracknowledged_atlt: str | Unset = UNSET, + filteracknowledged_atlte: str | Unset = UNSET, + filtermitigated_atgt: str | Unset = UNSET, + filtermitigated_atgte: str | Unset = UNSET, + filtermitigated_atlt: str | Unset = UNSET, + filtermitigated_atlte: str | Unset = UNSET, + filterresolved_atgt: str | Unset = UNSET, + filterresolved_atgte: str | Unset = UNSET, + filterresolved_atlt: str | Unset = UNSET, + filterresolved_atlte: str | Unset = UNSET, + filterclosed_atgt: str | Unset = UNSET, + filterclosed_atgte: str | Unset = UNSET, + filterclosed_atlt: str | Unset = UNSET, + filterclosed_atlte: str | Unset = UNSET, + filterin_triage_atgt: str | Unset = UNSET, + filterin_triage_atgte: str | Unset = UNSET, + filterin_triage_atlt: str | Unset = UNSET, + filterin_triage_atlte: str | Unset = UNSET, + sort: ListIncidentsSort | Unset = UNSET, + include: ListIncidentsInclude | Unset = UNSET, ) -> IncidentList | None: """List incidents List incidents Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterstatus (Union[Unset, str]): - filterprivate (Union[Unset, str]): - filteruser_id (Union[Unset, int]): - filterseverity (Union[Unset, str]): - filterseverity_id (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filtertypes (Union[Unset, str]): - filtertype_ids (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterenvironment_ids (Union[Unset, str]): - filterfunctionalities (Union[Unset, str]): - filterfunctionality_ids (Union[Unset, str]): - filterfunctionality_names (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterservice_ids (Union[Unset, str]): - filterservice_names (Union[Unset, str]): - filterteams (Union[Unset, str]): - filterteam_ids (Union[Unset, str]): - filterteam_names (Union[Unset, str]): - filtercause (Union[Unset, str]): - filtercause_ids (Union[Unset, str]): - filtercustom_field_selected_option_ids (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - filterupdated_atgt (Union[Unset, str]): - filterupdated_atgte (Union[Unset, str]): - filterupdated_atlt (Union[Unset, str]): - filterupdated_atlte (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterdetected_atgt (Union[Unset, str]): - filterdetected_atgte (Union[Unset, str]): - filterdetected_atlt (Union[Unset, str]): - filterdetected_atlte (Union[Unset, str]): - filteracknowledged_atgt (Union[Unset, str]): - filteracknowledged_atgte (Union[Unset, str]): - filteracknowledged_atlt (Union[Unset, str]): - filteracknowledged_atlte (Union[Unset, str]): - filtermitigated_atgt (Union[Unset, str]): - filtermitigated_atgte (Union[Unset, str]): - filtermitigated_atlt (Union[Unset, str]): - filtermitigated_atlte (Union[Unset, str]): - filterresolved_atgt (Union[Unset, str]): - filterresolved_atgte (Union[Unset, str]): - filterresolved_atlt (Union[Unset, str]): - filterresolved_atlte (Union[Unset, str]): - filterclosed_atgt (Union[Unset, str]): - filterclosed_atgte (Union[Unset, str]): - filterclosed_atlt (Union[Unset, str]): - filterclosed_atlte (Union[Unset, str]): - filterin_triage_atgt (Union[Unset, str]): - filterin_triage_atgte (Union[Unset, str]): - filterin_triage_atlt (Union[Unset, str]): - filterin_triage_atlte (Union[Unset, str]): - sort (Union[Unset, ListIncidentsSort]): - include (Union[Unset, ListIncidentsInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterkind (str | Unset): + filterstatus (str | Unset): + filterprivate (str | Unset): + filteruser_id (int | Unset): + filterseverity (str | Unset): + filterseverity_id (str | Unset): + filterlabels (str | Unset): + filtertypes (str | Unset): + filtertype_ids (str | Unset): + filterenvironments (str | Unset): + filterenvironment_ids (str | Unset): + filterfunctionalities (str | Unset): + filterfunctionality_ids (str | Unset): + filterfunctionality_names (str | Unset): + filterservices (str | Unset): + filterservice_ids (str | Unset): + filterservice_names (str | Unset): + filterteams (str | Unset): + filterteam_ids (str | Unset): + filterteam_names (str | Unset): + filtercause (str | Unset): + filtercause_ids (str | Unset): + filtercustom_field_selected_option_ids (str | Unset): + filterslack_channel_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + filterupdated_atgt (str | Unset): + filterupdated_atgte (str | Unset): + filterupdated_atlt (str | Unset): + filterupdated_atlte (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterdetected_atgt (str | Unset): + filterdetected_atgte (str | Unset): + filterdetected_atlt (str | Unset): + filterdetected_atlte (str | Unset): + filteracknowledged_atgt (str | Unset): + filteracknowledged_atgte (str | Unset): + filteracknowledged_atlt (str | Unset): + filteracknowledged_atlte (str | Unset): + filtermitigated_atgt (str | Unset): + filtermitigated_atgte (str | Unset): + filtermitigated_atlt (str | Unset): + filtermitigated_atlte (str | Unset): + filterresolved_atgt (str | Unset): + filterresolved_atgte (str | Unset): + filterresolved_atlt (str | Unset): + filterresolved_atlte (str | Unset): + filterclosed_atgt (str | Unset): + filterclosed_atgte (str | Unset): + filterclosed_atlt (str | Unset): + filterclosed_atlte (str | Unset): + filterin_triage_atgt (str | Unset): + filterin_triage_atgte (str | Unset): + filterin_triage_atlt (str | Unset): + filterin_triage_atlte (str | Unset): + sort (ListIncidentsSort | Unset): + include (ListIncidentsInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -1076,6 +1091,7 @@ async def asyncio( filtercause=filtercause, filtercause_ids=filtercause_ids, filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, filtercreated_atgt=filtercreated_atgt, filtercreated_atgte=filtercreated_atgte, filtercreated_atlt=filtercreated_atlt, diff --git a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py index d6ed447d..e93e2b46 100644 --- a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: ResolveIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}/duplicate", + "url": "/v1/incidents/{id}/duplicate".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -73,7 +76,7 @@ def sync_detailed( Mark an incident as a duplicate Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -107,7 +110,7 @@ def sync( Mark an incident as a duplicate Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Mark an incident as a duplicate Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -168,7 +171,7 @@ async def asyncio( Mark an incident as a duplicate Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/mitigate_incident.py b/rootly_sdk/api/incidents/mitigate_incident.py index efb44525..4c713578 100644 --- a/rootly_sdk/api/incidents/mitigate_incident.py +++ b/rootly_sdk/api/incidents/mitigate_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: MitigateIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}/mitigate", + "url": "/v1/incidents/{id}/mitigate".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, @@ -73,7 +76,7 @@ def sync_detailed( Mitigate a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (MitigateIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, @@ -107,7 +110,7 @@ def sync( Mitigate a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (MitigateIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Mitigate a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (MitigateIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, @@ -168,7 +171,7 @@ async def asyncio( Mitigate a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (MitigateIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py b/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py index ae393430..c86e1ec4 100644 --- a/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py +++ b/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UnassignRoleFromUser, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incidents/{id}/unassign_role_from_user", + "url": "/v1/incidents/{id}/unassign_role_from_user".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, @@ -73,7 +76,7 @@ def sync_detailed( Remove assigned user from incident Args: - id (Union[UUID, str]): + id (str | UUID): body (UnassignRoleFromUser): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, @@ -107,7 +110,7 @@ def sync( Remove assigned user from incident Args: - id (Union[UUID, str]): + id (str | UUID): body (UnassignRoleFromUser): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, @@ -136,7 +139,7 @@ async def asyncio_detailed( Remove assigned user from incident Args: - id (Union[UUID, str]): + id (str | UUID): body (UnassignRoleFromUser): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, @@ -168,7 +171,7 @@ async def asyncio( Remove assigned user from incident Args: - id (Union[UUID, str]): + id (str | UUID): body (UnassignRoleFromUser): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py index ba5666eb..0be005da 100644 --- a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: RemoveSubscribers, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/incidents/{id}/remove_subscribers", + "url": "/v1/incidents/{id}/remove_subscribers".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, @@ -73,7 +76,7 @@ def sync_detailed( Remove subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (RemoveSubscribers): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, @@ -107,7 +110,7 @@ def sync( Remove subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (RemoveSubscribers): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, @@ -136,7 +139,7 @@ async def asyncio_detailed( Remove subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (RemoveSubscribers): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, @@ -168,7 +171,7 @@ async def asyncio( Remove subscribers to incident Args: - id (Union[UUID, str]): + id (str | UUID): body (RemoveSubscribers): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/resolve_incident.py b/rootly_sdk/api/incidents/resolve_incident.py index 690fa270..094ca943 100644 --- a/rootly_sdk/api/incidents/resolve_incident.py +++ b/rootly_sdk/api/incidents/resolve_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: ResolveIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}/resolve", + "url": "/v1/incidents/{id}/resolve".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -73,7 +76,7 @@ def sync_detailed( Resolve a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -107,7 +110,7 @@ def sync( Resolve a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Resolve a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, @@ -168,7 +171,7 @@ async def asyncio( Resolve a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (ResolveIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/restart_incident.py b/rootly_sdk/api/incidents/restart_incident.py index 7ff3aaca..45953fc9 100644 --- a/rootly_sdk/api/incidents/restart_incident.py +++ b/rootly_sdk/api/incidents/restart_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: RestartIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}/restart", + "url": "/v1/incidents/{id}/restart".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, @@ -73,7 +76,7 @@ def sync_detailed( Restart a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (RestartIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, @@ -107,7 +110,7 @@ def sync( Restart a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (RestartIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Restart a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (RestartIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, @@ -168,7 +171,7 @@ async def asyncio( Restart a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (RestartIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/triage_incident.py b/rootly_sdk/api/incidents/triage_incident.py index b70ba562..819bedd0 100644 --- a/rootly_sdk/api/incidents/triage_incident.py +++ b/rootly_sdk/api/incidents/triage_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: InTriageIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}/in_triage", + "url": "/v1/incidents/{id}/in_triage".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, @@ -73,7 +76,7 @@ def sync_detailed( Set a specific incident by ID to triage state Args: - id (Union[UUID, str]): + id (str | UUID): body (InTriageIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, @@ -107,7 +110,7 @@ def sync( Set a specific incident by ID to triage state Args: - id (Union[UUID, str]): + id (str | UUID): body (InTriageIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Set a specific incident by ID to triage state Args: - id (Union[UUID, str]): + id (str | UUID): body (InTriageIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, @@ -168,7 +171,7 @@ async def asyncio( Set a specific incident by ID to triage state Args: - id (Union[UUID, str]): + id (str | UUID): body (InTriageIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py new file mode 100644 index 00000000..d5a053f8 --- /dev/null +++ b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote +from uuid import UUID + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.incident_response import IncidentResponse +from ...types import Response + + +def _get_kwargs( + id: str | UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/incidents/{id}/unmark_as_duplicate".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ErrorsList | IncidentResponse | None: + if response.status_code == 200: + response_200 = IncidentResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if response.status_code == 422: + response_422 = cast(Any, None) + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ErrorsList | IncidentResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[Any | ErrorsList | IncidentResponse]: + """Remove duplicate marking from an incident + + Remove the duplicate marking from an incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList | IncidentResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Any | ErrorsList | IncidentResponse | None: + """Remove duplicate marking from an incident + + Remove the duplicate marking from an incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList | IncidentResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Response[Any | ErrorsList | IncidentResponse]: + """Remove duplicate marking from an incident + + Remove the duplicate marking from an incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList | IncidentResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str | UUID, + *, + client: AuthenticatedClient, +) -> Any | ErrorsList | IncidentResponse | None: + """Remove duplicate marking from an incident + + Remove the duplicate marking from an incident + + Args: + id (str | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList | IncidentResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/update_incident.py b/rootly_sdk/api/incidents/update_incident.py index 00521b61..470c044e 100644 --- a/rootly_sdk/api/incidents/update_incident.py +++ b/rootly_sdk/api/incidents/update_incident.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateIncident, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/incidents/{id}", + "url": "/v1/incidents/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncident): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, @@ -107,7 +110,7 @@ def sync( Update a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncident): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncident): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentResponse]] + Response[ErrorsList | IncidentResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, @@ -168,7 +171,7 @@ async def asyncio( Update a specific incident by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateIncident): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentResponse] + ErrorsList | IncidentResponse """ return ( diff --git a/rootly_sdk/api/ip_ranges/get_ip_ranges.py b/rootly_sdk/api/ip_ranges/get_ip_ranges.py index de282bf7..1c8c7d81 100644 --- a/rootly_sdk/api/ip_ranges/get_ip_ranges.py +++ b/rootly_sdk/api/ip_ranges/get_ip_ranges.py @@ -10,6 +10,7 @@ def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/ip_ranges", diff --git a/rootly_sdk/api/live_call_routers/create_live_call_router.py b/rootly_sdk/api/live_call_routers/create_live_call_router.py index e34f474e..3411697b 100644 --- a/rootly_sdk/api/live_call_routers/create_live_call_router.py +++ b/rootly_sdk/api/live_call_routers/create_live_call_router.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return ( diff --git a/rootly_sdk/api/live_call_routers/delete_live_call_router.py b/rootly_sdk/api/live_call_routers/delete_live_call_router.py index c4c1e7cc..599d3193 100644 --- a/rootly_sdk/api/live_call_routers/delete_live_call_router.py +++ b/rootly_sdk/api/live_call_routers/delete_live_call_router.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/live_call_routers/{id}", + "url": "/v1/live_call_routers/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return ( diff --git a/rootly_sdk/api/live_call_routers/generate_phone_number_live_call_router.py b/rootly_sdk/api/live_call_routers/generate_phone_number_live_call_router.py index 405a91e4..f9a03d53 100644 --- a/rootly_sdk/api/live_call_routers/generate_phone_number_live_call_router.py +++ b/rootly_sdk/api/live_call_routers/generate_phone_number_live_call_router.py @@ -20,6 +20,7 @@ def _get_kwargs( country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, ) -> dict[str, Any]: + params: dict[str, Any] = {} json_country_code: str = country_code @@ -83,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -117,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return sync_detailed( @@ -146,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ErrorsList]] + Response[Any | ErrorsList] """ kwargs = _get_kwargs( @@ -178,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, ErrorsList] + Any | ErrorsList """ return ( diff --git a/rootly_sdk/api/live_call_routers/get_live_call_router.py b/rootly_sdk/api/live_call_routers/get_live_call_router.py index 477a4a36..df6f8458 100644 --- a/rootly_sdk/api/live_call_routers/get_live_call_router.py +++ b/rootly_sdk/api/live_call_routers/get_live_call_router.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/live_call_routers/{id}", + "url": "/v1/live_call_routers/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return ( diff --git a/rootly_sdk/api/live_call_routers/list_live_call_routers.py b/rootly_sdk/api/live_call_routers/list_live_call_routers.py index 3725a19e..fe5ad768 100644 --- a/rootly_sdk/api/live_call_routers/list_live_call_routers.py +++ b/rootly_sdk/api/live_call_routers/list_live_call_routers.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -82,34 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[LiveCallRouterList]: """List Live Call Routers List Live Call Routers Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,34 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> LiveCallRouterList | None: """List Live Call Routers List Live Call Routers Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,34 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[LiveCallRouterList]: """List Live Call Routers List Live Call Routers Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,34 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> LiveCallRouterList | None: """List Live Call Routers List Live Call Routers Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/live_call_routers/update_live_call_router.py b/rootly_sdk/api/live_call_routers/update_live_call_router.py index 41e988ce..8fd9e6f4 100644 --- a/rootly_sdk/api/live_call_routers/update_live_call_router.py +++ b/rootly_sdk/api/live_call_routers/update_live_call_router.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/live_call_routers/{id}", + "url": "/v1/live_call_routers/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, LiveCallRouterResponse]] + Response[ErrorsList | LiveCallRouterResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, LiveCallRouterResponse] + ErrorsList | LiveCallRouterResponse """ return ( diff --git a/rootly_sdk/api/meeting_recordings/__init__.py b/rootly_sdk/api/meeting_recordings/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py new file mode 100644 index 00000000..c4235f68 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py @@ -0,0 +1,131 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_meeting_recording_platform import ( + CreateMeetingRecordingPlatform, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + incident_id: str, + *, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_platform: str | Unset = UNSET + if not isinstance(platform, Unset): + json_platform = platform + + params["platform"] = json_platform + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/incidents/{incident_id}/meeting_recordings".format( + incident_id=quote(str(incident_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 201: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, +) -> Response[Any]: + """Create meeting recording + + Invite a recording bot to the incident's meeting. If no previous recordings exist for the platform, + a new bot is invited (session 1). If previous sessions exist, a new session is created (re-invite). + The bot joins the meeting, records audio/video, and generates a transcript when the session ends. + + Args: + incident_id (str): + platform (CreateMeetingRecordingPlatform | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + incident_id=incident_id, + platform=platform, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, +) -> Response[Any]: + """Create meeting recording + + Invite a recording bot to the incident's meeting. If no previous recordings exist for the platform, + a new bot is invited (session 1). If previous sessions exist, a new session is created (re-invite). + The bot joins the meeting, records audio/video, and generates a transcript when the session ends. + + Args: + incident_id (str): + platform (CreateMeetingRecordingPlatform | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + incident_id=incident_id, + platform=platform, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py new file mode 100644 index 00000000..2197b87e --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py @@ -0,0 +1,107 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/meeting_recordings/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete a meeting recording + + Delete a meeting recording. Only completed or failed recordings can be deleted. Active recordings + (pending, recording, paused) must be stopped first. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete a meeting recording + + Delete a meeting recording. Only completed or failed recordings can be deleted. Active recordings + (pending, recording, paused) must be stopped first. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py new file mode 100644 index 00000000..70ad4341 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py @@ -0,0 +1,107 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/meeting_recordings/{id}/delete_video".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete video from a meeting recording + + Delete only the video file from a meeting recording. The transcript, summary, and all metadata are + preserved. Only non-active recordings with an attached video can have their video deleted. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Delete video from a meeting recording + + Delete only the video file from a meeting recording. The transcript, summary, and all metadata are + preserved. Only non-active recordings with an attached video can have their video deleted. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py new file mode 100644 index 00000000..b1cfebd0 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py @@ -0,0 +1,107 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/meeting_recordings/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 404: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Get a meeting recording + + Retrieve a single meeting recording session including its status, duration, speaker count, word + count, and transcript summary. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Get a meeting recording + + Retrieve a single meeting recording session including its status, duration, speaker count, word + count, and transcript summary. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py new file mode 100644 index 00000000..28c334a2 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py @@ -0,0 +1,109 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/meeting_recordings/{id}/leave".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Leave a meeting call + + Remove the recording bot from the meeting entirely. Unlike stop, this immediately disconnects the + bot. The session will transition to analyzing and then completed once transcript processing + finishes. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Leave a meeting call + + Remove the recording bot from the meeting entirely. Unlike stop, this immediately disconnects the + bot. The session will transition to analyzing and then completed once transcript processing + finishes. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py new file mode 100644 index 00000000..891b4d58 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.meeting_recording_list import MeetingRecordingList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + incident_id: str, + *, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/incidents/{incident_id}/meeting_recordings".format( + incident_id=quote(str(incident_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingList | None: + if response.status_code == 200: + response_200 = MeetingRecordingList.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = cast(Any, None) + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Response[Any | MeetingRecordingList]: + """List meeting recordings + + List all meeting recording sessions for an incident. Returns recordings sorted by session number. + Each recording represents one bot session with its own transcript, status, and metadata. + + Args: + incident_id (str): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | MeetingRecordingList] + """ + + kwargs = _get_kwargs( + incident_id=incident_id, + pagenumber=pagenumber, + pagesize=pagesize, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + incident_id: str, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Any | MeetingRecordingList | None: + """List meeting recordings + + List all meeting recording sessions for an incident. Returns recordings sorted by session number. + Each recording represents one bot session with its own transcript, status, and metadata. + + Args: + incident_id (str): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingList + """ + + return sync_detailed( + incident_id=incident_id, + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + ).parsed + + +async def asyncio_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Response[Any | MeetingRecordingList]: + """List meeting recordings + + List all meeting recording sessions for an incident. Returns recordings sorted by session number. + Each recording represents one bot session with its own transcript, status, and metadata. + + Args: + incident_id (str): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | MeetingRecordingList] + """ + + kwargs = _get_kwargs( + incident_id=incident_id, + pagenumber=pagenumber, + pagesize=pagesize, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + incident_id: str, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, +) -> Any | MeetingRecordingList | None: + """List meeting recordings + + List all meeting recording sessions for an incident. Returns recordings sorted by session number. + Each recording represents one bot session with its own transcript, status, and metadata. + + Args: + incident_id (str): + pagenumber (int | Unset): + pagesize (int | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | MeetingRecordingList + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py new file mode 100644 index 00000000..5deca74e --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py @@ -0,0 +1,107 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/meeting_recordings/{id}/pause".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Pause a meeting recording + + Pause an active recording session. The bot remains in the meeting but stops capturing audio/video. + Use the resume endpoint to continue recording. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Pause a meeting recording + + Pause an active recording session. The bot remains in the meeting but stops capturing audio/video. + Use the resume endpoint to continue recording. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py new file mode 100644 index 00000000..11c21c66 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py @@ -0,0 +1,105 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/meeting_recordings/{id}/resume".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Resume a meeting recording + + Resume a paused recording session. The bot continues capturing audio/video from the meeting. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Resume a meeting recording + + Resume a paused recording session. The bot continues capturing audio/video from the meeting. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py new file mode 100644 index 00000000..d17057a9 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py @@ -0,0 +1,109 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/meeting_recordings/{id}/stop".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 422: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Stop a meeting recording + + Stop an active or paused recording. The bot finishes processing, generates a transcript, and the + session status transitions to completed. This is irreversible — to record again, create a new + session. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[Any]: + """Stop a meeting recording + + Stop an active or paused recording. The bot finishes processing, generates a transcript, and the + session status transitions to completed. This is irreversible — to record again, create a new + session. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/rootly_sdk/api/on_call_pay_reports/__init__.py b/rootly_sdk/api/on_call_pay_reports/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/on_call_pay_reports/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/on_call_pay_reports/create_on_call_pay_report.py b/rootly_sdk/api/on_call_pay_reports/create_on_call_pay_report.py new file mode 100644 index 00000000..cf078832 --- /dev/null +++ b/rootly_sdk/api/on_call_pay_reports/create_on_call_pay_report.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.new_on_call_pay_report import NewOnCallPayReport +from ...models.on_call_pay_report_response import OnCallPayReportResponse +from ...types import Response + + +def _get_kwargs( + *, + body: NewOnCallPayReport, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/on_call_pay_reports", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallPayReportResponse | None: + if response.status_code == 201: + response_201 = OnCallPayReportResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: NewOnCallPayReport, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Creates an On-Call Pay Report + + Generates a new on-call pay report for the given date range. The report is generated asynchronously. + + Args: + body (NewOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | OnCallPayReportResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: NewOnCallPayReport, +) -> ErrorsList | OnCallPayReportResponse | None: + """Creates an On-Call Pay Report + + Generates a new on-call pay report for the given date range. The report is generated asynchronously. + + Args: + body (NewOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | OnCallPayReportResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: NewOnCallPayReport, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Creates an On-Call Pay Report + + Generates a new on-call pay report for the given date range. The report is generated asynchronously. + + Args: + body (NewOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | OnCallPayReportResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: NewOnCallPayReport, +) -> ErrorsList | OnCallPayReportResponse | None: + """Creates an On-Call Pay Report + + Generates a new on-call pay report for the given date range. The report is generated asynchronously. + + Args: + body (NewOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | OnCallPayReportResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_fields/get_catalog_field.py b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py similarity index 62% rename from rootly_sdk/api/catalog_fields/get_catalog_field.py rename to rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py index bf3ceabc..e367d8f4 100644 --- a/rootly_sdk/api/catalog_fields/get_catalog_field.py +++ b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py @@ -1,35 +1,33 @@ from http import HTTPStatus from typing import Any -from uuid import UUID +from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse from ...models.errors_list import ErrorsList -from ...models.get_catalog_field_include import GetCatalogFieldInclude +from ...models.on_call_pay_report_response import OnCallPayReportResponse from ...types import UNSET, Response, Unset def _get_kwargs( - id: UUID | str, + id: str, *, - include: Unset | GetCatalogFieldInclude = UNSET, + include: str | Unset = UNSET, ) -> dict[str, Any]: - params: dict[str, Any] = {} - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include + params: dict[str, Any] = {} - params["include"] = json_include + params["include"] = include params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/catalog_fields/{id}", + "url": "/v1/on_call_pay_reports/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -38,9 +36,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> ErrorsList | OnCallPayReportResponse | None: if response.status_code == 200: - response_200 = CatalogFieldResponse.from_dict(response.json()) + response_200 = OnCallPayReportResponse.from_dict(response.json()) return response_200 @@ -57,7 +55,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,25 +65,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogFieldInclude = UNSET, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Retrieves a Catalog Field + include: str | Unset = UNSET, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Retrieves an On-Call Pay Report - Retrieves a specific Catalog Field by id + Retrieves a specific on-call pay report by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogFieldInclude]): + id (str): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | OnCallPayReportResponse] """ kwargs = _get_kwargs( @@ -101,25 +99,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogFieldInclude = UNSET, -) -> CatalogFieldResponse | ErrorsList | None: - """Retrieves a Catalog Field + include: str | Unset = UNSET, +) -> ErrorsList | OnCallPayReportResponse | None: + """Retrieves an On-Call Pay Report - Retrieves a specific Catalog Field by id + Retrieves a specific on-call pay report by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogFieldInclude]): + id (str): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | OnCallPayReportResponse """ return sync_detailed( @@ -130,25 +128,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogFieldInclude = UNSET, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Retrieves a Catalog Field + include: str | Unset = UNSET, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Retrieves an On-Call Pay Report - Retrieves a specific Catalog Field by id + Retrieves a specific on-call pay report by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogFieldInclude]): + id (str): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | OnCallPayReportResponse] """ kwargs = _get_kwargs( @@ -162,25 +160,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - include: Unset | GetCatalogFieldInclude = UNSET, -) -> CatalogFieldResponse | ErrorsList | None: - """Retrieves a Catalog Field + include: str | Unset = UNSET, +) -> ErrorsList | OnCallPayReportResponse | None: + """Retrieves an On-Call Pay Report - Retrieves a specific Catalog Field by id + Retrieves a specific on-call pay report by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetCatalogFieldInclude]): + id (str): + include (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | OnCallPayReportResponse """ return ( diff --git a/rootly_sdk/api/on_call_pay_reports/list_on_call_pay_reports.py b/rootly_sdk/api/on_call_pay_reports/list_on_call_pay_reports.py new file mode 100644 index 00000000..b365e4b4 --- /dev/null +++ b/rootly_sdk/api/on_call_pay_reports/list_on_call_pay_reports.py @@ -0,0 +1,269 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.on_call_pay_report_list import OnCallPayReportList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["include"] = include + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[status]"] = filterstatus + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/on_call_pay_reports", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OnCallPayReportList | None: + if response.status_code == 200: + response_200 = OnCallPayReportList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[OnCallPayReportList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[OnCallPayReportList]: + """List On-Call Pay Reports + + List on-call pay reports + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[OnCallPayReportList] + """ + + kwargs = _get_kwargs( + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> OnCallPayReportList | None: + """List On-Call Pay Reports + + List on-call pay reports + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + OnCallPayReportList + """ + + return sync_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[OnCallPayReportList]: + """List On-Call Pay Reports + + List on-call pay reports + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[OnCallPayReportList] + """ + + kwargs = _get_kwargs( + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterstatus: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> OnCallPayReportList | None: + """List On-Call Pay Reports + + List on-call pay reports + + Args: + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterstatus (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + OnCallPayReportList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterstatus=filterstatus, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_pay_reports/regenerate_on_call_pay_report.py b/rootly_sdk/api/on_call_pay_reports/regenerate_on_call_pay_report.py new file mode 100644 index 00000000..a1d72c27 --- /dev/null +++ b/rootly_sdk/api/on_call_pay_reports/regenerate_on_call_pay_report.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.on_call_pay_report_response import OnCallPayReportResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/on_call_pay_reports/{id}/regenerate".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallPayReportResponse | None: + if response.status_code == 200: + response_200 = OnCallPayReportResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Regenerate an On-Call Pay Report + + Triggers regeneration of an existing on-call pay report. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | OnCallPayReportResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | OnCallPayReportResponse | None: + """Regenerate an On-Call Pay Report + + Triggers regeneration of an existing on-call pay report. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | OnCallPayReportResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Regenerate an On-Call Pay Report + + Triggers regeneration of an existing on-call pay report. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | OnCallPayReportResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | OnCallPayReportResponse | None: + """Regenerate an On-Call Pay Report + + Triggers regeneration of an existing on-call pay report. + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | OnCallPayReportResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_pay_reports/update_on_call_pay_report.py b/rootly_sdk/api/on_call_pay_reports/update_on_call_pay_report.py new file mode 100644 index 00000000..7939e005 --- /dev/null +++ b/rootly_sdk/api/on_call_pay_reports/update_on_call_pay_report.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.on_call_pay_report_response import OnCallPayReportResponse +from ...models.update_on_call_pay_report import UpdateOnCallPayReport +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UpdateOnCallPayReport, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/on_call_pay_reports/{id}".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallPayReportResponse | None: + if response.status_code == 200: + response_200 = OnCallPayReportResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateOnCallPayReport, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Update an On-Call Pay Report + + Update a specific on-call pay report by id. Triggers report regeneration. + + Args: + id (str): + body (UpdateOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | OnCallPayReportResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: UpdateOnCallPayReport, +) -> ErrorsList | OnCallPayReportResponse | None: + """Update an On-Call Pay Report + + Update a specific on-call pay report by id. Triggers report regeneration. + + Args: + id (str): + body (UpdateOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | OnCallPayReportResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateOnCallPayReport, +) -> Response[ErrorsList | OnCallPayReportResponse]: + """Update an On-Call Pay Report + + Update a specific on-call pay report by id. Triggers report regeneration. + + Args: + id (str): + body (UpdateOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | OnCallPayReportResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: UpdateOnCallPayReport, +) -> ErrorsList | OnCallPayReportResponse | None: + """Update an On-Call Pay Report + + Update a specific on-call pay report by id. Triggers report regeneration. + + Args: + id (str): + body (UpdateOnCallPayReport): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | OnCallPayReportResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_roles/create_on_call_role.py b/rootly_sdk/api/on_call_roles/create_on_call_role.py index 5ad769b9..322f9107 100644 --- a/rootly_sdk/api/on_call_roles/create_on_call_role.py +++ b/rootly_sdk/api/on_call_roles/create_on_call_role.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return ( diff --git a/rootly_sdk/api/on_call_roles/delete_on_call_role.py b/rootly_sdk/api/on_call_roles/delete_on_call_role.py index e01d7f37..3fe85371 100644 --- a/rootly_sdk/api/on_call_roles/delete_on_call_role.py +++ b/rootly_sdk/api/on_call_roles/delete_on_call_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/on_call_roles/{id}", + "url": "/v1/on_call_roles/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return ( diff --git a/rootly_sdk/api/on_call_roles/get_on_call_role.py b/rootly_sdk/api/on_call_roles/get_on_call_role.py index c796b0f9..b58a3457 100644 --- a/rootly_sdk/api/on_call_roles/get_on_call_role.py +++ b/rootly_sdk/api/on_call_roles/get_on_call_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/on_call_roles/{id}", + "url": "/v1/on_call_roles/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return ( diff --git a/rootly_sdk/api/on_call_roles/list_on_call_roles.py b/rootly_sdk/api/on_call_roles/list_on_call_roles.py index 8b175ca8..cee91de5 100644 --- a/rootly_sdk/api/on_call_roles/list_on_call_roles.py +++ b/rootly_sdk/api/on_call_roles/list_on_call_roles.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -82,34 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[OnCallRoleList]: """List On-Call Roles List On-Call Roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,34 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> OnCallRoleList | None: """List On-Call Roles List On-Call Roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,34 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[OnCallRoleList]: """List On-Call Roles List On-Call Roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,34 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> OnCallRoleList | None: """List On-Call Roles List On-Call Roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/on_call_roles/update_on_call_role.py b/rootly_sdk/api/on_call_roles/update_on_call_role.py index 97cfb572..9fc73101 100644 --- a/rootly_sdk/api/on_call_roles/update_on_call_role.py +++ b/rootly_sdk/api/on_call_roles/update_on_call_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/on_call_roles/{id}", + "url": "/v1/on_call_roles/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallRoleResponse]] + Response[ErrorsList | OnCallRoleResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallRoleResponse] + ErrorsList | OnCallRoleResponse """ return ( diff --git a/rootly_sdk/api/on_call_shadows/create_on_call_shadow.py b/rootly_sdk/api/on_call_shadows/create_on_call_shadow.py index 06292c4b..e1038ade 100644 --- a/rootly_sdk/api/on_call_shadows/create_on_call_shadow.py +++ b/rootly_sdk/api/on_call_shadows/create_on_call_shadow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/schedules/{schedule_id}/on_call_shadows", + "url": "/v1/schedules/{schedule_id}/on_call_shadows".format( + schedule_id=quote(str(schedule_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return ( diff --git a/rootly_sdk/api/on_call_shadows/get_on_call_shadow.py b/rootly_sdk/api/on_call_shadows/get_on_call_shadow.py index 33c9d5e0..3892b844 100644 --- a/rootly_sdk/api/on_call_shadows/get_on_call_shadow.py +++ b/rootly_sdk/api/on_call_shadows/get_on_call_shadow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/on_call_shadows/{id}", + "url": "/v1/on_call_shadows/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return ( diff --git a/rootly_sdk/api/on_call_shadows/list_on_call_shadows.py b/rootly_sdk/api/on_call_shadows/list_on_call_shadows.py index 4f6a4101..310cdcf4 100644 --- a/rootly_sdk/api/on_call_shadows/list_on_call_shadows.py +++ b/rootly_sdk/api/on_call_shadows/list_on_call_shadows.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( schedule_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedules/{schedule_id}/on_call_shadows", + "url": "/v1/schedules/{schedule_id}/on_call_shadows".format( + schedule_id=quote(str(schedule_id), safe=""), + ), "params": params, } @@ -60,9 +64,9 @@ def sync_detailed( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[OnCallShadowsList]: """List On Call Shadows for Shift @@ -70,9 +74,9 @@ def sync_detailed( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,9 +104,9 @@ def sync( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> OnCallShadowsList | None: """List On Call Shadows for Shift @@ -110,9 +114,9 @@ def sync( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,9 +139,9 @@ async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[OnCallShadowsList]: """List On Call Shadows for Shift @@ -145,9 +149,9 @@ async def asyncio_detailed( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,9 +177,9 @@ async def asyncio( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> OnCallShadowsList | None: """List On Call Shadows for Shift @@ -183,9 +187,9 @@ async def asyncio( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/on_call_shadows/update_on_call_shadow.py b/rootly_sdk/api/on_call_shadows/update_on_call_shadow.py index c053d8a2..cbaeedb7 100644 --- a/rootly_sdk/api/on_call_shadows/update_on_call_shadow.py +++ b/rootly_sdk/api/on_call_shadows/update_on_call_shadow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/on_call_shadows/{id}", + "url": "/v1/on_call_shadows/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return ( diff --git a/rootly_sdk/api/on_calls/__init__.py b/rootly_sdk/api/on_calls/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/on_calls/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/on_calls/list_oncalls.py b/rootly_sdk/api/on_calls/list_oncalls.py new file mode 100644 index 00000000..7fe486c2 --- /dev/null +++ b/rootly_sdk/api/on_calls/list_oncalls.py @@ -0,0 +1,317 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.list_oncalls_include import ListOncallsInclude +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListOncallsInclude | Unset = UNSET, + since: str | Unset = UNSET, + until: str | Unset = UNSET, + earliest: bool | Unset = UNSET, + time_zone: str | Unset = UNSET, + filterescalation_policy_ids: str | Unset = UNSET, + filterschedule_ids: str | Unset = UNSET, + filteruser_ids: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + params["since"] = since + + params["until"] = until + + params["earliest"] = earliest + + params["time_zone"] = time_zone + + params["filter[escalation_policy_ids]"] = filterescalation_policy_ids + + params["filter[schedule_ids]"] = filterschedule_ids + + params["filter[user_ids]"] = filteruser_ids + + params["filter[service_ids]"] = filterservice_ids + + params["filter[group_ids]"] = filtergroup_ids + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/oncalls", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: + if response.status_code == 200: + response_200 = cast(Any, None) + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListOncallsInclude | Unset = UNSET, + since: str | Unset = UNSET, + until: str | Unset = UNSET, + earliest: bool | Unset = UNSET, + time_zone: str | Unset = UNSET, + filterescalation_policy_ids: str | Unset = UNSET, + filterschedule_ids: str | Unset = UNSET, + filteruser_ids: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, +) -> Response[Any | ErrorsList]: + """List on-calls + + List who is currently on-call, with support for filtering by escalation policy, schedule, and user. + Returns on-call entries grouped by escalation policy level. + + Args: + include (ListOncallsInclude | Unset): + since (str | Unset): + until (str | Unset): + earliest (bool | Unset): + time_zone (str | Unset): + filterescalation_policy_ids (str | Unset): + filterschedule_ids (str | Unset): + filteruser_ids (str | Unset): + filterservice_ids (str | Unset): + filtergroup_ids (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList] + """ + + kwargs = _get_kwargs( + include=include, + since=since, + until=until, + earliest=earliest, + time_zone=time_zone, + filterescalation_policy_ids=filterescalation_policy_ids, + filterschedule_ids=filterschedule_ids, + filteruser_ids=filteruser_ids, + filterservice_ids=filterservice_ids, + filtergroup_ids=filtergroup_ids, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListOncallsInclude | Unset = UNSET, + since: str | Unset = UNSET, + until: str | Unset = UNSET, + earliest: bool | Unset = UNSET, + time_zone: str | Unset = UNSET, + filterescalation_policy_ids: str | Unset = UNSET, + filterschedule_ids: str | Unset = UNSET, + filteruser_ids: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, +) -> Any | ErrorsList | None: + """List on-calls + + List who is currently on-call, with support for filtering by escalation policy, schedule, and user. + Returns on-call entries grouped by escalation policy level. + + Args: + include (ListOncallsInclude | Unset): + since (str | Unset): + until (str | Unset): + earliest (bool | Unset): + time_zone (str | Unset): + filterescalation_policy_ids (str | Unset): + filterschedule_ids (str | Unset): + filteruser_ids (str | Unset): + filterservice_ids (str | Unset): + filtergroup_ids (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList + """ + + return sync_detailed( + client=client, + include=include, + since=since, + until=until, + earliest=earliest, + time_zone=time_zone, + filterescalation_policy_ids=filterescalation_policy_ids, + filterschedule_ids=filterschedule_ids, + filteruser_ids=filteruser_ids, + filterservice_ids=filterservice_ids, + filtergroup_ids=filtergroup_ids, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListOncallsInclude | Unset = UNSET, + since: str | Unset = UNSET, + until: str | Unset = UNSET, + earliest: bool | Unset = UNSET, + time_zone: str | Unset = UNSET, + filterescalation_policy_ids: str | Unset = UNSET, + filterschedule_ids: str | Unset = UNSET, + filteruser_ids: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, +) -> Response[Any | ErrorsList]: + """List on-calls + + List who is currently on-call, with support for filtering by escalation policy, schedule, and user. + Returns on-call entries grouped by escalation policy level. + + Args: + include (ListOncallsInclude | Unset): + since (str | Unset): + until (str | Unset): + earliest (bool | Unset): + time_zone (str | Unset): + filterescalation_policy_ids (str | Unset): + filterschedule_ids (str | Unset): + filteruser_ids (str | Unset): + filterservice_ids (str | Unset): + filtergroup_ids (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | ErrorsList] + """ + + kwargs = _get_kwargs( + include=include, + since=since, + until=until, + earliest=earliest, + time_zone=time_zone, + filterescalation_policy_ids=filterescalation_policy_ids, + filterschedule_ids=filterschedule_ids, + filteruser_ids=filteruser_ids, + filterservice_ids=filterservice_ids, + filtergroup_ids=filtergroup_ids, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListOncallsInclude | Unset = UNSET, + since: str | Unset = UNSET, + until: str | Unset = UNSET, + earliest: bool | Unset = UNSET, + time_zone: str | Unset = UNSET, + filterescalation_policy_ids: str | Unset = UNSET, + filterschedule_ids: str | Unset = UNSET, + filteruser_ids: str | Unset = UNSET, + filterservice_ids: str | Unset = UNSET, + filtergroup_ids: str | Unset = UNSET, +) -> Any | ErrorsList | None: + """List on-calls + + List who is currently on-call, with support for filtering by escalation policy, schedule, and user. + Returns on-call entries grouped by escalation policy level. + + Args: + include (ListOncallsInclude | Unset): + since (str | Unset): + until (str | Unset): + earliest (bool | Unset): + time_zone (str | Unset): + filterescalation_policy_ids (str | Unset): + filterschedule_ids (str | Unset): + filteruser_ids (str | Unset): + filterservice_ids (str | Unset): + filtergroup_ids (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | ErrorsList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + since=since, + until=until, + earliest=earliest, + time_zone=time_zone, + filterescalation_policy_ids=filterescalation_policy_ids, + filterschedule_ids=filterschedule_ids, + filteruser_ids=filteruser_ids, + filterservice_ids=filterservice_ids, + filtergroup_ids=filtergroup_ids, + ) + ).parsed diff --git a/rootly_sdk/api/override_shifts/create_override_shift.py b/rootly_sdk/api/override_shifts/create_override_shift.py index 9dc753db..e208220a 100644 --- a/rootly_sdk/api/override_shifts/create_override_shift.py +++ b/rootly_sdk/api/override_shifts/create_override_shift.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/schedules/{schedule_id}/override_shifts", + "url": "/v1/schedules/{schedule_id}/override_shifts".format( + schedule_id=quote(str(schedule_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -86,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -121,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return sync_detailed( @@ -151,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -184,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return ( diff --git a/rootly_sdk/api/override_shifts/delete_on_call_shadow.py b/rootly_sdk/api/override_shifts/delete_on_call_shadow.py index 6fbf0295..ee1f2e0d 100644 --- a/rootly_sdk/api/override_shifts/delete_on_call_shadow.py +++ b/rootly_sdk/api/override_shifts/delete_on_call_shadow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/on_call_shadows/{id}", + "url": "/v1/on_call_shadows/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -34,6 +38,11 @@ def _parse_response( return response_404 + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -58,7 +67,8 @@ def sync_detailed( ) -> Response[ErrorsList | OnCallShadowResponse]: """Delete an on call shadow configuration - Delete a specific on call shadow configuration by id + Delete a specific on call shadow configuration by id. Future shadows are hard-deleted. Active + shadows (started in the past) have their end time truncated to preserve historical data. Args: id (str): @@ -68,7 +78,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -89,7 +99,8 @@ def sync( ) -> ErrorsList | OnCallShadowResponse | None: """Delete an on call shadow configuration - Delete a specific on call shadow configuration by id + Delete a specific on call shadow configuration by id. Future shadows are hard-deleted. Active + shadows (started in the past) have their end time truncated to preserve historical data. Args: id (str): @@ -99,7 +110,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return sync_detailed( @@ -115,7 +126,8 @@ async def asyncio_detailed( ) -> Response[ErrorsList | OnCallShadowResponse]: """Delete an on call shadow configuration - Delete a specific on call shadow configuration by id + Delete a specific on call shadow configuration by id. Future shadows are hard-deleted. Active + shadows (started in the past) have their end time truncated to preserve historical data. Args: id (str): @@ -125,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OnCallShadowResponse]] + Response[ErrorsList | OnCallShadowResponse] """ kwargs = _get_kwargs( @@ -144,7 +156,8 @@ async def asyncio( ) -> ErrorsList | OnCallShadowResponse | None: """Delete an on call shadow configuration - Delete a specific on call shadow configuration by id + Delete a specific on call shadow configuration by id. Future shadows are hard-deleted. Active + shadows (started in the past) have their end time truncated to preserve historical data. Args: id (str): @@ -154,7 +167,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OnCallShadowResponse] + ErrorsList | OnCallShadowResponse """ return ( diff --git a/rootly_sdk/api/override_shifts/delete_override_shift.py b/rootly_sdk/api/override_shifts/delete_override_shift.py index cb4a3e9c..200bc1a1 100644 --- a/rootly_sdk/api/override_shifts/delete_override_shift.py +++ b/rootly_sdk/api/override_shifts/delete_override_shift.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/override_shifts/{id}", + "url": "/v1/override_shifts/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return ( diff --git a/rootly_sdk/api/override_shifts/get_override_shift.py b/rootly_sdk/api/override_shifts/get_override_shift.py index 945033d2..1116f33d 100644 --- a/rootly_sdk/api/override_shifts/get_override_shift.py +++ b/rootly_sdk/api/override_shifts/get_override_shift.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/override_shifts/{id}", + "url": "/v1/override_shifts/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return ( diff --git a/rootly_sdk/api/override_shifts/list_override_shifts.py b/rootly_sdk/api/override_shifts/list_override_shifts.py index 778a806c..8370ff93 100644 --- a/rootly_sdk/api/override_shifts/list_override_shifts.py +++ b/rootly_sdk/api/override_shifts/list_override_shifts.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( schedule_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedules/{schedule_id}/override_shifts", + "url": "/v1/schedules/{schedule_id}/override_shifts".format( + schedule_id=quote(str(schedule_id), safe=""), + ), "params": params, } @@ -60,9 +64,9 @@ def sync_detailed( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[OverrideShiftList]: """List override shifts @@ -70,9 +74,9 @@ def sync_detailed( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,9 +104,9 @@ def sync( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> OverrideShiftList | None: """List override shifts @@ -110,9 +114,9 @@ def sync( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,9 +139,9 @@ async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[OverrideShiftList]: """List override shifts @@ -145,9 +149,9 @@ async def asyncio_detailed( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,9 +177,9 @@ async def asyncio( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> OverrideShiftList | None: """List override shifts @@ -183,9 +187,9 @@ async def asyncio( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/override_shifts/update_override_shift.py b/rootly_sdk/api/override_shifts/update_override_shift.py index 1d51fe99..3f692427 100644 --- a/rootly_sdk/api/override_shifts/update_override_shift.py +++ b/rootly_sdk/api/override_shifts/update_override_shift.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/override_shifts/{id}", + "url": "/v1/override_shifts/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, OverrideShiftResponse]] + Response[ErrorsList | OverrideShiftResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, OverrideShiftResponse] + ErrorsList | OverrideShiftResponse """ return ( diff --git a/rootly_sdk/api/playbook_tasks/create_playbook_task.py b/rootly_sdk/api/playbook_tasks/create_playbook_task.py index 1d183cf4..4589a663 100644 --- a/rootly_sdk/api/playbook_tasks/create_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/create_playbook_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/playbooks/{playbook_id}/playbook_tasks", + "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format( + playbook_id=quote(str(playbook_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return ( diff --git a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py index 6b25e8b3..9c9328d4 100644 --- a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/playbook_tasks/{id}", + "url": "/v1/playbook_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return ( diff --git a/rootly_sdk/api/playbook_tasks/get_playbook_task.py b/rootly_sdk/api/playbook_tasks/get_playbook_task.py index 1caa8d23..415605da 100644 --- a/rootly_sdk/api/playbook_tasks/get_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/get_playbook_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/playbook_tasks/{id}", + "url": "/v1/playbook_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return ( diff --git a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py index 7c9aad1c..cc9e0fa2 100644 --- a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py +++ b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( playbook_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/playbooks/{playbook_id}/playbook_tasks", + "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format( + playbook_id=quote(str(playbook_id), safe=""), + ), "params": params, } @@ -60,9 +64,9 @@ def sync_detailed( playbook_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PlaybookTaskList]: """List playbook tasks @@ -70,9 +74,9 @@ def sync_detailed( Args: playbook_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,9 +104,9 @@ def sync( playbook_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PlaybookTaskList | None: """List playbook tasks @@ -110,9 +114,9 @@ def sync( Args: playbook_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,9 +139,9 @@ async def asyncio_detailed( playbook_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PlaybookTaskList]: """List playbook tasks @@ -145,9 +149,9 @@ async def asyncio_detailed( Args: playbook_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,9 +177,9 @@ async def asyncio( playbook_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PlaybookTaskList | None: """List playbook tasks @@ -183,9 +187,9 @@ async def asyncio( Args: playbook_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/playbook_tasks/update_playbook_task.py b/rootly_sdk/api/playbook_tasks/update_playbook_task.py index 11903b62..b84699b6 100644 --- a/rootly_sdk/api/playbook_tasks/update_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/update_playbook_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/playbook_tasks/{id}", + "url": "/v1/playbook_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookTaskResponse]] + Response[ErrorsList | PlaybookTaskResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookTaskResponse] + ErrorsList | PlaybookTaskResponse """ return ( diff --git a/rootly_sdk/api/playbooks/create_playbook.py b/rootly_sdk/api/playbooks/create_playbook.py index ca3ebc8c..cee3273e 100644 --- a/rootly_sdk/api/playbooks/create_playbook.py +++ b/rootly_sdk/api/playbooks/create_playbook.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return ( diff --git a/rootly_sdk/api/playbooks/delete_playbook.py b/rootly_sdk/api/playbooks/delete_playbook.py index 5ef76845..f666eef3 100644 --- a/rootly_sdk/api/playbooks/delete_playbook.py +++ b/rootly_sdk/api/playbooks/delete_playbook.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/playbooks/{id}", + "url": "/v1/playbooks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return ( diff --git a/rootly_sdk/api/playbooks/get_playbook.py b/rootly_sdk/api/playbooks/get_playbook.py index 8d8dcb9c..7faea0c0 100644 --- a/rootly_sdk/api/playbooks/get_playbook.py +++ b/rootly_sdk/api/playbooks/get_playbook.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,11 +15,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetPlaybookInclude = UNSET, + include: GetPlaybookInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/playbooks/{id}", + "url": "/v1/playbooks/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -69,7 +73,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetPlaybookInclude = UNSET, + include: GetPlaybookInclude | Unset = UNSET, ) -> Response[ErrorsList | PlaybookResponse]: """Retrieves a playbook @@ -77,14 +81,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetPlaybookInclude]): + include (GetPlaybookInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -103,7 +107,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetPlaybookInclude = UNSET, + include: GetPlaybookInclude | Unset = UNSET, ) -> ErrorsList | PlaybookResponse | None: """Retrieves a playbook @@ -111,14 +115,14 @@ def sync( Args: id (str): - include (Union[Unset, GetPlaybookInclude]): + include (GetPlaybookInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetPlaybookInclude = UNSET, + include: GetPlaybookInclude | Unset = UNSET, ) -> Response[ErrorsList | PlaybookResponse]: """Retrieves a playbook @@ -140,14 +144,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetPlaybookInclude]): + include (GetPlaybookInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetPlaybookInclude = UNSET, + include: GetPlaybookInclude | Unset = UNSET, ) -> ErrorsList | PlaybookResponse | None: """Retrieves a playbook @@ -172,14 +176,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetPlaybookInclude]): + include (GetPlaybookInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return ( diff --git a/rootly_sdk/api/playbooks/list_playbooks.py b/rootly_sdk/api/playbooks/list_playbooks.py index e7ba8cb3..0326a21d 100644 --- a/rootly_sdk/api/playbooks/list_playbooks.py +++ b/rootly_sdk/api/playbooks/list_playbooks.py @@ -12,13 +12,14 @@ def _get_kwargs( *, - include: Unset | ListPlaybooksInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListPlaybooksInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -63,18 +64,18 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListPlaybooksInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListPlaybooksInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PlaybookList]: """List playbooks List playbooks Args: - include (Union[Unset, ListPlaybooksInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListPlaybooksInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,18 +101,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListPlaybooksInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListPlaybooksInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PlaybookList | None: """List playbooks List playbooks Args: - include (Union[Unset, ListPlaybooksInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListPlaybooksInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -132,18 +133,18 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListPlaybooksInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListPlaybooksInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PlaybookList]: """List playbooks List playbooks Args: - include (Union[Unset, ListPlaybooksInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListPlaybooksInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -167,18 +168,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListPlaybooksInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListPlaybooksInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PlaybookList | None: """List playbooks List playbooks Args: - include (Union[Unset, ListPlaybooksInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListPlaybooksInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/playbooks/update_playbook.py b/rootly_sdk/api/playbooks/update_playbook.py index 06bf4a5e..9fe8a131 100644 --- a/rootly_sdk/api/playbooks/update_playbook.py +++ b/rootly_sdk/api/playbooks/update_playbook.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/playbooks/{id}", + "url": "/v1/playbooks/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PlaybookResponse]] + Response[ErrorsList | PlaybookResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PlaybookResponse] + ErrorsList | PlaybookResponse """ return ( diff --git a/rootly_sdk/api/pulses/create_pulse.py b/rootly_sdk/api/pulses/create_pulse.py index a54eb50b..30b82b81 100644 --- a/rootly_sdk/api/pulses/create_pulse.py +++ b/rootly_sdk/api/pulses/create_pulse.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PulseResponse]] + Response[ErrorsList | PulseResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PulseResponse] + ErrorsList | PulseResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PulseResponse]] + Response[ErrorsList | PulseResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PulseResponse] + ErrorsList | PulseResponse """ return ( diff --git a/rootly_sdk/api/pulses/get_pulse.py b/rootly_sdk/api/pulses/get_pulse.py index 66769553..1d751fd4 100644 --- a/rootly_sdk/api/pulses/get_pulse.py +++ b/rootly_sdk/api/pulses/get_pulse.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/pulses/{id}", + "url": "/v1/pulses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PulseResponse]] + Response[ErrorsList | PulseResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PulseResponse] + ErrorsList | PulseResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PulseResponse]] + Response[ErrorsList | PulseResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PulseResponse] + ErrorsList | PulseResponse """ return ( diff --git a/rootly_sdk/api/pulses/list_pulses.py b/rootly_sdk/api/pulses/list_pulses.py index 4287e3a3..45c9eeef 100644 --- a/rootly_sdk/api/pulses/list_pulses.py +++ b/rootly_sdk/api/pulses/list_pulses.py @@ -11,27 +11,28 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterrefs: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterrefs: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -109,52 +110,52 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterrefs: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterrefs: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PulseList]: """List pulses List pulses Args: - include (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterrefs (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filterlabels (str | Unset): + filterrefs (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -197,52 +198,52 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterrefs: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterrefs: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PulseList | None: """List pulses List pulses Args: - include (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterrefs (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filterlabels (str | Unset): + filterrefs (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -280,52 +281,52 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterrefs: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterrefs: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PulseList]: """List pulses List pulses Args: - include (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterrefs (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filterlabels (str | Unset): + filterrefs (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -366,52 +367,52 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersource: Unset | str = UNSET, - filterservices: Unset | str = UNSET, - filterenvironments: Unset | str = UNSET, - filterlabels: Unset | str = UNSET, - filterrefs: Unset | str = UNSET, - filterstarted_atgt: Unset | str = UNSET, - filterstarted_atgte: Unset | str = UNSET, - filterstarted_atlt: Unset | str = UNSET, - filterstarted_atlte: Unset | str = UNSET, - filterended_atgt: Unset | str = UNSET, - filterended_atgte: Unset | str = UNSET, - filterended_atlt: Unset | str = UNSET, - filterended_atlte: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersource: str | Unset = UNSET, + filterservices: str | Unset = UNSET, + filterenvironments: str | Unset = UNSET, + filterlabels: str | Unset = UNSET, + filterrefs: str | Unset = UNSET, + filterstarted_atgt: str | Unset = UNSET, + filterstarted_atgte: str | Unset = UNSET, + filterstarted_atlt: str | Unset = UNSET, + filterstarted_atlte: str | Unset = UNSET, + filterended_atgt: str | Unset = UNSET, + filterended_atgte: str | Unset = UNSET, + filterended_atlt: str | Unset = UNSET, + filterended_atlte: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PulseList | None: """List pulses List pulses Args: - include (Union[Unset, str]): - filtersource (Union[Unset, str]): - filterservices (Union[Unset, str]): - filterenvironments (Union[Unset, str]): - filterlabels (Union[Unset, str]): - filterrefs (Union[Unset, str]): - filterstarted_atgt (Union[Unset, str]): - filterstarted_atgte (Union[Unset, str]): - filterstarted_atlt (Union[Unset, str]): - filterstarted_atlte (Union[Unset, str]): - filterended_atgt (Union[Unset, str]): - filterended_atgte (Union[Unset, str]): - filterended_atlt (Union[Unset, str]): - filterended_atlte (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersource (str | Unset): + filterservices (str | Unset): + filterenvironments (str | Unset): + filterlabels (str | Unset): + filterrefs (str | Unset): + filterstarted_atgt (str | Unset): + filterstarted_atgte (str | Unset): + filterstarted_atlt (str | Unset): + filterstarted_atlte (str | Unset): + filterended_atgt (str | Unset): + filterended_atgte (str | Unset): + filterended_atlt (str | Unset): + filterended_atlte (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/pulses/update_pulse.py b/rootly_sdk/api/pulses/update_pulse.py index 2364915a..38022933 100644 --- a/rootly_sdk/api/pulses/update_pulse.py +++ b/rootly_sdk/api/pulses/update_pulse.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/pulses/{id}", + "url": "/v1/pulses/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PulseResponse]] + Response[ErrorsList | PulseResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PulseResponse] + ErrorsList | PulseResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PulseResponse]] + Response[ErrorsList | PulseResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PulseResponse] + ErrorsList | PulseResponse """ return ( diff --git a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py index c9e25ba8..a198248f 100644 --- a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,11 +17,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetRetrospectiveConfigurationInclude = UNSET, + include: GetRetrospectiveConfigurationInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -30,7 +32,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_configurations/{id}", + "url": "/v1/retrospective_configurations/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -71,7 +75,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveConfigurationInclude = UNSET, + include: GetRetrospectiveConfigurationInclude | Unset = UNSET, ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: """Retrieves a Retrospective Configuration @@ -79,14 +83,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetRetrospectiveConfigurationInclude]): + include (GetRetrospectiveConfigurationInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveConfigurationResponse]] + Response[ErrorsList | RetrospectiveConfigurationResponse] """ kwargs = _get_kwargs( @@ -105,7 +109,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveConfigurationInclude = UNSET, + include: GetRetrospectiveConfigurationInclude | Unset = UNSET, ) -> ErrorsList | RetrospectiveConfigurationResponse | None: """Retrieves a Retrospective Configuration @@ -113,14 +117,14 @@ def sync( Args: id (str): - include (Union[Unset, GetRetrospectiveConfigurationInclude]): + include (GetRetrospectiveConfigurationInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveConfigurationResponse] + ErrorsList | RetrospectiveConfigurationResponse """ return sync_detailed( @@ -134,7 +138,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveConfigurationInclude = UNSET, + include: GetRetrospectiveConfigurationInclude | Unset = UNSET, ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: """Retrieves a Retrospective Configuration @@ -142,14 +146,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetRetrospectiveConfigurationInclude]): + include (GetRetrospectiveConfigurationInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveConfigurationResponse]] + Response[ErrorsList | RetrospectiveConfigurationResponse] """ kwargs = _get_kwargs( @@ -166,7 +170,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveConfigurationInclude = UNSET, + include: GetRetrospectiveConfigurationInclude | Unset = UNSET, ) -> ErrorsList | RetrospectiveConfigurationResponse | None: """Retrieves a Retrospective Configuration @@ -174,14 +178,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetRetrospectiveConfigurationInclude]): + include (GetRetrospectiveConfigurationInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveConfigurationResponse] + ErrorsList | RetrospectiveConfigurationResponse """ return ( diff --git a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py index 219d509d..41494cab 100644 --- a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py +++ b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py @@ -14,14 +14,15 @@ def _get_kwargs( *, - include: Unset | ListRetrospectiveConfigurationsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, + include: ListRetrospectiveConfigurationsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -72,20 +73,20 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveConfigurationsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, + include: ListRetrospectiveConfigurationsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, ) -> Response[RetrospectiveConfigurationList]: """List retrospective configurations List retrospective configurations Args: - include (Union[Unset, ListRetrospectiveConfigurationsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): + include (ListRetrospectiveConfigurationsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -112,20 +113,20 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveConfigurationsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, + include: ListRetrospectiveConfigurationsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, ) -> RetrospectiveConfigurationList | None: """List retrospective configurations List retrospective configurations Args: - include (Union[Unset, ListRetrospectiveConfigurationsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): + include (ListRetrospectiveConfigurationsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,20 +148,20 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveConfigurationsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, + include: ListRetrospectiveConfigurationsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, ) -> Response[RetrospectiveConfigurationList]: """List retrospective configurations List retrospective configurations Args: - include (Union[Unset, ListRetrospectiveConfigurationsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): + include (ListRetrospectiveConfigurationsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -185,20 +186,20 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveConfigurationsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterkind: Unset | str = UNSET, + include: ListRetrospectiveConfigurationsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterkind: str | Unset = UNSET, ) -> RetrospectiveConfigurationList | None: """List retrospective configurations List retrospective configurations Args: - include (Union[Unset, ListRetrospectiveConfigurationsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterkind (Union[Unset, str]): + include (ListRetrospectiveConfigurationsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterkind (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py index 0947dc5e..ceb35adb 100644 --- a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/retrospective_configurations/{id}", + "url": "/v1/retrospective_configurations/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveConfigurationResponse]] + Response[ErrorsList | RetrospectiveConfigurationResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveConfigurationResponse] + ErrorsList | RetrospectiveConfigurationResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveConfigurationResponse]] + Response[ErrorsList | RetrospectiveConfigurationResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveConfigurationResponse] + ErrorsList | RetrospectiveConfigurationResponse """ return ( diff --git a/rootly_sdk/api/retrospective_process_group_steps/create_retrospective_process_group_step.py b/rootly_sdk/api/retrospective_process_group_steps/create_retrospective_process_group_step.py index fc44bf43..2284fedd 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/create_retrospective_process_group_step.py +++ b/rootly_sdk/api/retrospective_process_group_steps/create_retrospective_process_group_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/retrospective_process_groups/{retrospective_process_group_id}/steps", + "url": "/v1/retrospective_process_groups/{retrospective_process_group_id}/steps".format( + retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupStepResponse]] + Response[ErrorsList | RetrospectiveProcessGroupStepResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupStepResponse] + ErrorsList | RetrospectiveProcessGroupStepResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupStepResponse]] + Response[ErrorsList | RetrospectiveProcessGroupStepResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupStepResponse] + ErrorsList | RetrospectiveProcessGroupStepResponse """ return ( diff --git a/rootly_sdk/api/retrospective_process_group_steps/delete_retrospective_process_group_step.py b/rootly_sdk/api/retrospective_process_group_steps/delete_retrospective_process_group_step.py index f3a4c85f..e49707dd 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/delete_retrospective_process_group_step.py +++ b/rootly_sdk/api/retrospective_process_group_steps/delete_retrospective_process_group_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/retrospective_process_group_steps/{id}", + "url": "/v1/retrospective_process_group_steps/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupStepResponse]] + Response[ErrorsList | RetrospectiveProcessGroupStepResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupStepResponse] + ErrorsList | RetrospectiveProcessGroupStepResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupStepResponse]] + Response[ErrorsList | RetrospectiveProcessGroupStepResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupStepResponse] + ErrorsList | RetrospectiveProcessGroupStepResponse """ return ( diff --git a/rootly_sdk/api/retrospective_process_group_steps/get_retrospective_process_group_step.py b/rootly_sdk/api/retrospective_process_group_steps/get_retrospective_process_group_step.py index 769b164e..7cb7eca6 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/get_retrospective_process_group_step.py +++ b/rootly_sdk/api/retrospective_process_group_steps/get_retrospective_process_group_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_process_group_steps/{id}", + "url": "/v1/retrospective_process_group_steps/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs diff --git a/rootly_sdk/api/retrospective_process_group_steps/list_retrospective_process_group_steps.py b/rootly_sdk/api/retrospective_process_group_steps/list_retrospective_process_group_steps.py index 2c7ec67e..71508e1f 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/list_retrospective_process_group_steps.py +++ b/rootly_sdk/api/retrospective_process_group_steps/list_retrospective_process_group_steps.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,15 +13,16 @@ def _get_kwargs( retrospective_process_group_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterretrospective_step_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterretrospective_step_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -43,7 +45,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_process_groups/{retrospective_process_group_id}/steps", + "url": "/v1/retrospective_process_groups/{retrospective_process_group_id}/steps".format( + retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""), + ), "params": params, } @@ -79,14 +83,14 @@ def sync_detailed( retrospective_process_group_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterretrospective_step_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterretrospective_step_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[RetrospectiveProcessGroupStepList]: """List RetrospectiveProcessGroup Steps @@ -94,14 +98,14 @@ def sync_detailed( Args: retrospective_process_group_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterretrospective_step_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterretrospective_step_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,14 +138,14 @@ def sync( retrospective_process_group_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterretrospective_step_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterretrospective_step_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> RetrospectiveProcessGroupStepList | None: """List RetrospectiveProcessGroup Steps @@ -149,14 +153,14 @@ def sync( Args: retrospective_process_group_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterretrospective_step_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterretrospective_step_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -184,14 +188,14 @@ async def asyncio_detailed( retrospective_process_group_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterretrospective_step_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterretrospective_step_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[RetrospectiveProcessGroupStepList]: """List RetrospectiveProcessGroup Steps @@ -199,14 +203,14 @@ async def asyncio_detailed( Args: retrospective_process_group_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterretrospective_step_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterretrospective_step_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -237,14 +241,14 @@ async def asyncio( retrospective_process_group_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterretrospective_step_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterretrospective_step_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> RetrospectiveProcessGroupStepList | None: """List RetrospectiveProcessGroup Steps @@ -252,14 +256,14 @@ async def asyncio( Args: retrospective_process_group_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterretrospective_step_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterretrospective_step_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_process_group_steps/update_retrospective_process_group_step.py b/rootly_sdk/api/retrospective_process_group_steps/update_retrospective_process_group_step.py index db601b68..6672af62 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/update_retrospective_process_group_step.py +++ b/rootly_sdk/api/retrospective_process_group_steps/update_retrospective_process_group_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -19,7 +20,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/retrospective_process_group_steps/{id}", + "url": "/v1/retrospective_process_group_steps/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/rootly_sdk/api/retrospective_process_groups/create_retrospective_process_group.py b/rootly_sdk/api/retrospective_process_groups/create_retrospective_process_group.py index b2593167..5d7feb3c 100644 --- a/rootly_sdk/api/retrospective_process_groups/create_retrospective_process_group.py +++ b/rootly_sdk/api/retrospective_process_groups/create_retrospective_process_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/retrospective_processes/{retrospective_process_id}/groups", + "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format( + retrospective_process_id=quote(str(retrospective_process_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupResponse]] + Response[ErrorsList | RetrospectiveProcessGroupResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupResponse] + ErrorsList | RetrospectiveProcessGroupResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupResponse]] + Response[ErrorsList | RetrospectiveProcessGroupResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupResponse] + ErrorsList | RetrospectiveProcessGroupResponse """ return ( diff --git a/rootly_sdk/api/retrospective_process_groups/delete_retrospective_process_group.py b/rootly_sdk/api/retrospective_process_groups/delete_retrospective_process_group.py index e5af35fc..ffa0bd00 100644 --- a/rootly_sdk/api/retrospective_process_groups/delete_retrospective_process_group.py +++ b/rootly_sdk/api/retrospective_process_groups/delete_retrospective_process_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/retrospective_process_groups/{id}", + "url": "/v1/retrospective_process_groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupResponse]] + Response[ErrorsList | RetrospectiveProcessGroupResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupResponse] + ErrorsList | RetrospectiveProcessGroupResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessGroupResponse]] + Response[ErrorsList | RetrospectiveProcessGroupResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessGroupResponse] + ErrorsList | RetrospectiveProcessGroupResponse """ return ( diff --git a/rootly_sdk/api/retrospective_process_groups/get_retrospective_process_group.py b/rootly_sdk/api/retrospective_process_groups/get_retrospective_process_group.py index 02bd0f1b..a1f3483d 100644 --- a/rootly_sdk/api/retrospective_process_groups/get_retrospective_process_group.py +++ b/rootly_sdk/api/retrospective_process_groups/get_retrospective_process_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,11 +16,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetRetrospectiveProcessGroupInclude = UNSET, + include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_process_groups/{id}", + "url": "/v1/retrospective_process_groups/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -65,7 +69,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessGroupInclude = UNSET, + include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, ) -> Response[RetrospectiveProcessGroupResponse]: """Retrieves a Retrospective Process Group @@ -73,7 +77,7 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessGroupInclude]): + include (GetRetrospectiveProcessGroupInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -99,7 +103,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessGroupInclude = UNSET, + include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, ) -> RetrospectiveProcessGroupResponse | None: """Retrieves a Retrospective Process Group @@ -107,7 +111,7 @@ def sync( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessGroupInclude]): + include (GetRetrospectiveProcessGroupInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,7 +132,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessGroupInclude = UNSET, + include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, ) -> Response[RetrospectiveProcessGroupResponse]: """Retrieves a Retrospective Process Group @@ -136,7 +140,7 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessGroupInclude]): + include (GetRetrospectiveProcessGroupInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -160,7 +164,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessGroupInclude = UNSET, + include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, ) -> RetrospectiveProcessGroupResponse | None: """Retrieves a Retrospective Process Group @@ -168,7 +172,7 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessGroupInclude]): + include (GetRetrospectiveProcessGroupInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_process_groups/list_retrospective_process_groups.py b/rootly_sdk/api/retrospective_process_groups/list_retrospective_process_groups.py index 364e8a03..a2ace0f8 100644 --- a/rootly_sdk/api/retrospective_process_groups/list_retrospective_process_groups.py +++ b/rootly_sdk/api/retrospective_process_groups/list_retrospective_process_groups.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -18,25 +19,26 @@ def _get_kwargs( retrospective_process_id: str, *, - include: Unset | ListRetrospectiveProcessGroupsInclude = UNSET, - sort: Unset | ListRetrospectiveProcessGroupsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListRetrospectiveProcessGroupsInclude | Unset = UNSET, + sort: ListRetrospectiveProcessGroupsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -60,7 +62,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_processes/{retrospective_process_id}/groups", + "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format( + retrospective_process_id=quote(str(retrospective_process_id), safe=""), + ), "params": params, } @@ -96,15 +100,15 @@ def sync_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessGroupsInclude = UNSET, - sort: Unset | ListRetrospectiveProcessGroupsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListRetrospectiveProcessGroupsInclude | Unset = UNSET, + sort: ListRetrospectiveProcessGroupsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[RetrospectiveProcessGroupList]: """List Retrospective Process Groups @@ -112,15 +116,15 @@ def sync_detailed( Args: retrospective_process_id (str): - include (Union[Unset, ListRetrospectiveProcessGroupsInclude]): - sort (Union[Unset, ListRetrospectiveProcessGroupsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListRetrospectiveProcessGroupsInclude | Unset): + sort (ListRetrospectiveProcessGroupsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,15 +158,15 @@ def sync( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessGroupsInclude = UNSET, - sort: Unset | ListRetrospectiveProcessGroupsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListRetrospectiveProcessGroupsInclude | Unset = UNSET, + sort: ListRetrospectiveProcessGroupsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> RetrospectiveProcessGroupList | None: """List Retrospective Process Groups @@ -170,15 +174,15 @@ def sync( Args: retrospective_process_id (str): - include (Union[Unset, ListRetrospectiveProcessGroupsInclude]): - sort (Union[Unset, ListRetrospectiveProcessGroupsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListRetrospectiveProcessGroupsInclude | Unset): + sort (ListRetrospectiveProcessGroupsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -207,15 +211,15 @@ async def asyncio_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessGroupsInclude = UNSET, - sort: Unset | ListRetrospectiveProcessGroupsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListRetrospectiveProcessGroupsInclude | Unset = UNSET, + sort: ListRetrospectiveProcessGroupsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[RetrospectiveProcessGroupList]: """List Retrospective Process Groups @@ -223,15 +227,15 @@ async def asyncio_detailed( Args: retrospective_process_id (str): - include (Union[Unset, ListRetrospectiveProcessGroupsInclude]): - sort (Union[Unset, ListRetrospectiveProcessGroupsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListRetrospectiveProcessGroupsInclude | Unset): + sort (ListRetrospectiveProcessGroupsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -263,15 +267,15 @@ async def asyncio( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessGroupsInclude = UNSET, - sort: Unset | ListRetrospectiveProcessGroupsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersub_status_id: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListRetrospectiveProcessGroupsInclude | Unset = UNSET, + sort: ListRetrospectiveProcessGroupsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersub_status_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> RetrospectiveProcessGroupList | None: """List Retrospective Process Groups @@ -279,15 +283,15 @@ async def asyncio( Args: retrospective_process_id (str): - include (Union[Unset, ListRetrospectiveProcessGroupsInclude]): - sort (Union[Unset, ListRetrospectiveProcessGroupsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersub_status_id (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListRetrospectiveProcessGroupsInclude | Unset): + sort (ListRetrospectiveProcessGroupsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersub_status_id (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_process_groups/update_retrospective_process_group.py b/rootly_sdk/api/retrospective_process_groups/update_retrospective_process_group.py index 0960115f..025b6851 100644 --- a/rootly_sdk/api/retrospective_process_groups/update_retrospective_process_group.py +++ b/rootly_sdk/api/retrospective_process_groups/update_retrospective_process_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -19,7 +20,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/retrospective_process_groups/{id}", + "url": "/v1/retrospective_process_groups/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() diff --git a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py index 80fdaa15..958b54e7 100644 --- a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return ( diff --git a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py index 8c3808e0..cb4c54f8 100644 --- a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/retrospective_processes/{id}", + "url": "/v1/retrospective_processes/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return ( diff --git a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py index f86ca3de..f88cfd09 100644 --- a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -16,11 +17,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetRetrospectiveProcessInclude = UNSET, + include: GetRetrospectiveProcessInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -30,7 +32,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_processes/{id}", + "url": "/v1/retrospective_processes/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -71,7 +75,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessInclude = UNSET, + include: GetRetrospectiveProcessInclude | Unset = UNSET, ) -> Response[ErrorsList | RetrospectiveProcessResponse]: """Retrieves a retrospective process @@ -79,14 +83,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessInclude]): + include (GetRetrospectiveProcessInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -105,7 +109,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessInclude = UNSET, + include: GetRetrospectiveProcessInclude | Unset = UNSET, ) -> ErrorsList | RetrospectiveProcessResponse | None: """Retrieves a retrospective process @@ -113,14 +117,14 @@ def sync( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessInclude]): + include (GetRetrospectiveProcessInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return sync_detailed( @@ -134,7 +138,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessInclude = UNSET, + include: GetRetrospectiveProcessInclude | Unset = UNSET, ) -> Response[ErrorsList | RetrospectiveProcessResponse]: """Retrieves a retrospective process @@ -142,14 +146,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessInclude]): + include (GetRetrospectiveProcessInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -166,7 +170,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetRetrospectiveProcessInclude = UNSET, + include: GetRetrospectiveProcessInclude | Unset = UNSET, ) -> ErrorsList | RetrospectiveProcessResponse | None: """Retrieves a retrospective process @@ -174,14 +178,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetRetrospectiveProcessInclude]): + include (GetRetrospectiveProcessInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return ( diff --git a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py index b2fbd7b2..a106a418 100644 --- a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py +++ b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py @@ -14,13 +14,14 @@ def _get_kwargs( *, - include: Unset | ListRetrospectiveProcessesInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListRetrospectiveProcessesInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -69,18 +70,18 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessesInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListRetrospectiveProcessesInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[RetrospectiveProcessList]: """List retrospective processes List retrospective processes Args: - include (Union[Unset, ListRetrospectiveProcessesInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListRetrospectiveProcessesInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -106,18 +107,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessesInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListRetrospectiveProcessesInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> RetrospectiveProcessList | None: """List retrospective processes List retrospective processes Args: - include (Union[Unset, ListRetrospectiveProcessesInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListRetrospectiveProcessesInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -138,18 +139,18 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessesInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListRetrospectiveProcessesInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[RetrospectiveProcessList]: """List retrospective processes List retrospective processes Args: - include (Union[Unset, ListRetrospectiveProcessesInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListRetrospectiveProcessesInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,18 +174,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListRetrospectiveProcessesInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: ListRetrospectiveProcessesInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> RetrospectiveProcessList | None: """List retrospective processes List retrospective processes Args: - include (Union[Unset, ListRetrospectiveProcessesInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (ListRetrospectiveProcessesInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py index 8afeb077..d290ed1b 100644 --- a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/retrospective_processes/{id}", + "url": "/v1/retrospective_processes/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveProcessResponse]] + Response[ErrorsList | RetrospectiveProcessResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveProcessResponse] + ErrorsList | RetrospectiveProcessResponse """ return ( diff --git a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py index 8c370ff6..92dfb6e8 100644 --- a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps", + "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format( + retrospective_process_id=quote(str(retrospective_process_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return ( diff --git a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py index 5988c137..51361c85 100644 --- a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/retrospective_steps/{id}", + "url": "/v1/retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return ( diff --git a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py index 52b64de5..416a641b 100644 --- a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_steps/{id}", + "url": "/v1/retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return ( diff --git a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py index 11922444..d611a9e0 100644 --- a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py +++ b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( retrospective_process_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps", + "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format( + retrospective_process_id=quote(str(retrospective_process_id), safe=""), + ), "params": params, } @@ -65,10 +69,10 @@ def sync_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[RetrospectiveStepList]: """List retrospective steps @@ -76,10 +80,10 @@ def sync_detailed( Args: retrospective_process_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -108,10 +112,10 @@ def sync( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> RetrospectiveStepList | None: """List retrospective steps @@ -119,10 +123,10 @@ def sync( Args: retrospective_process_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,10 +150,10 @@ async def asyncio_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[RetrospectiveStepList]: """List retrospective steps @@ -157,10 +161,10 @@ async def asyncio_detailed( Args: retrospective_process_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,10 +191,10 @@ async def asyncio( retrospective_process_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> RetrospectiveStepList | None: """List retrospective steps @@ -198,10 +202,10 @@ async def asyncio( Args: retrospective_process_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py index 553bd75e..004aa760 100644 --- a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/retrospective_steps/{id}", + "url": "/v1/retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RetrospectiveStepResponse]] + Response[ErrorsList | RetrospectiveStepResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RetrospectiveStepResponse] + ErrorsList | RetrospectiveStepResponse """ return ( diff --git a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py index 854b6889..a45d193d 100644 --- a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return ( diff --git a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py index b88c5b8d..aafa6848 100644 --- a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/post_mortem_templates/{id}", + "url": "/v1/post_mortem_templates/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | PostMortemTemplateResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | PostMortemTemplateResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | PostMortemTemplateResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | PostMortemTemplateResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return ( diff --git a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py index b4484263..20fda05d 100644 --- a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/post_mortem_templates/{id}", + "url": "/v1/post_mortem_templates/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | PostMortemTemplateResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | PostMortemTemplateResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | PostMortemTemplateResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | PostMortemTemplateResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return ( diff --git a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py index 4bd711cb..a85e9595 100644 --- a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py +++ b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py @@ -11,10 +11,11 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -60,18 +61,18 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PostMortemTemplateList]: """List Retrospective Templates List Retrospective Templates Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -97,18 +98,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PostMortemTemplateList | None: """List Retrospective Templates List Retrospective Templates Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,18 +130,18 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[PostMortemTemplateList]: """List Retrospective Templates List Retrospective Templates Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,18 +165,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> PostMortemTemplateList | None: """List Retrospective Templates List Retrospective Templates Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py index c3d78abf..32d1be7f 100644 --- a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdatePostMortemTemplate, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/post_mortem_templates/{id}", + "url": "/v1/post_mortem_templates/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdatePostMortemTemplate): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, @@ -107,7 +110,7 @@ def sync( Update a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdatePostMortemTemplate): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdatePostMortemTemplate): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, PostMortemTemplateResponse]] + Response[ErrorsList | PostMortemTemplateResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, @@ -168,7 +171,7 @@ async def asyncio( Update a specific Retrospective Template by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdatePostMortemTemplate): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, PostMortemTemplateResponse] + ErrorsList | PostMortemTemplateResponse """ return ( diff --git a/rootly_sdk/api/roles/create_role.py b/rootly_sdk/api/roles/create_role.py index cc05aa9d..14a23064 100644 --- a/rootly_sdk/api/roles/create_role.py +++ b/rootly_sdk/api/roles/create_role.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return ( diff --git a/rootly_sdk/api/roles/delete_role.py b/rootly_sdk/api/roles/delete_role.py index c4103b98..72c04400 100644 --- a/rootly_sdk/api/roles/delete_role.py +++ b/rootly_sdk/api/roles/delete_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/roles/{id}", + "url": "/v1/roles/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | RoleResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | RoleResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | RoleResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | RoleResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return ( diff --git a/rootly_sdk/api/roles/get_role.py b/rootly_sdk/api/roles/get_role.py index fa5e147f..ec32d7ee 100644 --- a/rootly_sdk/api/roles/get_role.py +++ b/rootly_sdk/api/roles/get_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/roles/{id}", + "url": "/v1/roles/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | RoleResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | RoleResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | RoleResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | RoleResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return ( diff --git a/rootly_sdk/api/roles/list_roles.py b/rootly_sdk/api/roles/list_roles.py index 92958f7c..fd378970 100644 --- a/rootly_sdk/api/roles/list_roles.py +++ b/rootly_sdk/api/roles/list_roles.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -82,34 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[RoleList]: """List roles List roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,34 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> RoleList | None: """List roles List roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,34 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[RoleList]: """List roles List roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,34 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> RoleList | None: """List roles List roles Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/roles/update_role.py b/rootly_sdk/api/roles/update_role.py index 2aae9b98..a0e1e4cd 100644 --- a/rootly_sdk/api/roles/update_role.py +++ b/rootly_sdk/api/roles/update_role.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateRole, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/roles/{id}", + "url": "/v1/roles/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateRole): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, @@ -107,7 +110,7 @@ def sync( Update a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateRole): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateRole): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, RoleResponse]] + Response[ErrorsList | RoleResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, @@ -168,7 +171,7 @@ async def asyncio( Update a specific role by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateRole): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, RoleResponse] + ErrorsList | RoleResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_active_days/create_schedule_rotation_active_day.py b/rootly_sdk/api/schedule_rotation_active_days/create_schedule_rotation_active_day.py index c107f416..8bb86f5f 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/create_schedule_rotation_active_day.py +++ b/rootly_sdk/api/schedule_rotation_active_days/create_schedule_rotation_active_day.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days", + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format( + schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_active_days/delete_schedule_rotation_active_day.py b/rootly_sdk/api/schedule_rotation_active_days/delete_schedule_rotation_active_day.py index 8e688f7c..a98550d8 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/delete_schedule_rotation_active_day.py +++ b/rootly_sdk/api/schedule_rotation_active_days/delete_schedule_rotation_active_day.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/schedule_rotation_active_days/{id}", + "url": "/v1/schedule_rotation_active_days/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_active_days/get_schedule_rotation_active_day.py b/rootly_sdk/api/schedule_rotation_active_days/get_schedule_rotation_active_day.py index e0458be5..fa2947c6 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/get_schedule_rotation_active_day.py +++ b/rootly_sdk/api/schedule_rotation_active_days/get_schedule_rotation_active_day.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedule_rotation_active_days/{id}", + "url": "/v1/schedule_rotation_active_days/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_active_days/list_schedule_rotation_active_days.py b/rootly_sdk/api/schedule_rotation_active_days/list_schedule_rotation_active_days.py index 1e54c8a5..17ccecb6 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/list_schedule_rotation_active_days.py +++ b/rootly_sdk/api/schedule_rotation_active_days/list_schedule_rotation_active_days.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( schedule_rotation_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days", + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format( + schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ScheduleRotationActiveDayList]: """List schedule rotation active days @@ -74,9 +78,9 @@ def sync_detailed( Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ScheduleRotationActiveDayList | None: """List schedule rotation active days @@ -114,9 +118,9 @@ def sync( Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ScheduleRotationActiveDayList]: """List schedule rotation active days @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ScheduleRotationActiveDayList | None: """List schedule rotation active days @@ -187,9 +191,9 @@ async def asyncio( Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/schedule_rotation_active_days/update_schedule_rotation_active_day.py b/rootly_sdk/api/schedule_rotation_active_days/update_schedule_rotation_active_day.py index 4b87bbda..b6446600 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/update_schedule_rotation_active_day.py +++ b/rootly_sdk/api/schedule_rotation_active_days/update_schedule_rotation_active_day.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/schedule_rotation_active_days/{id}", + "url": "/v1/schedule_rotation_active_days/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationActiveDayResponse]] + Response[ErrorsList | ScheduleRotationActiveDayResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationActiveDayResponse] + ErrorsList | ScheduleRotationActiveDayResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_users/create_schedule_rotation_user.py b/rootly_sdk/api/schedule_rotation_users/create_schedule_rotation_user.py index b87c2ed5..87733a8a 100644 --- a/rootly_sdk/api/schedule_rotation_users/create_schedule_rotation_user.py +++ b/rootly_sdk/api/schedule_rotation_users/create_schedule_rotation_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users", + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format( + schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_users/delete_schedule_rotation_user.py b/rootly_sdk/api/schedule_rotation_users/delete_schedule_rotation_user.py index f7fe1339..77221b81 100644 --- a/rootly_sdk/api/schedule_rotation_users/delete_schedule_rotation_user.py +++ b/rootly_sdk/api/schedule_rotation_users/delete_schedule_rotation_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/schedule_rotation_users/{id}", + "url": "/v1/schedule_rotation_users/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_users/get_schedule_rotation_user.py b/rootly_sdk/api/schedule_rotation_users/get_schedule_rotation_user.py index d1e6b151..bf1a538b 100644 --- a/rootly_sdk/api/schedule_rotation_users/get_schedule_rotation_user.py +++ b/rootly_sdk/api/schedule_rotation_users/get_schedule_rotation_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedule_rotation_users/{id}", + "url": "/v1/schedule_rotation_users/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotation_users/list_schedule_rotation_users.py b/rootly_sdk/api/schedule_rotation_users/list_schedule_rotation_users.py index 21d8f869..a217745f 100644 --- a/rootly_sdk/api/schedule_rotation_users/list_schedule_rotation_users.py +++ b/rootly_sdk/api/schedule_rotation_users/list_schedule_rotation_users.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( schedule_rotation_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users", + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format( + schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), + ), "params": params, } @@ -64,17 +68,17 @@ def sync_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ScheduleRotationUserList]: """List schedule rotation users Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,17 +106,17 @@ def sync( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ScheduleRotationUserList | None: """List schedule rotation users Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -135,17 +139,17 @@ async def asyncio_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ScheduleRotationUserList]: """List schedule rotation users Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,17 +175,17 @@ async def asyncio( schedule_rotation_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ScheduleRotationUserList | None: """List schedule rotation users Args: schedule_rotation_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/schedule_rotation_users/update_schedule_rotation_user.py b/rootly_sdk/api/schedule_rotation_users/update_schedule_rotation_user.py index 85250a89..c8dbb34b 100644 --- a/rootly_sdk/api/schedule_rotation_users/update_schedule_rotation_user.py +++ b/rootly_sdk/api/schedule_rotation_users/update_schedule_rotation_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/schedule_rotation_users/{id}", + "url": "/v1/schedule_rotation_users/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationUserResponse]] + Response[ErrorsList | ScheduleRotationUserResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationUserResponse] + ErrorsList | ScheduleRotationUserResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py index 9e113ece..61069e24 100644 --- a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/schedules/{schedule_id}/schedule_rotations", + "url": "/v1/schedules/{schedule_id}/schedule_rotations".format( + schedule_id=quote(str(schedule_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py index 0bd9ab54..441f2ff1 100644 --- a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/schedule_rotations/{id}", + "url": "/v1/schedule_rotations/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py index 7cb6f77b..09f83172 100644 --- a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedule_rotations/{id}", + "url": "/v1/schedule_rotations/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return ( diff --git a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py index 1cc7afbf..80ad5986 100644 --- a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py +++ b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( schedule_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedules/{schedule_id}/schedule_rotations", + "url": "/v1/schedules/{schedule_id}/schedule_rotations".format( + schedule_id=quote(str(schedule_id), safe=""), + ), "params": params, } @@ -65,10 +69,10 @@ def sync_detailed( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[ScheduleRotationList]: """List schedule rotations @@ -76,10 +80,10 @@ def sync_detailed( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -108,10 +112,10 @@ def sync( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> ScheduleRotationList | None: """List schedule rotations @@ -119,10 +123,10 @@ def sync( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,10 +150,10 @@ async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[ScheduleRotationList]: """List schedule rotations @@ -157,10 +161,10 @@ async def asyncio_detailed( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,10 +191,10 @@ async def asyncio( schedule_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> ScheduleRotationList | None: """List schedule rotations @@ -198,10 +202,10 @@ async def asyncio( Args: schedule_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py index 5ec8c3c3..2016f193 100644 --- a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/schedule_rotations/{id}", + "url": "/v1/schedule_rotations/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleRotationResponse]] + Response[ErrorsList | ScheduleRotationResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleRotationResponse] + ErrorsList | ScheduleRotationResponse """ return ( diff --git a/rootly_sdk/api/schedules/create_schedule.py b/rootly_sdk/api/schedules/create_schedule.py index 41dd8104..fe6cb78c 100644 --- a/rootly_sdk/api/schedules/create_schedule.py +++ b/rootly_sdk/api/schedules/create_schedule.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return ( diff --git a/rootly_sdk/api/schedules/delete_schedule.py b/rootly_sdk/api/schedules/delete_schedule.py index 83c1016e..1d4d73ba 100644 --- a/rootly_sdk/api/schedules/delete_schedule.py +++ b/rootly_sdk/api/schedules/delete_schedule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/schedules/{id}", + "url": "/v1/schedules/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return ( diff --git a/rootly_sdk/api/schedules/get_schedule.py b/rootly_sdk/api/schedules/get_schedule.py index 5449e85a..254e51f6 100644 --- a/rootly_sdk/api/schedules/get_schedule.py +++ b/rootly_sdk/api/schedules/get_schedule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedules/{id}", + "url": "/v1/schedules/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return ( diff --git a/rootly_sdk/api/schedules/list_schedules.py b/rootly_sdk/api/schedules/list_schedules.py index 28ad8b9f..bec7bb90 100644 --- a/rootly_sdk/api/schedules/list_schedules.py +++ b/rootly_sdk/api/schedules/list_schedules.py @@ -11,16 +11,17 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -76,30 +77,30 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ScheduleList]: """List schedules List schedules Args: - include (Union[Unset, str]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,30 +132,30 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ScheduleList | None: """List schedules List schedules Args: - include (Union[Unset, str]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,30 +182,30 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ScheduleList]: """List schedules List schedules Args: - include (Union[Unset, str]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -234,30 +235,30 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ScheduleList | None: """List schedules List schedules Args: - include (Union[Unset, str]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/schedules/update_schedule.py b/rootly_sdk/api/schedules/update_schedule.py index 0ba5b2b4..cc14d173 100644 --- a/rootly_sdk/api/schedules/update_schedule.py +++ b/rootly_sdk/api/schedules/update_schedule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/schedules/{id}", + "url": "/v1/schedules/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ScheduleResponse]] + Response[ErrorsList | ScheduleResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ScheduleResponse] + ErrorsList | ScheduleResponse """ return ( diff --git a/rootly_sdk/api/secrets/create_secret.py b/rootly_sdk/api/secrets/create_secret.py index a28973eb..927e7547 100644 --- a/rootly_sdk/api/secrets/create_secret.py +++ b/rootly_sdk/api/secrets/create_secret.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return ( diff --git a/rootly_sdk/api/secrets/delete_secret.py b/rootly_sdk/api/secrets/delete_secret.py index aded439f..cab7f849 100644 --- a/rootly_sdk/api/secrets/delete_secret.py +++ b/rootly_sdk/api/secrets/delete_secret.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/secrets/{id}", + "url": "/v1/secrets/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return ( diff --git a/rootly_sdk/api/secrets/get_secret.py b/rootly_sdk/api/secrets/get_secret.py index 4d1b134a..0a85cd44 100644 --- a/rootly_sdk/api/secrets/get_secret.py +++ b/rootly_sdk/api/secrets/get_secret.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/secrets/{id}", + "url": "/v1/secrets/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return ( diff --git a/rootly_sdk/api/secrets/list_secrets.py b/rootly_sdk/api/secrets/list_secrets.py index 09aced5b..5763e6c0 100644 --- a/rootly_sdk/api/secrets/list_secrets.py +++ b/rootly_sdk/api/secrets/list_secrets.py @@ -11,10 +11,11 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -58,18 +59,18 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[SecretList]: """List secrets List secrets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -95,18 +96,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> SecretList | None: """List secrets List secrets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -127,18 +128,18 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[SecretList]: """List secrets List secrets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -162,18 +163,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> SecretList | None: """List secrets List secrets Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/secrets/update_secret.py b/rootly_sdk/api/secrets/update_secret.py index b6c122d6..41fe293e 100644 --- a/rootly_sdk/api/secrets/update_secret.py +++ b/rootly_sdk/api/secrets/update_secret.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/secrets/{id}", + "url": "/v1/secrets/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SecretResponse]] + Response[ErrorsList | SecretResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SecretResponse] + ErrorsList | SecretResponse """ return ( diff --git a/rootly_sdk/api/services/create_service.py b/rootly_sdk/api/services/create_service.py index 56e5f79c..fcd786db 100644 --- a/rootly_sdk/api/services/create_service.py +++ b/rootly_sdk/api/services/create_service.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return ( diff --git a/rootly_sdk/api/services/create_service_catalog_field.py b/rootly_sdk/api/services/create_service_catalog_field.py deleted file mode 100644 index 68a25fc5..00000000 --- a/rootly_sdk/api/services/create_service_catalog_field.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse -from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField -from ...types import Response - - -def _get_kwargs( - *, - body: NewCatalogField, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/services/fields", - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/vnd.api+json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: - if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) - - return response_201 - - if response.status_code == 401: - response_401 = ErrorsList.from_dict(response.json()) - - return response_401 - - if response.status_code == 422: - response_422 = ErrorsList.from_dict(response.json()) - - return response_422 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field - - Creates a new Catalog Field from provided data - - Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field - - Creates a new Catalog Field from provided data - - Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[CatalogFieldResponse, ErrorsList] - """ - - return sync_detailed( - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field - - Creates a new Catalog Field from provided data - - Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] - """ - - kwargs = _get_kwargs( - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field - - Creates a new Catalog Field from provided data - - Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[CatalogFieldResponse, ErrorsList] - """ - - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed diff --git a/rootly_sdk/api/causes/create_cause_catalog_field.py b/rootly_sdk/api/services/create_service_catalog_property.py similarity index 66% rename from rootly_sdk/api/causes/create_cause_catalog_field.py rename to rootly_sdk/api/services/create_service_catalog_property.py index 4ea5f2ac..3c61dc54 100644 --- a/rootly_sdk/api/causes/create_cause_catalog_field.py +++ b/rootly_sdk/api/services/create_service_catalog_property.py @@ -5,21 +5,21 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse +from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField +from ...models.new_catalog_property import NewCatalogProperty from ...types import Response def _get_kwargs( *, - body: NewCatalogField, + body: NewCatalogProperty, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/causes/fields", + "url": "/v1/services/properties", } _kwargs["json"] = body.to_dict() @@ -32,9 +32,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> CatalogPropertyResponse | ErrorsList | None: if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) + response_201 = CatalogPropertyResponse.from_dict(response.json()) return response_201 @@ -56,7 +56,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,21 +68,21 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,21 +99,21 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return sync_detailed( @@ -125,21 +125,21 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,21 +154,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/services/delete_service.py b/rootly_sdk/api/services/delete_service.py index e4761a6c..52fc6e7d 100644 --- a/rootly_sdk/api/services/delete_service.py +++ b/rootly_sdk/api/services/delete_service.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/services/{id}", + "url": "/v1/services/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | ServiceResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | ServiceResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | ServiceResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | ServiceResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return ( diff --git a/rootly_sdk/api/services/get_service.py b/rootly_sdk/api/services/get_service.py index eea3f3c3..17d3ef16 100644 --- a/rootly_sdk/api/services/get_service.py +++ b/rootly_sdk/api/services/get_service.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/services/{id}", + "url": "/v1/services/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | ServiceResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | ServiceResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | ServiceResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | ServiceResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return ( diff --git a/rootly_sdk/api/services/get_service_incidents_chart.py b/rootly_sdk/api/services/get_service_incidents_chart.py index 499f72b2..7a881811 100644 --- a/rootly_sdk/api/services/get_service_incidents_chart.py +++ b/rootly_sdk/api/services/get_service_incidents_chart.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,10 +13,11 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, period: str, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["period"] = period @@ -24,7 +26,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/services/{id}/incidents_chart", + "url": "/v1/services/{id}/incidents_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -62,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -72,7 +76,7 @@ def sync_detailed( Get service incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -80,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentsChartResponse]] + Response[ErrorsList | IncidentsChartResponse] """ kwargs = _get_kwargs( @@ -96,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -106,7 +110,7 @@ def sync( Get service incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -114,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentsChartResponse] + ErrorsList | IncidentsChartResponse """ return sync_detailed( @@ -125,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -135,7 +139,7 @@ async def asyncio_detailed( Get service incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -143,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentsChartResponse]] + Response[ErrorsList | IncidentsChartResponse] """ kwargs = _get_kwargs( @@ -157,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, period: str, @@ -167,7 +171,7 @@ async def asyncio( Get service incidents chart Args: - id (Union[UUID, str]): + id (str | UUID): period (str): Raises: @@ -175,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentsChartResponse] + ErrorsList | IncidentsChartResponse """ return ( diff --git a/rootly_sdk/api/services/get_service_uptime_chart.py b/rootly_sdk/api/services/get_service_uptime_chart.py index 7efba8d2..1976e560 100644 --- a/rootly_sdk/api/services/get_service_uptime_chart.py +++ b/rootly_sdk/api/services/get_service_uptime_chart.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,10 +13,11 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["period"] = period @@ -24,7 +26,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/services/{id}/uptime_chart", + "url": "/v1/services/{id}/uptime_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -62,25 +66,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> Response[ErrorsList | UptimeChartResponse]: """Get service uptime chart Get service uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UptimeChartResponse]] + Response[ErrorsList | UptimeChartResponse] """ kwargs = _get_kwargs( @@ -96,25 +100,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> ErrorsList | UptimeChartResponse | None: """Get service uptime chart Get service uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UptimeChartResponse] + ErrorsList | UptimeChartResponse """ return sync_detailed( @@ -125,25 +129,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> Response[ErrorsList | UptimeChartResponse]: """Get service uptime chart Get service uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UptimeChartResponse]] + Response[ErrorsList | UptimeChartResponse] """ kwargs = _get_kwargs( @@ -157,25 +161,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - period: Unset | str = UNSET, + period: str | Unset = UNSET, ) -> ErrorsList | UptimeChartResponse | None: """Get service uptime chart Get service uptime chart Args: - id (Union[UUID, str]): - period (Union[Unset, str]): + id (str | UUID): + period (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UptimeChartResponse] + ErrorsList | UptimeChartResponse """ return ( diff --git a/rootly_sdk/api/services/list_service_catalog_fields.py b/rootly_sdk/api/services/list_service_catalog_fields.py deleted file mode 100644 index 323aa723..00000000 --- a/rootly_sdk/api/services/list_service_catalog_fields.py +++ /dev/null @@ -1,327 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_service_catalog_fields_include import ( - ListServiceCatalogFieldsInclude, -) -from ...models.list_service_catalog_fields_sort import ( - ListServiceCatalogFieldsSort, -) -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - include: Unset | ListServiceCatalogFieldsInclude = UNSET, - sort: Unset | ListServiceCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/services/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListServiceCatalogFieldsInclude = UNSET, - sort: Unset | ListServiceCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Service Catalog Fields - - Args: - include (Union[Unset, ListServiceCatalogFieldsInclude]): - sort (Union[Unset, ListServiceCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - include: Unset | ListServiceCatalogFieldsInclude = UNSET, - sort: Unset | ListServiceCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Service Catalog Fields - - Args: - include (Union[Unset, ListServiceCatalogFieldsInclude]): - sort (Union[Unset, ListServiceCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListServiceCatalogFieldsInclude = UNSET, - sort: Unset | ListServiceCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Service Catalog Fields - - Args: - include (Union[Unset, ListServiceCatalogFieldsInclude]): - sort (Union[Unset, ListServiceCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - include: Unset | ListServiceCatalogFieldsInclude = UNSET, - sort: Unset | ListServiceCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Service Catalog Fields - - Args: - include (Union[Unset, ListServiceCatalogFieldsInclude]): - sort (Union[Unset, ListServiceCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/services/list_service_catalog_properties.py b/rootly_sdk/api/services/list_service_catalog_properties.py new file mode 100644 index 00000000..54b4e887 --- /dev/null +++ b/rootly_sdk/api/services/list_service_catalog_properties.py @@ -0,0 +1,328 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_list import CatalogPropertyList +from ...models.list_service_catalog_properties_include import ( + ListServiceCatalogPropertiesInclude, +) +from ...models.list_service_catalog_properties_sort import ( + ListServiceCatalogPropertiesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListServiceCatalogPropertiesInclude | Unset = UNSET, + sort: ListServiceCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[kind]"] = filterkind + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/services/properties", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogPropertyList | None: + if response.status_code == 200: + response_200 = CatalogPropertyList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListServiceCatalogPropertiesInclude | Unset = UNSET, + sort: ListServiceCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Service Catalog Properties + + Args: + include (ListServiceCatalogPropertiesInclude | Unset): + sort (ListServiceCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListServiceCatalogPropertiesInclude | Unset = UNSET, + sort: ListServiceCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Service Catalog Properties + + Args: + include (ListServiceCatalogPropertiesInclude | Unset): + sort (ListServiceCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListServiceCatalogPropertiesInclude | Unset = UNSET, + sort: ListServiceCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Service Catalog Properties + + Args: + include (ListServiceCatalogPropertiesInclude | Unset): + sort (ListServiceCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListServiceCatalogPropertiesInclude | Unset = UNSET, + sort: ListServiceCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Service Catalog Properties + + Args: + include (ListServiceCatalogPropertiesInclude | Unset): + sort (ListServiceCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/services/list_services.py b/rootly_sdk/api/services/list_services.py index 9588ff9d..cb6db677 100644 --- a/rootly_sdk/api/services/list_services.py +++ b/rootly_sdk/api/services/list_services.py @@ -11,24 +11,25 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -100,46 +101,46 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[ServiceList]: """List services List services Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -179,46 +180,46 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> ServiceList | None: """List services List services Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -253,46 +254,46 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[ServiceList]: """List services List services Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -330,46 +331,46 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> ServiceList | None: """List services List services Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/services/update_service.py b/rootly_sdk/api/services/update_service.py index 23521465..5ba68ee9 100644 --- a/rootly_sdk/api/services/update_service.py +++ b/rootly_sdk/api/services/update_service.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateService, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/services/{id}", + "url": "/v1/services/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateService): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, @@ -107,7 +110,7 @@ def sync( Update a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateService): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateService): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ServiceResponse]] + Response[ErrorsList | ServiceResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, @@ -168,7 +171,7 @@ async def asyncio( Update a specific service by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateService): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ServiceResponse] + ErrorsList | ServiceResponse """ return ( diff --git a/rootly_sdk/api/severities/create_severity.py b/rootly_sdk/api/severities/create_severity.py index 5282399a..ac3b5494 100644 --- a/rootly_sdk/api/severities/create_severity.py +++ b/rootly_sdk/api/severities/create_severity.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return ( diff --git a/rootly_sdk/api/severities/delete_severity.py b/rootly_sdk/api/severities/delete_severity.py index 53aa6ffe..466626a3 100644 --- a/rootly_sdk/api/severities/delete_severity.py +++ b/rootly_sdk/api/severities/delete_severity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/severities/{id}", + "url": "/v1/severities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SeverityResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SeverityResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SeverityResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SeverityResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return ( diff --git a/rootly_sdk/api/severities/get_severity.py b/rootly_sdk/api/severities/get_severity.py index cf85c9b3..f36d72b9 100644 --- a/rootly_sdk/api/severities/get_severity.py +++ b/rootly_sdk/api/severities/get_severity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/severities/{id}", + "url": "/v1/severities/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SeverityResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SeverityResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SeverityResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SeverityResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return ( diff --git a/rootly_sdk/api/severities/list_severities.py b/rootly_sdk/api/severities/list_severities.py index 032510f1..852c9a44 100644 --- a/rootly_sdk/api/severities/list_severities.py +++ b/rootly_sdk/api/severities/list_severities.py @@ -11,20 +11,21 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -88,38 +89,38 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[SeverityList]: """List severities List severities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterseverity (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -155,38 +156,38 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> SeverityList | None: """List severities List severities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterseverity (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -217,38 +218,38 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[SeverityList]: """List severities List severities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterseverity (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -282,38 +283,38 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterseverity: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterseverity: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> SeverityList | None: """List severities List severities Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterseverity (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterseverity (str | Unset): + filtercolor (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/severities/update_severity.py b/rootly_sdk/api/severities/update_severity.py index 552576b1..d1794033 100644 --- a/rootly_sdk/api/severities/update_severity.py +++ b/rootly_sdk/api/severities/update_severity.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateSeverity, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/severities/{id}", + "url": "/v1/severities/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSeverity): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, @@ -107,7 +110,7 @@ def sync( Update a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSeverity): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSeverity): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SeverityResponse]] + Response[ErrorsList | SeverityResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, @@ -168,7 +171,7 @@ async def asyncio( Update a specific severity by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSeverity): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SeverityResponse] + ErrorsList | SeverityResponse """ return ( diff --git a/rootly_sdk/api/shifts/get_schedule_shifts.py b/rootly_sdk/api/shifts/get_schedule_shifts.py index baf5f6bb..e263871a 100644 --- a/rootly_sdk/api/shifts/get_schedule_shifts.py +++ b/rootly_sdk/api/shifts/get_schedule_shifts.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,10 @@ def _get_kwargs( id: str, *, - to: Unset | str = UNSET, - from_: Unset | str = UNSET, + to: str | Unset = UNSET, + from_: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["to"] = to @@ -26,7 +28,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/schedules/{id}/shifts", + "url": "/v1/schedules/{id}/shifts".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -65,8 +69,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - to: Unset | str = UNSET, - from_: Unset | str = UNSET, + to: str | Unset = UNSET, + from_: str | Unset = UNSET, ) -> Response[ErrorsList | ShiftList]: """Retrieves a schedule shifts @@ -74,15 +78,15 @@ def sync_detailed( Args: id (str): - to (Union[Unset, str]): - from_ (Union[Unset, str]): + to (str | Unset): + from_ (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ShiftList]] + Response[ErrorsList | ShiftList] """ kwargs = _get_kwargs( @@ -102,8 +106,8 @@ def sync( id: str, *, client: AuthenticatedClient, - to: Unset | str = UNSET, - from_: Unset | str = UNSET, + to: str | Unset = UNSET, + from_: str | Unset = UNSET, ) -> ErrorsList | ShiftList | None: """Retrieves a schedule shifts @@ -111,15 +115,15 @@ def sync( Args: id (str): - to (Union[Unset, str]): - from_ (Union[Unset, str]): + to (str | Unset): + from_ (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ShiftList] + ErrorsList | ShiftList """ return sync_detailed( @@ -134,8 +138,8 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - to: Unset | str = UNSET, - from_: Unset | str = UNSET, + to: str | Unset = UNSET, + from_: str | Unset = UNSET, ) -> Response[ErrorsList | ShiftList]: """Retrieves a schedule shifts @@ -143,15 +147,15 @@ async def asyncio_detailed( Args: id (str): - to (Union[Unset, str]): - from_ (Union[Unset, str]): + to (str | Unset): + from_ (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ShiftList]] + Response[ErrorsList | ShiftList] """ kwargs = _get_kwargs( @@ -169,8 +173,8 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - to: Unset | str = UNSET, - from_: Unset | str = UNSET, + to: str | Unset = UNSET, + from_: str | Unset = UNSET, ) -> ErrorsList | ShiftList | None: """Retrieves a schedule shifts @@ -178,15 +182,15 @@ async def asyncio( Args: id (str): - to (Union[Unset, str]): - from_ (Union[Unset, str]): + to (str | Unset): + from_ (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ShiftList] + ErrorsList | ShiftList """ return ( diff --git a/rootly_sdk/api/shifts/list_shifts.py b/rootly_sdk/api/shifts/list_shifts.py index 441079b9..33fbd52d 100644 --- a/rootly_sdk/api/shifts/list_shifts.py +++ b/rootly_sdk/api/shifts/list_shifts.py @@ -13,15 +13,18 @@ def _get_kwargs( *, - include: Unset | ListShiftsInclude = UNSET, - from_: Unset | str = UNSET, - to: Unset | str = UNSET, - user_ids: Unset | list[int] = UNSET, - schedule_ids: Unset | list[str] = UNSET, + include: ListShiftsInclude | Unset = UNSET, + from_: str | Unset = UNSET, + to: str | Unset = UNSET, + user_ids: list[int] | Unset = UNSET, + schedule_ids: list[str] | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -31,18 +34,22 @@ def _get_kwargs( params["to"] = to - json_user_ids: Unset | list[int] = UNSET + json_user_ids: list[int] | Unset = UNSET if not isinstance(user_ids, Unset): json_user_ids = user_ids params["user_ids[]"] = json_user_ids - json_schedule_ids: Unset | list[str] = UNSET + json_schedule_ids: list[str] | Unset = UNSET if not isinstance(schedule_ids, Unset): json_schedule_ids = schedule_ids params["schedule_ids[]"] = json_schedule_ids + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -85,29 +92,33 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListShiftsInclude = UNSET, - from_: Unset | str = UNSET, - to: Unset | str = UNSET, - user_ids: Unset | list[int] = UNSET, - schedule_ids: Unset | list[str] = UNSET, + include: ListShiftsInclude | Unset = UNSET, + from_: str | Unset = UNSET, + to: str | Unset = UNSET, + user_ids: list[int] | Unset = UNSET, + schedule_ids: list[str] | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ErrorsList | ShiftList]: """List shifts List shifts Args: - include (Union[Unset, ListShiftsInclude]): - from_ (Union[Unset, str]): - to (Union[Unset, str]): - user_ids (Union[Unset, list[int]]): - schedule_ids (Union[Unset, list[str]]): + include (ListShiftsInclude | Unset): + from_ (str | Unset): + to (str | Unset): + user_ids (list[int] | Unset): + schedule_ids (list[str] | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ShiftList]] + Response[ErrorsList | ShiftList] """ kwargs = _get_kwargs( @@ -116,6 +127,8 @@ def sync_detailed( to=to, user_ids=user_ids, schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -128,29 +141,33 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListShiftsInclude = UNSET, - from_: Unset | str = UNSET, - to: Unset | str = UNSET, - user_ids: Unset | list[int] = UNSET, - schedule_ids: Unset | list[str] = UNSET, + include: ListShiftsInclude | Unset = UNSET, + from_: str | Unset = UNSET, + to: str | Unset = UNSET, + user_ids: list[int] | Unset = UNSET, + schedule_ids: list[str] | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ErrorsList | ShiftList | None: """List shifts List shifts Args: - include (Union[Unset, ListShiftsInclude]): - from_ (Union[Unset, str]): - to (Union[Unset, str]): - user_ids (Union[Unset, list[int]]): - schedule_ids (Union[Unset, list[str]]): + include (ListShiftsInclude | Unset): + from_ (str | Unset): + to (str | Unset): + user_ids (list[int] | Unset): + schedule_ids (list[str] | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ShiftList] + ErrorsList | ShiftList """ return sync_detailed( @@ -160,35 +177,41 @@ def sync( to=to, user_ids=user_ids, schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListShiftsInclude = UNSET, - from_: Unset | str = UNSET, - to: Unset | str = UNSET, - user_ids: Unset | list[int] = UNSET, - schedule_ids: Unset | list[str] = UNSET, + include: ListShiftsInclude | Unset = UNSET, + from_: str | Unset = UNSET, + to: str | Unset = UNSET, + user_ids: list[int] | Unset = UNSET, + schedule_ids: list[str] | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[ErrorsList | ShiftList]: """List shifts List shifts Args: - include (Union[Unset, ListShiftsInclude]): - from_ (Union[Unset, str]): - to (Union[Unset, str]): - user_ids (Union[Unset, list[int]]): - schedule_ids (Union[Unset, list[str]]): + include (ListShiftsInclude | Unset): + from_ (str | Unset): + to (str | Unset): + user_ids (list[int] | Unset): + schedule_ids (list[str] | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, ShiftList]] + Response[ErrorsList | ShiftList] """ kwargs = _get_kwargs( @@ -197,6 +220,8 @@ async def asyncio_detailed( to=to, user_ids=user_ids, schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -207,29 +232,33 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListShiftsInclude = UNSET, - from_: Unset | str = UNSET, - to: Unset | str = UNSET, - user_ids: Unset | list[int] = UNSET, - schedule_ids: Unset | list[str] = UNSET, + include: ListShiftsInclude | Unset = UNSET, + from_: str | Unset = UNSET, + to: str | Unset = UNSET, + user_ids: list[int] | Unset = UNSET, + schedule_ids: list[str] | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> ErrorsList | ShiftList | None: """List shifts List shifts Args: - include (Union[Unset, ListShiftsInclude]): - from_ (Union[Unset, str]): - to (Union[Unset, str]): - user_ids (Union[Unset, list[int]]): - schedule_ids (Union[Unset, list[str]]): + include (ListShiftsInclude | Unset): + from_ (str | Unset): + to (str | Unset): + user_ids (list[int] | Unset): + schedule_ids (list[str] | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, ShiftList] + ErrorsList | ShiftList """ return ( @@ -240,5 +269,7 @@ async def asyncio( to=to, user_ids=user_ids, schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ) ).parsed diff --git a/rootly_sdk/api/sl_as/__init__.py b/rootly_sdk/api/sl_as/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/rootly_sdk/api/sl_as/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/teams/create_group_catalog_field.py b/rootly_sdk/api/sl_as/create_sla.py similarity index 68% rename from rootly_sdk/api/teams/create_group_catalog_field.py rename to rootly_sdk/api/sl_as/create_sla.py index eba97544..578b60d8 100644 --- a/rootly_sdk/api/teams/create_group_catalog_field.py +++ b/rootly_sdk/api/sl_as/create_sla.py @@ -5,21 +5,21 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField +from ...models.new_sla import NewSla +from ...models.sla_response import SlaResponse from ...types import Response def _get_kwargs( *, - body: NewCatalogField, + body: NewSla, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/teams/fields", + "url": "/v1/slas", } _kwargs["json"] = body.to_dict() @@ -32,9 +32,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> ErrorsList | SlaResponse | None: if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) + response_201 = SlaResponse.from_dict(response.json()) return response_201 @@ -56,7 +56,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,21 +68,21 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewSla, +) -> Response[ErrorsList | SlaResponse]: + """Creates an SLA - Creates a new Catalog Field from provided data + Creates a new SLA from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | SlaResponse] """ kwargs = _get_kwargs( @@ -99,21 +99,21 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewSla, +) -> ErrorsList | SlaResponse | None: + """Creates an SLA - Creates a new Catalog Field from provided data + Creates a new SLA from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | SlaResponse """ return sync_detailed( @@ -125,21 +125,21 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewSla, +) -> Response[ErrorsList | SlaResponse]: + """Creates an SLA - Creates a new Catalog Field from provided data + Creates a new SLA from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | SlaResponse] """ kwargs = _get_kwargs( @@ -154,21 +154,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewSla, +) -> ErrorsList | SlaResponse | None: + """Creates an SLA - Creates a new Catalog Field from provided data + Creates a new SLA from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | SlaResponse """ return ( diff --git a/rootly_sdk/api/catalog_fields/delete_catalog_field.py b/rootly_sdk/api/sl_as/delete_sla.py similarity index 70% rename from rootly_sdk/api/catalog_fields/delete_catalog_field.py rename to rootly_sdk/api/sl_as/delete_sla.py index f47654db..19b1e4eb 100644 --- a/rootly_sdk/api/catalog_fields/delete_catalog_field.py +++ b/rootly_sdk/api/sl_as/delete_sla.py @@ -1,22 +1,25 @@ from http import HTTPStatus from typing import Any -from uuid import UUID +from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse from ...models.errors_list import ErrorsList +from ...models.sla_response import SlaResponse from ...types import Response def _get_kwargs( - id: UUID | str, + id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/catalog_fields/{id}", + "url": "/v1/slas/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -24,9 +27,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> ErrorsList | SlaResponse | None: if response.status_code == 200: - response_200 = CatalogFieldResponse.from_dict(response.json()) + response_200 = SlaResponse.from_dict(response.json()) return response_200 @@ -43,7 +46,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -53,23 +56,23 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str, *, client: AuthenticatedClient, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Delete a catalog_field +) -> Response[ErrorsList | SlaResponse]: + """Delete an SLA - Delete a specific catalog_field by id + Delete a specific SLA by id Args: - id (Union[UUID, str]): + id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | SlaResponse] """ kwargs = _get_kwargs( @@ -84,23 +87,23 @@ def sync_detailed( def sync( - id: UUID | str, + id: str, *, client: AuthenticatedClient, -) -> CatalogFieldResponse | ErrorsList | None: - """Delete a catalog_field +) -> ErrorsList | SlaResponse | None: + """Delete an SLA - Delete a specific catalog_field by id + Delete a specific SLA by id Args: - id (Union[UUID, str]): + id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | SlaResponse """ return sync_detailed( @@ -110,23 +113,23 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str, *, client: AuthenticatedClient, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Delete a catalog_field +) -> Response[ErrorsList | SlaResponse]: + """Delete an SLA - Delete a specific catalog_field by id + Delete a specific SLA by id Args: - id (Union[UUID, str]): + id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | SlaResponse] """ kwargs = _get_kwargs( @@ -139,23 +142,23 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str, *, client: AuthenticatedClient, -) -> CatalogFieldResponse | ErrorsList | None: - """Delete a catalog_field +) -> ErrorsList | SlaResponse | None: + """Delete an SLA - Delete a specific catalog_field by id + Delete a specific SLA by id Args: - id (Union[UUID, str]): + id (str): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | SlaResponse """ return ( diff --git a/rootly_sdk/api/sl_as/get_sla.py b/rootly_sdk/api/sl_as/get_sla.py new file mode 100644 index 00000000..b2dcad6d --- /dev/null +++ b/rootly_sdk/api/sl_as/get_sla.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.sla_response import SlaResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/slas/{id}".format( + id=quote(str(id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SlaResponse | None: + if response.status_code == 200: + response_200 = SlaResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SlaResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | SlaResponse]: + """Retrieves an SLA + + Retrieves a specific SLA by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | SlaResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | SlaResponse | None: + """Retrieves an SLA + + Retrieves a specific SLA by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | SlaResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[ErrorsList | SlaResponse]: + """Retrieves an SLA + + Retrieves a specific SLA by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | SlaResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> ErrorsList | SlaResponse | None: + """Retrieves an SLA + + Retrieves a specific SLA by id + + Args: + id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | SlaResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/sl_as/list_sl_as.py b/rootly_sdk/api/sl_as/list_sl_as.py new file mode 100644 index 00000000..38524d80 --- /dev/null +++ b/rootly_sdk/api/sl_as/list_sl_as.py @@ -0,0 +1,299 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.sla_list import SlaList +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[search]"] = filtersearch + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params["sort"] = sort + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/slas", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SlaList | None: + if response.status_code == 200: + response_200 = SlaList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[SlaList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> Response[SlaList]: + """List SLAs + + List SLAs + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[SlaList] + """ + + kwargs = _get_kwargs( + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> SlaList | None: + """List SLAs + + List SLAs + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + SlaList + """ + + return sync_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> Response[SlaList]: + """List SLAs + + List SLAs + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[SlaList] + """ + + kwargs = _get_kwargs( + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, +) -> SlaList | None: + """List SLAs + + List SLAs + + Args: + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + SlaList + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_fields/update_catalog_field.py b/rootly_sdk/api/sl_as/update_sla.py similarity index 66% rename from rootly_sdk/api/catalog_fields/update_catalog_field.py rename to rootly_sdk/api/sl_as/update_sla.py index 83a5de27..f168bfc9 100644 --- a/rootly_sdk/api/catalog_fields/update_catalog_field.py +++ b/rootly_sdk/api/sl_as/update_sla.py @@ -1,27 +1,29 @@ from http import HTTPStatus from typing import Any -from uuid import UUID +from urllib.parse import quote import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse from ...models.errors_list import ErrorsList -from ...models.update_catalog_field import UpdateCatalogField +from ...models.sla_response import SlaResponse +from ...models.update_sla import UpdateSla from ...types import Response def _get_kwargs( - id: UUID | str, + id: str, *, - body: UpdateCatalogField, + body: UpdateSla, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/catalog_fields/{id}", + "url": "/v1/slas/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -34,9 +36,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> ErrorsList | SlaResponse | None: if response.status_code == 200: - response_200 = CatalogFieldResponse.from_dict(response.json()) + response_200 = SlaResponse.from_dict(response.json()) return response_200 @@ -53,7 +55,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -63,25 +65,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - body: UpdateCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Update a catalog_field + body: UpdateSla, +) -> Response[ErrorsList | SlaResponse]: + """Update an SLA - Update a specific catalog_field by id + Update a specific SLA by id Args: - id (Union[UUID, str]): - body (UpdateCatalogField): + id (str): + body (UpdateSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | SlaResponse] """ kwargs = _get_kwargs( @@ -97,25 +99,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - body: UpdateCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Update a catalog_field + body: UpdateSla, +) -> ErrorsList | SlaResponse | None: + """Update an SLA - Update a specific catalog_field by id + Update a specific SLA by id Args: - id (Union[UUID, str]): - body (UpdateCatalogField): + id (str): + body (UpdateSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | SlaResponse """ return sync_detailed( @@ -126,25 +128,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - body: UpdateCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Update a catalog_field + body: UpdateSla, +) -> Response[ErrorsList | SlaResponse]: + """Update an SLA - Update a specific catalog_field by id + Update a specific SLA by id Args: - id (Union[UUID, str]): - body (UpdateCatalogField): + id (str): + body (UpdateSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[ErrorsList | SlaResponse] """ kwargs = _get_kwargs( @@ -158,25 +160,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str, *, client: AuthenticatedClient, - body: UpdateCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Update a catalog_field + body: UpdateSla, +) -> ErrorsList | SlaResponse | None: + """Update an SLA - Update a specific catalog_field by id + Update a specific SLA by id Args: - id (Union[UUID, str]): - body (UpdateCatalogField): + id (str): + body (UpdateSla): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + ErrorsList | SlaResponse """ return ( diff --git a/rootly_sdk/api/status_page_templates/create_status_page_template.py b/rootly_sdk/api/status_page_templates/create_status_page_template.py index b2f957dc..38428024 100644 --- a/rootly_sdk/api/status_page_templates/create_status_page_template.py +++ b/rootly_sdk/api/status_page_templates/create_status_page_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/status-pages/{status_page_id}/templates", + "url": "/v1/status-pages/{status_page_id}/templates".format( + status_page_id=quote(str(status_page_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return ( diff --git a/rootly_sdk/api/status_page_templates/delete_status_page_template.py b/rootly_sdk/api/status_page_templates/delete_status_page_template.py index 161fa164..0fccfa58 100644 --- a/rootly_sdk/api/status_page_templates/delete_status_page_template.py +++ b/rootly_sdk/api/status_page_templates/delete_status_page_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/templates/{id}", + "url": "/v1/templates/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return ( diff --git a/rootly_sdk/api/status_page_templates/get_status_page_template.py b/rootly_sdk/api/status_page_templates/get_status_page_template.py index 14fdfede..cd9c534c 100644 --- a/rootly_sdk/api/status_page_templates/get_status_page_template.py +++ b/rootly_sdk/api/status_page_templates/get_status_page_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/templates/{id}", + "url": "/v1/templates/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return ( diff --git a/rootly_sdk/api/status_page_templates/list_status_page_templates.py b/rootly_sdk/api/status_page_templates/list_status_page_templates.py index e3a79d97..806aef61 100644 --- a/rootly_sdk/api/status_page_templates/list_status_page_templates.py +++ b/rootly_sdk/api/status_page_templates/list_status_page_templates.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( status_page_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/status-pages/{status_page_id}/templates", + "url": "/v1/status-pages/{status_page_id}/templates".format( + status_page_id=quote(str(status_page_id), safe=""), + ), "params": params, } @@ -62,9 +66,9 @@ def sync_detailed( status_page_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[StatusPageTemplateList]: """List status page templates @@ -72,9 +76,9 @@ def sync_detailed( Args: status_page_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,9 +106,9 @@ def sync( status_page_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> StatusPageTemplateList | None: """List status page templates @@ -112,9 +116,9 @@ def sync( Args: status_page_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,9 +141,9 @@ async def asyncio_detailed( status_page_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[StatusPageTemplateList]: """List status page templates @@ -147,9 +151,9 @@ async def asyncio_detailed( Args: status_page_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,9 +179,9 @@ async def asyncio( status_page_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> StatusPageTemplateList | None: """List status page templates @@ -185,9 +189,9 @@ async def asyncio( Args: status_page_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/status_page_templates/update_status_page_template.py b/rootly_sdk/api/status_page_templates/update_status_page_template.py index 88b755fa..e8f68a20 100644 --- a/rootly_sdk/api/status_page_templates/update_status_page_template.py +++ b/rootly_sdk/api/status_page_templates/update_status_page_template.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/templates/{id}", + "url": "/v1/templates/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageTemplateResponse]] + Response[ErrorsList | StatusPageTemplateResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageTemplateResponse] + ErrorsList | StatusPageTemplateResponse """ return ( diff --git a/rootly_sdk/api/status_pages/create_status_page.py b/rootly_sdk/api/status_pages/create_status_page.py index 9e7615a1..499bcdb8 100644 --- a/rootly_sdk/api/status_pages/create_status_page.py +++ b/rootly_sdk/api/status_pages/create_status_page.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return ( diff --git a/rootly_sdk/api/status_pages/delete_status_page.py b/rootly_sdk/api/status_pages/delete_status_page.py index ef7a14b6..fcb4150f 100644 --- a/rootly_sdk/api/status_pages/delete_status_page.py +++ b/rootly_sdk/api/status_pages/delete_status_page.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/status-pages/{id}", + "url": "/v1/status-pages/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | StatusPageResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | StatusPageResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | StatusPageResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | StatusPageResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return ( diff --git a/rootly_sdk/api/status_pages/get_status_page.py b/rootly_sdk/api/status_pages/get_status_page.py index 5f12160f..d48c36a9 100644 --- a/rootly_sdk/api/status_pages/get_status_page.py +++ b/rootly_sdk/api/status_pages/get_status_page.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/status-pages/{id}", + "url": "/v1/status-pages/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | StatusPageResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | StatusPageResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | StatusPageResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | StatusPageResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return ( diff --git a/rootly_sdk/api/status_pages/list_status_pages.py b/rootly_sdk/api/status_pages/list_status_pages.py index c1f3ceea..09701011 100644 --- a/rootly_sdk/api/status_pages/list_status_pages.py +++ b/rootly_sdk/api/status_pages/list_status_pages.py @@ -11,18 +11,19 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -82,34 +83,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[StatusPageList]: """List status pages List status pages Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -143,34 +144,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> StatusPageList | None: """List status pages List status pages Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,34 +200,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[StatusPageList]: """List status pages List status pages Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -258,34 +259,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> StatusPageList | None: """List status pages List status pages Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/status_pages/update_status_page.py b/rootly_sdk/api/status_pages/update_status_page.py index 74ebf96f..a6136c7a 100644 --- a/rootly_sdk/api/status_pages/update_status_page.py +++ b/rootly_sdk/api/status_pages/update_status_page.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateStatusPage, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/status-pages/{id}", + "url": "/v1/status-pages/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -68,7 +71,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, @@ -78,7 +81,7 @@ def sync_detailed( Update a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateStatusPage): Raises: @@ -86,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -102,7 +105,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, @@ -112,7 +115,7 @@ def sync( Update a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateStatusPage): Raises: @@ -120,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return sync_detailed( @@ -131,7 +134,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, @@ -141,7 +144,7 @@ async def asyncio_detailed( Update a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateStatusPage): Raises: @@ -149,7 +152,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusPageResponse]] + Response[ErrorsList | StatusPageResponse] """ kwargs = _get_kwargs( @@ -163,7 +166,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, @@ -173,7 +176,7 @@ async def asyncio( Update a specific status page by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateStatusPage): Raises: @@ -181,7 +184,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusPageResponse] + ErrorsList | StatusPageResponse """ return ( diff --git a/rootly_sdk/api/statuses/get_status.py b/rootly_sdk/api/statuses/get_status.py index d10a7bc7..185a8694 100644 --- a/rootly_sdk/api/statuses/get_status.py +++ b/rootly_sdk/api/statuses/get_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/statuses/{id}", + "url": "/v1/statuses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | StatusResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusResponse]] + Response[ErrorsList | StatusResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | StatusResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusResponse] + ErrorsList | StatusResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | StatusResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusResponse]] + Response[ErrorsList | StatusResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | StatusResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusResponse] + ErrorsList | StatusResponse """ return ( diff --git a/rootly_sdk/api/statuses/list_statuses.py b/rootly_sdk/api/statuses/list_statuses.py index b2f4c035..d7ddd61a 100644 --- a/rootly_sdk/api/statuses/list_statuses.py +++ b/rootly_sdk/api/statuses/list_statuses.py @@ -12,17 +12,18 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -89,39 +90,39 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[ErrorsList | StatusList]: """List Statuses List Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusList]] + Response[ErrorsList | StatusList] """ kwargs = _get_kwargs( @@ -147,39 +148,39 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> ErrorsList | StatusList | None: """List Statuses List Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusList] + ErrorsList | StatusList """ return sync_detailed( @@ -200,39 +201,39 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[ErrorsList | StatusList]: """List Statuses List Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, StatusList]] + Response[ErrorsList | StatusList] """ kwargs = _get_kwargs( @@ -256,39 +257,39 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterenabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> ErrorsList | StatusList | None: """List Statuses List Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterenabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterenabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, StatusList] + ErrorsList | StatusList """ return ( diff --git a/rootly_sdk/api/sub_statuses/create_sub_status.py b/rootly_sdk/api/sub_statuses/create_sub_status.py index f34b6c2d..47b85e50 100644 --- a/rootly_sdk/api/sub_statuses/create_sub_status.py +++ b/rootly_sdk/api/sub_statuses/create_sub_status.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return ( diff --git a/rootly_sdk/api/sub_statuses/delete_sub_status.py b/rootly_sdk/api/sub_statuses/delete_sub_status.py index 88af630e..4e323dfb 100644 --- a/rootly_sdk/api/sub_statuses/delete_sub_status.py +++ b/rootly_sdk/api/sub_statuses/delete_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/sub_statuses/{id}", + "url": "/v1/sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SubStatusResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SubStatusResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SubStatusResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SubStatusResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return ( diff --git a/rootly_sdk/api/sub_statuses/get_sub_status.py b/rootly_sdk/api/sub_statuses/get_sub_status.py index a364bb50..74ea1a88 100644 --- a/rootly_sdk/api/sub_statuses/get_sub_status.py +++ b/rootly_sdk/api/sub_statuses/get_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/sub_statuses/{id}", + "url": "/v1/sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SubStatusResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Retrieves a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SubStatusResponse | None: @@ -93,14 +97,14 @@ def sync( Retrieves a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | SubStatusResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Retrieves a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | SubStatusResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Retrieves a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return ( diff --git a/rootly_sdk/api/sub_statuses/list_sub_statuses.py b/rootly_sdk/api/sub_statuses/list_sub_statuses.py index 4bd03cdb..ecbe33ee 100644 --- a/rootly_sdk/api/sub_statuses/list_sub_statuses.py +++ b/rootly_sdk/api/sub_statuses/list_sub_statuses.py @@ -11,17 +11,18 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterparent_status: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterparent_status: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -79,32 +80,32 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterparent_status: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterparent_status: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[SubStatusList]: """List Sub-Statuses List Sub-Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterparent_status (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterparent_status (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,32 +138,32 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterparent_status: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterparent_status: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> SubStatusList | None: """List Sub-Statuses List Sub-Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterparent_status (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterparent_status (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,32 +191,32 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterparent_status: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterparent_status: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[SubStatusList]: """List Sub-Statuses List Sub-Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterparent_status (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterparent_status (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -246,32 +247,32 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterparent_status: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterparent_status: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> SubStatusList | None: """List Sub-Statuses List Sub-Statuses Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterparent_status (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterparent_status (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/sub_statuses/update_sub_status.py b/rootly_sdk/api/sub_statuses/update_sub_status.py index 684f59c8..290e2864 100644 --- a/rootly_sdk/api/sub_statuses/update_sub_status.py +++ b/rootly_sdk/api/sub_statuses/update_sub_status.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateSubStatus, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/sub_statuses/{id}", + "url": "/v1/sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSubStatus): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, @@ -107,7 +110,7 @@ def sync( Update a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSubStatus): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSubStatus): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, SubStatusResponse]] + Response[ErrorsList | SubStatusResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, @@ -168,7 +171,7 @@ async def asyncio( Update a specific Sub-Status by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateSubStatus): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, SubStatusResponse] + ErrorsList | SubStatusResponse """ return ( diff --git a/rootly_sdk/api/incident_types/create_incident_type_catalog_field.py b/rootly_sdk/api/teams/create_group_catalog_property.py similarity index 67% rename from rootly_sdk/api/incident_types/create_incident_type_catalog_field.py rename to rootly_sdk/api/teams/create_group_catalog_property.py index 99cb24c3..c3a7a4ef 100644 --- a/rootly_sdk/api/incident_types/create_incident_type_catalog_field.py +++ b/rootly_sdk/api/teams/create_group_catalog_property.py @@ -5,21 +5,21 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.catalog_field_response import CatalogFieldResponse +from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList -from ...models.new_catalog_field import NewCatalogField +from ...models.new_catalog_property import NewCatalogProperty from ...types import Response def _get_kwargs( *, - body: NewCatalogField, + body: NewCatalogProperty, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_types/fields", + "url": "/v1/teams/properties", } _kwargs["json"] = body.to_dict() @@ -32,9 +32,9 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogFieldResponse | ErrorsList | None: +) -> CatalogPropertyResponse | ErrorsList | None: if response.status_code == 201: - response_201 = CatalogFieldResponse.from_dict(response.json()) + response_201 = CatalogPropertyResponse.from_dict(response.json()) return response_201 @@ -56,7 +56,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogFieldResponse | ErrorsList]: +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,21 +68,21 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -99,21 +99,21 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return sync_detailed( @@ -125,21 +125,21 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> Response[CatalogFieldResponse | ErrorsList]: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> Response[CatalogPropertyResponse | ErrorsList]: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[CatalogFieldResponse, ErrorsList]] + Response[CatalogPropertyResponse | ErrorsList] """ kwargs = _get_kwargs( @@ -154,21 +154,21 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - body: NewCatalogField, -) -> CatalogFieldResponse | ErrorsList | None: - """Creates a Catalog Field + body: NewCatalogProperty, +) -> CatalogPropertyResponse | ErrorsList | None: + """Creates a Catalog Property - Creates a new Catalog Field from provided data + Creates a new Catalog Property from provided data Args: - body (NewCatalogField): A catalog can have a maximum of 50 fields. + body (NewCatalogProperty): A catalog can have a maximum of 50 properties. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[CatalogFieldResponse, ErrorsList] + CatalogPropertyResponse | ErrorsList """ return ( diff --git a/rootly_sdk/api/teams/create_team.py b/rootly_sdk/api/teams/create_team.py index 17bbf1b8..aa00b3db 100644 --- a/rootly_sdk/api/teams/create_team.py +++ b/rootly_sdk/api/teams/create_team.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return ( diff --git a/rootly_sdk/api/teams/delete_team.py b/rootly_sdk/api/teams/delete_team.py index c9bb64fa..bd6221ce 100644 --- a/rootly_sdk/api/teams/delete_team.py +++ b/rootly_sdk/api/teams/delete_team.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/teams/{id}", + "url": "/v1/teams/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | TeamResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | TeamResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | TeamResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | TeamResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return ( diff --git a/rootly_sdk/api/teams/get_team.py b/rootly_sdk/api/teams/get_team.py index 154624c1..3c4c049d 100644 --- a/rootly_sdk/api/teams/get_team.py +++ b/rootly_sdk/api/teams/get_team.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,13 +14,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - include: Unset | GetTeamInclude = UNSET, + include: GetTeamInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/teams/{id}", + "url": "/v1/teams/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -67,25 +71,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetTeamInclude = UNSET, + include: GetTeamInclude | Unset = UNSET, ) -> Response[ErrorsList | TeamResponse]: """Retrieves a team Retrieves a specific team by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetTeamInclude]): + id (str | UUID): + include (GetTeamInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -101,25 +105,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetTeamInclude = UNSET, + include: GetTeamInclude | Unset = UNSET, ) -> ErrorsList | TeamResponse | None: """Retrieves a team Retrieves a specific team by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetTeamInclude]): + id (str | UUID): + include (GetTeamInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return sync_detailed( @@ -130,25 +134,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetTeamInclude = UNSET, + include: GetTeamInclude | Unset = UNSET, ) -> Response[ErrorsList | TeamResponse]: """Retrieves a team Retrieves a specific team by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetTeamInclude]): + id (str | UUID): + include (GetTeamInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -162,25 +166,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetTeamInclude = UNSET, + include: GetTeamInclude | Unset = UNSET, ) -> ErrorsList | TeamResponse | None: """Retrieves a team Retrieves a specific team by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetTeamInclude]): + id (str | UUID): + include (GetTeamInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return ( diff --git a/rootly_sdk/api/teams/get_team_incidents_chart.py b/rootly_sdk/api/teams/get_team_incidents_chart.py index 46979aba..7f173bd8 100644 --- a/rootly_sdk/api/teams/get_team_incidents_chart.py +++ b/rootly_sdk/api/teams/get_team_incidents_chart.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,6 +16,7 @@ def _get_kwargs( *, period: str, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["period"] = period @@ -23,7 +25,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/teams/{id}/incidents_chart", + "url": "/v1/teams/{id}/incidents_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -79,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentsChartResponse]] + Response[ErrorsList | IncidentsChartResponse] """ kwargs = _get_kwargs( @@ -113,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentsChartResponse] + ErrorsList | IncidentsChartResponse """ return sync_detailed( @@ -142,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, IncidentsChartResponse]] + Response[ErrorsList | IncidentsChartResponse] """ kwargs = _get_kwargs( @@ -174,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, IncidentsChartResponse] + ErrorsList | IncidentsChartResponse """ return ( diff --git a/rootly_sdk/api/teams/list_group_catalog_fields.py b/rootly_sdk/api/teams/list_group_catalog_fields.py deleted file mode 100644 index 10761b45..00000000 --- a/rootly_sdk/api/teams/list_group_catalog_fields.py +++ /dev/null @@ -1,325 +0,0 @@ -from http import HTTPStatus -from typing import Any - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.catalog_field_list import CatalogFieldList -from ...models.list_group_catalog_fields_include import ( - ListGroupCatalogFieldsInclude, -) -from ...models.list_group_catalog_fields_sort import ListGroupCatalogFieldsSort -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - *, - include: Unset | ListGroupCatalogFieldsInclude = UNSET, - sort: Unset | ListGroupCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_include: Unset | str = UNSET - if not isinstance(include, Unset): - json_include = include - - params["include"] = json_include - - json_sort: Unset | str = UNSET - if not isinstance(sort, Unset): - json_sort = sort - - params["sort"] = json_sort - - params["page[number]"] = pagenumber - - params["page[size]"] = pagesize - - params["filter[slug]"] = filterslug - - params["filter[name]"] = filtername - - params["filter[kind]"] = filterkind - - params["filter[created_at][gt]"] = filtercreated_atgt - - params["filter[created_at][gte]"] = filtercreated_atgte - - params["filter[created_at][lt]"] = filtercreated_atlt - - params["filter[created_at][lte]"] = filtercreated_atlte - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/teams/fields", - "params": params, - } - - return _kwargs - - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogFieldList | None: - if response.status_code == 200: - response_200 = CatalogFieldList.from_dict(response.json()) - - return response_200 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogFieldList]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListGroupCatalogFieldsInclude = UNSET, - sort: Unset | ListGroupCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Group Catalog Fields - - Args: - include (Union[Unset, ListGroupCatalogFieldsInclude]): - sort (Union[Unset, ListGroupCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, - include: Unset | ListGroupCatalogFieldsInclude = UNSET, - sort: Unset | ListGroupCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Group Catalog Fields - - Args: - include (Union[Unset, ListGroupCatalogFieldsInclude]): - sort (Union[Unset, ListGroupCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return sync_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, - include: Unset | ListGroupCatalogFieldsInclude = UNSET, - sort: Unset | ListGroupCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> Response[CatalogFieldList]: - """List Catalog Fields - - List Group Catalog Fields - - Args: - include (Union[Unset, ListGroupCatalogFieldsInclude]): - sort (Union[Unset, ListGroupCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[CatalogFieldList] - """ - - kwargs = _get_kwargs( - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, - include: Unset | ListGroupCatalogFieldsInclude = UNSET, - sort: Unset | ListGroupCatalogFieldsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, -) -> CatalogFieldList | None: - """List Catalog Fields - - List Group Catalog Fields - - Args: - include (Union[Unset, ListGroupCatalogFieldsInclude]): - sort (Union[Unset, ListGroupCatalogFieldsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterkind (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - CatalogFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed diff --git a/rootly_sdk/api/teams/list_group_catalog_properties.py b/rootly_sdk/api/teams/list_group_catalog_properties.py new file mode 100644 index 00000000..59d899d2 --- /dev/null +++ b/rootly_sdk/api/teams/list_group_catalog_properties.py @@ -0,0 +1,328 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.catalog_property_list import CatalogPropertyList +from ...models.list_group_catalog_properties_include import ( + ListGroupCatalogPropertiesInclude, +) +from ...models.list_group_catalog_properties_sort import ( + ListGroupCatalogPropertiesSort, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + include: ListGroupCatalogPropertiesInclude | Unset = UNSET, + sort: ListGroupCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_include: str | Unset = UNSET + if not isinstance(include, Unset): + json_include = include + + params["include"] = json_include + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + params["page[number]"] = pagenumber + + params["page[size]"] = pagesize + + params["filter[slug]"] = filterslug + + params["filter[name]"] = filtername + + params["filter[kind]"] = filterkind + + params["filter[created_at][gt]"] = filtercreated_atgt + + params["filter[created_at][gte]"] = filtercreated_atgte + + params["filter[created_at][lt]"] = filtercreated_atlt + + params["filter[created_at][lte]"] = filtercreated_atlte + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/teams/properties", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogPropertyList | None: + if response.status_code == 200: + response_200 = CatalogPropertyList.from_dict(response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + include: ListGroupCatalogPropertiesInclude | Unset = UNSET, + sort: ListGroupCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Group Catalog Properties + + Args: + include (ListGroupCatalogPropertiesInclude | Unset): + sort (ListGroupCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + include: ListGroupCatalogPropertiesInclude | Unset = UNSET, + sort: ListGroupCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Group Catalog Properties + + Args: + include (ListGroupCatalogPropertiesInclude | Unset): + sort (ListGroupCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return sync_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + include: ListGroupCatalogPropertiesInclude | Unset = UNSET, + sort: ListGroupCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> Response[CatalogPropertyList]: + """List Catalog Properties + + List Group Catalog Properties + + Args: + include (ListGroupCatalogPropertiesInclude | Unset): + sort (ListGroupCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CatalogPropertyList] + """ + + kwargs = _get_kwargs( + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + include: ListGroupCatalogPropertiesInclude | Unset = UNSET, + sort: ListGroupCatalogPropertiesSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, +) -> CatalogPropertyList | None: + """List Catalog Properties + + List Group Catalog Properties + + Args: + include (ListGroupCatalogPropertiesInclude | Unset): + sort (ListGroupCatalogPropertiesSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterkind (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CatalogPropertyList + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/teams/list_teams.py b/rootly_sdk/api/teams/list_teams.py index be570bae..b0fed6ca 100644 --- a/rootly_sdk/api/teams/list_teams.py +++ b/rootly_sdk/api/teams/list_teams.py @@ -12,28 +12,29 @@ def _get_kwargs( *, - include: Unset | ListTeamsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: ListTeamsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -108,48 +109,48 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListTeamsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: ListTeamsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[TeamList]: """List teams List teams Args: - include (Union[Unset, ListTeamsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (ListTeamsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filtercolor (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -190,48 +191,48 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListTeamsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: ListTeamsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> TeamList | None: """List teams List teams Args: - include (Union[Unset, ListTeamsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (ListTeamsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filtercolor (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -267,48 +268,48 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListTeamsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: ListTeamsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[TeamList]: """List teams List teams Args: - include (Union[Unset, ListTeamsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (ListTeamsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filtercolor (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -347,48 +348,48 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListTeamsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterbackstage_id: Unset | str = UNSET, - filtercortex_id: Unset | str = UNSET, - filteropslevel_id: Unset | str = UNSET, - filterexternal_id: Unset | str = UNSET, - filtercolor: Unset | str = UNSET, - filteralert_broadcast_enabled: Unset | bool = UNSET, - filterincident_broadcast_enabled: Unset | bool = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | str = UNSET, + include: ListTeamsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filtercortex_id: str | Unset = UNSET, + filteropslevel_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtercolor: str | Unset = UNSET, + filteralert_broadcast_enabled: bool | Unset = UNSET, + filterincident_broadcast_enabled: bool | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: str | Unset = UNSET, ) -> TeamList | None: """List teams List teams Args: - include (Union[Unset, ListTeamsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): - filterbackstage_id (Union[Unset, str]): - filtercortex_id (Union[Unset, str]): - filteropslevel_id (Union[Unset, str]): - filterexternal_id (Union[Unset, str]): - filtercolor (Union[Unset, str]): - filteralert_broadcast_enabled (Union[Unset, bool]): - filterincident_broadcast_enabled (Union[Unset, bool]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, str]): + include (ListTeamsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filterslug (str | Unset): + filtername (str | Unset): + filterbackstage_id (str | Unset): + filtercortex_id (str | Unset): + filteropslevel_id (str | Unset): + filterexternal_id (str | Unset): + filtercolor (str | Unset): + filteralert_broadcast_enabled (bool | Unset): + filterincident_broadcast_enabled (bool | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/teams/update_team.py b/rootly_sdk/api/teams/update_team.py index 92f9645a..b555e950 100644 --- a/rootly_sdk/api/teams/update_team.py +++ b/rootly_sdk/api/teams/update_team.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateTeam, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/teams/{id}", + "url": "/v1/teams/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -63,7 +66,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, @@ -73,7 +76,7 @@ def sync_detailed( Update a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateTeam): Raises: @@ -81,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -97,7 +100,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, @@ -107,7 +110,7 @@ def sync( Update a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateTeam): Raises: @@ -115,7 +118,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return sync_detailed( @@ -126,7 +129,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, @@ -136,7 +139,7 @@ async def asyncio_detailed( Update a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateTeam): Raises: @@ -144,7 +147,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, TeamResponse]] + Response[ErrorsList | TeamResponse] """ kwargs = _get_kwargs( @@ -158,7 +161,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, @@ -168,7 +171,7 @@ async def asyncio( Update a specific team by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateTeam): Raises: @@ -176,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, TeamResponse] + ErrorsList | TeamResponse """ return ( diff --git a/rootly_sdk/api/user_email_addresses/create_user_email_address.py b/rootly_sdk/api/user_email_addresses/create_user_email_address.py index 6abb0a4f..74446851 100644 --- a/rootly_sdk/api/user_email_addresses/create_user_email_address.py +++ b/rootly_sdk/api/user_email_addresses/create_user_email_address.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/users/{user_id}/email_addresses", + "url": "/v1/users/{user_id}/email_addresses".format( + user_id=quote(str(user_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -90,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -124,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return sync_detailed( @@ -153,7 +156,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -185,7 +188,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return ( diff --git a/rootly_sdk/api/user_email_addresses/delete_user_email_address.py b/rootly_sdk/api/user_email_addresses/delete_user_email_address.py index b33ed180..48fb3366 100644 --- a/rootly_sdk/api/user_email_addresses/delete_user_email_address.py +++ b/rootly_sdk/api/user_email_addresses/delete_user_email_address.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/email_addresses/{id}", + "url": "/v1/email_addresses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return ( diff --git a/rootly_sdk/api/user_email_addresses/get_user_email_addresses.py b/rootly_sdk/api/user_email_addresses/get_user_email_addresses.py index 30837a61..1787502c 100644 --- a/rootly_sdk/api/user_email_addresses/get_user_email_addresses.py +++ b/rootly_sdk/api/user_email_addresses/get_user_email_addresses.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( user_id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/users/{user_id}/email_addresses", + "url": "/v1/users/{user_id}/email_addresses".format( + user_id=quote(str(user_id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressList]] + Response[ErrorsList | UserEmailAddressList] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressList] + ErrorsList | UserEmailAddressList """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressList]] + Response[ErrorsList | UserEmailAddressList] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressList] + ErrorsList | UserEmailAddressList """ return ( diff --git a/rootly_sdk/api/user_email_addresses/resend_user_email_address_verification.py b/rootly_sdk/api/user_email_addresses/resend_user_email_address_verification.py index b7d03cf9..f2cffd4b 100644 --- a/rootly_sdk/api/user_email_addresses/resend_user_email_address_verification.py +++ b/rootly_sdk/api/user_email_addresses/resend_user_email_address_verification.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/email_addresses/{id}/resend_verification", + "url": "/v1/email_addresses/{id}/resend_verification".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return ( diff --git a/rootly_sdk/api/user_email_addresses/show_user_email_address.py b/rootly_sdk/api/user_email_addresses/show_user_email_address.py index f350ab94..7d07adf5 100644 --- a/rootly_sdk/api/user_email_addresses/show_user_email_address.py +++ b/rootly_sdk/api/user_email_addresses/show_user_email_address.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/email_addresses/{id}", + "url": "/v1/email_addresses/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return ( diff --git a/rootly_sdk/api/user_email_addresses/update_user_email_address.py b/rootly_sdk/api/user_email_addresses/update_user_email_address.py index e2af7b2c..2c5e414d 100644 --- a/rootly_sdk/api/user_email_addresses/update_user_email_address.py +++ b/rootly_sdk/api/user_email_addresses/update_user_email_address.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/email_addresses/{id}", + "url": "/v1/email_addresses/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -90,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -124,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return sync_detailed( @@ -153,7 +156,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -185,7 +188,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return ( diff --git a/rootly_sdk/api/user_email_addresses/verify_user_email_address.py b/rootly_sdk/api/user_email_addresses/verify_user_email_address.py index 92667c75..87d89043 100644 --- a/rootly_sdk/api/user_email_addresses/verify_user_email_address.py +++ b/rootly_sdk/api/user_email_addresses/verify_user_email_address.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -15,6 +16,7 @@ def _get_kwargs( *, token: str, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["token"] = token @@ -23,7 +25,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/email_addresses/{id}/verify", + "url": "/v1/email_addresses/{id}/verify".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -84,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -118,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return sync_detailed( @@ -147,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserEmailAddressResponse]] + Response[ErrorsList | UserEmailAddressResponse] """ kwargs = _get_kwargs( @@ -179,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserEmailAddressResponse] + ErrorsList | UserEmailAddressResponse """ return ( diff --git a/rootly_sdk/api/user_notification_rules/create_user_notification_rule.py b/rootly_sdk/api/user_notification_rules/create_user_notification_rule.py index d1400b94..38aa6b53 100644 --- a/rootly_sdk/api/user_notification_rules/create_user_notification_rule.py +++ b/rootly_sdk/api/user_notification_rules/create_user_notification_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/users/{user_id}/notification_rules", + "url": "/v1/users/{user_id}/notification_rules".format( + user_id=quote(str(user_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return ( diff --git a/rootly_sdk/api/user_notification_rules/delete_user_notification_rule.py b/rootly_sdk/api/user_notification_rules/delete_user_notification_rule.py index 8e6643d7..45a0a726 100644 --- a/rootly_sdk/api/user_notification_rules/delete_user_notification_rule.py +++ b/rootly_sdk/api/user_notification_rules/delete_user_notification_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/notification_rules/{id}", + "url": "/v1/notification_rules/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return ( diff --git a/rootly_sdk/api/user_notification_rules/get_user_notification_rule.py b/rootly_sdk/api/user_notification_rules/get_user_notification_rule.py index 3951c128..1c214c69 100644 --- a/rootly_sdk/api/user_notification_rules/get_user_notification_rule.py +++ b/rootly_sdk/api/user_notification_rules/get_user_notification_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/notification_rules/{id}", + "url": "/v1/notification_rules/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return ( diff --git a/rootly_sdk/api/user_notification_rules/list_user_notification_rules.py b/rootly_sdk/api/user_notification_rules/list_user_notification_rules.py index 15115e91..839b2ca9 100644 --- a/rootly_sdk/api/user_notification_rules/list_user_notification_rules.py +++ b/rootly_sdk/api/user_notification_rules/list_user_notification_rules.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,11 +13,12 @@ def _get_kwargs( user_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -31,7 +33,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/users/{user_id}/notification_rules", + "url": "/v1/users/{user_id}/notification_rules".format( + user_id=quote(str(user_id), safe=""), + ), "params": params, } @@ -67,10 +71,10 @@ def sync_detailed( user_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[UserNotificationRuleList]: """List user notification rules @@ -78,10 +82,10 @@ def sync_detailed( Args: user_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -110,10 +114,10 @@ def sync( user_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> UserNotificationRuleList | None: """List user notification rules @@ -121,10 +125,10 @@ def sync( Args: user_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,10 +152,10 @@ async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> Response[UserNotificationRuleList]: """List user notification rules @@ -159,10 +163,10 @@ async def asyncio_detailed( Args: user_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,10 +193,10 @@ async def asyncio( user_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - sort: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + sort: str | Unset = UNSET, ) -> UserNotificationRuleList | None: """List user notification rules @@ -200,10 +204,10 @@ async def asyncio( Args: user_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - sort (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + sort (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/user_notification_rules/update_user_notification_rule.py b/rootly_sdk/api/user_notification_rules/update_user_notification_rule.py index 267b399d..39e99b2b 100644 --- a/rootly_sdk/api/user_notification_rules/update_user_notification_rule.py +++ b/rootly_sdk/api/user_notification_rules/update_user_notification_rule.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/notification_rules/{id}", + "url": "/v1/notification_rules/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserNotificationRuleResponse]] + Response[ErrorsList | UserNotificationRuleResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserNotificationRuleResponse] + ErrorsList | UserNotificationRuleResponse """ return ( diff --git a/rootly_sdk/api/user_phone_numbers/create_user_phone_number.py b/rootly_sdk/api/user_phone_numbers/create_user_phone_number.py index 8064bd89..4e6fc622 100644 --- a/rootly_sdk/api/user_phone_numbers/create_user_phone_number.py +++ b/rootly_sdk/api/user_phone_numbers/create_user_phone_number.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/users/{user_id}/phone_numbers", + "url": "/v1/users/{user_id}/phone_numbers".format( + user_id=quote(str(user_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -90,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -124,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return sync_detailed( @@ -153,7 +156,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -185,7 +188,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return ( diff --git a/rootly_sdk/api/user_phone_numbers/delete_user_phone_number.py b/rootly_sdk/api/user_phone_numbers/delete_user_phone_number.py index a0afefd8..0b556c98 100644 --- a/rootly_sdk/api/user_phone_numbers/delete_user_phone_number.py +++ b/rootly_sdk/api/user_phone_numbers/delete_user_phone_number.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/phone_numbers/{id}", + "url": "/v1/phone_numbers/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -78,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -109,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return sync_detailed( @@ -135,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return ( diff --git a/rootly_sdk/api/user_phone_numbers/get_user_phone_numbers.py b/rootly_sdk/api/user_phone_numbers/get_user_phone_numbers.py index b31cba8f..7e8d2f71 100644 --- a/rootly_sdk/api/user_phone_numbers/get_user_phone_numbers.py +++ b/rootly_sdk/api/user_phone_numbers/get_user_phone_numbers.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( user_id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/users/{user_id}/phone_numbers", + "url": "/v1/users/{user_id}/phone_numbers".format( + user_id=quote(str(user_id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberList]] + Response[ErrorsList | UserPhoneNumberList] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberList] + ErrorsList | UserPhoneNumberList """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberList]] + Response[ErrorsList | UserPhoneNumberList] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberList] + ErrorsList | UserPhoneNumberList """ return ( diff --git a/rootly_sdk/api/user_phone_numbers/show_user_phone_number.py b/rootly_sdk/api/user_phone_numbers/show_user_phone_number.py index 462a38b1..6cfafbed 100644 --- a/rootly_sdk/api/user_phone_numbers/show_user_phone_number.py +++ b/rootly_sdk/api/user_phone_numbers/show_user_phone_number.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/phone_numbers/{id}", + "url": "/v1/phone_numbers/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -73,7 +77,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -104,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return sync_detailed( @@ -130,7 +134,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -159,7 +163,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return ( diff --git a/rootly_sdk/api/user_phone_numbers/update_user_phone_number.py b/rootly_sdk/api/user_phone_numbers/update_user_phone_number.py index 5fc8306a..6dcffd23 100644 --- a/rootly_sdk/api/user_phone_numbers/update_user_phone_number.py +++ b/rootly_sdk/api/user_phone_numbers/update_user_phone_number.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/phone_numbers/{id}", + "url": "/v1/phone_numbers/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -90,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -124,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return sync_detailed( @@ -153,7 +156,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserPhoneNumberResponse]] + Response[ErrorsList | UserPhoneNumberResponse] """ kwargs = _get_kwargs( @@ -185,7 +188,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserPhoneNumberResponse] + ErrorsList | UserPhoneNumberResponse """ return ( diff --git a/rootly_sdk/api/users/delete_user.py b/rootly_sdk/api/users/delete_user.py index 3aaeadb4..e0be4b19 100644 --- a/rootly_sdk/api/users/delete_user.py +++ b/rootly_sdk/api/users/delete_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/users/{id}", + "url": "/v1/users/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return ( diff --git a/rootly_sdk/api/users/get_current_user.py b/rootly_sdk/api/users/get_current_user.py index 2a264abd..054c8451 100644 --- a/rootly_sdk/api/users/get_current_user.py +++ b/rootly_sdk/api/users/get_current_user.py @@ -11,6 +11,7 @@ def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/users/me", @@ -62,7 +63,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs() @@ -87,7 +88,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return sync_detailed( @@ -108,7 +109,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs() @@ -131,7 +132,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return ( diff --git a/rootly_sdk/api/users/get_user.py b/rootly_sdk/api/users/get_user.py index b07da7fd..7000acf4 100644 --- a/rootly_sdk/api/users/get_user.py +++ b/rootly_sdk/api/users/get_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -14,11 +15,12 @@ def _get_kwargs( id: str, *, - include: Unset | GetUserInclude = UNSET, + include: GetUserInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/users/{id}", + "url": "/v1/users/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -69,7 +73,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetUserInclude = UNSET, + include: GetUserInclude | Unset = UNSET, ) -> Response[ErrorsList | UserResponse]: """Retrieves an user @@ -77,14 +81,14 @@ def sync_detailed( Args: id (str): - include (Union[Unset, GetUserInclude]): + include (GetUserInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs( @@ -103,7 +107,7 @@ def sync( id: str, *, client: AuthenticatedClient, - include: Unset | GetUserInclude = UNSET, + include: GetUserInclude | Unset = UNSET, ) -> ErrorsList | UserResponse | None: """Retrieves an user @@ -111,14 +115,14 @@ def sync( Args: id (str): - include (Union[Unset, GetUserInclude]): + include (GetUserInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return sync_detailed( @@ -132,7 +136,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - include: Unset | GetUserInclude = UNSET, + include: GetUserInclude | Unset = UNSET, ) -> Response[ErrorsList | UserResponse]: """Retrieves an user @@ -140,14 +144,14 @@ async def asyncio_detailed( Args: id (str): - include (Union[Unset, GetUserInclude]): + include (GetUserInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs( @@ -164,7 +168,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - include: Unset | GetUserInclude = UNSET, + include: GetUserInclude | Unset = UNSET, ) -> ErrorsList | UserResponse | None: """Retrieves an user @@ -172,14 +176,14 @@ async def asyncio( Args: id (str): - include (Union[Unset, GetUserInclude]): + include (GetUserInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return ( diff --git a/rootly_sdk/api/users/list_users.py b/rootly_sdk/api/users/list_users.py index 0c8ec7b0..7ef32a0b 100644 --- a/rootly_sdk/api/users/list_users.py +++ b/rootly_sdk/api/users/list_users.py @@ -14,17 +14,18 @@ def _get_kwargs( *, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filteremail: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | ListUsersSort = UNSET, - include: Unset | ListUsersInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filteremail: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: ListUsersSort | Unset = UNSET, + include: ListUsersInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["page[number]"] = pagenumber @@ -43,13 +44,13 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort params["sort"] = json_sort - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -97,39 +98,39 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filteremail: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | ListUsersSort = UNSET, - include: Unset | ListUsersInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filteremail: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: ListUsersSort | Unset = UNSET, + include: ListUsersInclude | Unset = UNSET, ) -> Response[ErrorsList | UserList]: """List users List users Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filteremail (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, ListUsersSort]): - include (Union[Unset, ListUsersInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filteremail (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (ListUsersSort | Unset): + include (ListUsersInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserList]] + Response[ErrorsList | UserList] """ kwargs = _get_kwargs( @@ -155,39 +156,39 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filteremail: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | ListUsersSort = UNSET, - include: Unset | ListUsersInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filteremail: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: ListUsersSort | Unset = UNSET, + include: ListUsersInclude | Unset = UNSET, ) -> ErrorsList | UserList | None: """List users List users Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filteremail (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, ListUsersSort]): - include (Union[Unset, ListUsersInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filteremail (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (ListUsersSort | Unset): + include (ListUsersInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserList] + ErrorsList | UserList """ return sync_detailed( @@ -208,39 +209,39 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filteremail: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | ListUsersSort = UNSET, - include: Unset | ListUsersInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filteremail: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: ListUsersSort | Unset = UNSET, + include: ListUsersInclude | Unset = UNSET, ) -> Response[ErrorsList | UserList]: """List users List users Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filteremail (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, ListUsersSort]): - include (Union[Unset, ListUsersInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filteremail (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (ListUsersSort | Unset): + include (ListUsersInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserList]] + Response[ErrorsList | UserList] """ kwargs = _get_kwargs( @@ -264,39 +265,39 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filteremail: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, - sort: Unset | ListUsersSort = UNSET, - include: Unset | ListUsersInclude = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filteremail: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + sort: ListUsersSort | Unset = UNSET, + include: ListUsersInclude | Unset = UNSET, ) -> ErrorsList | UserList | None: """List users List users Args: - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filteremail (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): - sort (Union[Unset, ListUsersSort]): - include (Union[Unset, ListUsersInclude]): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filteremail (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): + sort (ListUsersSort | Unset): + include (ListUsersInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserList] + ErrorsList | UserList """ return ( diff --git a/rootly_sdk/api/users/update_user.py b/rootly_sdk/api/users/update_user.py index c02f9635..40ac5b44 100644 --- a/rootly_sdk/api/users/update_user.py +++ b/rootly_sdk/api/users/update_user.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -8,22 +9,25 @@ from ...models.errors_list import ErrorsList from ...models.update_user import UpdateUser from ...models.user_response import UserResponse -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( id: str, *, - body: UpdateUser, + body: UpdateUser | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/users/{id}", + "url": "/v1/users/{id}".format( + id=quote(str(id), safe=""), + ), } - _kwargs["json"] = body.to_dict() + if not isinstance(body, Unset): + _kwargs["json"] = body.to_dict() headers["Content-Type"] = "application/vnd.api+json" @@ -65,7 +69,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateUser, + body: UpdateUser | Unset = UNSET, ) -> Response[ErrorsList | UserResponse]: """Update a user @@ -73,14 +77,14 @@ def sync_detailed( Args: id (str): - body (UpdateUser): + body (UpdateUser | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( id: str, *, client: AuthenticatedClient, - body: UpdateUser, + body: UpdateUser | Unset = UNSET, ) -> ErrorsList | UserResponse | None: """Update a user @@ -107,14 +111,14 @@ def sync( Args: id (str): - body (UpdateUser): + body (UpdateUser | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return sync_detailed( @@ -128,7 +132,7 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - body: UpdateUser, + body: UpdateUser | Unset = UNSET, ) -> Response[ErrorsList | UserResponse]: """Update a user @@ -136,14 +140,14 @@ async def asyncio_detailed( Args: id (str): - body (UpdateUser): + body (UpdateUser | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, UserResponse]] + Response[ErrorsList | UserResponse] """ kwargs = _get_kwargs( @@ -160,7 +164,7 @@ async def asyncio( id: str, *, client: AuthenticatedClient, - body: UpdateUser, + body: UpdateUser | Unset = UNSET, ) -> ErrorsList | UserResponse | None: """Update a user @@ -168,14 +172,14 @@ async def asyncio( Args: id (str): - body (UpdateUser): + body (UpdateUser | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, UserResponse] + ErrorsList | UserResponse """ return ( diff --git a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py index 668768b5..4e61f403 100644 --- a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,9 +13,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/webhooks/deliveries/{id}/deliver", + "url": "/v1/webhooks/deliveries/{id}/deliver".format( + id=quote(str(id), safe=""), + ), } return _kwargs diff --git a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py index f2dd25c1..6bcff9b9 100644 --- a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/webhooks/deliveries/{id}", + "url": "/v1/webhooks/deliveries/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksDeliveryResponse]] + Response[ErrorsList | WebhooksDeliveryResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksDeliveryResponse] + ErrorsList | WebhooksDeliveryResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksDeliveryResponse]] + Response[ErrorsList | WebhooksDeliveryResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksDeliveryResponse] + ErrorsList | WebhooksDeliveryResponse """ return ( diff --git a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py index 3397af9e..a333135e 100644 --- a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py +++ b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( endpoint_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/webhooks/endpoints/{endpoint_id}/deliveries", + "url": "/v1/webhooks/endpoints/{endpoint_id}/deliveries".format( + endpoint_id=quote(str(endpoint_id), safe=""), + ), "params": params, } @@ -62,9 +66,9 @@ def sync_detailed( endpoint_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[WebhooksDeliveryList]: """List webhook deliveries @@ -72,9 +76,9 @@ def sync_detailed( Args: endpoint_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -102,9 +106,9 @@ def sync( endpoint_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> WebhooksDeliveryList | None: """List webhook deliveries @@ -112,9 +116,9 @@ def sync( Args: endpoint_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -137,9 +141,9 @@ async def asyncio_detailed( endpoint_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[WebhooksDeliveryList]: """List webhook deliveries @@ -147,9 +151,9 @@ async def asyncio_detailed( Args: endpoint_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,9 +179,9 @@ async def asyncio( endpoint_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> WebhooksDeliveryList | None: """List webhook deliveries @@ -185,9 +189,9 @@ async def asyncio( Args: endpoint_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py index a17df666..cbe5aec3 100644 --- a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return ( diff --git a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py index 05ed1579..080d170b 100644 --- a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/webhooks/endpoints/{id}", + "url": "/v1/webhooks/endpoints/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return ( diff --git a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py index 9030cf93..548a6545 100644 --- a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/webhooks/endpoints/{id}", + "url": "/v1/webhooks/endpoints/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return ( diff --git a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py index b3665ca8..6db925f4 100644 --- a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py +++ b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py @@ -11,12 +11,13 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -66,22 +67,22 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, ) -> Response[WebhooksEndpointList]: """List webhook endpoints List webhook endpoints Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -109,22 +110,22 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, ) -> WebhooksEndpointList | None: """List webhook endpoints List webhook endpoints Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,22 +148,22 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, ) -> Response[WebhooksEndpointList]: """List webhook endpoints List webhook endpoints Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -188,22 +189,22 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filterslug: Unset | str = UNSET, - filtername: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtername: str | Unset = UNSET, ) -> WebhooksEndpointList | None: """List webhook endpoints List webhook endpoints Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filterslug (Union[Unset, str]): - filtername (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filterslug (str | Unset): + filtername (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py index daeca8b2..e1d1f110 100644 --- a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/webhooks/endpoints/{id}", + "url": "/v1/webhooks/endpoints/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WebhooksEndpointResponse]] + Response[ErrorsList | WebhooksEndpointResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WebhooksEndpointResponse] + ErrorsList | WebhooksEndpointResponse """ return ( diff --git a/rootly_sdk/api/workflow_form_field_conditions/create_workflow_form_field_condition.py b/rootly_sdk/api/workflow_form_field_conditions/create_workflow_form_field_condition.py index 67824afb..66473fdd 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/create_workflow_form_field_condition.py +++ b/rootly_sdk/api/workflow_form_field_conditions/create_workflow_form_field_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/workflows/{workflow_id}/form_field_conditions", + "url": "/v1/workflows/{workflow_id}/form_field_conditions".format( + workflow_id=quote(str(workflow_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return ( diff --git a/rootly_sdk/api/workflow_form_field_conditions/delete_workflow_form_field_condition.py b/rootly_sdk/api/workflow_form_field_conditions/delete_workflow_form_field_condition.py index d8a84656..c0bdb34a 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/delete_workflow_form_field_condition.py +++ b/rootly_sdk/api/workflow_form_field_conditions/delete_workflow_form_field_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/workflow_form_field_conditions/{id}", + "url": "/v1/workflow_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return ( diff --git a/rootly_sdk/api/workflow_form_field_conditions/get_workflow_form_field_condition.py b/rootly_sdk/api/workflow_form_field_conditions/get_workflow_form_field_condition.py index a5e5f940..9e3dbac4 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/get_workflow_form_field_condition.py +++ b/rootly_sdk/api/workflow_form_field_conditions/get_workflow_form_field_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflow_form_field_conditions/{id}", + "url": "/v1/workflow_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return ( diff --git a/rootly_sdk/api/workflow_form_field_conditions/list_workflow_form_field_conditions.py b/rootly_sdk/api/workflow_form_field_conditions/list_workflow_form_field_conditions.py index 9b10918e..2bca4f9a 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/list_workflow_form_field_conditions.py +++ b/rootly_sdk/api/workflow_form_field_conditions/list_workflow_form_field_conditions.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,10 +13,11 @@ def _get_kwargs( workflow_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -28,7 +30,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/form_field_conditions", + "url": "/v1/workflows/{workflow_id}/form_field_conditions".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } @@ -64,9 +68,9 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[WorkflowFormFieldConditionList]: """List workflow form field conditions @@ -74,9 +78,9 @@ def sync_detailed( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -104,9 +108,9 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> WorkflowFormFieldConditionList | None: """List workflow form field conditions @@ -114,9 +118,9 @@ def sync( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -139,9 +143,9 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> Response[WorkflowFormFieldConditionList]: """List workflow form field conditions @@ -149,9 +153,9 @@ async def asyncio_detailed( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -177,9 +181,9 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, ) -> WorkflowFormFieldConditionList | None: """List workflow form field conditions @@ -187,9 +191,9 @@ async def asyncio( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/workflow_form_field_conditions/update_workflow_form_field_condition.py b/rootly_sdk/api/workflow_form_field_conditions/update_workflow_form_field_condition.py index 2f52843c..0ba30270 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/update_workflow_form_field_condition.py +++ b/rootly_sdk/api/workflow_form_field_conditions/update_workflow_form_field_condition.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/workflow_form_field_conditions/{id}", + "url": "/v1/workflow_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowFormFieldConditionResponse]] + Response[ErrorsList | WorkflowFormFieldConditionResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowFormFieldConditionResponse] + ErrorsList | WorkflowFormFieldConditionResponse """ return ( diff --git a/rootly_sdk/api/workflow_groups/create_workflow_group.py b/rootly_sdk/api/workflow_groups/create_workflow_group.py index 75cea8c3..33784b56 100644 --- a/rootly_sdk/api/workflow_groups/create_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/create_workflow_group.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return ( diff --git a/rootly_sdk/api/workflow_groups/delete_workflow_group.py b/rootly_sdk/api/workflow_groups/delete_workflow_group.py index 8537c97c..46a16891 100644 --- a/rootly_sdk/api/workflow_groups/delete_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/delete_workflow_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/workflow_groups/{id}", + "url": "/v1/workflow_groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return ( diff --git a/rootly_sdk/api/workflow_groups/get_workflow_group.py b/rootly_sdk/api/workflow_groups/get_workflow_group.py index ef87b467..2484f46b 100644 --- a/rootly_sdk/api/workflow_groups/get_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/get_workflow_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflow_groups/{id}", + "url": "/v1/workflow_groups/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return ( diff --git a/rootly_sdk/api/workflow_groups/list_workflow_groups.py b/rootly_sdk/api/workflow_groups/list_workflow_groups.py index 26a08737..4a20aac8 100644 --- a/rootly_sdk/api/workflow_groups/list_workflow_groups.py +++ b/rootly_sdk/api/workflow_groups/list_workflow_groups.py @@ -11,16 +11,17 @@ def _get_kwargs( *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterexpanded: Unset | bool = UNSET, - filterposition: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterexpanded: bool | Unset = UNSET, + filterposition: int | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -76,30 +77,30 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterexpanded: Unset | bool = UNSET, - filterposition: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterexpanded: bool | Unset = UNSET, + filterposition: int | Unset = UNSET, ) -> Response[WorkflowGroupList]: """List workflow groups List workflow groups Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterexpanded (Union[Unset, bool]): - filterposition (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterkind (str | Unset): + filterexpanded (bool | Unset): + filterposition (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,30 +132,30 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterexpanded: Unset | bool = UNSET, - filterposition: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterexpanded: bool | Unset = UNSET, + filterposition: int | Unset = UNSET, ) -> WorkflowGroupList | None: """List workflow groups List workflow groups Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterexpanded (Union[Unset, bool]): - filterposition (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterkind (str | Unset): + filterexpanded (bool | Unset): + filterposition (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -181,30 +182,30 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterexpanded: Unset | bool = UNSET, - filterposition: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterexpanded: bool | Unset = UNSET, + filterposition: int | Unset = UNSET, ) -> Response[WorkflowGroupList]: """List workflow groups List workflow groups Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterexpanded (Union[Unset, bool]): - filterposition (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterkind (str | Unset): + filterexpanded (bool | Unset): + filterposition (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -234,30 +235,30 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filterkind: Unset | str = UNSET, - filterexpanded: Unset | bool = UNSET, - filterposition: Unset | int = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filterkind: str | Unset = UNSET, + filterexpanded: bool | Unset = UNSET, + filterposition: int | Unset = UNSET, ) -> WorkflowGroupList | None: """List workflow groups List workflow groups Args: - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filterkind (Union[Unset, str]): - filterexpanded (Union[Unset, bool]): - filterposition (Union[Unset, int]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filterkind (str | Unset): + filterexpanded (bool | Unset): + filterposition (int | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/workflow_groups/update_workflow_group.py b/rootly_sdk/api/workflow_groups/update_workflow_group.py index 2338e429..f1922d9a 100644 --- a/rootly_sdk/api/workflow_groups/update_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/update_workflow_group.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/workflow_groups/{id}", + "url": "/v1/workflow_groups/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowGroupResponse]] + Response[ErrorsList | WorkflowGroupResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowGroupResponse] + ErrorsList | WorkflowGroupResponse """ return ( diff --git a/rootly_sdk/api/workflow_runs/create_workflow_run.py b/rootly_sdk/api/workflow_runs/create_workflow_run.py index 8876080e..70d53a0f 100644 --- a/rootly_sdk/api/workflow_runs/create_workflow_run.py +++ b/rootly_sdk/api/workflow_runs/create_workflow_run.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/workflows/{workflow_id}/workflow_runs", + "url": "/v1/workflows/{workflow_id}/workflow_runs".format( + workflow_id=quote(str(workflow_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -85,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowRunResponse]] + Response[ErrorsList | WorkflowRunResponse] """ kwargs = _get_kwargs( @@ -119,7 +122,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowRunResponse] + ErrorsList | WorkflowRunResponse """ return sync_detailed( @@ -148,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowRunResponse]] + Response[ErrorsList | WorkflowRunResponse] """ kwargs = _get_kwargs( @@ -180,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowRunResponse] + ErrorsList | WorkflowRunResponse """ return ( diff --git a/rootly_sdk/api/workflow_runs/list_workflow_runs.py b/rootly_sdk/api/workflow_runs/list_workflow_runs.py index 4c1bf17f..236adc68 100644 --- a/rootly_sdk/api/workflow_runs/list_workflow_runs.py +++ b/rootly_sdk/api/workflow_runs/list_workflow_runs.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,17 +14,18 @@ def _get_kwargs( workflow_id: str, *, - include: Unset | ListWorkflowRunsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowRunsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -45,7 +47,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/workflow_runs", + "url": "/v1/workflows/{workflow_id}/workflow_runs".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } @@ -77,13 +81,13 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | ListWorkflowRunsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowRunsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[WorkflowRunsList]: """List workflow runs @@ -91,13 +95,13 @@ def sync_detailed( Args: workflow_id (str): - include (Union[Unset, ListWorkflowRunsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowRunsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,13 +133,13 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | ListWorkflowRunsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowRunsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> WorkflowRunsList | None: """List workflow runs @@ -143,13 +147,13 @@ def sync( Args: workflow_id (str): - include (Union[Unset, ListWorkflowRunsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowRunsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -176,13 +180,13 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | ListWorkflowRunsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowRunsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[WorkflowRunsList]: """List workflow runs @@ -190,13 +194,13 @@ async def asyncio_detailed( Args: workflow_id (str): - include (Union[Unset, ListWorkflowRunsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowRunsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -226,13 +230,13 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | ListWorkflowRunsInclude = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowRunsInclude | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> WorkflowRunsList | None: """List workflow runs @@ -240,13 +244,13 @@ async def asyncio( Args: workflow_id (str): - include (Union[Unset, ListWorkflowRunsInclude]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowRunsInclude | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/workflow_tasks/create_workflow_task.py b/rootly_sdk/api/workflow_tasks/create_workflow_task.py index 6a5588e5..cc51608f 100644 --- a/rootly_sdk/api/workflow_tasks/create_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/create_workflow_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/workflows/{workflow_id}/workflow_tasks", + "url": "/v1/workflows/{workflow_id}/workflow_tasks".format( + workflow_id=quote(str(workflow_id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return ( diff --git a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py index b5db52c2..5c119fa1 100644 --- a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/workflow_tasks/{id}", + "url": "/v1/workflow_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return ( diff --git a/rootly_sdk/api/workflow_tasks/get_workflow_task.py b/rootly_sdk/api/workflow_tasks/get_workflow_task.py index 1e2d3735..d2ceba25 100644 --- a/rootly_sdk/api/workflow_tasks/get_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/get_workflow_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -13,9 +14,12 @@ def _get_kwargs( id: str, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflow_tasks/{id}", + "url": "/v1/workflow_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -99,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return sync_detailed( @@ -125,7 +129,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -154,7 +158,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return ( diff --git a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py index 3793e18d..dad27df0 100644 --- a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py +++ b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -12,13 +13,14 @@ def _get_kwargs( workflow_id: str, *, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} params["include"] = include @@ -37,7 +39,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/workflow_tasks", + "url": "/v1/workflows/{workflow_id}/workflow_tasks".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } @@ -69,12 +73,12 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, ) -> Response[WorkflowTaskList]: """List workflow tasks @@ -82,12 +86,12 @@ def sync_detailed( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,12 +122,12 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, ) -> WorkflowTaskList | None: """List workflow tasks @@ -131,12 +135,12 @@ def sync( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -162,12 +166,12 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, ) -> Response[WorkflowTaskList]: """List workflow tasks @@ -175,12 +179,12 @@ async def asyncio_detailed( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -209,12 +213,12 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, - include: Unset | str = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, ) -> WorkflowTaskList | None: """List workflow tasks @@ -222,12 +226,12 @@ async def asyncio( Args: workflow_id (str): - include (Union[Unset, str]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): + include (str | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/workflow_tasks/update_workflow_task.py b/rootly_sdk/api/workflow_tasks/update_workflow_task.py index 51e59bd2..3b045b86 100644 --- a/rootly_sdk/api/workflow_tasks/update_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/update_workflow_task.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote import httpx @@ -20,7 +21,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/workflow_tasks/{id}", + "url": "/v1/workflow_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -80,7 +83,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -114,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return sync_detailed( @@ -143,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowTaskResponse]] + Response[ErrorsList | WorkflowTaskResponse] """ kwargs = _get_kwargs( @@ -175,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowTaskResponse] + ErrorsList | WorkflowTaskResponse """ return ( diff --git a/rootly_sdk/api/workflows/create_workflow.py b/rootly_sdk/api/workflows/create_workflow.py index df1267c7..2db8a745 100644 --- a/rootly_sdk/api/workflows/create_workflow.py +++ b/rootly_sdk/api/workflows/create_workflow.py @@ -82,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -113,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return sync_detailed( @@ -139,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -168,7 +168,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return ( diff --git a/rootly_sdk/api/workflows/delete_workflow.py b/rootly_sdk/api/workflows/delete_workflow.py index 88b7e2a2..c407da66 100644 --- a/rootly_sdk/api/workflows/delete_workflow.py +++ b/rootly_sdk/api/workflows/delete_workflow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -12,11 +13,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, ) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/workflows/{id}", + "url": "/v1/workflows/{id}".format( + id=quote(str(id), safe=""), + ), } return _kwargs @@ -53,7 +57,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | WorkflowResponse]: @@ -62,14 +66,14 @@ def sync_detailed( Delete a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -84,7 +88,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | WorkflowResponse | None: @@ -93,14 +97,14 @@ def sync( Delete a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return sync_detailed( @@ -110,7 +114,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> Response[ErrorsList | WorkflowResponse]: @@ -119,14 +123,14 @@ async def asyncio_detailed( Delete a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -139,7 +143,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, ) -> ErrorsList | WorkflowResponse | None: @@ -148,14 +152,14 @@ async def asyncio( Delete a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return ( diff --git a/rootly_sdk/api/workflows/get_workflow.py b/rootly_sdk/api/workflows/get_workflow.py index 87dfb81a..905edf81 100644 --- a/rootly_sdk/api/workflows/get_workflow.py +++ b/rootly_sdk/api/workflows/get_workflow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,13 +14,14 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, - include: Unset | GetWorkflowInclude = UNSET, + include: GetWorkflowInclude | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include @@ -29,7 +31,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{id}", + "url": "/v1/workflows/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } @@ -67,25 +71,25 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetWorkflowInclude = UNSET, + include: GetWorkflowInclude | Unset = UNSET, ) -> Response[ErrorsList | WorkflowResponse]: """Retrieves a workflow Retrieves a specific workflow by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetWorkflowInclude]): + id (str | UUID): + include (GetWorkflowInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -101,25 +105,25 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetWorkflowInclude = UNSET, + include: GetWorkflowInclude | Unset = UNSET, ) -> ErrorsList | WorkflowResponse | None: """Retrieves a workflow Retrieves a specific workflow by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetWorkflowInclude]): + id (str | UUID): + include (GetWorkflowInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return sync_detailed( @@ -130,25 +134,25 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetWorkflowInclude = UNSET, + include: GetWorkflowInclude | Unset = UNSET, ) -> Response[ErrorsList | WorkflowResponse]: """Retrieves a workflow Retrieves a specific workflow by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetWorkflowInclude]): + id (str | UUID): + include (GetWorkflowInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -162,25 +166,25 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, - include: Unset | GetWorkflowInclude = UNSET, + include: GetWorkflowInclude | Unset = UNSET, ) -> ErrorsList | WorkflowResponse | None: """Retrieves a workflow Retrieves a specific workflow by id Args: - id (Union[UUID, str]): - include (Union[Unset, GetWorkflowInclude]): + id (str | UUID): + include (GetWorkflowInclude | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return ( diff --git a/rootly_sdk/api/workflows/list_workflows.py b/rootly_sdk/api/workflows/list_workflows.py index 5727f56e..3d12f3de 100644 --- a/rootly_sdk/api/workflows/list_workflows.py +++ b/rootly_sdk/api/workflows/list_workflows.py @@ -13,27 +13,28 @@ def _get_kwargs( *, - include: Unset | ListWorkflowsInclude = UNSET, - sort: Unset | ListWorkflowsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowsInclude | Unset = UNSET, + sort: ListWorkflowsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> dict[str, Any]: + params: dict[str, Any] = {} - json_include: Unset | str = UNSET + json_include: str | Unset = UNSET if not isinstance(include, Unset): json_include = include params["include"] = json_include - json_sort: Unset | str = UNSET + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -92,34 +93,34 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - include: Unset | ListWorkflowsInclude = UNSET, - sort: Unset | ListWorkflowsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowsInclude | Unset = UNSET, + sort: ListWorkflowsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[WorkflowList]: """List workflows List workflows Args: - include (Union[Unset, ListWorkflowsInclude]): - sort (Union[Unset, ListWorkflowsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowsInclude | Unset): + sort (ListWorkflowsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,34 +154,34 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - include: Unset | ListWorkflowsInclude = UNSET, - sort: Unset | ListWorkflowsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowsInclude | Unset = UNSET, + sort: ListWorkflowsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> WorkflowList | None: """List workflows List workflows Args: - include (Union[Unset, ListWorkflowsInclude]): - sort (Union[Unset, ListWorkflowsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowsInclude | Unset): + sort (ListWorkflowsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -209,34 +210,34 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - include: Unset | ListWorkflowsInclude = UNSET, - sort: Unset | ListWorkflowsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowsInclude | Unset = UNSET, + sort: ListWorkflowsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> Response[WorkflowList]: """List workflows List workflows Args: - include (Union[Unset, ListWorkflowsInclude]): - sort (Union[Unset, ListWorkflowsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowsInclude | Unset): + sort (ListWorkflowsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -268,34 +269,34 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - include: Unset | ListWorkflowsInclude = UNSET, - sort: Unset | ListWorkflowsSort = UNSET, - pagenumber: Unset | int = UNSET, - pagesize: Unset | int = UNSET, - filtersearch: Unset | str = UNSET, - filtername: Unset | str = UNSET, - filterslug: Unset | str = UNSET, - filtercreated_atgt: Unset | str = UNSET, - filtercreated_atgte: Unset | str = UNSET, - filtercreated_atlt: Unset | str = UNSET, - filtercreated_atlte: Unset | str = UNSET, + include: ListWorkflowsInclude | Unset = UNSET, + sort: ListWorkflowsSort | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + filtersearch: str | Unset = UNSET, + filtername: str | Unset = UNSET, + filterslug: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, ) -> WorkflowList | None: """List workflows List workflows Args: - include (Union[Unset, ListWorkflowsInclude]): - sort (Union[Unset, ListWorkflowsSort]): - pagenumber (Union[Unset, int]): - pagesize (Union[Unset, int]): - filtersearch (Union[Unset, str]): - filtername (Union[Unset, str]): - filterslug (Union[Unset, str]): - filtercreated_atgt (Union[Unset, str]): - filtercreated_atgte (Union[Unset, str]): - filtercreated_atlt (Union[Unset, str]): - filtercreated_atlte (Union[Unset, str]): + include (ListWorkflowsInclude | Unset): + sort (ListWorkflowsSort | Unset): + pagenumber (int | Unset): + pagesize (int | Unset): + filtersearch (str | Unset): + filtername (str | Unset): + filterslug (str | Unset): + filtercreated_atgt (str | Unset): + filtercreated_atgte (str | Unset): + filtercreated_atlt (str | Unset): + filtercreated_atlte (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/rootly_sdk/api/workflows/update_workflow.py b/rootly_sdk/api/workflows/update_workflow.py index d2ac8854..aa48bba6 100644 --- a/rootly_sdk/api/workflows/update_workflow.py +++ b/rootly_sdk/api/workflows/update_workflow.py @@ -1,5 +1,6 @@ from http import HTTPStatus from typing import Any +from urllib.parse import quote from uuid import UUID import httpx @@ -13,7 +14,7 @@ def _get_kwargs( - id: UUID | str, + id: str | UUID, *, body: UpdateWorkflow, ) -> dict[str, Any]: @@ -21,7 +22,9 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": f"/v1/workflows/{id}", + "url": "/v1/workflows/{id}".format( + id=quote(str(id), safe=""), + ), } _kwargs["json"] = body.to_dict() @@ -68,7 +71,7 @@ def _build_response( def sync_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, @@ -78,7 +81,7 @@ def sync_detailed( Update a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateWorkflow): Raises: @@ -86,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -102,7 +105,7 @@ def sync_detailed( def sync( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, @@ -112,7 +115,7 @@ def sync( Update a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateWorkflow): Raises: @@ -120,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return sync_detailed( @@ -131,7 +134,7 @@ def sync( async def asyncio_detailed( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, @@ -141,7 +144,7 @@ async def asyncio_detailed( Update a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateWorkflow): Raises: @@ -149,7 +152,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ErrorsList, WorkflowResponse]] + Response[ErrorsList | WorkflowResponse] """ kwargs = _get_kwargs( @@ -163,7 +166,7 @@ async def asyncio_detailed( async def asyncio( - id: UUID | str, + id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, @@ -173,7 +176,7 @@ async def asyncio( Update a specific workflow by id Args: - id (Union[UUID, str]): + id (str | UUID): body (UpdateWorkflow): Raises: @@ -181,7 +184,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ErrorsList, WorkflowResponse] + ErrorsList | WorkflowResponse """ return ( diff --git a/rootly_sdk/client.py b/rootly_sdk/client.py index 3f312fb1..1b7055ab 100644 --- a/rootly_sdk/client.py +++ b/rootly_sdk/client.py @@ -62,7 +62,7 @@ def with_cookies(self, cookies: dict[str, str]) -> "Client": return evolve(self, cookies={**self._cookies, **cookies}) def with_timeout(self, timeout: httpx.Timeout) -> "Client": - """Get a new client matching this one with a new timeout (in seconds)""" + """Get a new client matching this one with a new timeout configuration""" if self._client is not None: self._client.timeout = timeout if self._async_client is not None: @@ -101,7 +101,7 @@ def __exit__(self, *args: Any, **kwargs: Any) -> None: self.get_httpx_client().__exit__(*args, **kwargs) def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client": - """Manually the underlying httpx.AsyncClient + """Manually set the underlying httpx.AsyncClient **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. """ @@ -196,7 +196,7 @@ def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": return evolve(self, cookies={**self._cookies, **cookies}) def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient": - """Get a new client matching this one with a new timeout (in seconds)""" + """Get a new client matching this one with a new timeout configuration""" if self._client is not None: self._client.timeout = timeout if self._async_client is not None: @@ -236,7 +236,7 @@ def __exit__(self, *args: Any, **kwargs: Any) -> None: self.get_httpx_client().__exit__(*args, **kwargs) def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient": - """Manually the underlying httpx.AsyncClient + """Manually set the underlying httpx.AsyncClient **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. """ diff --git a/rootly_sdk/models/__init__.py b/rootly_sdk/models/__init__.py index c058df70..a2c17ae2 100644 --- a/rootly_sdk/models/__init__.py +++ b/rootly_sdk/models/__init__.py @@ -199,6 +199,7 @@ from .alert_trigger_params_alert_condition_payload import AlertTriggerParamsAlertConditionPayload from .alert_trigger_params_alert_condition_source import AlertTriggerParamsAlertConditionSource from .alert_trigger_params_alert_condition_status import AlertTriggerParamsAlertConditionStatus +from .alert_trigger_params_alert_condition_urgency import AlertTriggerParamsAlertConditionUrgency from .alert_trigger_params_alert_field_conditions_item import AlertTriggerParamsAlertFieldConditionsItem from .alert_trigger_params_alert_field_conditions_item_condition_type import ( AlertTriggerParamsAlertFieldConditionsItemConditionType, @@ -271,6 +272,18 @@ AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField, ) from .alerts_source_status import AlertsSourceStatus +from .api_key import ApiKey +from .api_key_kind import ApiKeyKind +from .api_key_list import ApiKeyList +from .api_key_list_data_item import ApiKeyListDataItem +from .api_key_list_data_item_type import ApiKeyListDataItemType +from .api_key_response import ApiKeyResponse +from .api_key_response_data import ApiKeyResponseData +from .api_key_response_data_type import ApiKeyResponseDataType +from .api_key_with_token_response import ApiKeyWithTokenResponse +from .api_key_with_token_response_data import ApiKeyWithTokenResponseData +from .api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes +from .api_key_with_token_response_data_type import ApiKeyWithTokenResponseDataType from .archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from .archive_microsoft_teams_channels_task_params_channels_item import ( ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem, @@ -333,11 +346,58 @@ from .cancel_incident_data_attributes import CancelIncidentDataAttributes from .cancel_incident_data_type import CancelIncidentDataType from .catalog import Catalog +from .catalog_checklist_template import CatalogChecklistTemplate +from .catalog_checklist_template_catalog_type import CatalogChecklistTemplateCatalogType +from .catalog_checklist_template_fields_type_0_item import CatalogChecklistTemplateFieldsType0Item +from .catalog_checklist_template_fields_type_0_item_field_source import ( + CatalogChecklistTemplateFieldsType0ItemFieldSource, +) +from .catalog_checklist_template_list import CatalogChecklistTemplateList +from .catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem +from .catalog_checklist_template_list_data_item_type import CatalogChecklistTemplateListDataItemType +from .catalog_checklist_template_owners_type_0_item import CatalogChecklistTemplateOwnersType0Item +from .catalog_checklist_template_owners_type_0_item_type import CatalogChecklistTemplateOwnersType0ItemType +from .catalog_checklist_template_response import CatalogChecklistTemplateResponse +from .catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData +from .catalog_checklist_template_response_data_type import CatalogChecklistTemplateResponseDataType +from .catalog_checklist_template_scope_type import CatalogChecklistTemplateScopeType from .catalog_entity import CatalogEntity -from .catalog_entity_fields_item import CatalogEntityFieldsItem +from .catalog_entity_checklist import CatalogEntityChecklist +from .catalog_entity_checklist_auditable_type import CatalogEntityChecklistAuditableType +from .catalog_entity_checklist_checklist_fields_type_0_item import CatalogEntityChecklistChecklistFieldsType0Item +from .catalog_entity_checklist_checklist_fields_type_0_item_data import ( + CatalogEntityChecklistChecklistFieldsType0ItemData, +) +from .catalog_entity_checklist_checklist_fields_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes, +) +from .catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0, +) +from .catalog_entity_checklist_checklist_fields_type_0_item_data_type import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataType, +) +from .catalog_entity_checklist_checklist_owners_type_0_item import CatalogEntityChecklistChecklistOwnersType0Item +from .catalog_entity_checklist_checklist_owners_type_0_item_data import ( + CatalogEntityChecklistChecklistOwnersType0ItemData, +) +from .catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes, +) +from .catalog_entity_checklist_checklist_owners_type_0_item_data_type import ( + CatalogEntityChecklistChecklistOwnersType0ItemDataType, +) +from .catalog_entity_checklist_list import CatalogEntityChecklistList +from .catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem +from .catalog_entity_checklist_list_data_item_type import CatalogEntityChecklistListDataItemType +from .catalog_entity_checklist_response import CatalogEntityChecklistResponse +from .catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData +from .catalog_entity_checklist_response_data_type import CatalogEntityChecklistResponseDataType +from .catalog_entity_checklist_status import CatalogEntityChecklistStatus from .catalog_entity_list import CatalogEntityList from .catalog_entity_list_data_item import CatalogEntityListDataItem from .catalog_entity_list_data_item_type import CatalogEntityListDataItemType +from .catalog_entity_properties_item import CatalogEntityPropertiesItem from .catalog_entity_property import CatalogEntityProperty from .catalog_entity_property_key import CatalogEntityPropertyKey from .catalog_entity_property_list import CatalogEntityPropertyList @@ -362,14 +422,23 @@ from .catalog_list import CatalogList from .catalog_list_data_item import CatalogListDataItem from .catalog_list_data_item_type import CatalogListDataItemType +from .catalog_property import CatalogProperty +from .catalog_property_catalog_type import CatalogPropertyCatalogType +from .catalog_property_kind import CatalogPropertyKind +from .catalog_property_list import CatalogPropertyList +from .catalog_property_list_data_item import CatalogPropertyListDataItem +from .catalog_property_list_data_item_type import CatalogPropertyListDataItemType +from .catalog_property_response import CatalogPropertyResponse +from .catalog_property_response_data import CatalogPropertyResponseData +from .catalog_property_response_data_type import CatalogPropertyResponseDataType from .catalog_response import CatalogResponse from .catalog_response_data import CatalogResponseData from .catalog_response_data_type import CatalogResponseDataType from .cause import Cause -from .cause_fields_item import CauseFieldsItem from .cause_list import CauseList from .cause_list_data_item import CauseListDataItem from .cause_list_data_item_type import CauseListDataItemType +from .cause_properties_item import CausePropertiesItem from .cause_response import CauseResponse from .cause_response_data import CauseResponseData from .cause_response_data_type import CauseResponseDataType @@ -488,6 +557,8 @@ from .create_edge_connector_body_data_attributes_status import CreateEdgeConnectorBodyDataAttributesStatus from .create_edge_connector_body_data_type import CreateEdgeConnectorBodyDataType from .create_github_issue_task_params import CreateGithubIssueTaskParams +from .create_github_issue_task_params_issue_type import CreateGithubIssueTaskParamsIssueType +from .create_github_issue_task_params_labels_item import CreateGithubIssueTaskParamsLabelsItem from .create_github_issue_task_params_repository import CreateGithubIssueTaskParamsRepository from .create_github_issue_task_params_task_type import CreateGithubIssueTaskParamsTaskType from .create_gitlab_issue_task_params import CreateGitlabIssueTaskParams @@ -545,6 +616,13 @@ from .create_jira_subtask_task_params_status import CreateJiraSubtaskTaskParamsStatus from .create_jira_subtask_task_params_subtask_issue_type import CreateJiraSubtaskTaskParamsSubtaskIssueType from .create_jira_subtask_task_params_task_type import CreateJiraSubtaskTaskParamsTaskType +from .create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams +from .create_jsmops_alert_task_params_escalations_item import CreateJsmopsAlertTaskParamsEscalationsItem +from .create_jsmops_alert_task_params_priority import CreateJsmopsAlertTaskParamsPriority +from .create_jsmops_alert_task_params_schedules_item import CreateJsmopsAlertTaskParamsSchedulesItem +from .create_jsmops_alert_task_params_task_type import CreateJsmopsAlertTaskParamsTaskType +from .create_jsmops_alert_task_params_teams_item import CreateJsmopsAlertTaskParamsTeamsItem +from .create_jsmops_alert_task_params_users_item import CreateJsmopsAlertTaskParamsUsersItem from .create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from .create_linear_issue_comment_task_params_task_type import CreateLinearIssueCommentTaskParamsTaskType from .create_linear_issue_task_params import CreateLinearIssueTaskParams @@ -559,6 +637,7 @@ from .create_linear_subtask_issue_task_params_priority import CreateLinearSubtaskIssueTaskParamsPriority from .create_linear_subtask_issue_task_params_state import CreateLinearSubtaskIssueTaskParamsState from .create_linear_subtask_issue_task_params_task_type import CreateLinearSubtaskIssueTaskParamsTaskType +from .create_meeting_recording_platform import CreateMeetingRecordingPlatform from .create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams from .create_microsoft_teams_channel_task_params_private import CreateMicrosoftTeamsChannelTaskParamsPrivate from .create_microsoft_teams_channel_task_params_task_type import CreateMicrosoftTeamsChannelTaskParamsTaskType @@ -762,10 +841,10 @@ from .edge_connector_data_attributes_status import EdgeConnectorDataAttributesStatus from .edge_connector_data_type import EdgeConnectorDataType from .environment import Environment -from .environment_fields_type_0_item import EnvironmentFieldsType0Item from .environment_list import EnvironmentList from .environment_list_data_item import EnvironmentListDataItem from .environment_list_data_item_type import EnvironmentListDataItemType +from .environment_properties_type_0_item import EnvironmentPropertiesType0Item from .environment_response import EnvironmentResponse from .environment_response_data import EnvironmentResponseData from .environment_response_data_type import EnvironmentResponseDataType @@ -802,9 +881,11 @@ from .escalation_policy_list_data_item import EscalationPolicyListDataItem from .escalation_policy_list_data_item_type import EscalationPolicyListDataItemType from .escalation_policy_path import EscalationPolicyPath +from .escalation_policy_path_after_deferral_behavior import EscalationPolicyPathAfterDeferralBehavior from .escalation_policy_path_list import EscalationPolicyPathList from .escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem from .escalation_policy_path_match_mode import EscalationPolicyPathMatchMode +from .escalation_policy_path_path_type import EscalationPolicyPathPathType from .escalation_policy_path_response import EscalationPolicyPathResponse from .escalation_policy_path_response_data import EscalationPolicyPathResponseData from .escalation_policy_path_response_data_type import EscalationPolicyPathResponseDataType @@ -818,26 +899,48 @@ from .escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 from .escalation_policy_path_rules_item_type_3_operator import EscalationPolicyPathRulesItemType3Operator from .escalation_policy_path_rules_item_type_3_rule_type import EscalationPolicyPathRulesItemType3RuleType -from .escalation_policy_path_rules_item_type_4_type_0 import EscalationPolicyPathRulesItemType4Type0 -from .escalation_policy_path_rules_item_type_4_type_0_rule_type import EscalationPolicyPathRulesItemType4Type0RuleType -from .escalation_policy_path_rules_item_type_4_type_1 import EscalationPolicyPathRulesItemType4Type1 -from .escalation_policy_path_rules_item_type_4_type_1_rule_type import EscalationPolicyPathRulesItemType4Type1RuleType -from .escalation_policy_path_rules_item_type_4_type_2 import EscalationPolicyPathRulesItemType4Type2 -from .escalation_policy_path_rules_item_type_4_type_2_operator import EscalationPolicyPathRulesItemType4Type2Operator -from .escalation_policy_path_rules_item_type_4_type_2_rule_type import EscalationPolicyPathRulesItemType4Type2RuleType -from .escalation_policy_path_rules_item_type_4_type_3 import EscalationPolicyPathRulesItemType4Type3 -from .escalation_policy_path_rules_item_type_4_type_3_operator import EscalationPolicyPathRulesItemType4Type3Operator -from .escalation_policy_path_rules_item_type_4_type_3_rule_type import EscalationPolicyPathRulesItemType4Type3RuleType -from .escalation_policy_path_rules_item_type_5_type_0 import EscalationPolicyPathRulesItemType5Type0 -from .escalation_policy_path_rules_item_type_5_type_0_rule_type import EscalationPolicyPathRulesItemType5Type0RuleType -from .escalation_policy_path_rules_item_type_5_type_1 import EscalationPolicyPathRulesItemType5Type1 -from .escalation_policy_path_rules_item_type_5_type_1_rule_type import EscalationPolicyPathRulesItemType5Type1RuleType -from .escalation_policy_path_rules_item_type_5_type_2 import EscalationPolicyPathRulesItemType5Type2 -from .escalation_policy_path_rules_item_type_5_type_2_operator import EscalationPolicyPathRulesItemType5Type2Operator -from .escalation_policy_path_rules_item_type_5_type_2_rule_type import EscalationPolicyPathRulesItemType5Type2RuleType -from .escalation_policy_path_rules_item_type_5_type_3 import EscalationPolicyPathRulesItemType5Type3 -from .escalation_policy_path_rules_item_type_5_type_3_operator import EscalationPolicyPathRulesItemType5Type3Operator -from .escalation_policy_path_rules_item_type_5_type_3_rule_type import EscalationPolicyPathRulesItemType5Type3RuleType +from .escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 +from .escalation_policy_path_rules_item_type_4_rule_type import EscalationPolicyPathRulesItemType4RuleType +from .escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 +from .escalation_policy_path_rules_item_type_5_rule_type import EscalationPolicyPathRulesItemType5RuleType +from .escalation_policy_path_rules_item_type_5_time_blocks_item import EscalationPolicyPathRulesItemType5TimeBlocksItem +from .escalation_policy_path_rules_item_type_5_time_zone import EscalationPolicyPathRulesItemType5TimeZone +from .escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 +from .escalation_policy_path_rules_item_type_6_type_0_rule_type import EscalationPolicyPathRulesItemType6Type0RuleType +from .escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 +from .escalation_policy_path_rules_item_type_6_type_1_rule_type import EscalationPolicyPathRulesItemType6Type1RuleType +from .escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 +from .escalation_policy_path_rules_item_type_6_type_2_operator import EscalationPolicyPathRulesItemType6Type2Operator +from .escalation_policy_path_rules_item_type_6_type_2_rule_type import EscalationPolicyPathRulesItemType6Type2RuleType +from .escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 +from .escalation_policy_path_rules_item_type_6_type_3_operator import EscalationPolicyPathRulesItemType6Type3Operator +from .escalation_policy_path_rules_item_type_6_type_3_rule_type import EscalationPolicyPathRulesItemType6Type3RuleType +from .escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 +from .escalation_policy_path_rules_item_type_6_type_4_rule_type import EscalationPolicyPathRulesItemType6Type4RuleType +from .escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 +from .escalation_policy_path_rules_item_type_6_type_5_rule_type import EscalationPolicyPathRulesItemType6Type5RuleType +from .escalation_policy_path_rules_item_type_6_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType6Type5TimeBlocksItem, +) +from .escalation_policy_path_rules_item_type_6_type_5_time_zone import EscalationPolicyPathRulesItemType6Type5TimeZone +from .escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 +from .escalation_policy_path_rules_item_type_7_type_0_rule_type import EscalationPolicyPathRulesItemType7Type0RuleType +from .escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 +from .escalation_policy_path_rules_item_type_7_type_1_rule_type import EscalationPolicyPathRulesItemType7Type1RuleType +from .escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 +from .escalation_policy_path_rules_item_type_7_type_2_operator import EscalationPolicyPathRulesItemType7Type2Operator +from .escalation_policy_path_rules_item_type_7_type_2_rule_type import EscalationPolicyPathRulesItemType7Type2RuleType +from .escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 +from .escalation_policy_path_rules_item_type_7_type_3_operator import EscalationPolicyPathRulesItemType7Type3Operator +from .escalation_policy_path_rules_item_type_7_type_3_rule_type import EscalationPolicyPathRulesItemType7Type3RuleType +from .escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 +from .escalation_policy_path_rules_item_type_7_type_4_rule_type import EscalationPolicyPathRulesItemType7Type4RuleType +from .escalation_policy_path_rules_item_type_7_type_5 import EscalationPolicyPathRulesItemType7Type5 +from .escalation_policy_path_rules_item_type_7_type_5_rule_type import EscalationPolicyPathRulesItemType7Type5RuleType +from .escalation_policy_path_rules_item_type_7_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType7Type5TimeBlocksItem, +) +from .escalation_policy_path_rules_item_type_7_type_5_time_zone import EscalationPolicyPathRulesItemType7Type5TimeZone from .escalation_policy_path_time_restriction_time_zone import EscalationPolicyPathTimeRestrictionTimeZone from .escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem from .escalation_policy_path_time_restrictions_item_end_day import EscalationPolicyPathTimeRestrictionsItemEndDay @@ -904,10 +1007,10 @@ from .form_set_response_data import FormSetResponseData from .form_set_response_data_type import FormSetResponseDataType from .functionality import Functionality -from .functionality_fields_type_0_item import FunctionalityFieldsType0Item from .functionality_list import FunctionalityList from .functionality_list_data_item import FunctionalityListDataItem from .functionality_list_data_item_type import FunctionalityListDataItemType +from .functionality_properties_type_0_item import FunctionalityPropertiesType0Item from .functionality_response import FunctionalityResponse from .functionality_response_data import FunctionalityResponseData from .functionality_response_data_type import FunctionalityResponseDataType @@ -922,7 +1025,6 @@ from .get_alerts_task_params_task_type import GetAlertsTaskParamsTaskType from .get_catalog_entity_include import GetCatalogEntityInclude from .get_catalog_entity_property_include import GetCatalogEntityPropertyInclude -from .get_catalog_field_include import GetCatalogFieldInclude from .get_custom_field_include import GetCustomFieldInclude from .get_dashboard_include import GetDashboardInclude from .get_escalation_path_include import GetEscalationPathInclude @@ -1146,16 +1248,17 @@ from .incident_trigger_params_incident_statuses_item import IncidentTriggerParamsIncidentStatusesItem from .incident_trigger_params_trigger_type import IncidentTriggerParamsTriggerType from .incident_type import IncidentType -from .incident_type_fields_item import IncidentTypeFieldsItem from .incident_type_list import IncidentTypeList from .incident_type_list_data_item import IncidentTypeListDataItem from .incident_type_list_data_item_type import IncidentTypeListDataItemType +from .incident_type_properties_item import IncidentTypePropertiesItem from .incident_type_response import IncidentTypeResponse from .incident_type_response_data import IncidentTypeResponseData from .incident_type_response_data_type import IncidentTypeResponseDataType from .incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item from .incident_type_slack_channels_type_0_item import IncidentTypeSlackChannelsType0Item from .incident_user_type_0 import IncidentUserType0 +from .incident_zoom_meeting_global_dial_in_numbers_type_0_item import IncidentZoomMeetingGlobalDialInNumbersType0Item from .incidents_chart_response import IncidentsChartResponse from .invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from .invite_to_microsoft_teams_channel_task_params_channel import InviteToMicrosoftTeamsChannelTaskParamsChannel @@ -1191,42 +1294,43 @@ from .ip_ranges_response_data_type import IpRangesResponseDataType from .links import Links from .list_alerts_include import ListAlertsInclude +from .list_catalog_checklist_templates_include import ListCatalogChecklistTemplatesInclude +from .list_catalog_checklist_templates_sort import ListCatalogChecklistTemplatesSort from .list_catalog_entities_include import ListCatalogEntitiesInclude from .list_catalog_entities_sort import ListCatalogEntitiesSort from .list_catalog_entity_properties_include import ListCatalogEntityPropertiesInclude from .list_catalog_entity_properties_sort import ListCatalogEntityPropertiesSort -from .list_catalog_fields_include import ListCatalogFieldsInclude -from .list_catalog_fields_sort import ListCatalogFieldsSort from .list_catalogs_include import ListCatalogsInclude from .list_catalogs_sort import ListCatalogsSort -from .list_cause_catalog_fields_include import ListCauseCatalogFieldsInclude -from .list_cause_catalog_fields_sort import ListCauseCatalogFieldsSort +from .list_cause_catalog_properties_include import ListCauseCatalogPropertiesInclude +from .list_cause_catalog_properties_sort import ListCauseCatalogPropertiesSort from .list_custom_fields_include import ListCustomFieldsInclude from .list_custom_fields_sort import ListCustomFieldsSort from .list_dashboards_include import ListDashboardsInclude -from .list_environment_catalog_fields_include import ListEnvironmentCatalogFieldsInclude -from .list_environment_catalog_fields_sort import ListEnvironmentCatalogFieldsSort +from .list_environment_catalog_properties_include import ListEnvironmentCatalogPropertiesInclude +from .list_environment_catalog_properties_sort import ListEnvironmentCatalogPropertiesSort from .list_escalation_paths_include import ListEscalationPathsInclude from .list_escalation_policies_include import ListEscalationPoliciesInclude from .list_form_fields_include import ListFormFieldsInclude -from .list_functionality_catalog_fields_include import ListFunctionalityCatalogFieldsInclude -from .list_functionality_catalog_fields_sort import ListFunctionalityCatalogFieldsSort -from .list_group_catalog_fields_include import ListGroupCatalogFieldsInclude -from .list_group_catalog_fields_sort import ListGroupCatalogFieldsSort +from .list_functionality_catalog_properties_include import ListFunctionalityCatalogPropertiesInclude +from .list_functionality_catalog_properties_sort import ListFunctionalityCatalogPropertiesSort +from .list_group_catalog_properties_include import ListGroupCatalogPropertiesInclude +from .list_group_catalog_properties_sort import ListGroupCatalogPropertiesSort from .list_incident_alerts_include import ListIncidentAlertsInclude from .list_incident_sub_statuses_include import ListIncidentSubStatusesInclude from .list_incident_sub_statuses_sort import ListIncidentSubStatusesSort -from .list_incident_type_catalog_fields_include import ListIncidentTypeCatalogFieldsInclude -from .list_incident_type_catalog_fields_sort import ListIncidentTypeCatalogFieldsSort +from .list_incident_type_catalog_properties_include import ListIncidentTypeCatalogPropertiesInclude +from .list_incident_type_catalog_properties_sort import ListIncidentTypeCatalogPropertiesSort from .list_incidents_include import ListIncidentsInclude from .list_incidents_sort import ListIncidentsSort +from .list_oncalls_include import ListOncallsInclude from .list_playbooks_include import ListPlaybooksInclude from .list_retrospective_configurations_include import ListRetrospectiveConfigurationsInclude from .list_retrospective_process_groups_include import ListRetrospectiveProcessGroupsInclude from .list_retrospective_process_groups_sort import ListRetrospectiveProcessGroupsSort from .list_retrospective_processes_include import ListRetrospectiveProcessesInclude -from .list_service_catalog_fields_include import ListServiceCatalogFieldsInclude -from .list_service_catalog_fields_sort import ListServiceCatalogFieldsSort +from .list_service_catalog_properties_include import ListServiceCatalogPropertiesInclude +from .list_service_catalog_properties_sort import ListServiceCatalogPropertiesSort from .list_shifts_include import ListShiftsInclude from .list_teams_include import ListTeamsInclude from .list_users_include import ListUsersInclude @@ -1249,6 +1353,12 @@ from .live_call_router_response_data import LiveCallRouterResponseData from .live_call_router_response_data_type import LiveCallRouterResponseDataType from .live_call_router_waiting_music_url import LiveCallRouterWaitingMusicUrl +from .meeting_recording import MeetingRecording +from .meeting_recording_list import MeetingRecordingList +from .meeting_recording_list_data_item import MeetingRecordingListDataItem +from .meeting_recording_list_data_item_type import MeetingRecordingListDataItemType +from .meeting_recording_platform import MeetingRecordingPlatform +from .meeting_recording_status import MeetingRecordingStatus from .meta import Meta from .mitigate_incident import MitigateIncident from .mitigate_incident_data import MitigateIncidentData @@ -1399,6 +1509,11 @@ NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, ) from .new_alerts_source_data_type import NewAlertsSourceDataType +from .new_api_key import NewApiKey +from .new_api_key_data import NewApiKeyData +from .new_api_key_data_attributes import NewApiKeyDataAttributes +from .new_api_key_data_attributes_kind import NewApiKeyDataAttributesKind +from .new_api_key_data_type import NewApiKeyDataType from .new_authorization import NewAuthorization from .new_authorization_data import NewAuthorizationData from .new_authorization_data_attributes import NewAuthorizationDataAttributes @@ -1407,6 +1522,34 @@ from .new_authorization_data_attributes_permissions_item import NewAuthorizationDataAttributesPermissionsItem from .new_authorization_data_type import NewAuthorizationDataType from .new_catalog import NewCatalog +from .new_catalog_checklist_template import NewCatalogChecklistTemplate +from .new_catalog_checklist_template_data import NewCatalogChecklistTemplateData +from .new_catalog_checklist_template_data_attributes import NewCatalogChecklistTemplateDataAttributes +from .new_catalog_checklist_template_data_attributes_builtin_field import ( + NewCatalogChecklistTemplateDataAttributesBuiltinField, +) +from .new_catalog_checklist_template_data_attributes_builtin_field_field_source import ( + NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, +) +from .new_catalog_checklist_template_data_attributes_catalog_type import ( + NewCatalogChecklistTemplateDataAttributesCatalogType, +) +from .new_catalog_checklist_template_data_attributes_custom_field import ( + NewCatalogChecklistTemplateDataAttributesCustomField, +) +from .new_catalog_checklist_template_data_attributes_custom_field_field_source import ( + NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, +) +from .new_catalog_checklist_template_data_attributes_owners_type_0_item import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0Item, +) +from .new_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType, +) +from .new_catalog_checklist_template_data_attributes_scope_type import ( + NewCatalogChecklistTemplateDataAttributesScopeType, +) +from .new_catalog_checklist_template_data_type import NewCatalogChecklistTemplateDataType from .new_catalog_data import NewCatalogData from .new_catalog_data_attributes import NewCatalogDataAttributes from .new_catalog_data_attributes_icon import NewCatalogDataAttributesIcon @@ -1414,7 +1557,7 @@ from .new_catalog_entity import NewCatalogEntity from .new_catalog_entity_data import NewCatalogEntityData from .new_catalog_entity_data_attributes import NewCatalogEntityDataAttributes -from .new_catalog_entity_data_attributes_fields_item import NewCatalogEntityDataAttributesFieldsItem +from .new_catalog_entity_data_attributes_properties_item import NewCatalogEntityDataAttributesPropertiesItem from .new_catalog_entity_data_type import NewCatalogEntityDataType from .new_catalog_entity_property import NewCatalogEntityProperty from .new_catalog_entity_property_data import NewCatalogEntityPropertyData @@ -1427,10 +1570,16 @@ from .new_catalog_field_data_attributes_catalog_type import NewCatalogFieldDataAttributesCatalogType from .new_catalog_field_data_attributes_kind import NewCatalogFieldDataAttributesKind from .new_catalog_field_data_type import NewCatalogFieldDataType +from .new_catalog_property import NewCatalogProperty +from .new_catalog_property_data import NewCatalogPropertyData +from .new_catalog_property_data_attributes import NewCatalogPropertyDataAttributes +from .new_catalog_property_data_attributes_catalog_type import NewCatalogPropertyDataAttributesCatalogType +from .new_catalog_property_data_attributes_kind import NewCatalogPropertyDataAttributesKind +from .new_catalog_property_data_type import NewCatalogPropertyDataType from .new_cause import NewCause from .new_cause_data import NewCauseData from .new_cause_data_attributes import NewCauseDataAttributes -from .new_cause_data_attributes_fields_item import NewCauseDataAttributesFieldsItem +from .new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem from .new_cause_data_type import NewCauseDataType from .new_communications_group import NewCommunicationsGroup from .new_communications_group_data import NewCommunicationsGroupData @@ -1540,7 +1689,7 @@ from .new_environment import NewEnvironment from .new_environment_data import NewEnvironmentData from .new_environment_data_attributes import NewEnvironmentDataAttributes -from .new_environment_data_attributes_fields_item import NewEnvironmentDataAttributesFieldsItem +from .new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem from .new_environment_data_attributes_slack_aliases_type_0_item import NewEnvironmentDataAttributesSlackAliasesType0Item from .new_environment_data_attributes_slack_channels_type_0_item import ( NewEnvironmentDataAttributesSlackChannelsType0Item, @@ -1626,7 +1775,7 @@ from .new_functionality import NewFunctionality from .new_functionality_data import NewFunctionalityData from .new_functionality_data_attributes import NewFunctionalityDataAttributes -from .new_functionality_data_attributes_fields_item import NewFunctionalityDataAttributesFieldsItem +from .new_functionality_data_attributes_properties_item import NewFunctionalityDataAttributesPropertiesItem from .new_functionality_data_attributes_show_uptime_last_days import NewFunctionalityDataAttributesShowUptimeLastDays from .new_functionality_data_attributes_slack_aliases_type_0_item import ( NewFunctionalityDataAttributesSlackAliasesType0Item, @@ -1732,7 +1881,7 @@ from .new_incident_type import NewIncidentType from .new_incident_type_data import NewIncidentTypeData from .new_incident_type_data_attributes import NewIncidentTypeDataAttributes -from .new_incident_type_data_attributes_fields_item import NewIncidentTypeDataAttributesFieldsItem +from .new_incident_type_data_attributes_properties_item import NewIncidentTypeDataAttributesPropertiesItem from .new_incident_type_data_attributes_slack_aliases_type_0_item import ( NewIncidentTypeDataAttributesSlackAliasesType0Item, ) @@ -1758,6 +1907,10 @@ from .new_live_call_router_data_attributes_phone_type import NewLiveCallRouterDataAttributesPhoneType from .new_live_call_router_data_attributes_waiting_music_url import NewLiveCallRouterDataAttributesWaitingMusicUrl from .new_live_call_router_data_type import NewLiveCallRouterDataType +from .new_on_call_pay_report import NewOnCallPayReport +from .new_on_call_pay_report_data import NewOnCallPayReportData +from .new_on_call_pay_report_data_attributes import NewOnCallPayReportDataAttributes +from .new_on_call_pay_report_data_type import NewOnCallPayReportDataType from .new_on_call_role import NewOnCallRole from .new_on_call_role_data import NewOnCallRoleData from .new_on_call_role_data_attributes import NewOnCallRoleDataAttributes @@ -1883,6 +2036,9 @@ from .new_role_data_attributes_api_keys_permissions_item import NewRoleDataAttributesApiKeysPermissionsItem from .new_role_data_attributes_audits_permissions_item import NewRoleDataAttributesAuditsPermissionsItem from .new_role_data_attributes_billing_permissions_item import NewRoleDataAttributesBillingPermissionsItem +from .new_role_data_attributes_catalogs_permissions_item import NewRoleDataAttributesCatalogsPermissionsItem +from .new_role_data_attributes_communication_permissions_item import NewRoleDataAttributesCommunicationPermissionsItem +from .new_role_data_attributes_edge_connector_permissions_item import NewRoleDataAttributesEdgeConnectorPermissionsItem from .new_role_data_attributes_environments_permissions_item import NewRoleDataAttributesEnvironmentsPermissionsItem from .new_role_data_attributes_form_fields_permissions_item import NewRoleDataAttributesFormFieldsPermissionsItem from .new_role_data_attributes_functionalities_permissions_item import ( @@ -1892,6 +2048,9 @@ from .new_role_data_attributes_incident_causes_permissions_item import ( NewRoleDataAttributesIncidentCausesPermissionsItem, ) +from .new_role_data_attributes_incident_communication_permissions_item import ( + NewRoleDataAttributesIncidentCommunicationPermissionsItem, +) from .new_role_data_attributes_incident_feedbacks_permissions_item import ( NewRoleDataAttributesIncidentFeedbacksPermissionsItem, ) @@ -1900,6 +2059,7 @@ from .new_role_data_attributes_incidents_permissions_item import NewRoleDataAttributesIncidentsPermissionsItem from .new_role_data_attributes_integrations_permissions_item import NewRoleDataAttributesIntegrationsPermissionsItem from .new_role_data_attributes_invitations_permissions_item import NewRoleDataAttributesInvitationsPermissionsItem +from .new_role_data_attributes_paging_permissions_item import NewRoleDataAttributesPagingPermissionsItem from .new_role_data_attributes_playbooks_permissions_item import NewRoleDataAttributesPlaybooksPermissionsItem from .new_role_data_attributes_private_incidents_permissions_item import ( NewRoleDataAttributesPrivateIncidentsPermissionsItem, @@ -1910,7 +2070,9 @@ from .new_role_data_attributes_secrets_permissions_item import NewRoleDataAttributesSecretsPermissionsItem from .new_role_data_attributes_services_permissions_item import NewRoleDataAttributesServicesPermissionsItem from .new_role_data_attributes_severities_permissions_item import NewRoleDataAttributesSeveritiesPermissionsItem +from .new_role_data_attributes_slas_permissions_item import NewRoleDataAttributesSlasPermissionsItem from .new_role_data_attributes_status_pages_permissions_item import NewRoleDataAttributesStatusPagesPermissionsItem +from .new_role_data_attributes_sub_statuses_permissions_item import NewRoleDataAttributesSubStatusesPermissionsItem from .new_role_data_attributes_webhooks_permissions_item import NewRoleDataAttributesWebhooksPermissionsItem from .new_role_data_attributes_workflows_permissions_item import NewRoleDataAttributesWorkflowsPermissionsItem from .new_role_data_type import NewRoleDataType @@ -1981,10 +2143,10 @@ from .new_service_data_attributes_alert_broadcast_channel_type_0 import ( NewServiceDataAttributesAlertBroadcastChannelType0, ) -from .new_service_data_attributes_fields_item import NewServiceDataAttributesFieldsItem from .new_service_data_attributes_incident_broadcast_channel_type_0 import ( NewServiceDataAttributesIncidentBroadcastChannelType0, ) +from .new_service_data_attributes_properties_item import NewServiceDataAttributesPropertiesItem from .new_service_data_attributes_show_uptime_last_days import NewServiceDataAttributesShowUptimeLastDays from .new_service_data_attributes_slack_aliases_type_0_item import NewServiceDataAttributesSlackAliasesType0Item from .new_service_data_attributes_slack_channels_type_0_item import NewServiceDataAttributesSlackChannelsType0Item @@ -1996,6 +2158,28 @@ from .new_severity_data_attributes_slack_aliases_type_0_item import NewSeverityDataAttributesSlackAliasesType0Item from .new_severity_data_attributes_slack_channels_type_0_item import NewSeverityDataAttributesSlackChannelsType0Item from .new_severity_data_type import NewSeverityDataType +from .new_sla import NewSla +from .new_sla_data import NewSlaData +from .new_sla_data_attributes import NewSlaDataAttributes +from .new_sla_data_attributes_assignment_deadline_days import NewSlaDataAttributesAssignmentDeadlineDays +from .new_sla_data_attributes_assignment_deadline_parent_status import ( + NewSlaDataAttributesAssignmentDeadlineParentStatus, +) +from .new_sla_data_attributes_completion_deadline_days import NewSlaDataAttributesCompletionDeadlineDays +from .new_sla_data_attributes_completion_deadline_parent_status import ( + NewSlaDataAttributesCompletionDeadlineParentStatus, +) +from .new_sla_data_attributes_condition_match_type import NewSlaDataAttributesConditionMatchType +from .new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem +from .new_sla_data_attributes_conditions_item_conditionable_type import ( + NewSlaDataAttributesConditionsItemConditionableType, +) +from .new_sla_data_attributes_conditions_item_property import NewSlaDataAttributesConditionsItemProperty +from .new_sla_data_attributes_notification_configurations_item import NewSlaDataAttributesNotificationConfigurationsItem +from .new_sla_data_attributes_notification_configurations_item_offset_type import ( + NewSlaDataAttributesNotificationConfigurationsItemOffsetType, +) +from .new_sla_data_type import NewSlaDataType from .new_status_page import NewStatusPage from .new_status_page_data import NewStatusPageData from .new_status_page_data_attributes import NewStatusPageDataAttributes @@ -2003,6 +2187,7 @@ from .new_status_page_data_attributes_saml_name_identifier_format import ( NewStatusPageDataAttributesSamlNameIdentifierFormat, ) +from .new_status_page_data_attributes_section_order_type_0_item import NewStatusPageDataAttributesSectionOrderType0Item from .new_status_page_data_attributes_show_uptime_last_days import NewStatusPageDataAttributesShowUptimeLastDays from .new_status_page_data_type import NewStatusPageDataType from .new_status_page_template import NewStatusPageTemplate @@ -2020,10 +2205,10 @@ from .new_team_data import NewTeamData from .new_team_data_attributes import NewTeamDataAttributes from .new_team_data_attributes_alert_broadcast_channel_type_0 import NewTeamDataAttributesAlertBroadcastChannelType0 -from .new_team_data_attributes_fields_item import NewTeamDataAttributesFieldsItem from .new_team_data_attributes_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) +from .new_team_data_attributes_properties_item import NewTeamDataAttributesPropertiesItem from .new_team_data_attributes_slack_aliases_type_0_item import NewTeamDataAttributesSlackAliasesType0Item from .new_team_data_attributes_slack_channels_type_0_item import NewTeamDataAttributesSlackChannelsType0Item from .new_team_data_type import NewTeamDataType @@ -2091,6 +2276,15 @@ from .new_workflow_task_data import NewWorkflowTaskData from .new_workflow_task_data_attributes import NewWorkflowTaskDataAttributes from .new_workflow_task_data_type import NewWorkflowTaskDataType +from .on_call_pay_report import OnCallPayReport +from .on_call_pay_report_list import OnCallPayReportList +from .on_call_pay_report_list_data_item import OnCallPayReportListDataItem +from .on_call_pay_report_list_data_item_type import OnCallPayReportListDataItemType +from .on_call_pay_report_pay_type import OnCallPayReportPayType +from .on_call_pay_report_response import OnCallPayReportResponse +from .on_call_pay_report_response_data import OnCallPayReportResponseData +from .on_call_pay_report_response_data_type import OnCallPayReportResponseDataType +from .on_call_pay_report_status import OnCallPayReportStatus from .on_call_role import OnCallRole from .on_call_role_alert_fields_permissions_item import OnCallRoleAlertFieldsPermissionsItem from .on_call_role_alert_groups_permissions_item import OnCallRoleAlertGroupsPermissionsItem @@ -2138,6 +2332,11 @@ from .override_shift_response import OverrideShiftResponse from .override_shift_response_data import OverrideShiftResponseData from .override_shift_response_data_type import OverrideShiftResponseDataType +from .page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams +from .page_jsmops_on_call_responders_task_params_priority import PageJsmopsOnCallRespondersTaskParamsPriority +from .page_jsmops_on_call_responders_task_params_task_type import PageJsmopsOnCallRespondersTaskParamsTaskType +from .page_jsmops_on_call_responders_task_params_teams_item import PageJsmopsOnCallRespondersTaskParamsTeamsItem +from .page_jsmops_on_call_responders_task_params_users_item import PageJsmopsOnCallRespondersTaskParamsUsersItem from .page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from .page_opsgenie_on_call_responders_task_params_priority import PageOpsgenieOnCallRespondersTaskParamsPriority from .page_opsgenie_on_call_responders_task_params_task_type import PageOpsgenieOnCallRespondersTaskParamsTaskType @@ -2155,6 +2354,9 @@ from .page_rootly_on_call_responders_task_params_escalation_policy_target import ( PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget, ) +from .page_rootly_on_call_responders_task_params_functionality_target import ( + PageRootlyOnCallRespondersTaskParamsFunctionalityTarget, +) from .page_rootly_on_call_responders_task_params_group_target import PageRootlyOnCallRespondersTaskParamsGroupTarget from .page_rootly_on_call_responders_task_params_service_target import PageRootlyOnCallRespondersTaskParamsServiceTarget from .page_rootly_on_call_responders_task_params_task_type import PageRootlyOnCallRespondersTaskParamsTaskType @@ -2372,11 +2574,15 @@ from .role_api_keys_permissions_item import RoleApiKeysPermissionsItem from .role_audits_permissions_item import RoleAuditsPermissionsItem from .role_billing_permissions_item import RoleBillingPermissionsItem +from .role_catalogs_permissions_item import RoleCatalogsPermissionsItem +from .role_communication_permissions_item import RoleCommunicationPermissionsItem +from .role_edge_connector_permissions_item import RoleEdgeConnectorPermissionsItem from .role_environments_permissions_item import RoleEnvironmentsPermissionsItem from .role_form_fields_permissions_item import RoleFormFieldsPermissionsItem from .role_functionalities_permissions_item import RoleFunctionalitiesPermissionsItem from .role_groups_permissions_item import RoleGroupsPermissionsItem from .role_incident_causes_permissions_item import RoleIncidentCausesPermissionsItem +from .role_incident_communication_permissions_item import RoleIncidentCommunicationPermissionsItem from .role_incident_feedbacks_permissions_item import RoleIncidentFeedbacksPermissionsItem from .role_incident_roles_permissions_item import RoleIncidentRolesPermissionsItem from .role_incident_types_permissions_item import RoleIncidentTypesPermissionsItem @@ -2386,6 +2592,7 @@ from .role_list import RoleList from .role_list_data_item import RoleListDataItem from .role_list_data_item_type import RoleListDataItemType +from .role_paging_permissions_item import RolePagingPermissionsItem from .role_playbooks_permissions_item import RolePlaybooksPermissionsItem from .role_private_incidents_permissions_item import RolePrivateIncidentsPermissionsItem from .role_pulses_permissions_item import RolePulsesPermissionsItem @@ -2400,9 +2607,15 @@ from .role_secrets_permissions_item import RoleSecretsPermissionsItem from .role_services_permissions_item import RoleServicesPermissionsItem from .role_severities_permissions_item import RoleSeveritiesPermissionsItem +from .role_slas_permissions_item import RoleSlasPermissionsItem from .role_status_pages_permissions_item import RoleStatusPagesPermissionsItem +from .role_sub_statuses_permissions_item import RoleSubStatusesPermissionsItem from .role_webhooks_permissions_item import RoleWebhooksPermissionsItem from .role_workflows_permissions_item import RoleWorkflowsPermissionsItem +from .rotate_api_key import RotateApiKey +from .rotate_api_key_data import RotateApiKeyData +from .rotate_api_key_data_attributes import RotateApiKeyDataAttributes +from .rotate_api_key_data_type import RotateApiKeyDataType from .run_command_heroku_task_params import RunCommandHerokuTaskParams from .run_command_heroku_task_params_post_to_slack_channels_item import ( RunCommandHerokuTaskParamsPostToSlackChannelsItem, @@ -2485,11 +2698,11 @@ from .send_whatsapp_message_task_params_task_type import SendWhatsappMessageTaskParamsTaskType from .service import Service from .service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 -from .service_fields_type_0_item import ServiceFieldsType0Item from .service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 from .service_list import ServiceList from .service_list_data_item import ServiceListDataItem from .service_list_data_item_type import ServiceListDataItemType +from .service_properties_type_0_item import ServicePropertiesType0Item from .service_response import ServiceResponse from .service_response_data import ServiceResponseData from .service_response_data_type import ServiceResponseDataType @@ -2525,6 +2738,19 @@ from .simple_trigger_params import SimpleTriggerParams from .simple_trigger_params_trigger_type import SimpleTriggerParamsTriggerType from .simple_trigger_params_triggers_item import SimpleTriggerParamsTriggersItem +from .sla import Sla +from .sla_condition_match_type import SlaConditionMatchType +from .sla_conditions_item import SlaConditionsItem +from .sla_conditions_item_conditionable_type import SlaConditionsItemConditionableType +from .sla_entity_type import SlaEntityType +from .sla_list import SlaList +from .sla_list_data_item import SlaListDataItem +from .sla_list_data_item_type import SlaListDataItemType +from .sla_notification_configurations_item import SlaNotificationConfigurationsItem +from .sla_notification_configurations_item_offset_type import SlaNotificationConfigurationsItemOffsetType +from .sla_response import SlaResponse +from .sla_response_data import SlaResponseData +from .sla_response_data_type import SlaResponseDataType from .snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams from .snapshot_datadog_graph_task_params_dashboards_item import SnapshotDatadogGraphTaskParamsDashboardsItem from .snapshot_datadog_graph_task_params_post_to_slack_channels_item import ( @@ -2555,6 +2781,7 @@ from .status_list_data_item_type import StatusListDataItemType from .status_page import StatusPage from .status_page_authentication_method import StatusPageAuthenticationMethod +from .status_page_cname_records_type_0 import StatusPageCnameRecordsType0 from .status_page_list import StatusPageList from .status_page_list_data_item import StatusPageListDataItem from .status_page_list_data_item_type import StatusPageListDataItemType @@ -2562,6 +2789,7 @@ from .status_page_response_data import StatusPageResponseData from .status_page_response_data_type import StatusPageResponseDataType from .status_page_saml_name_identifier_format import StatusPageSamlNameIdentifierFormat +from .status_page_section_order_type_0_item import StatusPageSectionOrderType0Item from .status_page_show_uptime_last_days import StatusPageShowUptimeLastDays from .status_page_template import StatusPageTemplate from .status_page_template_kind import StatusPageTemplateKind @@ -2584,11 +2812,11 @@ from .sub_status_response_data_type import SubStatusResponseDataType from .team import Team from .team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 -from .team_fields_type_0_item import TeamFieldsType0Item from .team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 from .team_list import TeamList from .team_list_data_item import TeamListDataItem from .team_list_data_item_type import TeamListDataItemType +from .team_properties_type_0_item import TeamPropertiesType0Item from .team_response import TeamResponse from .team_response_data import TeamResponseData from .team_response_data_type import TeamResponseDataType @@ -2766,6 +2994,10 @@ UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, ) from .update_alerts_source_data_type import UpdateAlertsSourceDataType +from .update_api_key import UpdateApiKey +from .update_api_key_data import UpdateApiKeyData +from .update_api_key_data_attributes import UpdateApiKeyDataAttributes +from .update_api_key_data_type import UpdateApiKeyDataType from .update_asana_task_task_params import UpdateAsanaTaskTaskParams from .update_asana_task_task_params_completion import UpdateAsanaTaskTaskParamsCompletion from .update_asana_task_task_params_dependency_direction import UpdateAsanaTaskTaskParamsDependencyDirection @@ -2779,6 +3011,28 @@ from .update_authorization_data_attributes_permissions_item import UpdateAuthorizationDataAttributesPermissionsItem from .update_authorization_data_type import UpdateAuthorizationDataType from .update_catalog import UpdateCatalog +from .update_catalog_checklist_template import UpdateCatalogChecklistTemplate +from .update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData +from .update_catalog_checklist_template_data_attributes import UpdateCatalogChecklistTemplateDataAttributes +from .update_catalog_checklist_template_data_attributes_builtin_field import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinField, +) +from .update_catalog_checklist_template_data_attributes_builtin_field_field_source import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, +) +from .update_catalog_checklist_template_data_attributes_custom_field import ( + UpdateCatalogChecklistTemplateDataAttributesCustomField, +) +from .update_catalog_checklist_template_data_attributes_custom_field_field_source import ( + UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, +) +from .update_catalog_checklist_template_data_attributes_owners_type_0_item import ( + UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item, +) +from .update_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( + UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType, +) +from .update_catalog_checklist_template_data_type import UpdateCatalogChecklistTemplateDataType from .update_catalog_data import UpdateCatalogData from .update_catalog_data_attributes import UpdateCatalogDataAttributes from .update_catalog_data_attributes_icon import UpdateCatalogDataAttributesIcon @@ -2786,7 +3040,7 @@ from .update_catalog_entity import UpdateCatalogEntity from .update_catalog_entity_data import UpdateCatalogEntityData from .update_catalog_entity_data_attributes import UpdateCatalogEntityDataAttributes -from .update_catalog_entity_data_attributes_fields_item import UpdateCatalogEntityDataAttributesFieldsItem +from .update_catalog_entity_data_attributes_properties_item import UpdateCatalogEntityDataAttributesPropertiesItem from .update_catalog_entity_data_type import UpdateCatalogEntityDataType from .update_catalog_entity_property import UpdateCatalogEntityProperty from .update_catalog_entity_property_data import UpdateCatalogEntityPropertyData @@ -2799,10 +3053,16 @@ from .update_catalog_field_data_attributes_catalog_type import UpdateCatalogFieldDataAttributesCatalogType from .update_catalog_field_data_attributes_kind import UpdateCatalogFieldDataAttributesKind from .update_catalog_field_data_type import UpdateCatalogFieldDataType +from .update_catalog_property import UpdateCatalogProperty +from .update_catalog_property_data import UpdateCatalogPropertyData +from .update_catalog_property_data_attributes import UpdateCatalogPropertyDataAttributes +from .update_catalog_property_data_attributes_catalog_type import UpdateCatalogPropertyDataAttributesCatalogType +from .update_catalog_property_data_attributes_kind import UpdateCatalogPropertyDataAttributesKind +from .update_catalog_property_data_type import UpdateCatalogPropertyDataType from .update_cause import UpdateCause from .update_cause_data import UpdateCauseData from .update_cause_data_attributes import UpdateCauseDataAttributes -from .update_cause_data_attributes_fields_item import UpdateCauseDataAttributesFieldsItem +from .update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem from .update_cause_data_type import UpdateCauseDataType from .update_clickup_task_task_params import UpdateClickupTaskTaskParams from .update_clickup_task_task_params_priority import UpdateClickupTaskTaskParamsPriority @@ -2935,7 +3195,7 @@ from .update_environment import UpdateEnvironment from .update_environment_data import UpdateEnvironmentData from .update_environment_data_attributes import UpdateEnvironmentDataAttributes -from .update_environment_data_attributes_fields_item import UpdateEnvironmentDataAttributesFieldsItem +from .update_environment_data_attributes_properties_item import UpdateEnvironmentDataAttributesPropertiesItem from .update_environment_data_attributes_slack_aliases_type_0_item import ( UpdateEnvironmentDataAttributesSlackAliasesType0Item, ) @@ -3023,7 +3283,7 @@ from .update_functionality import UpdateFunctionality from .update_functionality_data import UpdateFunctionalityData from .update_functionality_data_attributes import UpdateFunctionalityDataAttributes -from .update_functionality_data_attributes_fields_item import UpdateFunctionalityDataAttributesFieldsItem +from .update_functionality_data_attributes_properties_item import UpdateFunctionalityDataAttributesPropertiesItem from .update_functionality_data_attributes_slack_aliases_type_0_item import ( UpdateFunctionalityDataAttributesSlackAliasesType0Item, ) @@ -3033,6 +3293,9 @@ from .update_functionality_data_type import UpdateFunctionalityDataType from .update_github_issue_task_params import UpdateGithubIssueTaskParams from .update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion +from .update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType +from .update_github_issue_task_params_labels_item import UpdateGithubIssueTaskParamsLabelsItem +from .update_github_issue_task_params_repository import UpdateGithubIssueTaskParamsRepository from .update_github_issue_task_params_task_type import UpdateGithubIssueTaskParamsTaskType from .update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from .update_gitlab_issue_task_params_completion import UpdateGitlabIssueTaskParamsCompletion @@ -3170,7 +3433,7 @@ from .update_incident_type import UpdateIncidentType from .update_incident_type_data import UpdateIncidentTypeData from .update_incident_type_data_attributes import UpdateIncidentTypeDataAttributes -from .update_incident_type_data_attributes_fields_item import UpdateIncidentTypeDataAttributesFieldsItem +from .update_incident_type_data_attributes_properties_item import UpdateIncidentTypeDataAttributesPropertiesItem from .update_incident_type_data_attributes_slack_aliases_type_0_item import ( UpdateIncidentTypeDataAttributesSlackAliasesType0Item, ) @@ -3213,6 +3476,10 @@ from .update_motion_task_task_params_task_type import UpdateMotionTaskTaskParamsTaskType from .update_notion_page_task_params import UpdateNotionPageTaskParams from .update_notion_page_task_params_task_type import UpdateNotionPageTaskParamsTaskType +from .update_on_call_pay_report import UpdateOnCallPayReport +from .update_on_call_pay_report_data import UpdateOnCallPayReportData +from .update_on_call_pay_report_data_attributes import UpdateOnCallPayReportDataAttributes +from .update_on_call_pay_report_data_type import UpdateOnCallPayReportDataType from .update_on_call_role import UpdateOnCallRole from .update_on_call_role_data import UpdateOnCallRoleData from .update_on_call_role_data_attributes import UpdateOnCallRoleDataAttributes @@ -3367,6 +3634,13 @@ from .update_role_data_attributes_api_keys_permissions_item import UpdateRoleDataAttributesApiKeysPermissionsItem from .update_role_data_attributes_audits_permissions_item import UpdateRoleDataAttributesAuditsPermissionsItem from .update_role_data_attributes_billing_permissions_item import UpdateRoleDataAttributesBillingPermissionsItem +from .update_role_data_attributes_catalogs_permissions_item import UpdateRoleDataAttributesCatalogsPermissionsItem +from .update_role_data_attributes_communication_permissions_item import ( + UpdateRoleDataAttributesCommunicationPermissionsItem, +) +from .update_role_data_attributes_edge_connector_permissions_item import ( + UpdateRoleDataAttributesEdgeConnectorPermissionsItem, +) from .update_role_data_attributes_environments_permissions_item import ( UpdateRoleDataAttributesEnvironmentsPermissionsItem, ) @@ -3378,6 +3652,9 @@ from .update_role_data_attributes_incident_causes_permissions_item import ( UpdateRoleDataAttributesIncidentCausesPermissionsItem, ) +from .update_role_data_attributes_incident_communication_permissions_item import ( + UpdateRoleDataAttributesIncidentCommunicationPermissionsItem, +) from .update_role_data_attributes_incident_feedbacks_permissions_item import ( UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem, ) @@ -3392,6 +3669,7 @@ UpdateRoleDataAttributesIntegrationsPermissionsItem, ) from .update_role_data_attributes_invitations_permissions_item import UpdateRoleDataAttributesInvitationsPermissionsItem +from .update_role_data_attributes_paging_permissions_item import UpdateRoleDataAttributesPagingPermissionsItem from .update_role_data_attributes_playbooks_permissions_item import UpdateRoleDataAttributesPlaybooksPermissionsItem from .update_role_data_attributes_private_incidents_permissions_item import ( UpdateRoleDataAttributesPrivateIncidentsPermissionsItem, @@ -3403,9 +3681,13 @@ from .update_role_data_attributes_secrets_permissions_item import UpdateRoleDataAttributesSecretsPermissionsItem from .update_role_data_attributes_services_permissions_item import UpdateRoleDataAttributesServicesPermissionsItem from .update_role_data_attributes_severities_permissions_item import UpdateRoleDataAttributesSeveritiesPermissionsItem +from .update_role_data_attributes_slas_permissions_item import UpdateRoleDataAttributesSlasPermissionsItem from .update_role_data_attributes_status_pages_permissions_item import ( UpdateRoleDataAttributesStatusPagesPermissionsItem, ) +from .update_role_data_attributes_sub_statuses_permissions_item import ( + UpdateRoleDataAttributesSubStatusesPermissionsItem, +) from .update_role_data_attributes_webhooks_permissions_item import UpdateRoleDataAttributesWebhooksPermissionsItem from .update_role_data_attributes_workflows_permissions_item import UpdateRoleDataAttributesWorkflowsPermissionsItem from .update_role_data_type import UpdateRoleDataType @@ -3479,10 +3761,10 @@ from .update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, ) -from .update_service_data_attributes_fields_item import UpdateServiceDataAttributesFieldsItem from .update_service_data_attributes_incident_broadcast_channel_type_0 import ( UpdateServiceDataAttributesIncidentBroadcastChannelType0, ) +from .update_service_data_attributes_properties_item import UpdateServiceDataAttributesPropertiesItem from .update_service_data_attributes_slack_aliases_type_0_item import UpdateServiceDataAttributesSlackAliasesType0Item from .update_service_data_attributes_slack_channels_type_0_item import UpdateServiceDataAttributesSlackChannelsType0Item from .update_service_data_type import UpdateServiceDataType @@ -3507,6 +3789,30 @@ from .update_shortcut_task_task_params import UpdateShortcutTaskTaskParams from .update_shortcut_task_task_params_completion import UpdateShortcutTaskTaskParamsCompletion from .update_shortcut_task_task_params_task_type import UpdateShortcutTaskTaskParamsTaskType +from .update_sla import UpdateSla +from .update_sla_data import UpdateSlaData +from .update_sla_data_attributes import UpdateSlaDataAttributes +from .update_sla_data_attributes_assignment_deadline_days import UpdateSlaDataAttributesAssignmentDeadlineDays +from .update_sla_data_attributes_assignment_deadline_parent_status import ( + UpdateSlaDataAttributesAssignmentDeadlineParentStatus, +) +from .update_sla_data_attributes_completion_deadline_days import UpdateSlaDataAttributesCompletionDeadlineDays +from .update_sla_data_attributes_completion_deadline_parent_status import ( + UpdateSlaDataAttributesCompletionDeadlineParentStatus, +) +from .update_sla_data_attributes_condition_match_type import UpdateSlaDataAttributesConditionMatchType +from .update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem +from .update_sla_data_attributes_conditions_item_conditionable_type import ( + UpdateSlaDataAttributesConditionsItemConditionableType, +) +from .update_sla_data_attributes_conditions_item_property import UpdateSlaDataAttributesConditionsItemProperty +from .update_sla_data_attributes_notification_configurations_item import ( + UpdateSlaDataAttributesNotificationConfigurationsItem, +) +from .update_sla_data_attributes_notification_configurations_item_offset_type import ( + UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType, +) +from .update_sla_data_type import UpdateSlaDataType from .update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams from .update_slack_channel_topic_task_params_channel import UpdateSlackChannelTopicTaskParamsChannel from .update_slack_channel_topic_task_params_task_type import UpdateSlackChannelTopicTaskParamsTaskType @@ -3517,6 +3823,9 @@ from .update_status_page_data_attributes_saml_name_identifier_format import ( UpdateStatusPageDataAttributesSamlNameIdentifierFormat, ) +from .update_status_page_data_attributes_section_order_type_0_item import ( + UpdateStatusPageDataAttributesSectionOrderType0Item, +) from .update_status_page_data_attributes_show_uptime_last_days import UpdateStatusPageDataAttributesShowUptimeLastDays from .update_status_page_data_type import UpdateStatusPageDataType from .update_status_page_template import UpdateStatusPageTemplate @@ -3540,10 +3849,10 @@ from .update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) -from .update_team_data_attributes_fields_item import UpdateTeamDataAttributesFieldsItem from .update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) +from .update_team_data_attributes_properties_item import UpdateTeamDataAttributesPropertiesItem from .update_team_data_attributes_slack_aliases_type_0_item import UpdateTeamDataAttributesSlackAliasesType0Item from .update_team_data_attributes_slack_channels_type_0_item import UpdateTeamDataAttributesSlackChannelsType0Item from .update_team_data_type import UpdateTeamDataType @@ -3883,6 +4192,7 @@ "AlertTriggerParamsAlertConditionPayload", "AlertTriggerParamsAlertConditionSource", "AlertTriggerParamsAlertConditionStatus", + "AlertTriggerParamsAlertConditionUrgency", "AlertTriggerParamsAlertFieldConditionsItem", "AlertTriggerParamsAlertFieldConditionsItemConditionType", "AlertTriggerParamsAlertPayloadConditions", @@ -3898,6 +4208,18 @@ "AlertUrgencyResponse", "AlertUrgencyResponseData", "AlertUrgencyResponseDataType", + "ApiKey", + "ApiKeyKind", + "ApiKeyList", + "ApiKeyListDataItem", + "ApiKeyListDataItemType", + "ApiKeyResponse", + "ApiKeyResponseData", + "ApiKeyResponseDataType", + "ApiKeyWithTokenResponse", + "ApiKeyWithTokenResponseData", + "ApiKeyWithTokenResponseDataAttributes", + "ApiKeyWithTokenResponseDataType", "ArchiveMicrosoftTeamsChannelsTaskParams", "ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem", "ArchiveMicrosoftTeamsChannelsTaskParamsTaskType", @@ -3954,11 +4276,42 @@ "CancelIncidentDataAttributes", "CancelIncidentDataType", "Catalog", + "CatalogChecklistTemplate", + "CatalogChecklistTemplateCatalogType", + "CatalogChecklistTemplateFieldsType0Item", + "CatalogChecklistTemplateFieldsType0ItemFieldSource", + "CatalogChecklistTemplateList", + "CatalogChecklistTemplateListDataItem", + "CatalogChecklistTemplateListDataItemType", + "CatalogChecklistTemplateOwnersType0Item", + "CatalogChecklistTemplateOwnersType0ItemType", + "CatalogChecklistTemplateResponse", + "CatalogChecklistTemplateResponseData", + "CatalogChecklistTemplateResponseDataType", + "CatalogChecklistTemplateScopeType", "CatalogEntity", - "CatalogEntityFieldsItem", + "CatalogEntityChecklist", + "CatalogEntityChecklistAuditableType", + "CatalogEntityChecklistChecklistFieldsType0Item", + "CatalogEntityChecklistChecklistFieldsType0ItemData", + "CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes", + "CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0", + "CatalogEntityChecklistChecklistFieldsType0ItemDataType", + "CatalogEntityChecklistChecklistOwnersType0Item", + "CatalogEntityChecklistChecklistOwnersType0ItemData", + "CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes", + "CatalogEntityChecklistChecklistOwnersType0ItemDataType", + "CatalogEntityChecklistList", + "CatalogEntityChecklistListDataItem", + "CatalogEntityChecklistListDataItemType", + "CatalogEntityChecklistResponse", + "CatalogEntityChecklistResponseData", + "CatalogEntityChecklistResponseDataType", + "CatalogEntityChecklistStatus", "CatalogEntityList", "CatalogEntityListDataItem", "CatalogEntityListDataItemType", + "CatalogEntityPropertiesItem", "CatalogEntityProperty", "CatalogEntityPropertyKey", "CatalogEntityPropertyList", @@ -3983,14 +4336,23 @@ "CatalogList", "CatalogListDataItem", "CatalogListDataItemType", + "CatalogProperty", + "CatalogPropertyCatalogType", + "CatalogPropertyKind", + "CatalogPropertyList", + "CatalogPropertyListDataItem", + "CatalogPropertyListDataItemType", + "CatalogPropertyResponse", + "CatalogPropertyResponseData", + "CatalogPropertyResponseDataType", "CatalogResponse", "CatalogResponseData", "CatalogResponseDataType", "Cause", - "CauseFieldsItem", "CauseList", "CauseListDataItem", "CauseListDataItemType", + "CausePropertiesItem", "CauseResponse", "CauseResponseData", "CauseResponseDataType", @@ -4087,6 +4449,8 @@ "CreateEdgeConnectorBodyDataAttributesStatus", "CreateEdgeConnectorBodyDataType", "CreateGithubIssueTaskParams", + "CreateGithubIssueTaskParamsIssueType", + "CreateGithubIssueTaskParamsLabelsItem", "CreateGithubIssueTaskParamsRepository", "CreateGithubIssueTaskParamsTaskType", "CreateGitlabIssueTaskParams", @@ -4132,6 +4496,13 @@ "CreateJiraSubtaskTaskParamsStatus", "CreateJiraSubtaskTaskParamsSubtaskIssueType", "CreateJiraSubtaskTaskParamsTaskType", + "CreateJsmopsAlertTaskParams", + "CreateJsmopsAlertTaskParamsEscalationsItem", + "CreateJsmopsAlertTaskParamsPriority", + "CreateJsmopsAlertTaskParamsSchedulesItem", + "CreateJsmopsAlertTaskParamsTaskType", + "CreateJsmopsAlertTaskParamsTeamsItem", + "CreateJsmopsAlertTaskParamsUsersItem", "CreateLinearIssueCommentTaskParams", "CreateLinearIssueCommentTaskParamsTaskType", "CreateLinearIssueTaskParams", @@ -4146,6 +4517,7 @@ "CreateLinearSubtaskIssueTaskParamsPriority", "CreateLinearSubtaskIssueTaskParamsState", "CreateLinearSubtaskIssueTaskParamsTaskType", + "CreateMeetingRecordingPlatform", "CreateMicrosoftTeamsChannelTaskParams", "CreateMicrosoftTeamsChannelTaskParamsPrivate", "CreateMicrosoftTeamsChannelTaskParamsTaskType", @@ -4317,10 +4689,10 @@ "EdgeConnectorDataAttributesStatus", "EdgeConnectorDataType", "Environment", - "EnvironmentFieldsType0Item", "EnvironmentList", "EnvironmentListDataItem", "EnvironmentListDataItemType", + "EnvironmentPropertiesType0Item", "EnvironmentResponse", "EnvironmentResponseData", "EnvironmentResponseDataType", @@ -4347,9 +4719,11 @@ "EscalationPolicyListDataItem", "EscalationPolicyListDataItemType", "EscalationPolicyPath", + "EscalationPolicyPathAfterDeferralBehavior", "EscalationPolicyPathList", "EscalationPolicyPathListDataItem", "EscalationPolicyPathMatchMode", + "EscalationPolicyPathPathType", "EscalationPolicyPathResponse", "EscalationPolicyPathResponseData", "EscalationPolicyPathResponseDataType", @@ -4363,26 +4737,44 @@ "EscalationPolicyPathRulesItemType3", "EscalationPolicyPathRulesItemType3Operator", "EscalationPolicyPathRulesItemType3RuleType", - "EscalationPolicyPathRulesItemType4Type0", - "EscalationPolicyPathRulesItemType4Type0RuleType", - "EscalationPolicyPathRulesItemType4Type1", - "EscalationPolicyPathRulesItemType4Type1RuleType", - "EscalationPolicyPathRulesItemType4Type2", - "EscalationPolicyPathRulesItemType4Type2Operator", - "EscalationPolicyPathRulesItemType4Type2RuleType", - "EscalationPolicyPathRulesItemType4Type3", - "EscalationPolicyPathRulesItemType4Type3Operator", - "EscalationPolicyPathRulesItemType4Type3RuleType", - "EscalationPolicyPathRulesItemType5Type0", - "EscalationPolicyPathRulesItemType5Type0RuleType", - "EscalationPolicyPathRulesItemType5Type1", - "EscalationPolicyPathRulesItemType5Type1RuleType", - "EscalationPolicyPathRulesItemType5Type2", - "EscalationPolicyPathRulesItemType5Type2Operator", - "EscalationPolicyPathRulesItemType5Type2RuleType", - "EscalationPolicyPathRulesItemType5Type3", - "EscalationPolicyPathRulesItemType5Type3Operator", - "EscalationPolicyPathRulesItemType5Type3RuleType", + "EscalationPolicyPathRulesItemType4", + "EscalationPolicyPathRulesItemType4RuleType", + "EscalationPolicyPathRulesItemType5", + "EscalationPolicyPathRulesItemType5RuleType", + "EscalationPolicyPathRulesItemType5TimeBlocksItem", + "EscalationPolicyPathRulesItemType5TimeZone", + "EscalationPolicyPathRulesItemType6Type0", + "EscalationPolicyPathRulesItemType6Type0RuleType", + "EscalationPolicyPathRulesItemType6Type1", + "EscalationPolicyPathRulesItemType6Type1RuleType", + "EscalationPolicyPathRulesItemType6Type2", + "EscalationPolicyPathRulesItemType6Type2Operator", + "EscalationPolicyPathRulesItemType6Type2RuleType", + "EscalationPolicyPathRulesItemType6Type3", + "EscalationPolicyPathRulesItemType6Type3Operator", + "EscalationPolicyPathRulesItemType6Type3RuleType", + "EscalationPolicyPathRulesItemType6Type4", + "EscalationPolicyPathRulesItemType6Type4RuleType", + "EscalationPolicyPathRulesItemType6Type5", + "EscalationPolicyPathRulesItemType6Type5RuleType", + "EscalationPolicyPathRulesItemType6Type5TimeBlocksItem", + "EscalationPolicyPathRulesItemType6Type5TimeZone", + "EscalationPolicyPathRulesItemType7Type0", + "EscalationPolicyPathRulesItemType7Type0RuleType", + "EscalationPolicyPathRulesItemType7Type1", + "EscalationPolicyPathRulesItemType7Type1RuleType", + "EscalationPolicyPathRulesItemType7Type2", + "EscalationPolicyPathRulesItemType7Type2Operator", + "EscalationPolicyPathRulesItemType7Type2RuleType", + "EscalationPolicyPathRulesItemType7Type3", + "EscalationPolicyPathRulesItemType7Type3Operator", + "EscalationPolicyPathRulesItemType7Type3RuleType", + "EscalationPolicyPathRulesItemType7Type4", + "EscalationPolicyPathRulesItemType7Type4RuleType", + "EscalationPolicyPathRulesItemType7Type5", + "EscalationPolicyPathRulesItemType7Type5RuleType", + "EscalationPolicyPathRulesItemType7Type5TimeBlocksItem", + "EscalationPolicyPathRulesItemType7Type5TimeZone", "EscalationPolicyPathTimeRestrictionsItem", "EscalationPolicyPathTimeRestrictionsItemEndDay", "EscalationPolicyPathTimeRestrictionsItemStartDay", @@ -4449,10 +4841,10 @@ "FormSetResponseData", "FormSetResponseDataType", "Functionality", - "FunctionalityFieldsType0Item", "FunctionalityList", "FunctionalityListDataItem", "FunctionalityListDataItemType", + "FunctionalityPropertiesType0Item", "FunctionalityResponse", "FunctionalityResponseData", "FunctionalityResponseDataType", @@ -4467,7 +4859,6 @@ "GetAlertsTaskParamsTaskType", "GetCatalogEntityInclude", "GetCatalogEntityPropertyInclude", - "GetCatalogFieldInclude", "GetCustomFieldInclude", "GetDashboardInclude", "GetEscalationPathInclude", @@ -4667,16 +5058,17 @@ "IncidentTriggerParamsIncidentStatusesItem", "IncidentTriggerParamsTriggerType", "IncidentType", - "IncidentTypeFieldsItem", "IncidentTypeList", "IncidentTypeListDataItem", "IncidentTypeListDataItemType", + "IncidentTypePropertiesItem", "IncidentTypeResponse", "IncidentTypeResponseData", "IncidentTypeResponseDataType", "IncidentTypeSlackAliasesType0Item", "IncidentTypeSlackChannelsType0Item", "IncidentUserType0", + "IncidentZoomMeetingGlobalDialInNumbersType0Item", "InTriageIncident", "InTriageIncidentData", "InTriageIncidentDataType", @@ -4706,42 +5098,43 @@ "IpRangesResponseDataType", "Links", "ListAlertsInclude", + "ListCatalogChecklistTemplatesInclude", + "ListCatalogChecklistTemplatesSort", "ListCatalogEntitiesInclude", "ListCatalogEntitiesSort", "ListCatalogEntityPropertiesInclude", "ListCatalogEntityPropertiesSort", - "ListCatalogFieldsInclude", - "ListCatalogFieldsSort", "ListCatalogsInclude", "ListCatalogsSort", - "ListCauseCatalogFieldsInclude", - "ListCauseCatalogFieldsSort", + "ListCauseCatalogPropertiesInclude", + "ListCauseCatalogPropertiesSort", "ListCustomFieldsInclude", "ListCustomFieldsSort", "ListDashboardsInclude", - "ListEnvironmentCatalogFieldsInclude", - "ListEnvironmentCatalogFieldsSort", + "ListEnvironmentCatalogPropertiesInclude", + "ListEnvironmentCatalogPropertiesSort", "ListEscalationPathsInclude", "ListEscalationPoliciesInclude", "ListFormFieldsInclude", - "ListFunctionalityCatalogFieldsInclude", - "ListFunctionalityCatalogFieldsSort", - "ListGroupCatalogFieldsInclude", - "ListGroupCatalogFieldsSort", + "ListFunctionalityCatalogPropertiesInclude", + "ListFunctionalityCatalogPropertiesSort", + "ListGroupCatalogPropertiesInclude", + "ListGroupCatalogPropertiesSort", "ListIncidentAlertsInclude", "ListIncidentsInclude", "ListIncidentsSort", "ListIncidentSubStatusesInclude", "ListIncidentSubStatusesSort", - "ListIncidentTypeCatalogFieldsInclude", - "ListIncidentTypeCatalogFieldsSort", + "ListIncidentTypeCatalogPropertiesInclude", + "ListIncidentTypeCatalogPropertiesSort", + "ListOncallsInclude", "ListPlaybooksInclude", "ListRetrospectiveConfigurationsInclude", "ListRetrospectiveProcessesInclude", "ListRetrospectiveProcessGroupsInclude", "ListRetrospectiveProcessGroupsSort", - "ListServiceCatalogFieldsInclude", - "ListServiceCatalogFieldsSort", + "ListServiceCatalogPropertiesInclude", + "ListServiceCatalogPropertiesSort", "ListShiftsInclude", "ListTeamsInclude", "ListUsersInclude", @@ -4764,6 +5157,12 @@ "LiveCallRouterResponseData", "LiveCallRouterResponseDataType", "LiveCallRouterWaitingMusicUrl", + "MeetingRecording", + "MeetingRecordingList", + "MeetingRecordingListDataItem", + "MeetingRecordingListDataItemType", + "MeetingRecordingPlatform", + "MeetingRecordingStatus", "Meta", "MitigateIncident", "MitigateIncidentData", @@ -4852,6 +5251,11 @@ "NewAlertUrgencyData", "NewAlertUrgencyDataAttributes", "NewAlertUrgencyDataType", + "NewApiKey", + "NewApiKeyData", + "NewApiKeyDataAttributes", + "NewApiKeyDataAttributesKind", + "NewApiKeyDataType", "NewAuthorization", "NewAuthorizationData", "NewAuthorizationDataAttributes", @@ -4860,6 +5264,18 @@ "NewAuthorizationDataAttributesPermissionsItem", "NewAuthorizationDataType", "NewCatalog", + "NewCatalogChecklistTemplate", + "NewCatalogChecklistTemplateData", + "NewCatalogChecklistTemplateDataAttributes", + "NewCatalogChecklistTemplateDataAttributesBuiltinField", + "NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource", + "NewCatalogChecklistTemplateDataAttributesCatalogType", + "NewCatalogChecklistTemplateDataAttributesCustomField", + "NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource", + "NewCatalogChecklistTemplateDataAttributesOwnersType0Item", + "NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType", + "NewCatalogChecklistTemplateDataAttributesScopeType", + "NewCatalogChecklistTemplateDataType", "NewCatalogData", "NewCatalogDataAttributes", "NewCatalogDataAttributesIcon", @@ -4867,7 +5283,7 @@ "NewCatalogEntity", "NewCatalogEntityData", "NewCatalogEntityDataAttributes", - "NewCatalogEntityDataAttributesFieldsItem", + "NewCatalogEntityDataAttributesPropertiesItem", "NewCatalogEntityDataType", "NewCatalogEntityProperty", "NewCatalogEntityPropertyData", @@ -4880,10 +5296,16 @@ "NewCatalogFieldDataAttributesCatalogType", "NewCatalogFieldDataAttributesKind", "NewCatalogFieldDataType", + "NewCatalogProperty", + "NewCatalogPropertyData", + "NewCatalogPropertyDataAttributes", + "NewCatalogPropertyDataAttributesCatalogType", + "NewCatalogPropertyDataAttributesKind", + "NewCatalogPropertyDataType", "NewCause", "NewCauseData", "NewCauseDataAttributes", - "NewCauseDataAttributesFieldsItem", + "NewCauseDataAttributesPropertiesItem", "NewCauseDataType", "NewCommunicationsGroup", "NewCommunicationsGroupData", @@ -4961,7 +5383,7 @@ "NewEnvironment", "NewEnvironmentData", "NewEnvironmentDataAttributes", - "NewEnvironmentDataAttributesFieldsItem", + "NewEnvironmentDataAttributesPropertiesItem", "NewEnvironmentDataAttributesSlackAliasesType0Item", "NewEnvironmentDataAttributesSlackChannelsType0Item", "NewEnvironmentDataType", @@ -5021,7 +5443,7 @@ "NewFunctionality", "NewFunctionalityData", "NewFunctionalityDataAttributes", - "NewFunctionalityDataAttributesFieldsItem", + "NewFunctionalityDataAttributesPropertiesItem", "NewFunctionalityDataAttributesShowUptimeLastDays", "NewFunctionalityDataAttributesSlackAliasesType0Item", "NewFunctionalityDataAttributesSlackChannelsType0Item", @@ -5113,7 +5535,7 @@ "NewIncidentType", "NewIncidentTypeData", "NewIncidentTypeDataAttributes", - "NewIncidentTypeDataAttributesFieldsItem", + "NewIncidentTypeDataAttributesPropertiesItem", "NewIncidentTypeDataAttributesSlackAliasesType0Item", "NewIncidentTypeDataAttributesSlackChannelsType0Item", "NewIncidentTypeDataType", @@ -5129,6 +5551,10 @@ "NewLiveCallRouterDataAttributesPhoneType", "NewLiveCallRouterDataAttributesWaitingMusicUrl", "NewLiveCallRouterDataType", + "NewOnCallPayReport", + "NewOnCallPayReportData", + "NewOnCallPayReportDataAttributes", + "NewOnCallPayReportDataType", "NewOnCallRole", "NewOnCallRoleData", "NewOnCallRoleDataAttributes", @@ -5210,17 +5636,22 @@ "NewRoleDataAttributesApiKeysPermissionsItem", "NewRoleDataAttributesAuditsPermissionsItem", "NewRoleDataAttributesBillingPermissionsItem", + "NewRoleDataAttributesCatalogsPermissionsItem", + "NewRoleDataAttributesCommunicationPermissionsItem", + "NewRoleDataAttributesEdgeConnectorPermissionsItem", "NewRoleDataAttributesEnvironmentsPermissionsItem", "NewRoleDataAttributesFormFieldsPermissionsItem", "NewRoleDataAttributesFunctionalitiesPermissionsItem", "NewRoleDataAttributesGroupsPermissionsItem", "NewRoleDataAttributesIncidentCausesPermissionsItem", + "NewRoleDataAttributesIncidentCommunicationPermissionsItem", "NewRoleDataAttributesIncidentFeedbacksPermissionsItem", "NewRoleDataAttributesIncidentRolesPermissionsItem", "NewRoleDataAttributesIncidentsPermissionsItem", "NewRoleDataAttributesIncidentTypesPermissionsItem", "NewRoleDataAttributesIntegrationsPermissionsItem", "NewRoleDataAttributesInvitationsPermissionsItem", + "NewRoleDataAttributesPagingPermissionsItem", "NewRoleDataAttributesPlaybooksPermissionsItem", "NewRoleDataAttributesPrivateIncidentsPermissionsItem", "NewRoleDataAttributesPulsesPermissionsItem", @@ -5229,7 +5660,9 @@ "NewRoleDataAttributesSecretsPermissionsItem", "NewRoleDataAttributesServicesPermissionsItem", "NewRoleDataAttributesSeveritiesPermissionsItem", + "NewRoleDataAttributesSlasPermissionsItem", "NewRoleDataAttributesStatusPagesPermissionsItem", + "NewRoleDataAttributesSubStatusesPermissionsItem", "NewRoleDataAttributesWebhooksPermissionsItem", "NewRoleDataAttributesWorkflowsPermissionsItem", "NewRoleDataType", @@ -5274,8 +5707,8 @@ "NewServiceData", "NewServiceDataAttributes", "NewServiceDataAttributesAlertBroadcastChannelType0", - "NewServiceDataAttributesFieldsItem", "NewServiceDataAttributesIncidentBroadcastChannelType0", + "NewServiceDataAttributesPropertiesItem", "NewServiceDataAttributesShowUptimeLastDays", "NewServiceDataAttributesSlackAliasesType0Item", "NewServiceDataAttributesSlackChannelsType0Item", @@ -5287,11 +5720,26 @@ "NewSeverityDataAttributesSlackAliasesType0Item", "NewSeverityDataAttributesSlackChannelsType0Item", "NewSeverityDataType", + "NewSla", + "NewSlaData", + "NewSlaDataAttributes", + "NewSlaDataAttributesAssignmentDeadlineDays", + "NewSlaDataAttributesAssignmentDeadlineParentStatus", + "NewSlaDataAttributesCompletionDeadlineDays", + "NewSlaDataAttributesCompletionDeadlineParentStatus", + "NewSlaDataAttributesConditionMatchType", + "NewSlaDataAttributesConditionsItem", + "NewSlaDataAttributesConditionsItemConditionableType", + "NewSlaDataAttributesConditionsItemProperty", + "NewSlaDataAttributesNotificationConfigurationsItem", + "NewSlaDataAttributesNotificationConfigurationsItemOffsetType", + "NewSlaDataType", "NewStatusPage", "NewStatusPageData", "NewStatusPageDataAttributes", "NewStatusPageDataAttributesAuthenticationMethod", "NewStatusPageDataAttributesSamlNameIdentifierFormat", + "NewStatusPageDataAttributesSectionOrderType0Item", "NewStatusPageDataAttributesShowUptimeLastDays", "NewStatusPageDataType", "NewStatusPageTemplate", @@ -5309,8 +5757,8 @@ "NewTeamData", "NewTeamDataAttributes", "NewTeamDataAttributesAlertBroadcastChannelType0", - "NewTeamDataAttributesFieldsItem", "NewTeamDataAttributesIncidentBroadcastChannelType0", + "NewTeamDataAttributesPropertiesItem", "NewTeamDataAttributesSlackAliasesType0Item", "NewTeamDataAttributesSlackChannelsType0Item", "NewTeamDataType", @@ -5372,6 +5820,15 @@ "NewWorkflowTaskData", "NewWorkflowTaskDataAttributes", "NewWorkflowTaskDataType", + "OnCallPayReport", + "OnCallPayReportList", + "OnCallPayReportListDataItem", + "OnCallPayReportListDataItemType", + "OnCallPayReportPayType", + "OnCallPayReportResponse", + "OnCallPayReportResponseData", + "OnCallPayReportResponseDataType", + "OnCallPayReportStatus", "OnCallRole", "OnCallRoleAlertFieldsPermissionsItem", "OnCallRoleAlertGroupsPermissionsItem", @@ -5419,6 +5876,11 @@ "OverrideShiftResponse", "OverrideShiftResponseData", "OverrideShiftResponseDataType", + "PageJsmopsOnCallRespondersTaskParams", + "PageJsmopsOnCallRespondersTaskParamsPriority", + "PageJsmopsOnCallRespondersTaskParamsTaskType", + "PageJsmopsOnCallRespondersTaskParamsTeamsItem", + "PageJsmopsOnCallRespondersTaskParamsUsersItem", "PageOpsgenieOnCallRespondersTaskParams", "PageOpsgenieOnCallRespondersTaskParamsPriority", "PageOpsgenieOnCallRespondersTaskParamsTaskType", @@ -5432,6 +5894,7 @@ "PagePagerdutyOnCallRespondersTaskParamsUsersItem", "PageRootlyOnCallRespondersTaskParams", "PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget", + "PageRootlyOnCallRespondersTaskParamsFunctionalityTarget", "PageRootlyOnCallRespondersTaskParamsGroupTarget", "PageRootlyOnCallRespondersTaskParamsServiceTarget", "PageRootlyOnCallRespondersTaskParamsTaskType", @@ -5597,11 +6060,15 @@ "RoleApiKeysPermissionsItem", "RoleAuditsPermissionsItem", "RoleBillingPermissionsItem", + "RoleCatalogsPermissionsItem", + "RoleCommunicationPermissionsItem", + "RoleEdgeConnectorPermissionsItem", "RoleEnvironmentsPermissionsItem", "RoleFormFieldsPermissionsItem", "RoleFunctionalitiesPermissionsItem", "RoleGroupsPermissionsItem", "RoleIncidentCausesPermissionsItem", + "RoleIncidentCommunicationPermissionsItem", "RoleIncidentFeedbacksPermissionsItem", "RoleIncidentRolesPermissionsItem", "RoleIncidentsPermissionsItem", @@ -5611,6 +6078,7 @@ "RoleList", "RoleListDataItem", "RoleListDataItemType", + "RolePagingPermissionsItem", "RolePlaybooksPermissionsItem", "RolePrivateIncidentsPermissionsItem", "RolePulsesPermissionsItem", @@ -5625,9 +6093,15 @@ "RoleSecretsPermissionsItem", "RoleServicesPermissionsItem", "RoleSeveritiesPermissionsItem", + "RoleSlasPermissionsItem", "RoleStatusPagesPermissionsItem", + "RoleSubStatusesPermissionsItem", "RoleWebhooksPermissionsItem", "RoleWorkflowsPermissionsItem", + "RotateApiKey", + "RotateApiKeyData", + "RotateApiKeyDataAttributes", + "RotateApiKeyDataType", "RunCommandHerokuTaskParams", "RunCommandHerokuTaskParamsPostToSlackChannelsItem", "RunCommandHerokuTaskParamsSize", @@ -5694,11 +6168,11 @@ "SendWhatsappMessageTaskParamsTaskType", "Service", "ServiceAlertBroadcastChannelType0", - "ServiceFieldsType0Item", "ServiceIncidentBroadcastChannelType0", "ServiceList", "ServiceListDataItem", "ServiceListDataItemType", + "ServicePropertiesType0Item", "ServiceResponse", "ServiceResponseData", "ServiceResponseDataType", @@ -5734,6 +6208,19 @@ "SimpleTriggerParams", "SimpleTriggerParamsTriggersItem", "SimpleTriggerParamsTriggerType", + "Sla", + "SlaConditionMatchType", + "SlaConditionsItem", + "SlaConditionsItemConditionableType", + "SlaEntityType", + "SlaList", + "SlaListDataItem", + "SlaListDataItemType", + "SlaNotificationConfigurationsItem", + "SlaNotificationConfigurationsItemOffsetType", + "SlaResponse", + "SlaResponseData", + "SlaResponseDataType", "SnapshotDatadogGraphTaskParams", "SnapshotDatadogGraphTaskParamsDashboardsItem", "SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem", @@ -5756,6 +6243,7 @@ "StatusListDataItemType", "StatusPage", "StatusPageAuthenticationMethod", + "StatusPageCnameRecordsType0", "StatusPageList", "StatusPageListDataItem", "StatusPageListDataItemType", @@ -5763,6 +6251,7 @@ "StatusPageResponseData", "StatusPageResponseDataType", "StatusPageSamlNameIdentifierFormat", + "StatusPageSectionOrderType0Item", "StatusPageShowUptimeLastDays", "StatusPageTemplate", "StatusPageTemplateKind", @@ -5785,11 +6274,11 @@ "SubStatusResponseDataType", "Team", "TeamAlertBroadcastChannelType0", - "TeamFieldsType0Item", "TeamIncidentBroadcastChannelType0", "TeamList", "TeamListDataItem", "TeamListDataItemType", + "TeamPropertiesType0Item", "TeamResponse", "TeamResponseData", "TeamResponseDataType", @@ -5899,6 +6388,10 @@ "UpdateAlertUrgencyData", "UpdateAlertUrgencyDataAttributes", "UpdateAlertUrgencyDataType", + "UpdateApiKey", + "UpdateApiKeyData", + "UpdateApiKeyDataAttributes", + "UpdateApiKeyDataType", "UpdateAsanaTaskTaskParams", "UpdateAsanaTaskTaskParamsCompletion", "UpdateAsanaTaskTaskParamsDependencyDirection", @@ -5912,6 +6405,16 @@ "UpdateAuthorizationDataAttributesPermissionsItem", "UpdateAuthorizationDataType", "UpdateCatalog", + "UpdateCatalogChecklistTemplate", + "UpdateCatalogChecklistTemplateData", + "UpdateCatalogChecklistTemplateDataAttributes", + "UpdateCatalogChecklistTemplateDataAttributesBuiltinField", + "UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource", + "UpdateCatalogChecklistTemplateDataAttributesCustomField", + "UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource", + "UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item", + "UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType", + "UpdateCatalogChecklistTemplateDataType", "UpdateCatalogData", "UpdateCatalogDataAttributes", "UpdateCatalogDataAttributesIcon", @@ -5919,7 +6422,7 @@ "UpdateCatalogEntity", "UpdateCatalogEntityData", "UpdateCatalogEntityDataAttributes", - "UpdateCatalogEntityDataAttributesFieldsItem", + "UpdateCatalogEntityDataAttributesPropertiesItem", "UpdateCatalogEntityDataType", "UpdateCatalogEntityProperty", "UpdateCatalogEntityPropertyData", @@ -5932,10 +6435,16 @@ "UpdateCatalogFieldDataAttributesCatalogType", "UpdateCatalogFieldDataAttributesKind", "UpdateCatalogFieldDataType", + "UpdateCatalogProperty", + "UpdateCatalogPropertyData", + "UpdateCatalogPropertyDataAttributes", + "UpdateCatalogPropertyDataAttributesCatalogType", + "UpdateCatalogPropertyDataAttributesKind", + "UpdateCatalogPropertyDataType", "UpdateCause", "UpdateCauseData", "UpdateCauseDataAttributes", - "UpdateCauseDataAttributesFieldsItem", + "UpdateCauseDataAttributesPropertiesItem", "UpdateCauseDataType", "UpdateClickupTaskTaskParams", "UpdateClickupTaskTaskParamsPriority", @@ -6034,7 +6543,7 @@ "UpdateEnvironment", "UpdateEnvironmentData", "UpdateEnvironmentDataAttributes", - "UpdateEnvironmentDataAttributesFieldsItem", + "UpdateEnvironmentDataAttributesPropertiesItem", "UpdateEnvironmentDataAttributesSlackAliasesType0Item", "UpdateEnvironmentDataAttributesSlackChannelsType0Item", "UpdateEnvironmentDataType", @@ -6094,12 +6603,15 @@ "UpdateFunctionality", "UpdateFunctionalityData", "UpdateFunctionalityDataAttributes", - "UpdateFunctionalityDataAttributesFieldsItem", + "UpdateFunctionalityDataAttributesPropertiesItem", "UpdateFunctionalityDataAttributesSlackAliasesType0Item", "UpdateFunctionalityDataAttributesSlackChannelsType0Item", "UpdateFunctionalityDataType", "UpdateGithubIssueTaskParams", "UpdateGithubIssueTaskParamsCompletion", + "UpdateGithubIssueTaskParamsIssueType", + "UpdateGithubIssueTaskParamsLabelsItem", + "UpdateGithubIssueTaskParamsRepository", "UpdateGithubIssueTaskParamsTaskType", "UpdateGitlabIssueTaskParams", "UpdateGitlabIssueTaskParamsCompletion", @@ -6215,7 +6727,7 @@ "UpdateIncidentType", "UpdateIncidentTypeData", "UpdateIncidentTypeDataAttributes", - "UpdateIncidentTypeDataAttributesFieldsItem", + "UpdateIncidentTypeDataAttributesPropertiesItem", "UpdateIncidentTypeDataAttributesSlackAliasesType0Item", "UpdateIncidentTypeDataAttributesSlackChannelsType0Item", "UpdateIncidentTypeDataType", @@ -6246,6 +6758,10 @@ "UpdateMotionTaskTaskParamsTaskType", "UpdateNotionPageTaskParams", "UpdateNotionPageTaskParamsTaskType", + "UpdateOnCallPayReport", + "UpdateOnCallPayReportData", + "UpdateOnCallPayReportDataAttributes", + "UpdateOnCallPayReportDataType", "UpdateOnCallRole", "UpdateOnCallRoleData", "UpdateOnCallRoleDataAttributes", @@ -6350,17 +6866,22 @@ "UpdateRoleDataAttributesApiKeysPermissionsItem", "UpdateRoleDataAttributesAuditsPermissionsItem", "UpdateRoleDataAttributesBillingPermissionsItem", + "UpdateRoleDataAttributesCatalogsPermissionsItem", + "UpdateRoleDataAttributesCommunicationPermissionsItem", + "UpdateRoleDataAttributesEdgeConnectorPermissionsItem", "UpdateRoleDataAttributesEnvironmentsPermissionsItem", "UpdateRoleDataAttributesFormFieldsPermissionsItem", "UpdateRoleDataAttributesFunctionalitiesPermissionsItem", "UpdateRoleDataAttributesGroupsPermissionsItem", "UpdateRoleDataAttributesIncidentCausesPermissionsItem", + "UpdateRoleDataAttributesIncidentCommunicationPermissionsItem", "UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem", "UpdateRoleDataAttributesIncidentRolesPermissionsItem", "UpdateRoleDataAttributesIncidentsPermissionsItem", "UpdateRoleDataAttributesIncidentTypesPermissionsItem", "UpdateRoleDataAttributesIntegrationsPermissionsItem", "UpdateRoleDataAttributesInvitationsPermissionsItem", + "UpdateRoleDataAttributesPagingPermissionsItem", "UpdateRoleDataAttributesPlaybooksPermissionsItem", "UpdateRoleDataAttributesPrivateIncidentsPermissionsItem", "UpdateRoleDataAttributesRetrospectivePermissionsItem", @@ -6368,7 +6889,9 @@ "UpdateRoleDataAttributesSecretsPermissionsItem", "UpdateRoleDataAttributesServicesPermissionsItem", "UpdateRoleDataAttributesSeveritiesPermissionsItem", + "UpdateRoleDataAttributesSlasPermissionsItem", "UpdateRoleDataAttributesStatusPagesPermissionsItem", + "UpdateRoleDataAttributesSubStatusesPermissionsItem", "UpdateRoleDataAttributesWebhooksPermissionsItem", "UpdateRoleDataAttributesWorkflowsPermissionsItem", "UpdateRoleDataType", @@ -6412,8 +6935,8 @@ "UpdateServiceData", "UpdateServiceDataAttributes", "UpdateServiceDataAttributesAlertBroadcastChannelType0", - "UpdateServiceDataAttributesFieldsItem", "UpdateServiceDataAttributesIncidentBroadcastChannelType0", + "UpdateServiceDataAttributesPropertiesItem", "UpdateServiceDataAttributesSlackAliasesType0Item", "UpdateServiceDataAttributesSlackChannelsType0Item", "UpdateServiceDataType", @@ -6436,14 +6959,29 @@ "UpdateShortcutTaskTaskParams", "UpdateShortcutTaskTaskParamsCompletion", "UpdateShortcutTaskTaskParamsTaskType", + "UpdateSla", "UpdateSlackChannelTopicTaskParams", "UpdateSlackChannelTopicTaskParamsChannel", "UpdateSlackChannelTopicTaskParamsTaskType", + "UpdateSlaData", + "UpdateSlaDataAttributes", + "UpdateSlaDataAttributesAssignmentDeadlineDays", + "UpdateSlaDataAttributesAssignmentDeadlineParentStatus", + "UpdateSlaDataAttributesCompletionDeadlineDays", + "UpdateSlaDataAttributesCompletionDeadlineParentStatus", + "UpdateSlaDataAttributesConditionMatchType", + "UpdateSlaDataAttributesConditionsItem", + "UpdateSlaDataAttributesConditionsItemConditionableType", + "UpdateSlaDataAttributesConditionsItemProperty", + "UpdateSlaDataAttributesNotificationConfigurationsItem", + "UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType", + "UpdateSlaDataType", "UpdateStatusPage", "UpdateStatusPageData", "UpdateStatusPageDataAttributes", "UpdateStatusPageDataAttributesAuthenticationMethod", "UpdateStatusPageDataAttributesSamlNameIdentifierFormat", + "UpdateStatusPageDataAttributesSectionOrderType0Item", "UpdateStatusPageDataAttributesShowUptimeLastDays", "UpdateStatusPageDataType", "UpdateStatusPageTemplate", @@ -6463,8 +7001,8 @@ "UpdateTeamData", "UpdateTeamDataAttributes", "UpdateTeamDataAttributesAlertBroadcastChannelType0", - "UpdateTeamDataAttributesFieldsItem", "UpdateTeamDataAttributesIncidentBroadcastChannelType0", + "UpdateTeamDataAttributesPropertiesItem", "UpdateTeamDataAttributesSlackAliasesType0Item", "UpdateTeamDataAttributesSlackChannelsType0Item", "UpdateTeamDataType", diff --git a/rootly_sdk/models/action_item_trigger_params.py b/rootly_sdk/models/action_item_trigger_params.py index 10dd31f6..6c91967f 100644 --- a/rootly_sdk/models/action_item_trigger_params.py +++ b/rootly_sdk/models/action_item_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -134,70 +136,66 @@ class ActionItemTriggerParams: """ Attributes: trigger_type (ActionItemTriggerParamsTriggerType): - triggers (Union[Unset, list[str]]): - incident_visibilities (Union[Unset, list[bool]]): - incident_kinds (Union[Unset, list[ActionItemTriggerParamsIncidentKindsItem]]): - incident_statuses (Union[Unset, list[ActionItemTriggerParamsIncidentStatusesItem]]): - incident_inactivity_duration (Union[None, Unset, str]): - incident_condition (Union[Unset, ActionItemTriggerParamsIncidentCondition]): Default: 'ALL'. - incident_condition_visibility (Union[Unset, ActionItemTriggerParamsIncidentConditionVisibility]): Default: + triggers (list[str] | Unset): + incident_visibilities (list[bool] | Unset): + incident_kinds (list[ActionItemTriggerParamsIncidentKindsItem] | Unset): + incident_statuses (list[ActionItemTriggerParamsIncidentStatusesItem] | Unset): + incident_inactivity_duration (None | str | Unset): + incident_condition (ActionItemTriggerParamsIncidentCondition | Unset): Default: 'ALL'. + incident_condition_visibility (ActionItemTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. + incident_condition_kind (ActionItemTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. + incident_condition_status (ActionItemTriggerParamsIncidentConditionStatus | Unset): Default: 'ANY'. + incident_condition_sub_status (ActionItemTriggerParamsIncidentConditionSubStatus | Unset): Default: 'ANY'. + incident_condition_environment (ActionItemTriggerParamsIncidentConditionEnvironment | Unset): Default: 'ANY'. + incident_condition_severity (ActionItemTriggerParamsIncidentConditionSeverity | Unset): Default: 'ANY'. + incident_condition_incident_type (ActionItemTriggerParamsIncidentConditionIncidentType | Unset): Default: 'ANY'. - incident_condition_kind (Union[Unset, ActionItemTriggerParamsIncidentConditionKind]): Default: 'IS'. - incident_condition_status (Union[Unset, ActionItemTriggerParamsIncidentConditionStatus]): Default: 'ANY'. - incident_condition_sub_status (Union[Unset, ActionItemTriggerParamsIncidentConditionSubStatus]): Default: + incident_condition_incident_roles (ActionItemTriggerParamsIncidentConditionIncidentRoles | Unset): Default: 'ANY'. - incident_condition_environment (Union[Unset, ActionItemTriggerParamsIncidentConditionEnvironment]): Default: + incident_condition_service (ActionItemTriggerParamsIncidentConditionService | Unset): Default: 'ANY'. + incident_condition_functionality (ActionItemTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. - incident_condition_severity (Union[Unset, ActionItemTriggerParamsIncidentConditionSeverity]): Default: 'ANY'. - incident_condition_incident_type (Union[Unset, ActionItemTriggerParamsIncidentConditionIncidentType]): Default: + incident_condition_group (ActionItemTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. + incident_condition_summary (ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset): + incident_condition_started_at (ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset): + incident_condition_detected_at (ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset): + incident_condition_acknowledged_at (ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset): + incident_condition_mitigated_at (ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset): + incident_condition_resolved_at (ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset): + incident_conditional_inactivity (ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset): + incident_action_item_condition (ActionItemTriggerParamsIncidentActionItemCondition | Unset): + incident_action_item_condition_kind (ActionItemTriggerParamsIncidentActionItemConditionKind | Unset): Default: 'ANY'. - incident_condition_incident_roles (Union[Unset, ActionItemTriggerParamsIncidentConditionIncidentRoles]): - Default: 'ANY'. - incident_condition_service (Union[Unset, ActionItemTriggerParamsIncidentConditionService]): Default: 'ANY'. - incident_condition_functionality (Union[Unset, ActionItemTriggerParamsIncidentConditionFunctionality]): - Default: 'ANY'. - incident_condition_group (Union[Unset, ActionItemTriggerParamsIncidentConditionGroup]): Default: 'ANY'. - incident_condition_summary (Union[ActionItemTriggerParamsIncidentConditionSummaryType1, None, Unset]): - incident_condition_started_at (Union[ActionItemTriggerParamsIncidentConditionStartedAtType1, None, Unset]): - incident_condition_detected_at (Union[ActionItemTriggerParamsIncidentConditionDetectedAtType1, None, Unset]): - incident_condition_acknowledged_at (Union[ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, None, - Unset]): - incident_condition_mitigated_at (Union[ActionItemTriggerParamsIncidentConditionMitigatedAtType1, None, Unset]): - incident_condition_resolved_at (Union[ActionItemTriggerParamsIncidentConditionResolvedAtType1, None, Unset]): - incident_conditional_inactivity (Union[ActionItemTriggerParamsIncidentConditionalInactivityType1, None, Unset]): - incident_action_item_condition (Union[Unset, ActionItemTriggerParamsIncidentActionItemCondition]): - incident_action_item_condition_kind (Union[Unset, ActionItemTriggerParamsIncidentActionItemConditionKind]): + incident_action_item_kinds (list[ActionItemTriggerParamsIncidentActionItemKindsItem] | Unset): + incident_action_item_condition_status (ActionItemTriggerParamsIncidentActionItemConditionStatus | Unset): Default: 'ANY'. - incident_action_item_kinds (Union[Unset, list[ActionItemTriggerParamsIncidentActionItemKindsItem]]): - incident_action_item_condition_status (Union[Unset, ActionItemTriggerParamsIncidentActionItemConditionStatus]): + incident_action_item_statuses (list[ActionItemTriggerParamsIncidentActionItemStatusesItem] | Unset): + incident_action_item_condition_priority (ActionItemTriggerParamsIncidentActionItemConditionPriority | Unset): Default: 'ANY'. - incident_action_item_statuses (Union[Unset, list[ActionItemTriggerParamsIncidentActionItemStatusesItem]]): - incident_action_item_condition_priority (Union[Unset, - ActionItemTriggerParamsIncidentActionItemConditionPriority]): Default: 'ANY'. - incident_action_item_priorities (Union[Unset, list[ActionItemTriggerParamsIncidentActionItemPrioritiesItem]]): - incident_action_item_condition_group (Union[Unset, ActionItemTriggerParamsIncidentActionItemConditionGroup]): + incident_action_item_priorities (list[ActionItemTriggerParamsIncidentActionItemPrioritiesItem] | Unset): + incident_action_item_condition_group (ActionItemTriggerParamsIncidentActionItemConditionGroup | Unset): Default: 'ANY'. - incident_action_item_group_ids (Union[Unset, list[str]]): + incident_action_item_group_ids (list[str] | Unset): """ trigger_type: ActionItemTriggerParamsTriggerType - triggers: Unset | list[str] = UNSET - incident_visibilities: Unset | list[bool] = UNSET - incident_kinds: Unset | list[ActionItemTriggerParamsIncidentKindsItem] = UNSET - incident_statuses: Unset | list[ActionItemTriggerParamsIncidentStatusesItem] = UNSET - incident_inactivity_duration: None | Unset | str = UNSET - incident_condition: Unset | ActionItemTriggerParamsIncidentCondition = "ALL" - incident_condition_visibility: Unset | ActionItemTriggerParamsIncidentConditionVisibility = "ANY" - incident_condition_kind: Unset | ActionItemTriggerParamsIncidentConditionKind = "IS" - incident_condition_status: Unset | ActionItemTriggerParamsIncidentConditionStatus = "ANY" - incident_condition_sub_status: Unset | ActionItemTriggerParamsIncidentConditionSubStatus = "ANY" - incident_condition_environment: Unset | ActionItemTriggerParamsIncidentConditionEnvironment = "ANY" - incident_condition_severity: Unset | ActionItemTriggerParamsIncidentConditionSeverity = "ANY" - incident_condition_incident_type: Unset | ActionItemTriggerParamsIncidentConditionIncidentType = "ANY" - incident_condition_incident_roles: Unset | ActionItemTriggerParamsIncidentConditionIncidentRoles = "ANY" - incident_condition_service: Unset | ActionItemTriggerParamsIncidentConditionService = "ANY" - incident_condition_functionality: Unset | ActionItemTriggerParamsIncidentConditionFunctionality = "ANY" - incident_condition_group: Unset | ActionItemTriggerParamsIncidentConditionGroup = "ANY" + triggers: list[str] | Unset = UNSET + incident_visibilities: list[bool] | Unset = UNSET + incident_kinds: list[ActionItemTriggerParamsIncidentKindsItem] | Unset = UNSET + incident_statuses: list[ActionItemTriggerParamsIncidentStatusesItem] | Unset = UNSET + incident_inactivity_duration: None | str | Unset = UNSET + incident_condition: ActionItemTriggerParamsIncidentCondition | Unset = "ALL" + incident_condition_visibility: ActionItemTriggerParamsIncidentConditionVisibility | Unset = "ANY" + incident_condition_kind: ActionItemTriggerParamsIncidentConditionKind | Unset = "IS" + incident_condition_status: ActionItemTriggerParamsIncidentConditionStatus | Unset = "ANY" + incident_condition_sub_status: ActionItemTriggerParamsIncidentConditionSubStatus | Unset = "ANY" + incident_condition_environment: ActionItemTriggerParamsIncidentConditionEnvironment | Unset = "ANY" + incident_condition_severity: ActionItemTriggerParamsIncidentConditionSeverity | Unset = "ANY" + incident_condition_incident_type: ActionItemTriggerParamsIncidentConditionIncidentType | Unset = "ANY" + incident_condition_incident_roles: ActionItemTriggerParamsIncidentConditionIncidentRoles | Unset = "ANY" + incident_condition_service: ActionItemTriggerParamsIncidentConditionService | Unset = "ANY" + incident_condition_functionality: ActionItemTriggerParamsIncidentConditionFunctionality | Unset = "ANY" + incident_condition_group: ActionItemTriggerParamsIncidentConditionGroup | Unset = "ANY" incident_condition_summary: ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset = UNSET incident_condition_started_at: ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset = UNSET incident_condition_detected_at: ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset = UNSET @@ -207,97 +205,97 @@ class ActionItemTriggerParams: incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset = UNSET incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset = UNSET incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset = UNSET - incident_action_item_condition: Unset | ActionItemTriggerParamsIncidentActionItemCondition = UNSET - incident_action_item_condition_kind: Unset | ActionItemTriggerParamsIncidentActionItemConditionKind = "ANY" - incident_action_item_kinds: Unset | list[ActionItemTriggerParamsIncidentActionItemKindsItem] = UNSET - incident_action_item_condition_status: Unset | ActionItemTriggerParamsIncidentActionItemConditionStatus = "ANY" - incident_action_item_statuses: Unset | list[ActionItemTriggerParamsIncidentActionItemStatusesItem] = UNSET - incident_action_item_condition_priority: Unset | ActionItemTriggerParamsIncidentActionItemConditionPriority = "ANY" - incident_action_item_priorities: Unset | list[ActionItemTriggerParamsIncidentActionItemPrioritiesItem] = UNSET - incident_action_item_condition_group: Unset | ActionItemTriggerParamsIncidentActionItemConditionGroup = "ANY" - incident_action_item_group_ids: Unset | list[str] = UNSET + incident_action_item_condition: ActionItemTriggerParamsIncidentActionItemCondition | Unset = UNSET + incident_action_item_condition_kind: ActionItemTriggerParamsIncidentActionItemConditionKind | Unset = "ANY" + incident_action_item_kinds: list[ActionItemTriggerParamsIncidentActionItemKindsItem] | Unset = UNSET + incident_action_item_condition_status: ActionItemTriggerParamsIncidentActionItemConditionStatus | Unset = "ANY" + incident_action_item_statuses: list[ActionItemTriggerParamsIncidentActionItemStatusesItem] | Unset = UNSET + incident_action_item_condition_priority: ActionItemTriggerParamsIncidentActionItemConditionPriority | Unset = "ANY" + incident_action_item_priorities: list[ActionItemTriggerParamsIncidentActionItemPrioritiesItem] | Unset = UNSET + incident_action_item_condition_group: ActionItemTriggerParamsIncidentActionItemConditionGroup | Unset = "ANY" + incident_action_item_group_ids: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: trigger_type: str = self.trigger_type - triggers: Unset | list[str] = UNSET + triggers: list[str] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = self.triggers - incident_visibilities: Unset | list[bool] = UNSET + incident_visibilities: list[bool] | Unset = UNSET if not isinstance(self.incident_visibilities, Unset): incident_visibilities = self.incident_visibilities - incident_kinds: Unset | list[str] = UNSET + incident_kinds: list[str] | Unset = UNSET if not isinstance(self.incident_kinds, Unset): incident_kinds = [] for incident_kinds_item_data in self.incident_kinds: incident_kinds_item: str = incident_kinds_item_data incident_kinds.append(incident_kinds_item) - incident_statuses: Unset | list[str] = UNSET + incident_statuses: list[str] | Unset = UNSET if not isinstance(self.incident_statuses, Unset): incident_statuses = [] for incident_statuses_item_data in self.incident_statuses: incident_statuses_item: str = incident_statuses_item_data incident_statuses.append(incident_statuses_item) - incident_inactivity_duration: None | Unset | str + incident_inactivity_duration: None | str | Unset if isinstance(self.incident_inactivity_duration, Unset): incident_inactivity_duration = UNSET else: incident_inactivity_duration = self.incident_inactivity_duration - incident_condition: Unset | str = UNSET + incident_condition: str | Unset = UNSET if not isinstance(self.incident_condition, Unset): incident_condition = self.incident_condition - incident_condition_visibility: Unset | str = UNSET + incident_condition_visibility: str | Unset = UNSET if not isinstance(self.incident_condition_visibility, Unset): incident_condition_visibility = self.incident_condition_visibility - incident_condition_kind: Unset | str = UNSET + incident_condition_kind: str | Unset = UNSET if not isinstance(self.incident_condition_kind, Unset): incident_condition_kind = self.incident_condition_kind - incident_condition_status: Unset | str = UNSET + incident_condition_status: str | Unset = UNSET if not isinstance(self.incident_condition_status, Unset): incident_condition_status = self.incident_condition_status - incident_condition_sub_status: Unset | str = UNSET + incident_condition_sub_status: str | Unset = UNSET if not isinstance(self.incident_condition_sub_status, Unset): incident_condition_sub_status = self.incident_condition_sub_status - incident_condition_environment: Unset | str = UNSET + incident_condition_environment: str | Unset = UNSET if not isinstance(self.incident_condition_environment, Unset): incident_condition_environment = self.incident_condition_environment - incident_condition_severity: Unset | str = UNSET + incident_condition_severity: str | Unset = UNSET if not isinstance(self.incident_condition_severity, Unset): incident_condition_severity = self.incident_condition_severity - incident_condition_incident_type: Unset | str = UNSET + incident_condition_incident_type: str | Unset = UNSET if not isinstance(self.incident_condition_incident_type, Unset): incident_condition_incident_type = self.incident_condition_incident_type - incident_condition_incident_roles: Unset | str = UNSET + incident_condition_incident_roles: str | Unset = UNSET if not isinstance(self.incident_condition_incident_roles, Unset): incident_condition_incident_roles = self.incident_condition_incident_roles - incident_condition_service: Unset | str = UNSET + incident_condition_service: str | Unset = UNSET if not isinstance(self.incident_condition_service, Unset): incident_condition_service = self.incident_condition_service - incident_condition_functionality: Unset | str = UNSET + incident_condition_functionality: str | Unset = UNSET if not isinstance(self.incident_condition_functionality, Unset): incident_condition_functionality = self.incident_condition_functionality - incident_condition_group: Unset | str = UNSET + incident_condition_group: str | Unset = UNSET if not isinstance(self.incident_condition_group, Unset): incident_condition_group = self.incident_condition_group - incident_condition_summary: None | Unset | str + incident_condition_summary: None | str | Unset if isinstance(self.incident_condition_summary, Unset): incident_condition_summary = UNSET elif isinstance(self.incident_condition_summary, str): @@ -305,7 +303,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_summary = self.incident_condition_summary - incident_condition_started_at: None | Unset | str + incident_condition_started_at: None | str | Unset if isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = UNSET elif isinstance(self.incident_condition_started_at, str): @@ -313,7 +311,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_started_at = self.incident_condition_started_at - incident_condition_detected_at: None | Unset | str + incident_condition_detected_at: None | str | Unset if isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = UNSET elif isinstance(self.incident_condition_detected_at, str): @@ -321,7 +319,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_detected_at = self.incident_condition_detected_at - incident_condition_acknowledged_at: None | Unset | str + incident_condition_acknowledged_at: None | str | Unset if isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = UNSET elif isinstance(self.incident_condition_acknowledged_at, str): @@ -329,7 +327,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - incident_condition_mitigated_at: None | Unset | str + incident_condition_mitigated_at: None | str | Unset if isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = UNSET elif isinstance(self.incident_condition_mitigated_at, str): @@ -337,7 +335,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_mitigated_at = self.incident_condition_mitigated_at - incident_condition_resolved_at: None | Unset | str + incident_condition_resolved_at: None | str | Unset if isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = UNSET elif isinstance(self.incident_condition_resolved_at, str): @@ -345,7 +343,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | Unset | str + incident_conditional_inactivity: None | str | Unset if isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = UNSET elif isinstance(self.incident_conditional_inactivity, str): @@ -353,48 +351,48 @@ def to_dict(self) -> dict[str, Any]: else: incident_conditional_inactivity = self.incident_conditional_inactivity - incident_action_item_condition: Unset | str = UNSET + incident_action_item_condition: str | Unset = UNSET if not isinstance(self.incident_action_item_condition, Unset): incident_action_item_condition = self.incident_action_item_condition - incident_action_item_condition_kind: Unset | str = UNSET + incident_action_item_condition_kind: str | Unset = UNSET if not isinstance(self.incident_action_item_condition_kind, Unset): incident_action_item_condition_kind = self.incident_action_item_condition_kind - incident_action_item_kinds: Unset | list[str] = UNSET + incident_action_item_kinds: list[str] | Unset = UNSET if not isinstance(self.incident_action_item_kinds, Unset): incident_action_item_kinds = [] for incident_action_item_kinds_item_data in self.incident_action_item_kinds: incident_action_item_kinds_item: str = incident_action_item_kinds_item_data incident_action_item_kinds.append(incident_action_item_kinds_item) - incident_action_item_condition_status: Unset | str = UNSET + incident_action_item_condition_status: str | Unset = UNSET if not isinstance(self.incident_action_item_condition_status, Unset): incident_action_item_condition_status = self.incident_action_item_condition_status - incident_action_item_statuses: Unset | list[str] = UNSET + incident_action_item_statuses: list[str] | Unset = UNSET if not isinstance(self.incident_action_item_statuses, Unset): incident_action_item_statuses = [] for incident_action_item_statuses_item_data in self.incident_action_item_statuses: incident_action_item_statuses_item: str = incident_action_item_statuses_item_data incident_action_item_statuses.append(incident_action_item_statuses_item) - incident_action_item_condition_priority: Unset | str = UNSET + incident_action_item_condition_priority: str | Unset = UNSET if not isinstance(self.incident_action_item_condition_priority, Unset): incident_action_item_condition_priority = self.incident_action_item_condition_priority - incident_action_item_priorities: Unset | list[str] = UNSET + incident_action_item_priorities: list[str] | Unset = UNSET if not isinstance(self.incident_action_item_priorities, Unset): incident_action_item_priorities = [] for incident_action_item_priorities_item_data in self.incident_action_item_priorities: incident_action_item_priorities_item: str = incident_action_item_priorities_item_data incident_action_item_priorities.append(incident_action_item_priorities_item) - incident_action_item_condition_group: Unset | str = UNSET + incident_action_item_condition_group: str | Unset = UNSET if not isinstance(self.incident_action_item_condition_group, Unset): incident_action_item_condition_group = self.incident_action_item_condition_group - incident_action_item_group_ids: Unset | list[str] = UNSET + incident_action_item_group_ids: list[str] | Unset = UNSET if not isinstance(self.incident_action_item_group_ids, Unset): incident_action_item_group_ids = self.incident_action_item_group_ids @@ -483,40 +481,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_visibilities = cast(list[bool], d.pop("incident_visibilities", UNSET)) - incident_kinds = [] _incident_kinds = d.pop("incident_kinds", UNSET) - for incident_kinds_item_data in _incident_kinds or []: - incident_kinds_item = check_action_item_trigger_params_incident_kinds_item(incident_kinds_item_data) + incident_kinds: list[ActionItemTriggerParamsIncidentKindsItem] | Unset = UNSET + if _incident_kinds is not UNSET: + incident_kinds = [] + for incident_kinds_item_data in _incident_kinds: + incident_kinds_item = check_action_item_trigger_params_incident_kinds_item(incident_kinds_item_data) - incident_kinds.append(incident_kinds_item) + incident_kinds.append(incident_kinds_item) - incident_statuses = [] _incident_statuses = d.pop("incident_statuses", UNSET) - for incident_statuses_item_data in _incident_statuses or []: - incident_statuses_item = check_action_item_trigger_params_incident_statuses_item( - incident_statuses_item_data - ) + incident_statuses: list[ActionItemTriggerParamsIncidentStatusesItem] | Unset = UNSET + if _incident_statuses is not UNSET: + incident_statuses = [] + for incident_statuses_item_data in _incident_statuses: + incident_statuses_item = check_action_item_trigger_params_incident_statuses_item( + incident_statuses_item_data + ) - incident_statuses.append(incident_statuses_item) + incident_statuses.append(incident_statuses_item) - def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: + def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_inactivity_duration = _parse_incident_inactivity_duration(d.pop("incident_inactivity_duration", UNSET)) _incident_condition = d.pop("incident_condition", UNSET) - incident_condition: Unset | ActionItemTriggerParamsIncidentCondition + incident_condition: ActionItemTriggerParamsIncidentCondition | Unset if isinstance(_incident_condition, Unset): incident_condition = UNSET else: incident_condition = check_action_item_trigger_params_incident_condition(_incident_condition) _incident_condition_visibility = d.pop("incident_condition_visibility", UNSET) - incident_condition_visibility: Unset | ActionItemTriggerParamsIncidentConditionVisibility + incident_condition_visibility: ActionItemTriggerParamsIncidentConditionVisibility | Unset if isinstance(_incident_condition_visibility, Unset): incident_condition_visibility = UNSET else: @@ -525,14 +527,14 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_kind = d.pop("incident_condition_kind", UNSET) - incident_condition_kind: Unset | ActionItemTriggerParamsIncidentConditionKind + incident_condition_kind: ActionItemTriggerParamsIncidentConditionKind | Unset if isinstance(_incident_condition_kind, Unset): incident_condition_kind = UNSET else: incident_condition_kind = check_action_item_trigger_params_incident_condition_kind(_incident_condition_kind) _incident_condition_status = d.pop("incident_condition_status", UNSET) - incident_condition_status: Unset | ActionItemTriggerParamsIncidentConditionStatus + incident_condition_status: ActionItemTriggerParamsIncidentConditionStatus | Unset if isinstance(_incident_condition_status, Unset): incident_condition_status = UNSET else: @@ -541,7 +543,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_sub_status = d.pop("incident_condition_sub_status", UNSET) - incident_condition_sub_status: Unset | ActionItemTriggerParamsIncidentConditionSubStatus + incident_condition_sub_status: ActionItemTriggerParamsIncidentConditionSubStatus | Unset if isinstance(_incident_condition_sub_status, Unset): incident_condition_sub_status = UNSET else: @@ -550,7 +552,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_environment = d.pop("incident_condition_environment", UNSET) - incident_condition_environment: Unset | ActionItemTriggerParamsIncidentConditionEnvironment + incident_condition_environment: ActionItemTriggerParamsIncidentConditionEnvironment | Unset if isinstance(_incident_condition_environment, Unset): incident_condition_environment = UNSET else: @@ -559,7 +561,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_severity = d.pop("incident_condition_severity", UNSET) - incident_condition_severity: Unset | ActionItemTriggerParamsIncidentConditionSeverity + incident_condition_severity: ActionItemTriggerParamsIncidentConditionSeverity | Unset if isinstance(_incident_condition_severity, Unset): incident_condition_severity = UNSET else: @@ -568,7 +570,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_incident_type = d.pop("incident_condition_incident_type", UNSET) - incident_condition_incident_type: Unset | ActionItemTriggerParamsIncidentConditionIncidentType + incident_condition_incident_type: ActionItemTriggerParamsIncidentConditionIncidentType | Unset if isinstance(_incident_condition_incident_type, Unset): incident_condition_incident_type = UNSET else: @@ -577,7 +579,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_incident_roles = d.pop("incident_condition_incident_roles", UNSET) - incident_condition_incident_roles: Unset | ActionItemTriggerParamsIncidentConditionIncidentRoles + incident_condition_incident_roles: ActionItemTriggerParamsIncidentConditionIncidentRoles | Unset if isinstance(_incident_condition_incident_roles, Unset): incident_condition_incident_roles = UNSET else: @@ -586,7 +588,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_service = d.pop("incident_condition_service", UNSET) - incident_condition_service: Unset | ActionItemTriggerParamsIncidentConditionService + incident_condition_service: ActionItemTriggerParamsIncidentConditionService | Unset if isinstance(_incident_condition_service, Unset): incident_condition_service = UNSET else: @@ -595,7 +597,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_functionality = d.pop("incident_condition_functionality", UNSET) - incident_condition_functionality: Unset | ActionItemTriggerParamsIncidentConditionFunctionality + incident_condition_functionality: ActionItemTriggerParamsIncidentConditionFunctionality | Unset if isinstance(_incident_condition_functionality, Unset): incident_condition_functionality = UNSET else: @@ -604,7 +606,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_group = d.pop("incident_condition_group", UNSET) - incident_condition_group: Unset | ActionItemTriggerParamsIncidentConditionGroup + incident_condition_group: ActionItemTriggerParamsIncidentConditionGroup | Unset if isinstance(_incident_condition_group, Unset): incident_condition_group = UNSET else: @@ -627,7 +629,7 @@ def _parse_incident_condition_summary( ) return incident_condition_summary_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset, data) @@ -648,7 +650,7 @@ def _parse_incident_condition_started_at( ) return incident_condition_started_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset, data) @@ -671,7 +673,7 @@ def _parse_incident_condition_detected_at( ) return incident_condition_detected_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset, data) @@ -694,7 +696,7 @@ def _parse_incident_condition_acknowledged_at( ) return incident_condition_acknowledged_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset, data) @@ -717,7 +719,7 @@ def _parse_incident_condition_mitigated_at( ) return incident_condition_mitigated_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset, data) @@ -740,7 +742,7 @@ def _parse_incident_condition_resolved_at( ) return incident_condition_resolved_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset, data) @@ -763,7 +765,7 @@ def _parse_incident_conditional_inactivity( ) return incident_conditional_inactivity_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset, data) @@ -772,7 +774,7 @@ def _parse_incident_conditional_inactivity( ) _incident_action_item_condition = d.pop("incident_action_item_condition", UNSET) - incident_action_item_condition: Unset | ActionItemTriggerParamsIncidentActionItemCondition + incident_action_item_condition: ActionItemTriggerParamsIncidentActionItemCondition | Unset if isinstance(_incident_action_item_condition, Unset): incident_action_item_condition = UNSET else: @@ -781,7 +783,7 @@ def _parse_incident_conditional_inactivity( ) _incident_action_item_condition_kind = d.pop("incident_action_item_condition_kind", UNSET) - incident_action_item_condition_kind: Unset | ActionItemTriggerParamsIncidentActionItemConditionKind + incident_action_item_condition_kind: ActionItemTriggerParamsIncidentActionItemConditionKind | Unset if isinstance(_incident_action_item_condition_kind, Unset): incident_action_item_condition_kind = UNSET else: @@ -789,17 +791,19 @@ def _parse_incident_conditional_inactivity( _incident_action_item_condition_kind ) - incident_action_item_kinds = [] _incident_action_item_kinds = d.pop("incident_action_item_kinds", UNSET) - for incident_action_item_kinds_item_data in _incident_action_item_kinds or []: - incident_action_item_kinds_item = check_action_item_trigger_params_incident_action_item_kinds_item( - incident_action_item_kinds_item_data - ) + incident_action_item_kinds: list[ActionItemTriggerParamsIncidentActionItemKindsItem] | Unset = UNSET + if _incident_action_item_kinds is not UNSET: + incident_action_item_kinds = [] + for incident_action_item_kinds_item_data in _incident_action_item_kinds: + incident_action_item_kinds_item = check_action_item_trigger_params_incident_action_item_kinds_item( + incident_action_item_kinds_item_data + ) - incident_action_item_kinds.append(incident_action_item_kinds_item) + incident_action_item_kinds.append(incident_action_item_kinds_item) _incident_action_item_condition_status = d.pop("incident_action_item_condition_status", UNSET) - incident_action_item_condition_status: Unset | ActionItemTriggerParamsIncidentActionItemConditionStatus + incident_action_item_condition_status: ActionItemTriggerParamsIncidentActionItemConditionStatus | Unset if isinstance(_incident_action_item_condition_status, Unset): incident_action_item_condition_status = UNSET else: @@ -809,17 +813,21 @@ def _parse_incident_conditional_inactivity( ) ) - incident_action_item_statuses = [] _incident_action_item_statuses = d.pop("incident_action_item_statuses", UNSET) - for incident_action_item_statuses_item_data in _incident_action_item_statuses or []: - incident_action_item_statuses_item = check_action_item_trigger_params_incident_action_item_statuses_item( - incident_action_item_statuses_item_data - ) + incident_action_item_statuses: list[ActionItemTriggerParamsIncidentActionItemStatusesItem] | Unset = UNSET + if _incident_action_item_statuses is not UNSET: + incident_action_item_statuses = [] + for incident_action_item_statuses_item_data in _incident_action_item_statuses: + incident_action_item_statuses_item = ( + check_action_item_trigger_params_incident_action_item_statuses_item( + incident_action_item_statuses_item_data + ) + ) - incident_action_item_statuses.append(incident_action_item_statuses_item) + incident_action_item_statuses.append(incident_action_item_statuses_item) _incident_action_item_condition_priority = d.pop("incident_action_item_condition_priority", UNSET) - incident_action_item_condition_priority: Unset | ActionItemTriggerParamsIncidentActionItemConditionPriority + incident_action_item_condition_priority: ActionItemTriggerParamsIncidentActionItemConditionPriority | Unset if isinstance(_incident_action_item_condition_priority, Unset): incident_action_item_condition_priority = UNSET else: @@ -829,19 +837,21 @@ def _parse_incident_conditional_inactivity( ) ) - incident_action_item_priorities = [] _incident_action_item_priorities = d.pop("incident_action_item_priorities", UNSET) - for incident_action_item_priorities_item_data in _incident_action_item_priorities or []: - incident_action_item_priorities_item = ( - check_action_item_trigger_params_incident_action_item_priorities_item( - incident_action_item_priorities_item_data + incident_action_item_priorities: list[ActionItemTriggerParamsIncidentActionItemPrioritiesItem] | Unset = UNSET + if _incident_action_item_priorities is not UNSET: + incident_action_item_priorities = [] + for incident_action_item_priorities_item_data in _incident_action_item_priorities: + incident_action_item_priorities_item = ( + check_action_item_trigger_params_incident_action_item_priorities_item( + incident_action_item_priorities_item_data + ) ) - ) - incident_action_item_priorities.append(incident_action_item_priorities_item) + incident_action_item_priorities.append(incident_action_item_priorities_item) _incident_action_item_condition_group = d.pop("incident_action_item_condition_group", UNSET) - incident_action_item_condition_group: Unset | ActionItemTriggerParamsIncidentActionItemConditionGroup + incident_action_item_condition_group: ActionItemTriggerParamsIncidentActionItemConditionGroup | Unset if isinstance(_incident_action_item_condition_group, Unset): incident_action_item_condition_group = UNSET else: diff --git a/rootly_sdk/models/add_action_item_task_params.py b/rootly_sdk/models/add_action_item_task_params.py index ce3f369c..285b47a0 100644 --- a/rootly_sdk/models/add_action_item_task_params.py +++ b/rootly_sdk/models/add_action_item_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -39,37 +41,36 @@ class AddActionItemTaskParams: priority (AddActionItemTaskParamsPriority): The action item priority summary (str): The action item summary status (AddActionItemTaskParamsStatus): The action item status - task_type (Union[Unset, AddActionItemTaskParamsTaskType]): - attribute_to_query_by (Union[Unset, AddActionItemTaskParamsAttributeToQueryBy]): Attribute of the Incident to - match against - query_value (Union[None, Unset, str]): Value that attribute_to_query_by to uses to match against - incident_role_id (Union[Unset, str]): The role id this action item is associated with - assigned_to_user_id (Union[Unset, str]): [DEPRECATED] Use assigned_to_user attribute instead. The user id this - action item is assigned to - assigned_to_user (Union[Unset, AddActionItemTaskParamsAssignedToUser]): The user this action item is assigned - to - kind (Union[Unset, str]): The action item kind - description (Union[Unset, str]): The action item description - post_to_incident_timeline (Union[Unset, bool]): - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (AddActionItemTaskParamsTaskType | Unset): + attribute_to_query_by (AddActionItemTaskParamsAttributeToQueryBy | Unset): Attribute of the Incident to match + against + query_value (None | str | Unset): Value that attribute_to_query_by to uses to match against + incident_role_id (str | Unset): The role id this action item is associated with + assigned_to_user_id (str | Unset): [DEPRECATED] Use assigned_to_user attribute instead. The user id this action + item is assigned to + assigned_to_user (AddActionItemTaskParamsAssignedToUser | Unset): The user this action item is assigned to + kind (str | Unset): The action item kind + description (str | Unset): The action item description + post_to_incident_timeline (bool | Unset): + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - post_to_slack_channels (Union[Unset, list['AddActionItemTaskParamsPostToSlackChannelsItem']]): + post_to_slack_channels (list[AddActionItemTaskParamsPostToSlackChannelsItem] | Unset): """ priority: AddActionItemTaskParamsPriority summary: str status: AddActionItemTaskParamsStatus - task_type: Unset | AddActionItemTaskParamsTaskType = UNSET - attribute_to_query_by: Unset | AddActionItemTaskParamsAttributeToQueryBy = UNSET - query_value: None | Unset | str = UNSET - incident_role_id: Unset | str = UNSET - assigned_to_user_id: Unset | str = UNSET - assigned_to_user: Union[Unset, "AddActionItemTaskParamsAssignedToUser"] = UNSET - kind: Unset | str = UNSET - description: Unset | str = UNSET - post_to_incident_timeline: Unset | bool = UNSET - custom_fields_mapping: None | Unset | str = UNSET - post_to_slack_channels: Unset | list["AddActionItemTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: AddActionItemTaskParamsTaskType | Unset = UNSET + attribute_to_query_by: AddActionItemTaskParamsAttributeToQueryBy | Unset = UNSET + query_value: None | str | Unset = UNSET + incident_role_id: str | Unset = UNSET + assigned_to_user_id: str | Unset = UNSET + assigned_to_user: AddActionItemTaskParamsAssignedToUser | Unset = UNSET + kind: str | Unset = UNSET + description: str | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + post_to_slack_channels: list[AddActionItemTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -79,15 +80,15 @@ def to_dict(self) -> dict[str, Any]: status: str = self.status - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - attribute_to_query_by: Unset | str = UNSET + attribute_to_query_by: str | Unset = UNSET if not isinstance(self.attribute_to_query_by, Unset): attribute_to_query_by = self.attribute_to_query_by - query_value: None | Unset | str + query_value: None | str | Unset if isinstance(self.query_value, Unset): query_value = UNSET else: @@ -97,7 +98,7 @@ def to_dict(self) -> dict[str, Any]: assigned_to_user_id = self.assigned_to_user_id - assigned_to_user: Unset | dict[str, Any] = UNSET + assigned_to_user: dict[str, Any] | Unset = UNSET if not isinstance(self.assigned_to_user, Unset): assigned_to_user = self.assigned_to_user.to_dict() @@ -107,13 +108,13 @@ def to_dict(self) -> dict[str, Any]: post_to_incident_timeline = self.post_to_incident_timeline - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -169,25 +170,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = check_add_action_item_task_params_status(d.pop("status")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | AddActionItemTaskParamsTaskType + task_type: AddActionItemTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_add_action_item_task_params_task_type(_task_type) _attribute_to_query_by = d.pop("attribute_to_query_by", UNSET) - attribute_to_query_by: Unset | AddActionItemTaskParamsAttributeToQueryBy + attribute_to_query_by: AddActionItemTaskParamsAttributeToQueryBy | Unset if isinstance(_attribute_to_query_by, Unset): attribute_to_query_by = UNSET else: attribute_to_query_by = check_add_action_item_task_params_attribute_to_query_by(_attribute_to_query_by) - def _parse_query_value(data: object) -> None | Unset | str: + def _parse_query_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) query_value = _parse_query_value(d.pop("query_value", UNSET)) @@ -196,7 +197,7 @@ def _parse_query_value(data: object) -> None | Unset | str: assigned_to_user_id = d.pop("assigned_to_user_id", UNSET) _assigned_to_user = d.pop("assigned_to_user", UNSET) - assigned_to_user: Unset | AddActionItemTaskParamsAssignedToUser + assigned_to_user: AddActionItemTaskParamsAssignedToUser | Unset if isinstance(_assigned_to_user, Unset): assigned_to_user = UNSET else: @@ -208,23 +209,25 @@ def _parse_query_value(data: object) -> None | Unset | str: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = AddActionItemTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[AddActionItemTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = AddActionItemTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) add_action_item_task_params = cls( priority=priority, diff --git a/rootly_sdk/models/add_action_item_task_params_assigned_to_user.py b/rootly_sdk/models/add_action_item_task_params_assigned_to_user.py index 972a5720..8d65de98 100644 --- a/rootly_sdk/models/add_action_item_task_params_assigned_to_user.py +++ b/rootly_sdk/models/add_action_item_task_params_assigned_to_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class AddActionItemTaskParamsAssignedToUser: """The user this action item is assigned to Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/add_action_item_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/add_action_item_task_params_post_to_slack_channels_item.py index 0c500319..2f32e287 100644 --- a/rootly_sdk/models/add_action_item_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/add_action_item_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AddActionItemTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py b/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py index ae7c5c7b..393233e1 100644 --- a/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py +++ b/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,13 +26,13 @@ class AddMicrosoftTeamsChatTabTaskParams: chat (AddMicrosoftTeamsChatTabTaskParamsChat): title (str): The tab title link (str): The tab link - task_type (Union[Unset, AddMicrosoftTeamsChatTabTaskParamsTaskType]): + task_type (AddMicrosoftTeamsChatTabTaskParamsTaskType | Unset): """ - chat: "AddMicrosoftTeamsChatTabTaskParamsChat" + chat: AddMicrosoftTeamsChatTabTaskParamsChat title: str link: str - task_type: Unset | AddMicrosoftTeamsChatTabTaskParamsTaskType = UNSET + task_type: AddMicrosoftTeamsChatTabTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: link = self.link - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -70,7 +72,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: link = d.pop("link") _task_type = d.pop("task_type", UNSET) - task_type: Unset | AddMicrosoftTeamsChatTabTaskParamsTaskType + task_type: AddMicrosoftTeamsChatTabTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params_chat.py b/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params_chat.py index 2d33f9ef..8d82e503 100644 --- a/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params_chat.py +++ b/rootly_sdk/models/add_microsoft_teams_chat_tab_task_params_chat.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AddMicrosoftTeamsChatTabTaskParamsChat: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/add_role_task_params.py b/rootly_sdk/models/add_role_task_params.py index 85e68e5a..886d7027 100644 --- a/rootly_sdk/models/add_role_task_params.py +++ b/rootly_sdk/models/add_role_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,28 +21,28 @@ class AddRoleTaskParams: """ Attributes: incident_role_id (str): The role id to add to the incident - task_type (Union[Unset, AddRoleTaskParamsTaskType]): - assigned_to_user_id (Union[Unset, str]): [DEPRECATED] Use assigned_to_user attribute instead. The user id this - role is assigned to - assigned_to_user (Union[Unset, AddRoleTaskParamsAssignedToUser]): The user this role is assigned to + task_type (AddRoleTaskParamsTaskType | Unset): + assigned_to_user_id (str | Unset): [DEPRECATED] Use assigned_to_user attribute instead. The user id this role is + assigned to + assigned_to_user (AddRoleTaskParamsAssignedToUser | Unset): The user this role is assigned to """ incident_role_id: str - task_type: Unset | AddRoleTaskParamsTaskType = UNSET - assigned_to_user_id: Unset | str = UNSET - assigned_to_user: Union[Unset, "AddRoleTaskParamsAssignedToUser"] = UNSET + task_type: AddRoleTaskParamsTaskType | Unset = UNSET + assigned_to_user_id: str | Unset = UNSET + assigned_to_user: AddRoleTaskParamsAssignedToUser | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: incident_role_id = self.incident_role_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type assigned_to_user_id = self.assigned_to_user_id - assigned_to_user: Unset | dict[str, Any] = UNSET + assigned_to_user: dict[str, Any] | Unset = UNSET if not isinstance(self.assigned_to_user, Unset): assigned_to_user = self.assigned_to_user.to_dict() @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_role_id = d.pop("incident_role_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | AddRoleTaskParamsTaskType + task_type: AddRoleTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -77,7 +79,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assigned_to_user_id = d.pop("assigned_to_user_id", UNSET) _assigned_to_user = d.pop("assigned_to_user", UNSET) - assigned_to_user: Unset | AddRoleTaskParamsAssignedToUser + assigned_to_user: AddRoleTaskParamsAssignedToUser | Unset if isinstance(_assigned_to_user, Unset): assigned_to_user = UNSET else: diff --git a/rootly_sdk/models/add_role_task_params_assigned_to_user.py b/rootly_sdk/models/add_role_task_params_assigned_to_user.py index 8e99caa9..2c165799 100644 --- a/rootly_sdk/models/add_role_task_params_assigned_to_user.py +++ b/rootly_sdk/models/add_role_task_params_assigned_to_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class AddRoleTaskParamsAssignedToUser: """The user this role is assigned to Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/add_subscribers.py b/rootly_sdk/models/add_subscribers.py index 8c8f6c2d..2fc8e038 100644 --- a/rootly_sdk/models/add_subscribers.py +++ b/rootly_sdk/models/add_subscribers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AddSubscribers: data (AddSubscribersData): """ - data: "AddSubscribersData" + data: AddSubscribersData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/add_subscribers_data.py b/rootly_sdk/models/add_subscribers_data.py index e3a5017b..dc21630c 100644 --- a/rootly_sdk/models/add_subscribers_data.py +++ b/rootly_sdk/models/add_subscribers_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class AddSubscribersData: """ type_: AddSubscribersDataType - attributes: "AddSubscribersDataAttributes" + attributes: AddSubscribersDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/add_subscribers_data_attributes.py b/rootly_sdk/models/add_subscribers_data_attributes.py index b3543b07..7f819592 100644 --- a/rootly_sdk/models/add_subscribers_data_attributes.py +++ b/rootly_sdk/models/add_subscribers_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,16 +14,16 @@ class AddSubscribersDataAttributes: """ Attributes: - user_ids (Union[None, Unset, list[str]]): IDs of users you wish to add to list of subscribers for this incident - remove_users_with_no_private_incident_access (Union[None, Unset, bool]): Users without read permissions for - private incidents will be removed from the subscriber list of this incident Default: False. + user_ids (list[str] | None | Unset): IDs of users you wish to add to list of subscribers for this incident + remove_users_with_no_private_incident_access (bool | None | Unset): Users without read permissions for private + incidents will be removed from the subscriber list of this incident Default: False. """ - user_ids: None | Unset | list[str] = UNSET - remove_users_with_no_private_incident_access: None | Unset | bool = False + user_ids: list[str] | None | Unset = UNSET + remove_users_with_no_private_incident_access: bool | None | Unset = False def to_dict(self) -> dict[str, Any]: - user_ids: None | Unset | list[str] + user_ids: list[str] | None | Unset if isinstance(self.user_ids, Unset): user_ids = UNSET elif isinstance(self.user_ids, list): @@ -30,7 +32,7 @@ def to_dict(self) -> dict[str, Any]: else: user_ids = self.user_ids - remove_users_with_no_private_incident_access: None | Unset | bool + remove_users_with_no_private_incident_access: bool | None | Unset if isinstance(self.remove_users_with_no_private_incident_access, Unset): remove_users_with_no_private_incident_access = UNSET else: @@ -50,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_user_ids(data: object) -> None | Unset | list[str]: + def _parse_user_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -61,18 +63,18 @@ def _parse_user_ids(data: object) -> None | Unset | list[str]: user_ids_type_0 = cast(list[str], data) return user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) user_ids = _parse_user_ids(d.pop("user_ids", UNSET)) - def _parse_remove_users_with_no_private_incident_access(data: object) -> None | Unset | bool: + def _parse_remove_users_with_no_private_incident_access(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) remove_users_with_no_private_incident_access = _parse_remove_users_with_no_private_incident_access( d.pop("remove_users_with_no_private_incident_access", UNSET) diff --git a/rootly_sdk/models/add_team_task_params.py b/rootly_sdk/models/add_team_task_params.py index f1847b9a..20b40bd2 100644 --- a/rootly_sdk/models/add_team_task_params.py +++ b/rootly_sdk/models/add_team_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,17 +17,17 @@ class AddTeamTaskParams: """ Attributes: group_id (str): The team id - task_type (Union[Unset, AddTeamTaskParamsTaskType]): + task_type (AddTeamTaskParamsTaskType | Unset): """ group_id: str - task_type: Unset | AddTeamTaskParamsTaskType = UNSET + task_type: AddTeamTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: group_id = self.group_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -47,7 +49,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: group_id = d.pop("group_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | AddTeamTaskParamsTaskType + task_type: AddTeamTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/add_to_timeline_task_params.py b/rootly_sdk/models/add_to_timeline_task_params.py index d30f8943..200ae000 100644 --- a/rootly_sdk/models/add_to_timeline_task_params.py +++ b/rootly_sdk/models/add_to_timeline_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,27 +26,27 @@ class AddToTimelineTaskParams: """ Attributes: event (str): The timeline event description - task_type (Union[Unset, AddToTimelineTaskParamsTaskType]): - url (Union[Unset, str]): A URL for the timeline event - post_to_slack_channels (Union[Unset, list['AddToTimelineTaskParamsPostToSlackChannelsItem']]): + task_type (AddToTimelineTaskParamsTaskType | Unset): + url (str | Unset): A URL for the timeline event + post_to_slack_channels (list[AddToTimelineTaskParamsPostToSlackChannelsItem] | Unset): """ event: str - task_type: Unset | AddToTimelineTaskParamsTaskType = UNSET - url: Unset | str = UNSET - post_to_slack_channels: Unset | list["AddToTimelineTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: AddToTimelineTaskParamsTaskType | Unset = UNSET + url: str | Unset = UNSET + post_to_slack_channels: list[AddToTimelineTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: event = self.event - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type url = self.url - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -77,7 +79,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: event = d.pop("event") _task_type = d.pop("task_type", UNSET) - task_type: Unset | AddToTimelineTaskParamsTaskType + task_type: AddToTimelineTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -85,14 +87,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: url = d.pop("url", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = AddToTimelineTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[AddToTimelineTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = AddToTimelineTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) add_to_timeline_task_params = cls( event=event, diff --git a/rootly_sdk/models/add_to_timeline_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/add_to_timeline_task_params_post_to_slack_channels_item.py index bd3ec020..a0238cd6 100644 --- a/rootly_sdk/models/add_to_timeline_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/add_to_timeline_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AddToTimelineTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert.py b/rootly_sdk/models/alert.py index 6dbfe16e..f058d7e5 100644 --- a/rootly_sdk/models/alert.py +++ b/rootly_sdk/models/alert.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,30 +34,29 @@ class Alert: summary (str): The summary of the alert created_at (str): Date of creation updated_at (str): Date of last update - noise (Union[Unset, AlertNoise]): Whether the alert is marked as noise - status (Union[Unset, AlertStatus]): The status of the alert - description (Union[None, Unset, str]): The description of the alert - services (Union[Unset, list['Service']]): Services attached to the alert - groups (Union[Unset, list['Team']]): Groups attached to the alert - environments (Union[Unset, list['Environment']]): Environments attached to the alert - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the alert. If your organization has - On-Call enabled and your notification target is a Service. This field will be automatically set for you. - group_ids (Union[None, Unset, list[str]]): The Group IDs to attach to the alert. If your organization has On- - Call enabled and your notification target is a Group. This field will be automatically set for you. - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the alert - external_id (Union[None, Unset, str]): External ID - external_url (Union[None, Unset, str]): External Url - alert_urgency_id (Union[None, Unset, str]): The ID of the alert urgency - group_leader_alert_id (Union[None, Unset, str]): The ID of the group leader alert - is_group_leader_alert (Union[None, Unset, bool]): Whether the alert is a group leader alert - labels (Union[Unset, list[Union['AlertLabelsItemType0', None]]]): - data (Union['AlertDataType0', None, Unset]): Additional data - deduplication_key (Union[None, Unset, str]): Alerts sharing the same deduplication key are treated as a single - alert. - alert_field_values_attributes (Union[Unset, list[Union['AlertAlertFieldValuesAttributesItemType0', None]]]): - Custom alert field values to create with the alert - started_at (Union[None, Unset, datetime.datetime]): When the alert started - ended_at (Union[None, Unset, datetime.datetime]): When the alert ended + noise (AlertNoise | Unset): Whether the alert is marked as noise + status (AlertStatus | Unset): The status of the alert + description (None | str | Unset): The description of the alert + services (list[Service] | Unset): Services attached to the alert + groups (list[Team] | Unset): Groups attached to the alert + environments (list[Environment] | Unset): Environments attached to the alert + service_ids (list[str] | None | Unset): The Service IDs to attach to the alert. If your organization has On-Call + enabled and your notification target is a Service. This field will be automatically set for you. + group_ids (list[str] | None | Unset): The Group IDs to attach to the alert. If your organization has On-Call + enabled and your notification target is a Group. This field will be automatically set for you. + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the alert + external_id (None | str | Unset): External ID + external_url (None | str | Unset): External Url + alert_urgency_id (None | str | Unset): The ID of the alert urgency + group_leader_alert_id (None | str | Unset): The ID of the group leader alert + is_group_leader_alert (bool | None | Unset): Whether the alert is a group leader alert + labels (list[AlertLabelsItemType0 | None] | Unset): + data (AlertDataType0 | None | Unset): Additional data + deduplication_key (None | str | Unset): Alerts sharing the same deduplication key are treated as a single alert. + alert_field_values_attributes (list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset): Custom alert + field values to create with the alert + started_at (datetime.datetime | None | Unset): When the alert started + ended_at (datetime.datetime | None | Unset): When the alert ended """ short_id: str @@ -63,26 +64,26 @@ class Alert: summary: str created_at: str updated_at: str - noise: Unset | AlertNoise = UNSET - status: Unset | AlertStatus = UNSET - description: None | Unset | str = UNSET - services: Unset | list["Service"] = UNSET - groups: Unset | list["Team"] = UNSET - environments: Unset | list["Environment"] = UNSET - service_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - external_id: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - group_leader_alert_id: None | Unset | str = UNSET - is_group_leader_alert: None | Unset | bool = UNSET - labels: Unset | list[Union["AlertLabelsItemType0", None]] = UNSET - data: Union["AlertDataType0", None, Unset] = UNSET - deduplication_key: None | Unset | str = UNSET - alert_field_values_attributes: Unset | list[Union["AlertAlertFieldValuesAttributesItemType0", None]] = UNSET - started_at: None | Unset | datetime.datetime = UNSET - ended_at: None | Unset | datetime.datetime = UNSET + noise: AlertNoise | Unset = UNSET + status: AlertStatus | Unset = UNSET + description: None | str | Unset = UNSET + services: list[Service] | Unset = UNSET + groups: list[Team] | Unset = UNSET + environments: list[Environment] | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + external_id: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + group_leader_alert_id: None | str | Unset = UNSET + is_group_leader_alert: bool | None | Unset = UNSET + labels: list[AlertLabelsItemType0 | None] | Unset = UNSET + data: AlertDataType0 | None | Unset = UNSET + deduplication_key: None | str | Unset = UNSET + alert_field_values_attributes: list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -100,42 +101,42 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - noise: Unset | str = UNSET + noise: str | Unset = UNSET if not isinstance(self.noise, Unset): noise = self.noise - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - services: Unset | list[dict[str, Any]] = UNSET + services: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.services, Unset): services = [] for services_item_data in self.services: services_item = services_item_data.to_dict() services.append(services_item) - groups: Unset | list[dict[str, Any]] = UNSET + groups: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.groups, Unset): groups = [] for groups_item_data in self.groups: groups_item = groups_item_data.to_dict() groups.append(groups_item) - environments: Unset | list[dict[str, Any]] = UNSET + environments: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.environments, Unset): environments = [] for environments_item_data in self.environments: environments_item = environments_item_data.to_dict() environments.append(environments_item) - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -144,7 +145,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -153,7 +154,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -162,48 +163,48 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - group_leader_alert_id: None | Unset | str + group_leader_alert_id: None | str | Unset if isinstance(self.group_leader_alert_id, Unset): group_leader_alert_id = UNSET else: group_leader_alert_id = self.group_leader_alert_id - is_group_leader_alert: None | Unset | bool + is_group_leader_alert: bool | None | Unset if isinstance(self.is_group_leader_alert, Unset): is_group_leader_alert = UNSET else: is_group_leader_alert = self.is_group_leader_alert - labels: Unset | list[None | dict[str, Any]] = UNSET + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: - labels_item: None | dict[str, Any] + labels_item: dict[str, Any] | None if isinstance(labels_item_data, AlertLabelsItemType0): labels_item = labels_item_data.to_dict() else: labels_item = labels_item_data labels.append(labels_item) - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, AlertDataType0): @@ -211,24 +212,24 @@ def to_dict(self) -> dict[str, Any]: else: data = self.data - deduplication_key: None | Unset | str + deduplication_key: None | str | Unset if isinstance(self.deduplication_key, Unset): deduplication_key = UNSET else: deduplication_key = self.deduplication_key - alert_field_values_attributes: Unset | list[None | dict[str, Any]] = UNSET + alert_field_values_attributes: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.alert_field_values_attributes, Unset): alert_field_values_attributes = [] for alert_field_values_attributes_item_data in self.alert_field_values_attributes: - alert_field_values_attributes_item: None | dict[str, Any] + alert_field_values_attributes_item: dict[str, Any] | None if isinstance(alert_field_values_attributes_item_data, AlertAlertFieldValuesAttributesItemType0): alert_field_values_attributes_item = alert_field_values_attributes_item_data.to_dict() else: alert_field_values_attributes_item = alert_field_values_attributes_item_data alert_field_values_attributes.append(alert_field_values_attributes_item) - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET elif isinstance(self.started_at, datetime.datetime): @@ -236,7 +237,7 @@ def to_dict(self) -> dict[str, Any]: else: started_at = self.started_at - ended_at: None | Unset | str + ended_at: None | str | Unset if isinstance(self.ended_at, Unset): ended_at = UNSET elif isinstance(self.ended_at, datetime.datetime): @@ -319,50 +320,56 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") _noise = d.pop("noise", UNSET) - noise: Unset | AlertNoise + noise: AlertNoise | Unset if isinstance(_noise, Unset): noise = UNSET else: noise = check_alert_noise(_noise) _status = d.pop("status", UNSET) - status: Unset | AlertStatus + status: AlertStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_alert_status(_status) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - services = [] _services = d.pop("services", UNSET) - for services_item_data in _services or []: - services_item = Service.from_dict(services_item_data) + services: list[Service] | Unset = UNSET + if _services is not UNSET: + services = [] + for services_item_data in _services: + services_item = Service.from_dict(services_item_data) - services.append(services_item) + services.append(services_item) - groups = [] _groups = d.pop("groups", UNSET) - for groups_item_data in _groups or []: - groups_item = Team.from_dict(groups_item_data) + groups: list[Team] | Unset = UNSET + if _groups is not UNSET: + groups = [] + for groups_item_data in _groups: + groups_item = Team.from_dict(groups_item_data) - groups.append(groups_item) + groups.append(groups_item) - environments = [] _environments = d.pop("environments", UNSET) - for environments_item_data in _environments or []: - environments_item = Environment.from_dict(environments_item_data) + environments: list[Environment] | Unset = UNSET + if _environments is not UNSET: + environments = [] + for environments_item_data in _environments: + environments_item = Environment.from_dict(environments_item_data) - environments.append(environments_item) + environments.append(environments_item) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -373,13 +380,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -390,13 +397,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -407,79 +414,81 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_group_leader_alert_id(data: object) -> None | Unset | str: + def _parse_group_leader_alert_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) group_leader_alert_id = _parse_group_leader_alert_id(d.pop("group_leader_alert_id", UNSET)) - def _parse_is_group_leader_alert(data: object) -> None | Unset | bool: + def _parse_is_group_leader_alert(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) is_group_leader_alert = _parse_is_group_leader_alert(d.pop("is_group_leader_alert", UNSET)) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: + labels: list[AlertLabelsItemType0 | None] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: - def _parse_labels_item(data: object) -> Union["AlertLabelsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - labels_item_type_0 = AlertLabelsItemType0.from_dict(data) + def _parse_labels_item(data: object) -> AlertLabelsItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + labels_item_type_0 = AlertLabelsItemType0.from_dict(data) - return labels_item_type_0 - except: # noqa: E722 - pass - return cast(Union["AlertLabelsItemType0", None], data) + return labels_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertLabelsItemType0 | None, data) - labels_item = _parse_labels_item(labels_item_data) + labels_item = _parse_labels_item(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) - def _parse_data(data: object) -> Union["AlertDataType0", None, Unset]: + def _parse_data(data: object) -> AlertDataType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -490,47 +499,51 @@ def _parse_data(data: object) -> Union["AlertDataType0", None, Unset]: data_type_0 = AlertDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AlertDataType0", None, Unset], data) + return cast(AlertDataType0 | None | Unset, data) data = _parse_data(d.pop("data", UNSET)) - def _parse_deduplication_key(data: object) -> None | Unset | str: + def _parse_deduplication_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key = _parse_deduplication_key(d.pop("deduplication_key", UNSET)) - alert_field_values_attributes = [] _alert_field_values_attributes = d.pop("alert_field_values_attributes", UNSET) - for alert_field_values_attributes_item_data in _alert_field_values_attributes or []: - - def _parse_alert_field_values_attributes_item( - data: object, - ) -> Union["AlertAlertFieldValuesAttributesItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - alert_field_values_attributes_item_type_0 = AlertAlertFieldValuesAttributesItemType0.from_dict(data) - - return alert_field_values_attributes_item_type_0 - except: # noqa: E722 - pass - return cast(Union["AlertAlertFieldValuesAttributesItemType0", None], data) - - alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( - alert_field_values_attributes_item_data - ) - - alert_field_values_attributes.append(alert_field_values_attributes_item) - - def _parse_started_at(data: object) -> None | Unset | datetime.datetime: + alert_field_values_attributes: list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset = UNSET + if _alert_field_values_attributes is not UNSET: + alert_field_values_attributes = [] + for alert_field_values_attributes_item_data in _alert_field_values_attributes: + + def _parse_alert_field_values_attributes_item( + data: object, + ) -> AlertAlertFieldValuesAttributesItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + alert_field_values_attributes_item_type_0 = AlertAlertFieldValuesAttributesItemType0.from_dict( + data + ) + + return alert_field_values_attributes_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertAlertFieldValuesAttributesItemType0 | None, data) + + alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( + alert_field_values_attributes_item_data + ) + + alert_field_values_attributes.append(alert_field_values_attributes_item) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -541,13 +554,13 @@ def _parse_started_at(data: object) -> None | Unset | datetime.datetime: started_at_type_0 = isoparse(data) return started_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -558,9 +571,9 @@ def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: ended_at_type_0 = isoparse(data) return ended_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) diff --git a/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py b/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py index be4d4434..e7939f3a 100644 --- a/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py +++ b/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/alert_data_type_0.py b/rootly_sdk/models/alert_data_type_0.py index a1daf88d..ce1e2630 100644 --- a/rootly_sdk/models/alert_data_type_0.py +++ b/rootly_sdk/models/alert_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class AlertDataType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/alert_event.py b/rootly_sdk/models/alert_event.py index 7b601659..d0e3ceb2 100644 --- a/rootly_sdk/models/alert_event.py +++ b/rootly_sdk/models/alert_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,8 +22,8 @@ class AlertEvent: source (str): created_at (str): updated_at (str): - user_id (Union[None, Unset, int]): Author of the note. - details (Union[None, Unset, str]): Note message. + user_id (int | None | Unset): Author of the note. + details (None | str | Unset): Note message. """ kind: AlertEventKind @@ -29,8 +31,8 @@ class AlertEvent: source: str created_at: str updated_at: str - user_id: None | Unset | int = UNSET - details: None | Unset | str = UNSET + user_id: int | None | Unset = UNSET + details: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,13 +46,13 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - user_id: None | Unset | int + user_id: int | None | Unset if isinstance(self.user_id, Unset): user_id = UNSET else: user_id = self.user_id - details: None | Unset | str + details: None | str | Unset if isinstance(self.details, Unset): details = UNSET else: @@ -87,21 +89,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_user_id(data: object) -> None | Unset | int: + def _parse_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) user_id = _parse_user_id(d.pop("user_id", UNSET)) - def _parse_details(data: object) -> None | Unset | str: + def _parse_details(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) details = _parse_details(d.pop("details", UNSET)) diff --git a/rootly_sdk/models/alert_event_list.py b/rootly_sdk/models/alert_event_list.py index a3efb269..bf443fde 100644 --- a/rootly_sdk/models/alert_event_list.py +++ b/rootly_sdk/models/alert_event_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertEventList: """ Attributes: - data (list['AlertEventListDataItem']): + data (list[AlertEventListDataItem]): links (Links): meta (Meta): """ - data: list["AlertEventListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertEventListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_event_list_data_item.py b/rootly_sdk/models/alert_event_list_data_item.py index 9228289f..16d7f67a 100644 --- a/rootly_sdk/models/alert_event_list_data_item.py +++ b/rootly_sdk/models/alert_event_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertEventListDataItem: id: str type_: AlertEventListDataItemType - attributes: "AlertEvent" + attributes: AlertEvent additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_event_response.py b/rootly_sdk/models/alert_event_response.py index 52453b40..5b95d09a 100644 --- a/rootly_sdk/models/alert_event_response.py +++ b/rootly_sdk/models/alert_event_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertEventResponse: data (AlertEventResponseData): """ - data: "AlertEventResponseData" + data: AlertEventResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_event_response_data.py b/rootly_sdk/models/alert_event_response_data.py index 7bb109dc..0fe0cf01 100644 --- a/rootly_sdk/models/alert_event_response_data.py +++ b/rootly_sdk/models/alert_event_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertEventResponseData: id: str type_: AlertEventResponseDataType - attributes: "AlertEvent" + attributes: AlertEvent additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_field.py b/rootly_sdk/models/alert_field.py index 1796e3d9..57d6df37 100644 --- a/rootly_sdk/models/alert_field.py +++ b/rootly_sdk/models/alert_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,14 +19,14 @@ class AlertField: kind (str): The kind of alert field created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the alert field + slug (str | Unset): The slug of the alert field """ name: str kind: str created_at: str updated_at: str - slug: Unset | str = UNSET + slug: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_field_list.py b/rootly_sdk/models/alert_field_list.py index 6028be3a..6b0890a6 100644 --- a/rootly_sdk/models/alert_field_list.py +++ b/rootly_sdk/models/alert_field_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertFieldList: """ Attributes: - data (list['AlertFieldListDataItem']): + data (list[AlertFieldListDataItem]): links (Links): meta (Meta): """ - data: list["AlertFieldListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertFieldListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_field_list_data_item.py b/rootly_sdk/models/alert_field_list_data_item.py index f1b8c603..377b7621 100644 --- a/rootly_sdk/models/alert_field_list_data_item.py +++ b/rootly_sdk/models/alert_field_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertFieldListDataItem: id: str type_: AlertFieldListDataItemType - attributes: "AlertField" + attributes: AlertField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_field_response.py b/rootly_sdk/models/alert_field_response.py index f2c9e358..194e802b 100644 --- a/rootly_sdk/models/alert_field_response.py +++ b/rootly_sdk/models/alert_field_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertFieldResponse: data (AlertFieldResponseData): """ - data: "AlertFieldResponseData" + data: AlertFieldResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_field_response_data.py b/rootly_sdk/models/alert_field_response_data.py index 45c54724..2b6de736 100644 --- a/rootly_sdk/models/alert_field_response_data.py +++ b/rootly_sdk/models/alert_field_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -20,12 +22,12 @@ class AlertFieldResponseData: Attributes: type_ (AlertFieldResponseDataType): attributes (AlertField): - id (Union[Unset, str]): The ID of the alert field + id (str | Unset): The ID of the alert field """ type_: AlertFieldResponseDataType - attributes: "AlertField" - id: Unset | str = UNSET + attributes: AlertField + id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_group.py b/rootly_sdk/models/alert_group.py index f9913184..f6d123b9 100644 --- a/rootly_sdk/models/alert_group.py +++ b/rootly_sdk/models/alert_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -20,21 +22,21 @@ class AlertGroup: """ Attributes: name (str): The name of the alert group - description (Union[None, str]): The description of the alert group + description (None | str): The description of the alert group condition_type (str): Grouping condition for the alert group time_window (int): Time window for the alert grouping created_at (str): Date of creation updated_at (str): Date of last update - deleted_at (Union[None, str]): Date or deletion - slug (Union[Unset, str]): The slug of the alert group - group_by_alert_title (Union[Unset, bool]): [DEPRECATED] Whether the alerts are grouped by title or not. This - field is deprecated. Please use the `conditions` field with advanced alert grouping instead. - group_by_alert_urgency (Union[Unset, bool]): [DEPRECATED] Whether the alerts are grouped by urgency or not. This - field is deprecated. Please use the `conditions` field with advanced alert grouping instead. - targets (Union[Unset, list['AlertGroupTargetsItem']]): - attributes (Union[Unset, list['AlertGroupAttributesItem']]): This field is deprecated. Please use the - `conditions` field instead, `attributes` will be removed in the future. - conditions (Union[Unset, list['AlertGroupConditionsItem']]): The conditions for the alert group + deleted_at (None | str): Date or deletion + slug (str | Unset): The slug of the alert group + group_by_alert_title (bool | Unset): [DEPRECATED] Whether the alerts are grouped by title or not. This field is + deprecated. Please use the `conditions` field with advanced alert grouping instead. + group_by_alert_urgency (bool | Unset): [DEPRECATED] Whether the alerts are grouped by urgency or not. This field + is deprecated. Please use the `conditions` field with advanced alert grouping instead. + targets (list[AlertGroupTargetsItem] | Unset): + attributes (list[AlertGroupAttributesItem] | Unset): This field is deprecated. Please use the `conditions` field + instead, `attributes` will be removed in the future. + conditions (list[AlertGroupConditionsItem] | Unset): The conditions for the alert group """ name: str @@ -44,12 +46,12 @@ class AlertGroup: created_at: str updated_at: str deleted_at: None | str - slug: Unset | str = UNSET - group_by_alert_title: Unset | bool = UNSET - group_by_alert_urgency: Unset | bool = UNSET - targets: Unset | list["AlertGroupTargetsItem"] = UNSET - attributes: Unset | list["AlertGroupAttributesItem"] = UNSET - conditions: Unset | list["AlertGroupConditionsItem"] = UNSET + slug: str | Unset = UNSET + group_by_alert_title: bool | Unset = UNSET + group_by_alert_urgency: bool | Unset = UNSET + targets: list[AlertGroupTargetsItem] | Unset = UNSET + attributes: list[AlertGroupAttributesItem] | Unset = UNSET + conditions: list[AlertGroupConditionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -75,21 +77,21 @@ def to_dict(self) -> dict[str, Any]: group_by_alert_urgency = self.group_by_alert_urgency - targets: Unset | list[dict[str, Any]] = UNSET + targets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.targets, Unset): targets = [] for targets_item_data in self.targets: targets_item = targets_item_data.to_dict() targets.append(targets_item) - attributes: Unset | list[dict[str, Any]] = UNSET + attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = [] for attributes_item_data in self.attributes: attributes_item = attributes_item_data.to_dict() attributes.append(attributes_item) - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -161,26 +163,32 @@ def _parse_deleted_at(data: object) -> None | str: group_by_alert_urgency = d.pop("group_by_alert_urgency", UNSET) - targets = [] _targets = d.pop("targets", UNSET) - for targets_item_data in _targets or []: - targets_item = AlertGroupTargetsItem.from_dict(targets_item_data) + targets: list[AlertGroupTargetsItem] | Unset = UNSET + if _targets is not UNSET: + targets = [] + for targets_item_data in _targets: + targets_item = AlertGroupTargetsItem.from_dict(targets_item_data) - targets.append(targets_item) + targets.append(targets_item) - attributes = [] _attributes = d.pop("attributes", UNSET) - for attributes_item_data in _attributes or []: - attributes_item = AlertGroupAttributesItem.from_dict(attributes_item_data) + attributes: list[AlertGroupAttributesItem] | Unset = UNSET + if _attributes is not UNSET: + attributes = [] + for attributes_item_data in _attributes: + attributes_item = AlertGroupAttributesItem.from_dict(attributes_item_data) - attributes.append(attributes_item) + attributes.append(attributes_item) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = AlertGroupConditionsItem.from_dict(conditions_item_data) + conditions: list[AlertGroupConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = AlertGroupConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) alert_group = cls( name=name, diff --git a/rootly_sdk/models/alert_group_attributes_item.py b/rootly_sdk/models/alert_group_attributes_item.py index 120ba12a..574f2129 100644 --- a/rootly_sdk/models/alert_group_attributes_item.py +++ b/rootly_sdk/models/alert_group_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class AlertGroupAttributesItem: """ Attributes: - json_path (Union[Unset, str]): The JSON path to the value to group by. + json_path (str | Unset): The JSON path to the value to group by. """ - json_path: Unset | str = UNSET + json_path: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_group_conditions_item.py b/rootly_sdk/models/alert_group_conditions_item.py index c521f354..7a2c80f7 100644 --- a/rootly_sdk/models/alert_group_conditions_item.py +++ b/rootly_sdk/models/alert_group_conditions_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,32 +34,32 @@ class AlertGroupConditionsItem: property_field_type (AlertGroupConditionsItemPropertyFieldType): The type of the property field property_field_condition_type (AlertGroupConditionsItemPropertyFieldConditionType): The condition type of the property field - property_field_name (Union[None, Unset, str]): The name of the property field. If the property field type is - selected as 'attribute', then the allowed property field names are 'summary' (for Title), 'description', - 'alert_urgency' and 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', - then the property field name should be supplied in JSON Path syntax. - property_field_value (Union[None, Unset, str]): The value of the property field. Can be null if the property - field condition type is 'is_one_of' or 'is_not_one_of' - property_field_values (Union[Unset, list[str]]): The values of the property field. Used if the property field + property_field_name (None | str | Unset): The name of the property field. If the property field type is selected + as 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' + and 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the + property field name should be supplied in JSON Path syntax. + property_field_value (None | str | Unset): The value of the property field. Can be null if the property field + condition type is 'is_one_of' or 'is_not_one_of' + property_field_values (list[str] | Unset): The values of the property field. Used if the property field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is 'alert_urgency' - values (Union[Unset, list[Union['AlertGroupConditionsItemValuesItemType0', None]]]): - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition. Only need to - be set when the property field type is 'attribute', the property field name is 'alert_urgency' and the property + values (list[AlertGroupConditionsItemValuesItemType0 | None] | Unset): + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition. Only need to be + set when the property field type is 'attribute', the property field name is 'alert_urgency' and the property field condition type is 'is_one_of' or 'is_not_one_of' - conditionable_type (Union[Unset, AlertGroupConditionsItemConditionableType]): The type of the conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. + conditionable_type (AlertGroupConditionsItemConditionableType | Unset): The type of the conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. """ property_field_type: AlertGroupConditionsItemPropertyFieldType property_field_condition_type: AlertGroupConditionsItemPropertyFieldConditionType - property_field_name: None | Unset | str = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: Unset | list[str] = UNSET - values: Unset | list[Union["AlertGroupConditionsItemValuesItemType0", None]] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET - conditionable_type: Unset | AlertGroupConditionsItemConditionableType = UNSET - conditionable_id: None | Unset | str = UNSET + property_field_name: None | str | Unset = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | Unset = UNSET + values: list[AlertGroupConditionsItemValuesItemType0 | None] | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET + conditionable_type: AlertGroupConditionsItemConditionableType | Unset = UNSET + conditionable_id: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -67,34 +69,34 @@ def to_dict(self) -> dict[str, Any]: property_field_condition_type: str = self.property_field_condition_type - property_field_name: None | Unset | str + property_field_name: None | str | Unset if isinstance(self.property_field_name, Unset): property_field_name = UNSET else: property_field_name = self.property_field_name - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: Unset | list[str] = UNSET + property_field_values: list[str] | Unset = UNSET if not isinstance(self.property_field_values, Unset): property_field_values = self.property_field_values - values: Unset | list[None | dict[str, Any]] = UNSET + values: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.values, Unset): values = [] for values_item_data in self.values: - values_item: None | dict[str, Any] + values_item: dict[str, Any] | None if isinstance(values_item_data, AlertGroupConditionsItemValuesItemType0): values_item = values_item_data.to_dict() else: values_item = values_item_data values.append(values_item) - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -103,11 +105,11 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: @@ -149,48 +151,50 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d.pop("property_field_condition_type") ) - def _parse_property_field_name(data: object) -> None | Unset | str: + def _parse_property_field_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_name = _parse_property_field_name(d.pop("property_field_name", UNSET)) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) property_field_values = cast(list[str], d.pop("property_field_values", UNSET)) - values = [] _values = d.pop("values", UNSET) - for values_item_data in _values or []: + values: list[AlertGroupConditionsItemValuesItemType0 | None] | Unset = UNSET + if _values is not UNSET: + values = [] + for values_item_data in _values: - def _parse_values_item(data: object) -> Union["AlertGroupConditionsItemValuesItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - values_item_type_0 = AlertGroupConditionsItemValuesItemType0.from_dict(data) + def _parse_values_item(data: object) -> AlertGroupConditionsItemValuesItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + values_item_type_0 = AlertGroupConditionsItemValuesItemType0.from_dict(data) - return values_item_type_0 - except: # noqa: E722 - pass - return cast(Union["AlertGroupConditionsItemValuesItemType0", None], data) + return values_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertGroupConditionsItemValuesItemType0 | None, data) - values_item = _parse_values_item(values_item_data) + values_item = _parse_values_item(values_item_data) - values.append(values_item) + values.append(values_item) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -201,25 +205,25 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | AlertGroupConditionsItemConditionableType + conditionable_type: AlertGroupConditionsItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: conditionable_type = check_alert_group_conditions_item_conditionable_type(_conditionable_type) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) diff --git a/rootly_sdk/models/alert_group_conditions_item_values_item_type_0.py b/rootly_sdk/models/alert_group_conditions_item_values_item_type_0.py index 23ed1e3a..a2bb4948 100644 --- a/rootly_sdk/models/alert_group_conditions_item_values_item_type_0.py +++ b/rootly_sdk/models/alert_group_conditions_item_values_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/alert_group_list.py b/rootly_sdk/models/alert_group_list.py index 60d285f0..382f95e7 100644 --- a/rootly_sdk/models/alert_group_list.py +++ b/rootly_sdk/models/alert_group_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,10 +17,10 @@ class AlertGroupList: """ Attributes: - data (list['AlertGroupListDataItem']): + data (list[AlertGroupListDataItem]): """ - data: list["AlertGroupListDataItem"] + data: list[AlertGroupListDataItem] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_group_list_data_item.py b/rootly_sdk/models/alert_group_list_data_item.py index f526ed60..3a40c496 100644 --- a/rootly_sdk/models/alert_group_list_data_item.py +++ b/rootly_sdk/models/alert_group_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertGroupListDataItem: id: str type_: AlertGroupListDataItemType - attributes: "AlertGroup" + attributes: AlertGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_group_response.py b/rootly_sdk/models/alert_group_response.py index 0b0aeb47..e3ca1078 100644 --- a/rootly_sdk/models/alert_group_response.py +++ b/rootly_sdk/models/alert_group_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertGroupResponse: data (AlertGroupResponseData): """ - data: "AlertGroupResponseData" + data: AlertGroupResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_group_response_data.py b/rootly_sdk/models/alert_group_response_data.py index 96a04949..d2171843 100644 --- a/rootly_sdk/models/alert_group_response_data.py +++ b/rootly_sdk/models/alert_group_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertGroupResponseData: id: str type_: AlertGroupResponseDataType - attributes: "AlertGroup" + attributes: AlertGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_group_targets_item.py b/rootly_sdk/models/alert_group_targets_item.py index e19b7af2..c197aa66 100644 --- a/rootly_sdk/models/alert_group_targets_item.py +++ b/rootly_sdk/models/alert_group_targets_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID diff --git a/rootly_sdk/models/alert_labels_item_type_0.py b/rootly_sdk/models/alert_labels_item_type_0.py index cf7bf716..432ad1f0 100644 --- a/rootly_sdk/models/alert_labels_item_type_0.py +++ b/rootly_sdk/models/alert_labels_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,7 +14,7 @@ class AlertLabelsItemType0: """ Attributes: key (str): Key of the tag - value (Union[bool, float, str]): Value of the tag + value (bool | float | str): Value of the tag """ key: str diff --git a/rootly_sdk/models/alert_list.py b/rootly_sdk/models/alert_list.py index 51998b1f..a8d28725 100644 --- a/rootly_sdk/models/alert_list.py +++ b/rootly_sdk/models/alert_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertList: """ Attributes: - data (list['AlertListDataItem']): + data (list[AlertListDataItem]): links (Links): meta (Meta): """ - data: list["AlertListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_list_data_item.py b/rootly_sdk/models/alert_list_data_item.py index d6f4cd6c..ed0d8fe7 100644 --- a/rootly_sdk/models/alert_list_data_item.py +++ b/rootly_sdk/models/alert_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,13 +24,13 @@ class AlertListDataItem: id (str): Unique ID of the alert type_ (AlertListDataItemType): attributes (Alert): - source (Union[Unset, AlertListDataItemSource]): The source of the alert + source (AlertListDataItemSource | Unset): The source of the alert """ id: str type_: AlertListDataItemType - attributes: "Alert" - source: Unset | AlertListDataItemSource = UNSET + attributes: Alert + source: AlertListDataItemSource | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - source: Unset | str = UNSET + source: str | Unset = UNSET if not isinstance(self.source, Unset): source = self.source @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = Alert.from_dict(d.pop("attributes")) _source = d.pop("source", UNSET) - source: Unset | AlertListDataItemSource + source: AlertListDataItemSource | Unset if isinstance(_source, Unset): source = UNSET else: diff --git a/rootly_sdk/models/alert_list_data_item_source.py b/rootly_sdk/models/alert_list_data_item_source.py index 6281d242..d88a9512 100644 --- a/rootly_sdk/models/alert_list_data_item_source.py +++ b/rootly_sdk/models/alert_list_data_item_source.py @@ -6,6 +6,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -14,6 +15,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", @@ -52,6 +54,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -60,6 +63,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", diff --git a/rootly_sdk/models/alert_response.py b/rootly_sdk/models/alert_response.py index 40747c66..b1e9801b 100644 --- a/rootly_sdk/models/alert_response.py +++ b/rootly_sdk/models/alert_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertResponse: data (AlertResponseData): """ - data: "AlertResponseData" + data: AlertResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_response_data.py b/rootly_sdk/models/alert_response_data.py index e59f7ebf..615c4731 100644 --- a/rootly_sdk/models/alert_response_data.py +++ b/rootly_sdk/models/alert_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,13 +24,13 @@ class AlertResponseData: id (str): Unique ID of the alert type_ (AlertResponseDataType): attributes (Alert): - source (Union[Unset, AlertResponseDataSource]): The source of the alert + source (AlertResponseDataSource | Unset): The source of the alert """ id: str type_: AlertResponseDataType - attributes: "Alert" - source: Unset | AlertResponseDataSource = UNSET + attributes: Alert + source: AlertResponseDataSource | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - source: Unset | str = UNSET + source: str | Unset = UNSET if not isinstance(self.source, Unset): source = self.source @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = Alert.from_dict(d.pop("attributes")) _source = d.pop("source", UNSET) - source: Unset | AlertResponseDataSource + source: AlertResponseDataSource | Unset if isinstance(_source, Unset): source = UNSET else: diff --git a/rootly_sdk/models/alert_response_data_source.py b/rootly_sdk/models/alert_response_data_source.py index 39e90baf..0572eee7 100644 --- a/rootly_sdk/models/alert_response_data_source.py +++ b/rootly_sdk/models/alert_response_data_source.py @@ -6,6 +6,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -14,6 +15,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", @@ -52,6 +54,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -60,6 +63,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", diff --git a/rootly_sdk/models/alert_route.py b/rootly_sdk/models/alert_route.py index d8f701e4..d0895905 100644 --- a/rootly_sdk/models/alert_route.py +++ b/rootly_sdk/models/alert_route.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -20,16 +22,16 @@ class AlertRoute: Attributes: name (str): The name of the alert route alerts_source_ids (list[UUID]): - enabled (Union[Unset, bool]): Whether the alert route is enabled - owning_team_ids (Union[Unset, list[UUID]]): - rules (Union[Unset, list['AlertRouteRulesItem']]): + enabled (bool | Unset): Whether the alert route is enabled + owning_team_ids (list[UUID] | Unset): + rules (list[AlertRouteRulesItem] | Unset): """ name: str alerts_source_ids: list[UUID] - enabled: Unset | bool = UNSET - owning_team_ids: Unset | list[UUID] = UNSET - rules: Unset | list["AlertRouteRulesItem"] = UNSET + enabled: bool | Unset = UNSET + owning_team_ids: list[UUID] | Unset = UNSET + rules: list[AlertRouteRulesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,14 +44,14 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - owning_team_ids: Unset | list[str] = UNSET + owning_team_ids: list[str] | Unset = UNSET if not isinstance(self.owning_team_ids, Unset): owning_team_ids = [] for owning_team_ids_item_data in self.owning_team_ids: owning_team_ids_item = str(owning_team_ids_item_data) owning_team_ids.append(owning_team_ids_item) - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -89,19 +91,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) - owning_team_ids = [] _owning_team_ids = d.pop("owning_team_ids", UNSET) - for owning_team_ids_item_data in _owning_team_ids or []: - owning_team_ids_item = UUID(owning_team_ids_item_data) + owning_team_ids: list[UUID] | Unset = UNSET + if _owning_team_ids is not UNSET: + owning_team_ids = [] + for owning_team_ids_item_data in _owning_team_ids: + owning_team_ids_item = UUID(owning_team_ids_item_data) - owning_team_ids.append(owning_team_ids_item) + owning_team_ids.append(owning_team_ids_item) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = AlertRouteRulesItem.from_dict(rules_item_data) + rules: list[AlertRouteRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = AlertRouteRulesItem.from_dict(rules_item_data) - rules.append(rules_item) + rules.append(rules_item) alert_route = cls( name=name, diff --git a/rootly_sdk/models/alert_route_list.py b/rootly_sdk/models/alert_route_list.py index ccae9fd3..788a6a65 100644 --- a/rootly_sdk/models/alert_route_list.py +++ b/rootly_sdk/models/alert_route_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertRouteList: """ Attributes: - data (list['AlertRouteListDataItem']): + data (list[AlertRouteListDataItem]): links (Links): meta (Meta): """ - data: list["AlertRouteListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertRouteListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_route_list_data_item.py b/rootly_sdk/models/alert_route_list_data_item.py index ba77f29a..3aee86f3 100644 --- a/rootly_sdk/models/alert_route_list_data_item.py +++ b/rootly_sdk/models/alert_route_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertRouteListDataItem: id: str type_: AlertRouteListDataItemType - attributes: "AlertRoute" + attributes: AlertRoute additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_route_response.py b/rootly_sdk/models/alert_route_response.py index 21c9cd2d..0fb84000 100644 --- a/rootly_sdk/models/alert_route_response.py +++ b/rootly_sdk/models/alert_route_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertRouteResponse: data (AlertRouteResponseData): """ - data: "AlertRouteResponseData" + data: AlertRouteResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_route_response_data.py b/rootly_sdk/models/alert_route_response_data.py index b94232f9..f52eb429 100644 --- a/rootly_sdk/models/alert_route_response_data.py +++ b/rootly_sdk/models/alert_route_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AlertRouteResponseData: id: str type_: AlertRouteResponseDataType - attributes: "AlertRoute" + attributes: AlertRoute additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_route_rules_item.py b/rootly_sdk/models/alert_route_rules_item.py index ca9ddf55..6377e212 100644 --- a/rootly_sdk/models/alert_route_rules_item.py +++ b/rootly_sdk/models/alert_route_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,17 +21,17 @@ class AlertRouteRulesItem: """ Attributes: name (str): The name of the alert routing rule - destinations (list['AlertRouteRulesItemDestinationsItem']): - condition_groups (list['AlertRouteRulesItemConditionGroupsItem']): - position (Union[Unset, int]): The position of the alert routing rule for ordering evaluation - fallback_rule (Union[Unset, bool]): Whether this is a fallback rule + destinations (list[AlertRouteRulesItemDestinationsItem]): + condition_groups (list[AlertRouteRulesItemConditionGroupsItem]): + position (int | Unset): The position of the alert routing rule for ordering evaluation + fallback_rule (bool | Unset): Whether this is a fallback rule Default: False. """ name: str - destinations: list["AlertRouteRulesItemDestinationsItem"] - condition_groups: list["AlertRouteRulesItemConditionGroupsItem"] - position: Unset | int = UNSET - fallback_rule: Unset | bool = UNSET + destinations: list[AlertRouteRulesItemDestinationsItem] + condition_groups: list[AlertRouteRulesItemConditionGroupsItem] + position: int | Unset = UNSET + fallback_rule: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py b/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py index 94f139fc..80a9e188 100644 --- a/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/alert_route_rules_item_condition_groups_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,12 +21,12 @@ class AlertRouteRulesItemConditionGroupsItem: """ Attributes: - conditions (list['AlertRouteRulesItemConditionGroupsItemConditionsItem']): - position (Union[Unset, int]): The position of the condition group + conditions (list[AlertRouteRulesItemConditionGroupsItemConditionsItem]): + position (int | Unset): The position of the condition group """ - conditions: list["AlertRouteRulesItemConditionGroupsItemConditionsItem"] - position: Unset | int = UNSET + conditions: list[AlertRouteRulesItemConditionGroupsItemConditionsItem] + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_route_rules_item_condition_groups_item_conditions_item.py b/rootly_sdk/models/alert_route_rules_item_condition_groups_item_conditions_item.py index 91f1fba8..413dfacc 100644 --- a/rootly_sdk/models/alert_route_rules_item_condition_groups_item_conditions_item.py +++ b/rootly_sdk/models/alert_route_rules_item_condition_groups_item_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -28,23 +30,23 @@ class AlertRouteRulesItemConditionGroupsItemConditionsItem: Attributes: property_field_condition_type (AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType): property_field_type (AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldType): - property_field_name (Union[Unset, str]): The name of the property field - property_field_value (Union[None, Unset, str]): The value of the property field - property_field_values (Union[None, Unset, list[str]]): - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition - conditionable_type (Union[Unset, AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType]): The - type of the conditionable - conditionable_id (Union[None, UUID, Unset]): The ID of the conditionable + property_field_name (str | Unset): The name of the property field + property_field_value (None | str | Unset): The value of the property field + property_field_values (list[str] | None | Unset): + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition + conditionable_type (AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType | Unset): The type of + the conditionable + conditionable_id (None | Unset | UUID): The ID of the conditionable """ property_field_condition_type: AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType property_field_type: AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldType - property_field_name: Unset | str = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: None | Unset | list[str] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET - conditionable_type: Unset | AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType = UNSET - conditionable_id: None | UUID | Unset = UNSET + property_field_name: str | Unset = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | None | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET + conditionable_type: AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType | Unset = UNSET + conditionable_id: None | Unset | UUID = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,13 +56,13 @@ def to_dict(self) -> dict[str, Any]: property_field_name = self.property_field_name - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: None | Unset | list[str] + property_field_values: list[str] | None | Unset if isinstance(self.property_field_values, Unset): property_field_values = UNSET elif isinstance(self.property_field_values, list): @@ -69,7 +71,7 @@ def to_dict(self) -> dict[str, Any]: else: property_field_values = self.property_field_values - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -78,11 +80,11 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET elif isinstance(self.conditionable_id, UUID): @@ -128,16 +130,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: property_field_name = d.pop("property_field_name", UNSET) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) - def _parse_property_field_values(data: object) -> None | Unset | list[str]: + def _parse_property_field_values(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -148,13 +150,13 @@ def _parse_property_field_values(data: object) -> None | Unset | list[str]: property_field_values_type_0 = cast(list[str], data) return property_field_values_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) property_field_values = _parse_property_field_values(d.pop("property_field_values", UNSET)) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -165,14 +167,14 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType + conditionable_type: AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: @@ -180,7 +182,7 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | UUID | Unset: + def _parse_conditionable_id(data: object) -> None | Unset | UUID: if data is None: return data if isinstance(data, Unset): @@ -191,9 +193,9 @@ def _parse_conditionable_id(data: object) -> None | UUID | Unset: conditionable_id_type_0 = UUID(data) return conditionable_id_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | UUID | Unset, data) + return cast(None | Unset | UUID, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) diff --git a/rootly_sdk/models/alert_route_rules_item_destinations_item.py b/rootly_sdk/models/alert_route_rules_item_destinations_item.py index 68cb445f..303e9070 100644 --- a/rootly_sdk/models/alert_route_rules_item_destinations_item.py +++ b/rootly_sdk/models/alert_route_rules_item_destinations_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -17,7 +19,8 @@ class AlertRouteRulesItemDestinationsItem: """ Attributes: - target_type (AlertRouteRulesItemDestinationsItemTargetType): The type of the target + target_type (AlertRouteRulesItemDestinationsItemTargetType): The type of the target. Please contact support if + you encounter issues using `Functionality` as a target type. target_id (UUID): The ID of the target """ diff --git a/rootly_sdk/models/alert_route_rules_item_destinations_item_target_type.py b/rootly_sdk/models/alert_route_rules_item_destinations_item_target_type.py index 5ad5d252..03f3bfde 100644 --- a/rootly_sdk/models/alert_route_rules_item_destinations_item_target_type.py +++ b/rootly_sdk/models/alert_route_rules_item_destinations_item_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -AlertRouteRulesItemDestinationsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +AlertRouteRulesItemDestinationsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] ALERT_ROUTE_RULES_ITEM_DESTINATIONS_ITEM_TARGET_TYPE_VALUES: set[AlertRouteRulesItemDestinationsItemTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/alert_routing_rule.py b/rootly_sdk/models/alert_routing_rule.py index d6c36741..1ca607b9 100644 --- a/rootly_sdk/models/alert_routing_rule.py +++ b/rootly_sdk/models/alert_routing_rule.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from uuid import UUID from attrs import define as _attrs_define @@ -31,11 +33,10 @@ class AlertRoutingRule: condition_type (AlertRoutingRuleConditionType): The type of condition for the alert routing rule created_at (str): Date of creation updated_at (str): Date of last update - conditions (Union[Unset, list['AlertRoutingRuleConditionsItem']]): The conditions for the alert routing rule - destination (Union['AlertRoutingRuleDestinationType0', None, Unset]): The destinations for the alert routing + conditions (list[AlertRoutingRuleConditionsItem] | Unset): The conditions for the alert routing rule + destination (AlertRoutingRuleDestinationType0 | None | Unset): The destinations for the alert routing rule + condition_groups (list[AlertRoutingRuleConditionGroupsItem] | Unset): The condition groups for the alert routing rule - condition_groups (Union[Unset, list['AlertRoutingRuleConditionGroupsItem']]): The condition groups for the alert - routing rule """ name: str @@ -45,9 +46,9 @@ class AlertRoutingRule: condition_type: AlertRoutingRuleConditionType created_at: str updated_at: str - conditions: Unset | list["AlertRoutingRuleConditionsItem"] = UNSET - destination: Union["AlertRoutingRuleDestinationType0", None, Unset] = UNSET - condition_groups: Unset | list["AlertRoutingRuleConditionGroupsItem"] = UNSET + conditions: list[AlertRoutingRuleConditionsItem] | Unset = UNSET + destination: AlertRoutingRuleDestinationType0 | None | Unset = UNSET + condition_groups: list[AlertRoutingRuleConditionGroupsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -67,14 +68,14 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() conditions.append(conditions_item) - destination: None | Unset | dict[str, Any] + destination: dict[str, Any] | None | Unset if isinstance(self.destination, Unset): destination = UNSET elif isinstance(self.destination, AlertRoutingRuleDestinationType0): @@ -82,7 +83,7 @@ def to_dict(self) -> dict[str, Any]: else: destination = self.destination - condition_groups: Unset | list[dict[str, Any]] = UNSET + condition_groups: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.condition_groups, Unset): condition_groups = [] for condition_groups_item_data in self.condition_groups: @@ -132,14 +133,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = AlertRoutingRuleConditionsItem.from_dict(conditions_item_data) + conditions: list[AlertRoutingRuleConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = AlertRoutingRuleConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) - def _parse_destination(data: object) -> Union["AlertRoutingRuleDestinationType0", None, Unset]: + def _parse_destination(data: object) -> AlertRoutingRuleDestinationType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -150,18 +153,20 @@ def _parse_destination(data: object) -> Union["AlertRoutingRuleDestinationType0" destination_type_0 = AlertRoutingRuleDestinationType0.from_dict(data) return destination_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AlertRoutingRuleDestinationType0", None, Unset], data) + return cast(AlertRoutingRuleDestinationType0 | None | Unset, data) destination = _parse_destination(d.pop("destination", UNSET)) - condition_groups = [] _condition_groups = d.pop("condition_groups", UNSET) - for condition_groups_item_data in _condition_groups or []: - condition_groups_item = AlertRoutingRuleConditionGroupsItem.from_dict(condition_groups_item_data) + condition_groups: list[AlertRoutingRuleConditionGroupsItem] | Unset = UNSET + if _condition_groups is not UNSET: + condition_groups = [] + for condition_groups_item_data in _condition_groups: + condition_groups_item = AlertRoutingRuleConditionGroupsItem.from_dict(condition_groups_item_data) - condition_groups.append(condition_groups_item) + condition_groups.append(condition_groups_item) alert_routing_rule = cls( name=name, diff --git a/rootly_sdk/models/alert_routing_rule_condition.py b/rootly_sdk/models/alert_routing_rule_condition.py index 90aa12ea..0ab961a3 100644 --- a/rootly_sdk/models/alert_routing_rule_condition.py +++ b/rootly_sdk/models/alert_routing_rule_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -27,25 +29,25 @@ class AlertRoutingRuleCondition: property_field_name (str): The name of the property field property_field_condition_type (AlertRoutingRuleConditionPropertyFieldConditionType): The condition type of the property field - id (Union[Unset, UUID]): Unique ID of the condition - property_field_value (Union[None, Unset, str]): The value of the property field - property_field_values (Union[None, Unset, list[str]]): The values of the property field - conditionable_id (Union[None, UUID, Unset]): The ID of the conditionable object - conditionable_type (Union[None, Unset, str]): The type of the conditionable object - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + id (UUID | Unset): Unique ID of the condition + property_field_value (None | str | Unset): The value of the property field + property_field_values (list[str] | None | Unset): The values of the property field + conditionable_id (None | Unset | UUID): The ID of the conditionable object + conditionable_type (None | str | Unset): The type of the conditionable object + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ property_field_type: AlertRoutingRuleConditionPropertyFieldType property_field_name: str property_field_condition_type: AlertRoutingRuleConditionPropertyFieldConditionType - id: Unset | UUID = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: None | Unset | list[str] = UNSET - conditionable_id: None | UUID | Unset = UNSET - conditionable_type: None | Unset | str = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + id: UUID | Unset = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | None | Unset = UNSET + conditionable_id: None | Unset | UUID = UNSET + conditionable_type: None | str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,17 +57,17 @@ def to_dict(self) -> dict[str, Any]: property_field_condition_type: str = self.property_field_condition_type - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: None | Unset | list[str] + property_field_values: list[str] | None | Unset if isinstance(self.property_field_values, Unset): property_field_values = UNSET elif isinstance(self.property_field_values, list): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: property_field_values = self.property_field_values - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET elif isinstance(self.conditionable_id, UUID): @@ -82,7 +84,7 @@ def to_dict(self) -> dict[str, Any]: else: conditionable_id = self.conditionable_id - conditionable_type: None | Unset | str + conditionable_type: None | str | Unset if isinstance(self.conditionable_type, Unset): conditionable_type = UNSET else: @@ -130,22 +132,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: id = UUID(_id) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) - def _parse_property_field_values(data: object) -> None | Unset | list[str]: + def _parse_property_field_values(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -156,13 +158,13 @@ def _parse_property_field_values(data: object) -> None | Unset | list[str]: property_field_values_type_0 = cast(list[str], data) return property_field_values_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) property_field_values = _parse_property_field_values(d.pop("property_field_values", UNSET)) - def _parse_conditionable_id(data: object) -> None | UUID | Unset: + def _parse_conditionable_id(data: object) -> None | Unset | UUID: if data is None: return data if isinstance(data, Unset): @@ -173,18 +175,18 @@ def _parse_conditionable_id(data: object) -> None | UUID | Unset: conditionable_id_type_0 = UUID(data) return conditionable_id_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | UUID | Unset, data) + return cast(None | Unset | UUID, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) - def _parse_conditionable_type(data: object) -> None | Unset | str: + def _parse_conditionable_type(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_type = _parse_conditionable_type(d.pop("conditionable_type", UNSET)) diff --git a/rootly_sdk/models/alert_routing_rule_condition_group.py b/rootly_sdk/models/alert_routing_rule_condition_group.py index bc3441dc..056ffefd 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_group.py +++ b/rootly_sdk/models/alert_routing_rule_condition_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -20,27 +22,27 @@ class AlertRoutingRuleConditionGroup: Attributes: position (int): The position of the condition group for ordering - id (Union[Unset, UUID]): Unique ID of the condition group - conditions (Union[Unset, list['AlertRoutingRuleCondition']]): The conditions within this group - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + id (UUID | Unset): Unique ID of the condition group + conditions (list[AlertRoutingRuleCondition] | Unset): The conditions within this group + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ position: int - id: Unset | UUID = UNSET - conditions: Unset | list["AlertRoutingRuleCondition"] = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + id: UUID | Unset = UNSET + conditions: list[AlertRoutingRuleCondition] | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: position = self.position - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -77,18 +79,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: position = d.pop("position") _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: id = UUID(_id) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = AlertRoutingRuleCondition.from_dict(conditions_item_data) + conditions: list[AlertRoutingRuleCondition] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = AlertRoutingRuleCondition.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) created_at = d.pop("created_at", UNSET) diff --git a/rootly_sdk/models/alert_routing_rule_condition_groups_item.py b/rootly_sdk/models/alert_routing_rule_condition_groups_item.py index e16fffa5..c537c24e 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_groups_item.py +++ b/rootly_sdk/models/alert_routing_rule_condition_groups_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -21,28 +23,27 @@ class AlertRoutingRuleConditionGroupsItem: """ Attributes: position (int): The position of the condition group for ordering - id (Union[Unset, UUID]): Unique ID of the condition group - conditions (Union[Unset, list['AlertRoutingRuleConditionGroupsItemConditionsItem']]): The conditions within this - group - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + id (UUID | Unset): Unique ID of the condition group + conditions (list[AlertRoutingRuleConditionGroupsItemConditionsItem] | Unset): The conditions within this group + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ position: int - id: Unset | UUID = UNSET - conditions: Unset | list["AlertRoutingRuleConditionGroupsItemConditionsItem"] = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + id: UUID | Unset = UNSET + conditions: list[AlertRoutingRuleConditionGroupsItemConditionsItem] | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: position = self.position - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -81,18 +82,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: position = d.pop("position") _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: id = UUID(_id) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = AlertRoutingRuleConditionGroupsItemConditionsItem.from_dict(conditions_item_data) + conditions: list[AlertRoutingRuleConditionGroupsItemConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = AlertRoutingRuleConditionGroupsItemConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) created_at = d.pop("created_at", UNSET) diff --git a/rootly_sdk/models/alert_routing_rule_condition_groups_item_conditions_item.py b/rootly_sdk/models/alert_routing_rule_condition_groups_item_conditions_item.py index 8958ac1b..93399246 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_groups_item_conditions_item.py +++ b/rootly_sdk/models/alert_routing_rule_condition_groups_item_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -27,25 +29,25 @@ class AlertRoutingRuleConditionGroupsItemConditionsItem: property_field_name (str): The name of the property field property_field_condition_type (AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldConditionType): The condition type of the property field - id (Union[Unset, UUID]): Unique ID of the condition - property_field_value (Union[None, Unset, str]): The value of the property field - property_field_values (Union[None, Unset, list[str]]): The values of the property field - conditionable_id (Union[None, UUID, Unset]): The ID of the conditionable object - conditionable_type (Union[None, Unset, str]): The type of the conditionable object - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + id (UUID | Unset): Unique ID of the condition + property_field_value (None | str | Unset): The value of the property field + property_field_values (list[str] | None | Unset): The values of the property field + conditionable_id (None | Unset | UUID): The ID of the conditionable object + conditionable_type (None | str | Unset): The type of the conditionable object + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ property_field_type: AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldType property_field_name: str property_field_condition_type: AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldConditionType - id: Unset | UUID = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: None | Unset | list[str] = UNSET - conditionable_id: None | UUID | Unset = UNSET - conditionable_type: None | Unset | str = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + id: UUID | Unset = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | None | Unset = UNSET + conditionable_id: None | Unset | UUID = UNSET + conditionable_type: None | str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,17 +57,17 @@ def to_dict(self) -> dict[str, Any]: property_field_condition_type: str = self.property_field_condition_type - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: None | Unset | list[str] + property_field_values: list[str] | None | Unset if isinstance(self.property_field_values, Unset): property_field_values = UNSET elif isinstance(self.property_field_values, list): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: property_field_values = self.property_field_values - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET elif isinstance(self.conditionable_id, UUID): @@ -82,7 +84,7 @@ def to_dict(self) -> dict[str, Any]: else: conditionable_id = self.conditionable_id - conditionable_type: None | Unset | str + conditionable_type: None | str | Unset if isinstance(self.conditionable_type, Unset): conditionable_type = UNSET else: @@ -134,22 +136,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: id = UUID(_id) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) - def _parse_property_field_values(data: object) -> None | Unset | list[str]: + def _parse_property_field_values(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -160,13 +162,13 @@ def _parse_property_field_values(data: object) -> None | Unset | list[str]: property_field_values_type_0 = cast(list[str], data) return property_field_values_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) property_field_values = _parse_property_field_values(d.pop("property_field_values", UNSET)) - def _parse_conditionable_id(data: object) -> None | UUID | Unset: + def _parse_conditionable_id(data: object) -> None | Unset | UUID: if data is None: return data if isinstance(data, Unset): @@ -177,18 +179,18 @@ def _parse_conditionable_id(data: object) -> None | UUID | Unset: conditionable_id_type_0 = UUID(data) return conditionable_id_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | UUID | Unset, data) + return cast(None | Unset | UUID, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) - def _parse_conditionable_type(data: object) -> None | Unset | str: + def _parse_conditionable_type(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_type = _parse_conditionable_type(d.pop("conditionable_type", UNSET)) diff --git a/rootly_sdk/models/alert_routing_rule_conditions_item.py b/rootly_sdk/models/alert_routing_rule_conditions_item.py index 88f1a77f..7d65f2f1 100644 --- a/rootly_sdk/models/alert_routing_rule_conditions_item.py +++ b/rootly_sdk/models/alert_routing_rule_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -28,17 +30,17 @@ class AlertRoutingRuleConditionsItem: field name should be supplied in JSON Path syntax. property_field_condition_type (AlertRoutingRuleConditionsItemPropertyFieldConditionType): The condition type of the property field - property_field_value (Union[None, Unset, str]): The value of the property field. Can be null if the property - field condition type is 'is_one_of' or 'is_not_one_of' - property_field_values (Union[Unset, list[str]]): The values of the property field. Used if the property field + property_field_value (None | str | Unset): The value of the property field. Can be null if the property field + condition type is 'is_one_of' or 'is_not_one_of' + property_field_values (list[str] | Unset): The values of the property field. Used if the property field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is 'alert_urgency' """ property_field_type: AlertRoutingRuleConditionsItemPropertyFieldType property_field_name: str property_field_condition_type: AlertRoutingRuleConditionsItemPropertyFieldConditionType - property_field_value: None | Unset | str = UNSET - property_field_values: Unset | list[str] = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,13 +50,13 @@ def to_dict(self) -> dict[str, Any]: property_field_condition_type: str = self.property_field_condition_type - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: Unset | list[str] = UNSET + property_field_values: list[str] | Unset = UNSET if not isinstance(self.property_field_values, Unset): property_field_values = self.property_field_values @@ -85,12 +87,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d.pop("property_field_condition_type") ) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) diff --git a/rootly_sdk/models/alert_routing_rule_destination_type_0.py b/rootly_sdk/models/alert_routing_rule_destination_type_0.py index 07771237..e628187c 100644 --- a/rootly_sdk/models/alert_routing_rule_destination_type_0.py +++ b/rootly_sdk/models/alert_routing_rule_destination_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -18,7 +20,8 @@ class AlertRoutingRuleDestinationType0: """The destinations for the alert routing rule Attributes: - target_type (AlertRoutingRuleDestinationType0TargetType): The type of the target + target_type (AlertRoutingRuleDestinationType0TargetType): The type of the target. Please contact support if you + encounter issues using `Functionality` as a target type. target_id (UUID): The ID of the target """ diff --git a/rootly_sdk/models/alert_routing_rule_destination_type_0_target_type.py b/rootly_sdk/models/alert_routing_rule_destination_type_0_target_type.py index b17cec9d..5a99d87c 100644 --- a/rootly_sdk/models/alert_routing_rule_destination_type_0_target_type.py +++ b/rootly_sdk/models/alert_routing_rule_destination_type_0_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -AlertRoutingRuleDestinationType0TargetType = Literal["EscalationPolicy", "Group", "Service"] +AlertRoutingRuleDestinationType0TargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] ALERT_ROUTING_RULE_DESTINATION_TYPE_0_TARGET_TYPE_VALUES: set[AlertRoutingRuleDestinationType0TargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/alert_routing_rule_list.py b/rootly_sdk/models/alert_routing_rule_list.py index 19ed683e..79720fd0 100644 --- a/rootly_sdk/models/alert_routing_rule_list.py +++ b/rootly_sdk/models/alert_routing_rule_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertRoutingRuleList: """ Attributes: - data (list['AlertRoutingRuleListDataItem']): + data (list[AlertRoutingRuleListDataItem]): links (Links): meta (Meta): """ - data: list["AlertRoutingRuleListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertRoutingRuleListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_routing_rule_list_data_item.py b/rootly_sdk/models/alert_routing_rule_list_data_item.py index 343f7c40..7f60918e 100644 --- a/rootly_sdk/models/alert_routing_rule_list_data_item.py +++ b/rootly_sdk/models/alert_routing_rule_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AlertRoutingRuleListDataItem: id: str type_: AlertRoutingRuleListDataItemType - attributes: "AlertRoutingRule" + attributes: AlertRoutingRule additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_routing_rule_response.py b/rootly_sdk/models/alert_routing_rule_response.py index 05f7774b..79852973 100644 --- a/rootly_sdk/models/alert_routing_rule_response.py +++ b/rootly_sdk/models/alert_routing_rule_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertRoutingRuleResponse: data (AlertRoutingRuleResponseData): """ - data: "AlertRoutingRuleResponseData" + data: AlertRoutingRuleResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_routing_rule_response_data.py b/rootly_sdk/models/alert_routing_rule_response_data.py index 87bc9619..a03b56b9 100644 --- a/rootly_sdk/models/alert_routing_rule_response_data.py +++ b/rootly_sdk/models/alert_routing_rule_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AlertRoutingRuleResponseData: id: str type_: AlertRoutingRuleResponseDataType - attributes: "AlertRoutingRule" + attributes: AlertRoutingRule additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_routing_rule_target_type_0.py b/rootly_sdk/models/alert_routing_rule_target_type_0.py index 4f5c623c..2c3c2e4a 100644 --- a/rootly_sdk/models/alert_routing_rule_target_type_0.py +++ b/rootly_sdk/models/alert_routing_rule_target_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -18,7 +20,8 @@ class AlertRoutingRuleTargetType0: """The destination target for the alert routing rule Attributes: - target_type (AlertRoutingRuleTargetType0TargetType): The type of the target + target_type (AlertRoutingRuleTargetType0TargetType): The type of the target. Please contact support if you + encounter issues using `Functionality` as a target type. target_id (UUID): The ID of the target """ diff --git a/rootly_sdk/models/alert_routing_rule_target_type_0_target_type.py b/rootly_sdk/models/alert_routing_rule_target_type_0_target_type.py index 7bf9104a..4059aae7 100644 --- a/rootly_sdk/models/alert_routing_rule_target_type_0_target_type.py +++ b/rootly_sdk/models/alert_routing_rule_target_type_0_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -AlertRoutingRuleTargetType0TargetType = Literal["EscalationPolicy", "Group", "Service"] +AlertRoutingRuleTargetType0TargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] ALERT_ROUTING_RULE_TARGET_TYPE_0_TARGET_TYPE_VALUES: set[AlertRoutingRuleTargetType0TargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/alert_source.py b/rootly_sdk/models/alert_source.py index 46b53454..65e09e2b 100644 --- a/rootly_sdk/models/alert_source.py +++ b/rootly_sdk/models/alert_source.py @@ -6,6 +6,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -14,6 +15,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", @@ -52,6 +54,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -60,6 +63,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", diff --git a/rootly_sdk/models/alert_trigger_params.py b/rootly_sdk/models/alert_trigger_params.py index 954cf615..a7761fcf 100644 --- a/rootly_sdk/models/alert_trigger_params.py +++ b/rootly_sdk/models/alert_trigger_params.py @@ -1,5 +1,8 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,6 +27,10 @@ AlertTriggerParamsAlertConditionStatus, check_alert_trigger_params_alert_condition_status, ) +from ..models.alert_trigger_params_alert_condition_urgency import ( + AlertTriggerParamsAlertConditionUrgency, + check_alert_trigger_params_alert_condition_urgency, +) from ..models.alert_trigger_params_trigger_type import ( AlertTriggerParamsTriggerType, check_alert_trigger_params_trigger_type, @@ -47,113 +54,128 @@ class AlertTriggerParams: """ Attributes: trigger_type (AlertTriggerParamsTriggerType): - triggers (Union[Unset, list[AlertTriggerParamsTriggersItem]]): - alert_condition (Union[Unset, AlertTriggerParamsAlertCondition]): - alert_condition_source (Union[Unset, AlertTriggerParamsAlertConditionSource]): Default: 'ANY'. - alert_condition_source_use_regexp (Union[Unset, bool]): Default: False. - alert_sources (Union[Unset, list[str]]): - alert_condition_label (Union[Unset, AlertTriggerParamsAlertConditionLabel]): Default: 'ANY'. - alert_condition_label_use_regexp (Union[Unset, bool]): Default: False. - alert_condition_status (Union[Unset, AlertTriggerParamsAlertConditionStatus]): Default: 'ANY'. - alert_condition_status_use_regexp (Union[Unset, bool]): Default: False. - alert_statuses (Union[Unset, list[str]]): - alert_labels (Union[Unset, list[str]]): - alert_condition_payload (Union[Unset, AlertTriggerParamsAlertConditionPayload]): Default: 'ANY'. - alert_condition_payload_use_regexp (Union[Unset, bool]): Default: False. - alert_payload (Union[Unset, list[str]]): - alert_query_payload (Union[None, Unset, str]): You can use jsonpath syntax. eg: $.incident.teams[*] - alert_field_conditions (Union[Unset, list['AlertTriggerParamsAlertFieldConditionsItem']]): - alert_payload_conditions (Union[Unset, AlertTriggerParamsAlertPayloadConditions]): + triggers (list[AlertTriggerParamsTriggersItem] | Unset): + alert_condition (AlertTriggerParamsAlertCondition | Unset): + alert_condition_source (AlertTriggerParamsAlertConditionSource | Unset): Default: 'ANY'. + alert_condition_source_use_regexp (bool | Unset): Default: False. + alert_sources (list[str] | Unset): + alert_condition_label (AlertTriggerParamsAlertConditionLabel | Unset): Default: 'ANY'. + alert_condition_label_use_regexp (bool | Unset): Default: False. + alert_condition_status (AlertTriggerParamsAlertConditionStatus | Unset): Default: 'ANY'. + alert_condition_status_use_regexp (bool | Unset): Default: False. + alert_statuses (list[str] | Unset): + alert_labels (list[str] | Unset): + alert_condition_urgency (AlertTriggerParamsAlertConditionUrgency | Unset): Default: 'ANY'. + alert_urgency_ids (list[UUID] | Unset): + alert_condition_payload (AlertTriggerParamsAlertConditionPayload | Unset): Default: 'ANY'. + alert_condition_payload_use_regexp (bool | Unset): Default: False. + alert_payload (list[str] | Unset): + alert_query_payload (None | str | Unset): You can use jsonpath syntax. eg: $.incident.teams[*] + alert_field_conditions (list[AlertTriggerParamsAlertFieldConditionsItem] | Unset): + alert_payload_conditions (AlertTriggerParamsAlertPayloadConditions | Unset): """ trigger_type: AlertTriggerParamsTriggerType - triggers: Unset | list[AlertTriggerParamsTriggersItem] = UNSET - alert_condition: Unset | AlertTriggerParamsAlertCondition = UNSET - alert_condition_source: Unset | AlertTriggerParamsAlertConditionSource = "ANY" - alert_condition_source_use_regexp: Unset | bool = False - alert_sources: Unset | list[str] = UNSET - alert_condition_label: Unset | AlertTriggerParamsAlertConditionLabel = "ANY" - alert_condition_label_use_regexp: Unset | bool = False - alert_condition_status: Unset | AlertTriggerParamsAlertConditionStatus = "ANY" - alert_condition_status_use_regexp: Unset | bool = False - alert_statuses: Unset | list[str] = UNSET - alert_labels: Unset | list[str] = UNSET - alert_condition_payload: Unset | AlertTriggerParamsAlertConditionPayload = "ANY" - alert_condition_payload_use_regexp: Unset | bool = False - alert_payload: Unset | list[str] = UNSET - alert_query_payload: None | Unset | str = UNSET - alert_field_conditions: Unset | list["AlertTriggerParamsAlertFieldConditionsItem"] = UNSET - alert_payload_conditions: Union[Unset, "AlertTriggerParamsAlertPayloadConditions"] = UNSET + triggers: list[AlertTriggerParamsTriggersItem] | Unset = UNSET + alert_condition: AlertTriggerParamsAlertCondition | Unset = UNSET + alert_condition_source: AlertTriggerParamsAlertConditionSource | Unset = "ANY" + alert_condition_source_use_regexp: bool | Unset = False + alert_sources: list[str] | Unset = UNSET + alert_condition_label: AlertTriggerParamsAlertConditionLabel | Unset = "ANY" + alert_condition_label_use_regexp: bool | Unset = False + alert_condition_status: AlertTriggerParamsAlertConditionStatus | Unset = "ANY" + alert_condition_status_use_regexp: bool | Unset = False + alert_statuses: list[str] | Unset = UNSET + alert_labels: list[str] | Unset = UNSET + alert_condition_urgency: AlertTriggerParamsAlertConditionUrgency | Unset = "ANY" + alert_urgency_ids: list[UUID] | Unset = UNSET + alert_condition_payload: AlertTriggerParamsAlertConditionPayload | Unset = "ANY" + alert_condition_payload_use_regexp: bool | Unset = False + alert_payload: list[str] | Unset = UNSET + alert_query_payload: None | str | Unset = UNSET + alert_field_conditions: list[AlertTriggerParamsAlertFieldConditionsItem] | Unset = UNSET + alert_payload_conditions: AlertTriggerParamsAlertPayloadConditions | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: trigger_type: str = self.trigger_type - triggers: Unset | list[str] = UNSET + triggers: list[str] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = [] for triggers_item_data in self.triggers: triggers_item: str = triggers_item_data triggers.append(triggers_item) - alert_condition: Unset | str = UNSET + alert_condition: str | Unset = UNSET if not isinstance(self.alert_condition, Unset): alert_condition = self.alert_condition - alert_condition_source: Unset | str = UNSET + alert_condition_source: str | Unset = UNSET if not isinstance(self.alert_condition_source, Unset): alert_condition_source = self.alert_condition_source alert_condition_source_use_regexp = self.alert_condition_source_use_regexp - alert_sources: Unset | list[str] = UNSET + alert_sources: list[str] | Unset = UNSET if not isinstance(self.alert_sources, Unset): alert_sources = self.alert_sources - alert_condition_label: Unset | str = UNSET + alert_condition_label: str | Unset = UNSET if not isinstance(self.alert_condition_label, Unset): alert_condition_label = self.alert_condition_label alert_condition_label_use_regexp = self.alert_condition_label_use_regexp - alert_condition_status: Unset | str = UNSET + alert_condition_status: str | Unset = UNSET if not isinstance(self.alert_condition_status, Unset): alert_condition_status = self.alert_condition_status alert_condition_status_use_regexp = self.alert_condition_status_use_regexp - alert_statuses: Unset | list[str] = UNSET + alert_statuses: list[str] | Unset = UNSET if not isinstance(self.alert_statuses, Unset): alert_statuses = self.alert_statuses - alert_labels: Unset | list[str] = UNSET + alert_labels: list[str] | Unset = UNSET if not isinstance(self.alert_labels, Unset): alert_labels = self.alert_labels - alert_condition_payload: Unset | str = UNSET + alert_condition_urgency: str | Unset = UNSET + if not isinstance(self.alert_condition_urgency, Unset): + alert_condition_urgency = self.alert_condition_urgency + + alert_urgency_ids: list[str] | Unset = UNSET + if not isinstance(self.alert_urgency_ids, Unset): + alert_urgency_ids = [] + for alert_urgency_ids_item_data in self.alert_urgency_ids: + alert_urgency_ids_item = str(alert_urgency_ids_item_data) + alert_urgency_ids.append(alert_urgency_ids_item) + + alert_condition_payload: str | Unset = UNSET if not isinstance(self.alert_condition_payload, Unset): alert_condition_payload = self.alert_condition_payload alert_condition_payload_use_regexp = self.alert_condition_payload_use_regexp - alert_payload: Unset | list[str] = UNSET + alert_payload: list[str] | Unset = UNSET if not isinstance(self.alert_payload, Unset): alert_payload = self.alert_payload - alert_query_payload: None | Unset | str + alert_query_payload: None | str | Unset if isinstance(self.alert_query_payload, Unset): alert_query_payload = UNSET else: alert_query_payload = self.alert_query_payload - alert_field_conditions: Unset | list[dict[str, Any]] = UNSET + alert_field_conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_field_conditions, Unset): alert_field_conditions = [] for alert_field_conditions_item_data in self.alert_field_conditions: alert_field_conditions_item = alert_field_conditions_item_data.to_dict() alert_field_conditions.append(alert_field_conditions_item) - alert_payload_conditions: Unset | dict[str, Any] = UNSET + alert_payload_conditions: dict[str, Any] | Unset = UNSET if not isinstance(self.alert_payload_conditions, Unset): alert_payload_conditions = self.alert_payload_conditions.to_dict() @@ -186,6 +208,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["alert_statuses"] = alert_statuses if alert_labels is not UNSET: field_dict["alert_labels"] = alert_labels + if alert_condition_urgency is not UNSET: + field_dict["alert_condition_urgency"] = alert_condition_urgency + if alert_urgency_ids is not UNSET: + field_dict["alert_urgency_ids"] = alert_urgency_ids if alert_condition_payload is not UNSET: field_dict["alert_condition_payload"] = alert_condition_payload if alert_condition_payload_use_regexp is not UNSET: @@ -209,22 +235,24 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) trigger_type = check_alert_trigger_params_trigger_type(d.pop("trigger_type")) - triggers = [] _triggers = d.pop("triggers", UNSET) - for triggers_item_data in _triggers or []: - triggers_item = check_alert_trigger_params_triggers_item(triggers_item_data) + triggers: list[AlertTriggerParamsTriggersItem] | Unset = UNSET + if _triggers is not UNSET: + triggers = [] + for triggers_item_data in _triggers: + triggers_item = check_alert_trigger_params_triggers_item(triggers_item_data) - triggers.append(triggers_item) + triggers.append(triggers_item) _alert_condition = d.pop("alert_condition", UNSET) - alert_condition: Unset | AlertTriggerParamsAlertCondition + alert_condition: AlertTriggerParamsAlertCondition | Unset if isinstance(_alert_condition, Unset): alert_condition = UNSET else: alert_condition = check_alert_trigger_params_alert_condition(_alert_condition) _alert_condition_source = d.pop("alert_condition_source", UNSET) - alert_condition_source: Unset | AlertTriggerParamsAlertConditionSource + alert_condition_source: AlertTriggerParamsAlertConditionSource | Unset if isinstance(_alert_condition_source, Unset): alert_condition_source = UNSET else: @@ -235,7 +263,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alert_sources = cast(list[str], d.pop("alert_sources", UNSET)) _alert_condition_label = d.pop("alert_condition_label", UNSET) - alert_condition_label: Unset | AlertTriggerParamsAlertConditionLabel + alert_condition_label: AlertTriggerParamsAlertConditionLabel | Unset if isinstance(_alert_condition_label, Unset): alert_condition_label = UNSET else: @@ -244,7 +272,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alert_condition_label_use_regexp = d.pop("alert_condition_label_use_regexp", UNSET) _alert_condition_status = d.pop("alert_condition_status", UNSET) - alert_condition_status: Unset | AlertTriggerParamsAlertConditionStatus + alert_condition_status: AlertTriggerParamsAlertConditionStatus | Unset if isinstance(_alert_condition_status, Unset): alert_condition_status = UNSET else: @@ -256,8 +284,24 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alert_labels = cast(list[str], d.pop("alert_labels", UNSET)) + _alert_condition_urgency = d.pop("alert_condition_urgency", UNSET) + alert_condition_urgency: AlertTriggerParamsAlertConditionUrgency | Unset + if isinstance(_alert_condition_urgency, Unset): + alert_condition_urgency = UNSET + else: + alert_condition_urgency = check_alert_trigger_params_alert_condition_urgency(_alert_condition_urgency) + + _alert_urgency_ids = d.pop("alert_urgency_ids", UNSET) + alert_urgency_ids: list[UUID] | Unset = UNSET + if _alert_urgency_ids is not UNSET: + alert_urgency_ids = [] + for alert_urgency_ids_item_data in _alert_urgency_ids: + alert_urgency_ids_item = UUID(alert_urgency_ids_item_data) + + alert_urgency_ids.append(alert_urgency_ids_item) + _alert_condition_payload = d.pop("alert_condition_payload", UNSET) - alert_condition_payload: Unset | AlertTriggerParamsAlertConditionPayload + alert_condition_payload: AlertTriggerParamsAlertConditionPayload | Unset if isinstance(_alert_condition_payload, Unset): alert_condition_payload = UNSET else: @@ -267,26 +311,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alert_payload = cast(list[str], d.pop("alert_payload", UNSET)) - def _parse_alert_query_payload(data: object) -> None | Unset | str: + def _parse_alert_query_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_query_payload = _parse_alert_query_payload(d.pop("alert_query_payload", UNSET)) - alert_field_conditions = [] _alert_field_conditions = d.pop("alert_field_conditions", UNSET) - for alert_field_conditions_item_data in _alert_field_conditions or []: - alert_field_conditions_item = AlertTriggerParamsAlertFieldConditionsItem.from_dict( - alert_field_conditions_item_data - ) + alert_field_conditions: list[AlertTriggerParamsAlertFieldConditionsItem] | Unset = UNSET + if _alert_field_conditions is not UNSET: + alert_field_conditions = [] + for alert_field_conditions_item_data in _alert_field_conditions: + alert_field_conditions_item = AlertTriggerParamsAlertFieldConditionsItem.from_dict( + alert_field_conditions_item_data + ) - alert_field_conditions.append(alert_field_conditions_item) + alert_field_conditions.append(alert_field_conditions_item) _alert_payload_conditions = d.pop("alert_payload_conditions", UNSET) - alert_payload_conditions: Unset | AlertTriggerParamsAlertPayloadConditions + alert_payload_conditions: AlertTriggerParamsAlertPayloadConditions | Unset if isinstance(_alert_payload_conditions, Unset): alert_payload_conditions = UNSET else: @@ -305,6 +351,8 @@ def _parse_alert_query_payload(data: object) -> None | Unset | str: alert_condition_status_use_regexp=alert_condition_status_use_regexp, alert_statuses=alert_statuses, alert_labels=alert_labels, + alert_condition_urgency=alert_condition_urgency, + alert_urgency_ids=alert_urgency_ids, alert_condition_payload=alert_condition_payload, alert_condition_payload_use_regexp=alert_condition_payload_use_regexp, alert_payload=alert_payload, diff --git a/rootly_sdk/models/alert_trigger_params_alert_condition_urgency.py b/rootly_sdk/models/alert_trigger_params_alert_condition_urgency.py new file mode 100644 index 00000000..84bba6a7 --- /dev/null +++ b/rootly_sdk/models/alert_trigger_params_alert_condition_urgency.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +AlertTriggerParamsAlertConditionUrgency = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +ALERT_TRIGGER_PARAMS_ALERT_CONDITION_URGENCY_VALUES: set[AlertTriggerParamsAlertConditionUrgency] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_alert_trigger_params_alert_condition_urgency( + value: str | None, +) -> AlertTriggerParamsAlertConditionUrgency | None: + if value is None: + return None + if value in ALERT_TRIGGER_PARAMS_ALERT_CONDITION_URGENCY_VALUES: + return cast(AlertTriggerParamsAlertConditionUrgency, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ALERT_TRIGGER_PARAMS_ALERT_CONDITION_URGENCY_VALUES!r}" + ) diff --git a/rootly_sdk/models/alert_trigger_params_alert_field_conditions_item.py b/rootly_sdk/models/alert_trigger_params_alert_field_conditions_item.py index d4463fd9..56455b09 100644 --- a/rootly_sdk/models/alert_trigger_params_alert_field_conditions_item.py +++ b/rootly_sdk/models/alert_trigger_params_alert_field_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,12 +21,12 @@ class AlertTriggerParamsAlertFieldConditionsItem: Attributes: alert_field_id (str): condition_type (AlertTriggerParamsAlertFieldConditionsItemConditionType): - values (Union[Unset, list[str]]): + values (list[str] | Unset): """ alert_field_id: str condition_type: AlertTriggerParamsAlertFieldConditionsItemConditionType - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: condition_type: str = self.condition_type - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values diff --git a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py index c037c6b6..dea2beff 100644 --- a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py +++ b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,20 +25,20 @@ class AlertTriggerParamsAlertPayloadConditions: """ Attributes: - logic (Union[Unset, AlertTriggerParamsAlertPayloadConditionsLogic]): - conditions (Union[Unset, list['AlertTriggerParamsAlertPayloadConditionsConditionsItem']]): + logic (AlertTriggerParamsAlertPayloadConditionsLogic | Unset): + conditions (list[AlertTriggerParamsAlertPayloadConditionsConditionsItem] | Unset): """ - logic: Unset | AlertTriggerParamsAlertPayloadConditionsLogic = UNSET - conditions: Unset | list["AlertTriggerParamsAlertPayloadConditionsConditionsItem"] = UNSET + logic: AlertTriggerParamsAlertPayloadConditionsLogic | Unset = UNSET + conditions: list[AlertTriggerParamsAlertPayloadConditionsConditionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - logic: Unset | str = UNSET + logic: str | Unset = UNSET if not isinstance(self.logic, Unset): logic = self.logic - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -61,18 +63,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _logic = d.pop("logic", UNSET) - logic: Unset | AlertTriggerParamsAlertPayloadConditionsLogic + logic: AlertTriggerParamsAlertPayloadConditionsLogic | Unset if isinstance(_logic, Unset): logic = UNSET else: logic = check_alert_trigger_params_alert_payload_conditions_logic(_logic) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = AlertTriggerParamsAlertPayloadConditionsConditionsItem.from_dict(conditions_item_data) + conditions: list[AlertTriggerParamsAlertPayloadConditionsConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = AlertTriggerParamsAlertPayloadConditionsConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) alert_trigger_params_alert_payload_conditions = cls( logic=logic, diff --git a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions_conditions_item.py b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions_conditions_item.py index d00a6cc6..6a9ea7fd 100644 --- a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions_conditions_item.py +++ b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,14 +21,14 @@ class AlertTriggerParamsAlertPayloadConditionsConditionsItem: Attributes: query (str): operator (AlertTriggerParamsAlertPayloadConditionsConditionsItemOperator): - values (Union[Unset, list[str]]): - use_regexp (Union[Unset, bool]): + values (list[str] | Unset): + use_regexp (bool | Unset): """ query: str operator: AlertTriggerParamsAlertPayloadConditionsConditionsItemOperator - values: Unset | list[str] = UNSET - use_regexp: Unset | bool = UNSET + values: list[str] | Unset = UNSET + use_regexp: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: operator: str = self.operator - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values diff --git a/rootly_sdk/models/alert_urgency.py b/rootly_sdk/models/alert_urgency.py index 33b91079..443ca62e 100644 --- a/rootly_sdk/models/alert_urgency.py +++ b/rootly_sdk/models/alert_urgency.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/alert_urgency_list.py b/rootly_sdk/models/alert_urgency_list.py index 3d04e876..392b8cdf 100644 --- a/rootly_sdk/models/alert_urgency_list.py +++ b/rootly_sdk/models/alert_urgency_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertUrgencyList: """ Attributes: - data (list['AlertUrgencyListDataItem']): + data (list[AlertUrgencyListDataItem]): links (Links): meta (Meta): """ - data: list["AlertUrgencyListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertUrgencyListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_urgency_list_data_item.py b/rootly_sdk/models/alert_urgency_list_data_item.py index aa0ff94f..634dc584 100644 --- a/rootly_sdk/models/alert_urgency_list_data_item.py +++ b/rootly_sdk/models/alert_urgency_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AlertUrgencyListDataItem: id: str type_: AlertUrgencyListDataItemType - attributes: "AlertUrgency" + attributes: AlertUrgency additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_urgency_response.py b/rootly_sdk/models/alert_urgency_response.py index 2cb22ca8..146eee39 100644 --- a/rootly_sdk/models/alert_urgency_response.py +++ b/rootly_sdk/models/alert_urgency_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertUrgencyResponse: data (AlertUrgencyResponseData): """ - data: "AlertUrgencyResponseData" + data: AlertUrgencyResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alert_urgency_response_data.py b/rootly_sdk/models/alert_urgency_response_data.py index c013d891..9f88c165 100644 --- a/rootly_sdk/models/alert_urgency_response_data.py +++ b/rootly_sdk/models/alert_urgency_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AlertUrgencyResponseData: id: str type_: AlertUrgencyResponseDataType - attributes: "AlertUrgency" + attributes: AlertUrgency additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alerts_source.py b/rootly_sdk/models/alerts_source.py index 543620ec..1a770d52 100644 --- a/rootly_sdk/models/alerts_source.py +++ b/rootly_sdk/models/alerts_source.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,29 +36,28 @@ class AlertsSource: secret (str): The secret used to authenticate non-email alert sources created_at (str): Date of creation updated_at (str): Date of last update - source_type (Union[Unset, AlertsSourceSourceType]): The alert source type - alert_urgency_id (Union[Unset, str]): ID for the default alert urgency assigned to this alert source - deduplicate_alerts_by_key (Union[Unset, bool]): Toggle alert deduplication using deduplication key. If enabled, + source_type (AlertsSourceSourceType | Unset): The alert source type + alert_urgency_id (str | Unset): ID for the default alert urgency assigned to this alert source + deduplicate_alerts_by_key (bool | Unset): Toggle alert deduplication using deduplication key. If enabled, deduplication_key_kind and deduplication_key_path are required. - deduplication_key_kind (Union[Unset, AlertsSourceDeduplicationKeyKind]): Kind of deduplication key. - deduplication_key_path (Union[None, Unset, str]): Path to deduplication key. This is a JSON Path to extract the + deduplication_key_kind (AlertsSourceDeduplicationKeyKind | Unset): Kind of deduplication key. + deduplication_key_path (None | str | Unset): Path to deduplication key. This is a JSON Path to extract the deduplication key from the request body. - deduplication_key_regexp (Union[None, Unset, str]): Regular expression to extract key from value found at key - path. - owner_group_ids (Union[Unset, list[str]]): List of team IDs that will own the alert source - alert_template_attributes (Union['AlertsSourceAlertTemplateAttributesType0', None, Unset]): - alert_source_urgency_rules_attributes (Union[Unset, list['AlertsSourceAlertSourceUrgencyRulesAttributesItem']]): - List of rules that define the conditions under which the alert urgency will be set automatically based on the - alert payload - sourceable_attributes (Union['AlertsSourceSourceableAttributesType0', None, Unset]): Provide additional - attributes for generic_webhook alerts source - resolution_rule_attributes (Union['AlertsSourceResolutionRuleAttributesType0', None, Unset]): Provide additional + deduplication_key_regexp (None | str | Unset): Regular expression to extract key from value found at key path. + owner_group_ids (list[str] | Unset): List of team IDs that will own the alert source + alert_template_attributes (AlertsSourceAlertTemplateAttributesType0 | None | Unset): + alert_source_urgency_rules_attributes (list[AlertsSourceAlertSourceUrgencyRulesAttributesItem] | Unset): List of + rules that define the conditions under which the alert urgency will be set automatically based on the alert + payload + sourceable_attributes (AlertsSourceSourceableAttributesType0 | None | Unset): Provide additional attributes for + generic_webhook alerts source + resolution_rule_attributes (AlertsSourceResolutionRuleAttributesType0 | None | Unset): Provide additional attributes for email alerts source - alert_source_fields_attributes (Union[Unset, list['AlertsSourceAlertSourceFieldsAttributesItem']]): List of - alert fields to be added to the alert source. Note: This attribute requires the alert field feature to be - enabled on your account. Contact Rootly customer support if you need assistance with this feature. - email (Union[None, Unset, str]): The email generated for email alert sources - webhook_endpoint (Union[None, Unset, str]): The webhook URL generated for non-email alert sources + alert_source_fields_attributes (list[AlertsSourceAlertSourceFieldsAttributesItem] | Unset): List of alert fields + to be added to the alert source. Note: This attribute requires the alert field feature to be enabled on your + account. Contact Rootly customer support if you need assistance with this feature. + email (None | str | Unset): The email generated for email alert sources + webhook_endpoint (None | str | Unset): The webhook URL generated for non-email alert sources """ name: str @@ -64,20 +65,20 @@ class AlertsSource: secret: str created_at: str updated_at: str - source_type: Unset | AlertsSourceSourceType = UNSET - alert_urgency_id: Unset | str = UNSET - deduplicate_alerts_by_key: Unset | bool = UNSET - deduplication_key_kind: Unset | AlertsSourceDeduplicationKeyKind = UNSET - deduplication_key_path: None | Unset | str = UNSET - deduplication_key_regexp: None | Unset | str = UNSET - owner_group_ids: Unset | list[str] = UNSET - alert_template_attributes: Union["AlertsSourceAlertTemplateAttributesType0", None, Unset] = UNSET - alert_source_urgency_rules_attributes: Unset | list["AlertsSourceAlertSourceUrgencyRulesAttributesItem"] = UNSET - sourceable_attributes: Union["AlertsSourceSourceableAttributesType0", None, Unset] = UNSET - resolution_rule_attributes: Union["AlertsSourceResolutionRuleAttributesType0", None, Unset] = UNSET - alert_source_fields_attributes: Unset | list["AlertsSourceAlertSourceFieldsAttributesItem"] = UNSET - email: None | Unset | str = UNSET - webhook_endpoint: None | Unset | str = UNSET + source_type: AlertsSourceSourceType | Unset = UNSET + alert_urgency_id: str | Unset = UNSET + deduplicate_alerts_by_key: bool | Unset = UNSET + deduplication_key_kind: AlertsSourceDeduplicationKeyKind | Unset = UNSET + deduplication_key_path: None | str | Unset = UNSET + deduplication_key_regexp: None | str | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET + alert_template_attributes: AlertsSourceAlertTemplateAttributesType0 | None | Unset = UNSET + alert_source_urgency_rules_attributes: list[AlertsSourceAlertSourceUrgencyRulesAttributesItem] | Unset = UNSET + sourceable_attributes: AlertsSourceSourceableAttributesType0 | None | Unset = UNSET + resolution_rule_attributes: AlertsSourceResolutionRuleAttributesType0 | None | Unset = UNSET + alert_source_fields_attributes: list[AlertsSourceAlertSourceFieldsAttributesItem] | Unset = UNSET + email: None | str | Unset = UNSET + webhook_endpoint: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -95,7 +96,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - source_type: Unset | str = UNSET + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -103,27 +104,27 @@ def to_dict(self) -> dict[str, Any]: deduplicate_alerts_by_key = self.deduplicate_alerts_by_key - deduplication_key_kind: Unset | str = UNSET + deduplication_key_kind: str | Unset = UNSET if not isinstance(self.deduplication_key_kind, Unset): deduplication_key_kind = self.deduplication_key_kind - deduplication_key_path: None | Unset | str + deduplication_key_path: None | str | Unset if isinstance(self.deduplication_key_path, Unset): deduplication_key_path = UNSET else: deduplication_key_path = self.deduplication_key_path - deduplication_key_regexp: None | Unset | str + deduplication_key_regexp: None | str | Unset if isinstance(self.deduplication_key_regexp, Unset): deduplication_key_regexp = UNSET else: deduplication_key_regexp = self.deduplication_key_regexp - owner_group_ids: Unset | list[str] = UNSET + owner_group_ids: list[str] | Unset = UNSET if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids - alert_template_attributes: None | Unset | dict[str, Any] + alert_template_attributes: dict[str, Any] | None | Unset if isinstance(self.alert_template_attributes, Unset): alert_template_attributes = UNSET elif isinstance(self.alert_template_attributes, AlertsSourceAlertTemplateAttributesType0): @@ -131,14 +132,14 @@ def to_dict(self) -> dict[str, Any]: else: alert_template_attributes = self.alert_template_attributes - alert_source_urgency_rules_attributes: Unset | list[dict[str, Any]] = UNSET + alert_source_urgency_rules_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_source_urgency_rules_attributes, Unset): alert_source_urgency_rules_attributes = [] for alert_source_urgency_rules_attributes_item_data in self.alert_source_urgency_rules_attributes: alert_source_urgency_rules_attributes_item = alert_source_urgency_rules_attributes_item_data.to_dict() alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) - sourceable_attributes: None | Unset | dict[str, Any] + sourceable_attributes: dict[str, Any] | None | Unset if isinstance(self.sourceable_attributes, Unset): sourceable_attributes = UNSET elif isinstance(self.sourceable_attributes, AlertsSourceSourceableAttributesType0): @@ -146,7 +147,7 @@ def to_dict(self) -> dict[str, Any]: else: sourceable_attributes = self.sourceable_attributes - resolution_rule_attributes: None | Unset | dict[str, Any] + resolution_rule_attributes: dict[str, Any] | None | Unset if isinstance(self.resolution_rule_attributes, Unset): resolution_rule_attributes = UNSET elif isinstance(self.resolution_rule_attributes, AlertsSourceResolutionRuleAttributesType0): @@ -154,20 +155,20 @@ def to_dict(self) -> dict[str, Any]: else: resolution_rule_attributes = self.resolution_rule_attributes - alert_source_fields_attributes: Unset | list[dict[str, Any]] = UNSET + alert_source_fields_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_source_fields_attributes, Unset): alert_source_fields_attributes = [] for alert_source_fields_attributes_item_data in self.alert_source_fields_attributes: alert_source_fields_attributes_item = alert_source_fields_attributes_item_data.to_dict() alert_source_fields_attributes.append(alert_source_fields_attributes_item) - email: None | Unset | str + email: None | str | Unset if isinstance(self.email, Unset): email = UNSET else: email = self.email - webhook_endpoint: None | Unset | str + webhook_endpoint: None | str | Unset if isinstance(self.webhook_endpoint, Unset): webhook_endpoint = UNSET else: @@ -239,7 +240,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") _source_type = d.pop("source_type", UNSET) - source_type: Unset | AlertsSourceSourceType + source_type: AlertsSourceSourceType | Unset if isinstance(_source_type, Unset): source_type = UNSET else: @@ -250,35 +251,33 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: deduplicate_alerts_by_key = d.pop("deduplicate_alerts_by_key", UNSET) _deduplication_key_kind = d.pop("deduplication_key_kind", UNSET) - deduplication_key_kind: Unset | AlertsSourceDeduplicationKeyKind + deduplication_key_kind: AlertsSourceDeduplicationKeyKind | Unset if isinstance(_deduplication_key_kind, Unset): deduplication_key_kind = UNSET else: deduplication_key_kind = check_alerts_source_deduplication_key_kind(_deduplication_key_kind) - def _parse_deduplication_key_path(data: object) -> None | Unset | str: + def _parse_deduplication_key_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key_path = _parse_deduplication_key_path(d.pop("deduplication_key_path", UNSET)) - def _parse_deduplication_key_regexp(data: object) -> None | Unset | str: + def _parse_deduplication_key_regexp(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key_regexp = _parse_deduplication_key_regexp(d.pop("deduplication_key_regexp", UNSET)) owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) - def _parse_alert_template_attributes( - data: object, - ) -> Union["AlertsSourceAlertTemplateAttributesType0", None, Unset]: + def _parse_alert_template_attributes(data: object) -> AlertsSourceAlertTemplateAttributesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -289,22 +288,26 @@ def _parse_alert_template_attributes( alert_template_attributes_type_0 = AlertsSourceAlertTemplateAttributesType0.from_dict(data) return alert_template_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AlertsSourceAlertTemplateAttributesType0", None, Unset], data) + return cast(AlertsSourceAlertTemplateAttributesType0 | None | Unset, data) alert_template_attributes = _parse_alert_template_attributes(d.pop("alert_template_attributes", UNSET)) - alert_source_urgency_rules_attributes = [] _alert_source_urgency_rules_attributes = d.pop("alert_source_urgency_rules_attributes", UNSET) - for alert_source_urgency_rules_attributes_item_data in _alert_source_urgency_rules_attributes or []: - alert_source_urgency_rules_attributes_item = AlertsSourceAlertSourceUrgencyRulesAttributesItem.from_dict( - alert_source_urgency_rules_attributes_item_data - ) + alert_source_urgency_rules_attributes: list[AlertsSourceAlertSourceUrgencyRulesAttributesItem] | Unset = UNSET + if _alert_source_urgency_rules_attributes is not UNSET: + alert_source_urgency_rules_attributes = [] + for alert_source_urgency_rules_attributes_item_data in _alert_source_urgency_rules_attributes: + alert_source_urgency_rules_attributes_item = ( + AlertsSourceAlertSourceUrgencyRulesAttributesItem.from_dict( + alert_source_urgency_rules_attributes_item_data + ) + ) - alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) + alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) - def _parse_sourceable_attributes(data: object) -> Union["AlertsSourceSourceableAttributesType0", None, Unset]: + def _parse_sourceable_attributes(data: object) -> AlertsSourceSourceableAttributesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -315,15 +318,13 @@ def _parse_sourceable_attributes(data: object) -> Union["AlertsSourceSourceableA sourceable_attributes_type_0 = AlertsSourceSourceableAttributesType0.from_dict(data) return sourceable_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AlertsSourceSourceableAttributesType0", None, Unset], data) + return cast(AlertsSourceSourceableAttributesType0 | None | Unset, data) sourceable_attributes = _parse_sourceable_attributes(d.pop("sourceable_attributes", UNSET)) - def _parse_resolution_rule_attributes( - data: object, - ) -> Union["AlertsSourceResolutionRuleAttributesType0", None, Unset]: + def _parse_resolution_rule_attributes(data: object) -> AlertsSourceResolutionRuleAttributesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -334,36 +335,38 @@ def _parse_resolution_rule_attributes( resolution_rule_attributes_type_0 = AlertsSourceResolutionRuleAttributesType0.from_dict(data) return resolution_rule_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AlertsSourceResolutionRuleAttributesType0", None, Unset], data) + return cast(AlertsSourceResolutionRuleAttributesType0 | None | Unset, data) resolution_rule_attributes = _parse_resolution_rule_attributes(d.pop("resolution_rule_attributes", UNSET)) - alert_source_fields_attributes = [] _alert_source_fields_attributes = d.pop("alert_source_fields_attributes", UNSET) - for alert_source_fields_attributes_item_data in _alert_source_fields_attributes or []: - alert_source_fields_attributes_item = AlertsSourceAlertSourceFieldsAttributesItem.from_dict( - alert_source_fields_attributes_item_data - ) + alert_source_fields_attributes: list[AlertsSourceAlertSourceFieldsAttributesItem] | Unset = UNSET + if _alert_source_fields_attributes is not UNSET: + alert_source_fields_attributes = [] + for alert_source_fields_attributes_item_data in _alert_source_fields_attributes: + alert_source_fields_attributes_item = AlertsSourceAlertSourceFieldsAttributesItem.from_dict( + alert_source_fields_attributes_item_data + ) - alert_source_fields_attributes.append(alert_source_fields_attributes_item) + alert_source_fields_attributes.append(alert_source_fields_attributes_item) - def _parse_email(data: object) -> None | Unset | str: + def _parse_email(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email = _parse_email(d.pop("email", UNSET)) - def _parse_webhook_endpoint(data: object) -> None | Unset | str: + def _parse_webhook_endpoint(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) webhook_endpoint = _parse_webhook_endpoint(d.pop("webhook_endpoint", UNSET)) diff --git a/rootly_sdk/models/alerts_source_alert_source_fields_attributes_item.py b/rootly_sdk/models/alerts_source_alert_source_fields_attributes_item.py index 4c60c844..a9f3276f 100644 --- a/rootly_sdk/models/alerts_source_alert_source_fields_attributes_item.py +++ b/rootly_sdk/models/alerts_source_alert_source_fields_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,19 +15,19 @@ class AlertsSourceAlertSourceFieldsAttributesItem: """ Attributes: - alert_field_id (Union[Unset, str]): The ID of the alert field - template_body (Union[None, Unset, str]): Liquid expression to extract a specific value from the alert's payload - for evaluation + alert_field_id (str | Unset): The ID of the alert field + template_body (None | str | Unset): Liquid expression to extract a specific value from the alert's payload for + evaluation """ - alert_field_id: Unset | str = UNSET - template_body: None | Unset | str = UNSET + alert_field_id: str | Unset = UNSET + template_body: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: alert_field_id = self.alert_field_id - template_body: None | Unset | str + template_body: None | str | Unset if isinstance(self.template_body, Unset): template_body = UNSET else: @@ -46,12 +48,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) alert_field_id = d.pop("alert_field_id", UNSET) - def _parse_template_body(data: object) -> None | Unset | str: + def _parse_template_body(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) template_body = _parse_template_body(d.pop("template_body", UNSET)) diff --git a/rootly_sdk/models/alerts_source_alert_source_urgency_rules_attributes_item.py b/rootly_sdk/models/alerts_source_alert_source_urgency_rules_attributes_item.py index a462d04a..f3cb5e0c 100644 --- a/rootly_sdk/models/alerts_source_alert_source_urgency_rules_attributes_item.py +++ b/rootly_sdk/models/alerts_source_alert_source_urgency_rules_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,53 +27,53 @@ class AlertsSourceAlertSourceUrgencyRulesAttributesItem: """ Attributes: - json_path (Union[None, Unset, str]): JSON path expression to extract a specific value from the alert's payload - for evaluation - operator (Union[Unset, AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator]): Comparison operator used to + json_path (None | str | Unset): JSON path expression to extract a specific value from the alert's payload for + evaluation + operator (AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator | Unset): Comparison operator used to evaluate the extracted value against the specified condition - value (Union[Unset, str]): Value that the extracted payload data is compared to using the specified operator to + value (str | Unset): Value that the extracted payload data is compared to using the specified operator to determine a match - conditionable_type (Union[Unset, AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType]): The type - of the conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. - kind (Union[Unset, AlertsSourceAlertSourceUrgencyRulesAttributesItemKind]): The kind of the conditionable - alert_urgency_id (Union[Unset, str]): The ID of the alert urgency + conditionable_type (AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType | Unset): The type of the + conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. + kind (AlertsSourceAlertSourceUrgencyRulesAttributesItemKind | Unset): The kind of the conditionable + alert_urgency_id (str | Unset): The ID of the alert urgency """ - json_path: None | Unset | str = UNSET - operator: Unset | AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator = UNSET - value: Unset | str = UNSET - conditionable_type: Unset | AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType = UNSET - conditionable_id: None | Unset | str = UNSET - kind: Unset | AlertsSourceAlertSourceUrgencyRulesAttributesItemKind = UNSET - alert_urgency_id: Unset | str = UNSET + json_path: None | str | Unset = UNSET + operator: AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator | Unset = UNSET + value: str | Unset = UNSET + conditionable_type: AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType | Unset = UNSET + conditionable_id: None | str | Unset = UNSET + kind: AlertsSourceAlertSourceUrgencyRulesAttributesItemKind | Unset = UNSET + alert_urgency_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - json_path: None | Unset | str + json_path: None | str | Unset if isinstance(self.json_path, Unset): json_path = UNSET else: json_path = self.json_path - operator: Unset | str = UNSET + operator: str | Unset = UNSET if not isinstance(self.operator, Unset): operator = self.operator value = self.value - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: conditionable_id = self.conditionable_id - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -101,17 +103,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_json_path(data: object) -> None | Unset | str: + def _parse_json_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) json_path = _parse_json_path(d.pop("json_path", UNSET)) _operator = d.pop("operator", UNSET) - operator: Unset | AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator + operator: AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator | Unset if isinstance(_operator, Unset): operator = UNSET else: @@ -120,7 +122,7 @@ def _parse_json_path(data: object) -> None | Unset | str: value = d.pop("value", UNSET) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType + conditionable_type: AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: @@ -128,17 +130,17 @@ def _parse_json_path(data: object) -> None | Unset | str: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | AlertsSourceAlertSourceUrgencyRulesAttributesItemKind + kind: AlertsSourceAlertSourceUrgencyRulesAttributesItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: diff --git a/rootly_sdk/models/alerts_source_alert_template_attributes_type_0.py b/rootly_sdk/models/alerts_source_alert_template_attributes_type_0.py index 5cd8aa2f..139bdfa8 100644 --- a/rootly_sdk/models/alerts_source_alert_template_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_alert_template_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,30 +15,30 @@ class AlertsSourceAlertTemplateAttributesType0: """ Attributes: - title (Union[None, Unset, str]): The alert title. - description (Union[None, Unset, str]): The alert description. - external_url (Union[None, Unset, str]): The alert URL. + title (None | str | Unset): The alert title. + description (None | str | Unset): The alert description. + external_url (None | str | Unset): The alert URL. """ - title: None | Unset | str = UNSET - description: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET + title: None | str | Unset = UNSET + description: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: @@ -58,30 +60,30 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) diff --git a/rootly_sdk/models/alerts_source_list.py b/rootly_sdk/models/alerts_source_list.py index 8eb12459..791f2ed1 100644 --- a/rootly_sdk/models/alerts_source_list.py +++ b/rootly_sdk/models/alerts_source_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AlertsSourceList: """ Attributes: - data (list['AlertsSourceListDataItem']): + data (list[AlertsSourceListDataItem]): links (Links): meta (Meta): """ - data: list["AlertsSourceListDataItem"] - links: "Links" - meta: "Meta" + data: list[AlertsSourceListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alerts_source_list_data_item.py b/rootly_sdk/models/alerts_source_list_data_item.py index 5650b90d..26b483bb 100644 --- a/rootly_sdk/models/alerts_source_list_data_item.py +++ b/rootly_sdk/models/alerts_source_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AlertsSourceListDataItem: id: str type_: AlertsSourceListDataItemType - attributes: "AlertsSource" + attributes: AlertsSource additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py b/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py index 5364cf61..4bfaa3c1 100644 --- a/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -32,67 +34,67 @@ class AlertsSourceResolutionRuleAttributesType0: """Provide additional attributes for email alerts source Attributes: - enabled (Union[Unset, bool]): Set this to true to enable the auto resolution rule - condition_type (Union[Unset, AlertsSourceResolutionRuleAttributesType0ConditionType]): The type of condition to + enabled (bool | Unset): Set this to true to enable the auto resolution rule + condition_type (AlertsSourceResolutionRuleAttributesType0ConditionType | Unset): The type of condition to evaluate to apply auto resolution rule - identifier_matchable_type (Union[Unset, AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType]): The - type of the identifier matchable - identifier_matchable_id (Union[None, Unset, str]): The ID of the identifier matchable. If - identifier_matchable_type is AlertField, this is the ID of the alert field. - identifier_reference_kind (Union[Unset, AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind]): The - kind of the identifier reference - identifier_json_path (Union[None, Unset, str]): JSON path expression to extract unique alert identifier used to - match triggered alerts with resolving alerts - identifier_value_regex (Union[None, Unset, str]): Regex group to further specify the part of the string used as - a unique identifier - conditions_attributes (Union[Unset, list['AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem']]): - List of conditions to evaluate for auto resolution + identifier_matchable_type (AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType | Unset): The type + of the identifier matchable + identifier_matchable_id (None | str | Unset): The ID of the identifier matchable. If identifier_matchable_type + is AlertField, this is the ID of the alert field. + identifier_reference_kind (AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind | Unset): The kind + of the identifier reference + identifier_json_path (None | str | Unset): JSON path expression to extract unique alert identifier used to match + triggered alerts with resolving alerts + identifier_value_regex (None | str | Unset): Regex group to further specify the part of the string used as a + unique identifier + conditions_attributes (list[AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem] | Unset): List of + conditions to evaluate for auto resolution """ - enabled: Unset | bool = UNSET - condition_type: Unset | AlertsSourceResolutionRuleAttributesType0ConditionType = UNSET - identifier_matchable_type: Unset | AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType = UNSET - identifier_matchable_id: None | Unset | str = UNSET - identifier_reference_kind: Unset | AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind = UNSET - identifier_json_path: None | Unset | str = UNSET - identifier_value_regex: None | Unset | str = UNSET - conditions_attributes: Unset | list["AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem"] = UNSET + enabled: bool | Unset = UNSET + condition_type: AlertsSourceResolutionRuleAttributesType0ConditionType | Unset = UNSET + identifier_matchable_type: AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType | Unset = UNSET + identifier_matchable_id: None | str | Unset = UNSET + identifier_reference_kind: AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind | Unset = UNSET + identifier_json_path: None | str | Unset = UNSET + identifier_value_regex: None | str | Unset = UNSET + conditions_attributes: list[AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: enabled = self.enabled - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - identifier_matchable_type: Unset | str = UNSET + identifier_matchable_type: str | Unset = UNSET if not isinstance(self.identifier_matchable_type, Unset): identifier_matchable_type = self.identifier_matchable_type - identifier_matchable_id: None | Unset | str + identifier_matchable_id: None | str | Unset if isinstance(self.identifier_matchable_id, Unset): identifier_matchable_id = UNSET else: identifier_matchable_id = self.identifier_matchable_id - identifier_reference_kind: Unset | str = UNSET + identifier_reference_kind: str | Unset = UNSET if not isinstance(self.identifier_reference_kind, Unset): identifier_reference_kind = self.identifier_reference_kind - identifier_json_path: None | Unset | str + identifier_json_path: None | str | Unset if isinstance(self.identifier_json_path, Unset): identifier_json_path = UNSET else: identifier_json_path = self.identifier_json_path - identifier_value_regex: None | Unset | str + identifier_value_regex: None | str | Unset if isinstance(self.identifier_value_regex, Unset): identifier_value_regex = UNSET else: identifier_value_regex = self.identifier_value_regex - conditions_attributes: Unset | list[dict[str, Any]] = UNSET + conditions_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions_attributes, Unset): conditions_attributes = [] for conditions_attributes_item_data in self.conditions_attributes: @@ -131,14 +133,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | AlertsSourceResolutionRuleAttributesType0ConditionType + condition_type: AlertsSourceResolutionRuleAttributesType0ConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_alerts_source_resolution_rule_attributes_type_0_condition_type(_condition_type) _identifier_matchable_type = d.pop("identifier_matchable_type", UNSET) - identifier_matchable_type: Unset | AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType + identifier_matchable_type: AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType | Unset if isinstance(_identifier_matchable_type, Unset): identifier_matchable_type = UNSET else: @@ -146,17 +148,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _identifier_matchable_type ) - def _parse_identifier_matchable_id(data: object) -> None | Unset | str: + def _parse_identifier_matchable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_matchable_id = _parse_identifier_matchable_id(d.pop("identifier_matchable_id", UNSET)) _identifier_reference_kind = d.pop("identifier_reference_kind", UNSET) - identifier_reference_kind: Unset | AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind + identifier_reference_kind: AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind | Unset if isinstance(_identifier_reference_kind, Unset): identifier_reference_kind = UNSET else: @@ -164,32 +166,36 @@ def _parse_identifier_matchable_id(data: object) -> None | Unset | str: _identifier_reference_kind ) - def _parse_identifier_json_path(data: object) -> None | Unset | str: + def _parse_identifier_json_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_json_path = _parse_identifier_json_path(d.pop("identifier_json_path", UNSET)) - def _parse_identifier_value_regex(data: object) -> None | Unset | str: + def _parse_identifier_value_regex(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_value_regex = _parse_identifier_value_regex(d.pop("identifier_value_regex", UNSET)) - conditions_attributes = [] _conditions_attributes = d.pop("conditions_attributes", UNSET) - for conditions_attributes_item_data in _conditions_attributes or []: - conditions_attributes_item = AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem.from_dict( - conditions_attributes_item_data - ) + conditions_attributes: list[AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem] | Unset = UNSET + if _conditions_attributes is not UNSET: + conditions_attributes = [] + for conditions_attributes_item_data in _conditions_attributes: + conditions_attributes_item = ( + AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem.from_dict( + conditions_attributes_item_data + ) + ) - conditions_attributes.append(conditions_attributes_item) + conditions_attributes.append(conditions_attributes_item) alerts_source_resolution_rule_attributes_type_0 = cls( enabled=enabled, diff --git a/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item.py b/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item.py index 37aa59ad..ccc2ade1 100644 --- a/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item.py +++ b/rootly_sdk/models/alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,55 +27,54 @@ class AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem: """ Attributes: - field (Union[None, Unset, str]): JSON path expression to extract a specific value from the alert's payload for + field (None | str | Unset): JSON path expression to extract a specific value from the alert's payload for evaluation - operator (Union[Unset, AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator]): Comparison + operator (AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset): Comparison operator used to evaluate the extracted value against the specified condition - value (Union[Unset, str]): Value that the extracted payload data is compared to using the specified operator to + value (str | Unset): Value that the extracted payload data is compared to using the specified operator to determine a match - conditionable_type (Union[Unset, - AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType]): The type of the - conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. - kind (Union[Unset, AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind]): The kind of the + conditionable_type (AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset): + The type of the conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. + kind (AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset): The kind of the conditionable """ - field: None | Unset | str = UNSET - operator: Unset | AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator = UNSET - value: Unset | str = UNSET - conditionable_type: Unset | AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType = ( + field: None | str | Unset = UNSET + operator: AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset = UNSET + value: str | Unset = UNSET + conditionable_type: AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset = ( UNSET ) - conditionable_id: None | Unset | str = UNSET - kind: Unset | AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind = UNSET + conditionable_id: None | str | Unset = UNSET + kind: AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - field: None | Unset | str + field: None | str | Unset if isinstance(self.field, Unset): field = UNSET else: field = self.field - operator: Unset | str = UNSET + operator: str | Unset = UNSET if not isinstance(self.operator, Unset): operator = self.operator value = self.value - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: conditionable_id = self.conditionable_id - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -99,17 +100,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_field(data: object) -> None | Unset | str: + def _parse_field(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) field = _parse_field(d.pop("field", UNSET)) _operator = d.pop("operator", UNSET) - operator: Unset | AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator + operator: AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset if isinstance(_operator, Unset): operator = UNSET else: @@ -120,7 +121,7 @@ def _parse_field(data: object) -> None | Unset | str: value = d.pop("value", UNSET) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType + conditionable_type: AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: @@ -130,17 +131,17 @@ def _parse_field(data: object) -> None | Unset | str: ) ) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind + kind: AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: diff --git a/rootly_sdk/models/alerts_source_response.py b/rootly_sdk/models/alerts_source_response.py index fbb0fcea..5b72f28e 100644 --- a/rootly_sdk/models/alerts_source_response.py +++ b/rootly_sdk/models/alerts_source_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AlertsSourceResponse: data (AlertsSourceResponseData): """ - data: "AlertsSourceResponseData" + data: AlertsSourceResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alerts_source_response_data.py b/rootly_sdk/models/alerts_source_response_data.py index 1c8f6d20..5413efa8 100644 --- a/rootly_sdk/models/alerts_source_response_data.py +++ b/rootly_sdk/models/alerts_source_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AlertsSourceResponseData: id: str type_: AlertsSourceResponseDataType - attributes: "AlertsSource" + attributes: AlertsSource additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/alerts_source_source_type.py b/rootly_sdk/models/alerts_source_source_type.py index 777ab6cc..318c7d22 100644 --- a/rootly_sdk/models/alerts_source_source_type.py +++ b/rootly_sdk/models/alerts_source_source_type.py @@ -4,6 +4,7 @@ "alertmanager", "app_dynamics", "app_optics", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -11,6 +12,7 @@ "chronosphere", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "google_cloud", @@ -28,6 +30,7 @@ "alertmanager", "app_dynamics", "app_optics", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -35,6 +38,7 @@ "chronosphere", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "google_cloud", diff --git a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py index a492b629..2e36bf19 100644 --- a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -20,25 +22,25 @@ class AlertsSourceSourceableAttributesType0: """Provide additional attributes for generic_webhook alerts source Attributes: - auto_resolve (Union[Unset, bool]): Set this to true to auto-resolve alerts based on field_mappings_attributes + auto_resolve (bool | Unset): Set this to true to auto-resolve alerts based on field_mappings_attributes conditions - resolve_state (Union[None, Unset, str]): This value is matched with the value extracted from alerts payload - using JSON path in field_mappings_attributes - accept_threaded_emails (Union[Unset, bool]): Set this to false to reject threaded emails - field_mappings_attributes (Union[Unset, - list['AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem']]): Specify rules to auto resolve alerts + resolve_state (None | str | Unset): This value is matched with the value extracted from alerts payload using + JSON path in field_mappings_attributes + accept_threaded_emails (bool | Unset): Set this to false to reject threaded emails + field_mappings_attributes (list[AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem] | Unset): + Specify rules to auto resolve alerts """ - auto_resolve: Unset | bool = UNSET - resolve_state: None | Unset | str = UNSET - accept_threaded_emails: Unset | bool = UNSET - field_mappings_attributes: Unset | list["AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem"] = UNSET + auto_resolve: bool | Unset = UNSET + resolve_state: None | str | Unset = UNSET + accept_threaded_emails: bool | Unset = UNSET + field_mappings_attributes: list[AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: auto_resolve = self.auto_resolve - resolve_state: None | Unset | str + resolve_state: None | str | Unset if isinstance(self.resolve_state, Unset): resolve_state = UNSET else: @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: accept_threaded_emails = self.accept_threaded_emails - field_mappings_attributes: Unset | list[dict[str, Any]] = UNSET + field_mappings_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.field_mappings_attributes, Unset): field_mappings_attributes = [] for field_mappings_attributes_item_data in self.field_mappings_attributes: @@ -76,25 +78,31 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) auto_resolve = d.pop("auto_resolve", UNSET) - def _parse_resolve_state(data: object) -> None | Unset | str: + def _parse_resolve_state(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolve_state = _parse_resolve_state(d.pop("resolve_state", UNSET)) accept_threaded_emails = d.pop("accept_threaded_emails", UNSET) - field_mappings_attributes = [] _field_mappings_attributes = d.pop("field_mappings_attributes", UNSET) - for field_mappings_attributes_item_data in _field_mappings_attributes or []: - field_mappings_attributes_item = AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem.from_dict( - field_mappings_attributes_item_data - ) + field_mappings_attributes: list[AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem] | Unset = ( + UNSET + ) + if _field_mappings_attributes is not UNSET: + field_mappings_attributes = [] + for field_mappings_attributes_item_data in _field_mappings_attributes: + field_mappings_attributes_item = ( + AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem.from_dict( + field_mappings_attributes_item_data + ) + ) - field_mappings_attributes.append(field_mappings_attributes_item) + field_mappings_attributes.append(field_mappings_attributes_item) alerts_source_sourceable_attributes_type_0 = cls( auto_resolve=auto_resolve, diff --git a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py index d61312be..f677c96b 100644 --- a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py +++ b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem: """ Attributes: - field (Union[Unset, AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField]): Select the field on - which the condition to be evaluated - json_path (Union[Unset, str]): JSON path expression to extract a specific value from the alert's payload for + field (AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField | Unset): Select the field on which + the condition to be evaluated + json_path (str | Unset): JSON path expression to extract a specific value from the alert's payload for evaluation """ - field: Unset | AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField = UNSET - json_path: Unset | str = UNSET + field: AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET + json_path: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - field: Unset | str = UNSET + field: str | Unset = UNSET if not isinstance(self.field, Unset): field = self.field @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _field = d.pop("field", UNSET) - field: Unset | AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField + field: AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField | Unset if isinstance(_field, Unset): field = UNSET else: diff --git a/rootly_sdk/models/api_key.py b/rootly_sdk/models/api_key.py new file mode 100644 index 00000000..c58d6d6b --- /dev/null +++ b/rootly_sdk/models/api_key.py @@ -0,0 +1,208 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_key_kind import ApiKeyKind, check_api_key_kind +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApiKey") + + +@_attrs_define +class ApiKey: + """ + Attributes: + name (str): The name of the API key + kind (ApiKeyKind): The kind of the API key + created_at (str): Date of creation + updated_at (str): Date of last update + description (None | str | Unset): A description of the API key + role_id (None | str | Unset): The role ID + on_call_role_id (None | str | Unset): The on-call role ID + expires_at (None | str | Unset): Expiration date + last_used_at (None | str | Unset): Date of last use + grace_period_ends_at (None | str | Unset): Grace period end date + """ + + name: str + kind: ApiKeyKind + created_at: str + updated_at: str + description: None | str | Unset = UNSET + role_id: None | str | Unset = UNSET + on_call_role_id: None | str | Unset = UNSET + expires_at: None | str | Unset = UNSET + last_used_at: None | str | Unset = UNSET + grace_period_ends_at: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + kind: str = self.kind + + created_at = self.created_at + + updated_at = self.updated_at + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + role_id: None | str | Unset + if isinstance(self.role_id, Unset): + role_id = UNSET + else: + role_id = self.role_id + + on_call_role_id: None | str | Unset + if isinstance(self.on_call_role_id, Unset): + on_call_role_id = UNSET + else: + on_call_role_id = self.on_call_role_id + + expires_at: None | str | Unset + if isinstance(self.expires_at, Unset): + expires_at = UNSET + else: + expires_at = self.expires_at + + last_used_at: None | str | Unset + if isinstance(self.last_used_at, Unset): + last_used_at = UNSET + else: + last_used_at = self.last_used_at + + grace_period_ends_at: None | str | Unset + if isinstance(self.grace_period_ends_at, Unset): + grace_period_ends_at = UNSET + else: + grace_period_ends_at = self.grace_period_ends_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "kind": kind, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if description is not UNSET: + field_dict["description"] = description + if role_id is not UNSET: + field_dict["role_id"] = role_id + if on_call_role_id is not UNSET: + field_dict["on_call_role_id"] = on_call_role_id + if expires_at is not UNSET: + field_dict["expires_at"] = expires_at + if last_used_at is not UNSET: + field_dict["last_used_at"] = last_used_at + if grace_period_ends_at is not UNSET: + field_dict["grace_period_ends_at"] = grace_period_ends_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + kind = check_api_key_kind(d.pop("kind")) + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_role_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + role_id = _parse_role_id(d.pop("role_id", UNSET)) + + def _parse_on_call_role_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + on_call_role_id = _parse_on_call_role_id(d.pop("on_call_role_id", UNSET)) + + def _parse_expires_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + expires_at = _parse_expires_at(d.pop("expires_at", UNSET)) + + def _parse_last_used_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + last_used_at = _parse_last_used_at(d.pop("last_used_at", UNSET)) + + def _parse_grace_period_ends_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + grace_period_ends_at = _parse_grace_period_ends_at(d.pop("grace_period_ends_at", UNSET)) + + api_key = cls( + name=name, + kind=kind, + created_at=created_at, + updated_at=updated_at, + description=description, + role_id=role_id, + on_call_role_id=on_call_role_id, + expires_at=expires_at, + last_used_at=last_used_at, + grace_period_ends_at=grace_period_ends_at, + ) + + api_key.additional_properties = d + return api_key + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_kind.py b/rootly_sdk/models/api_key_kind.py new file mode 100644 index 00000000..1d9a84c0 --- /dev/null +++ b/rootly_sdk/models/api_key_kind.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +ApiKeyKind = Literal["organization", "personal", "team"] + +API_KEY_KIND_VALUES: set[ApiKeyKind] = { + "organization", + "personal", + "team", +} + + +def check_api_key_kind(value: str | None) -> ApiKeyKind | None: + if value is None: + return None + if value in API_KEY_KIND_VALUES: + return cast(ApiKeyKind, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {API_KEY_KIND_VALUES!r}") diff --git a/rootly_sdk/models/api_key_list.py b/rootly_sdk/models/api_key_list.py new file mode 100644 index 00000000..f91da75e --- /dev/null +++ b/rootly_sdk/models/api_key_list.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.api_key_list_data_item import ApiKeyListDataItem + from ..models.links import Links + from ..models.meta import Meta + + +T = TypeVar("T", bound="ApiKeyList") + + +@_attrs_define +class ApiKeyList: + """ + Attributes: + data (list[ApiKeyListDataItem]): + links (Links): + meta (Meta): + """ + + data: list[ApiKeyListDataItem] + links: Links + meta: Meta + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links = self.links.to_dict() + + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "links": links, + "meta": meta, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key_list_data_item import ApiKeyListDataItem + from ..models.links import Links + from ..models.meta import Meta + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = ApiKeyListDataItem.from_dict(data_item_data) + + data.append(data_item) + + links = Links.from_dict(d.pop("links")) + + meta = Meta.from_dict(d.pop("meta")) + + api_key_list = cls( + data=data, + links=links, + meta=meta, + ) + + api_key_list.additional_properties = d + return api_key_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_list_data_item.py b/rootly_sdk/models/api_key_list_data_item.py new file mode 100644 index 00000000..45c001d8 --- /dev/null +++ b/rootly_sdk/models/api_key_list_data_item.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_key_list_data_item_type import ApiKeyListDataItemType, check_api_key_list_data_item_type + +if TYPE_CHECKING: + from ..models.api_key import ApiKey + + +T = TypeVar("T", bound="ApiKeyListDataItem") + + +@_attrs_define +class ApiKeyListDataItem: + """ + Attributes: + id (str): Unique ID of the API key + type_ (ApiKeyListDataItemType): + attributes (ApiKey): + """ + + id: str + type_: ApiKeyListDataItemType + attributes: ApiKey + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key import ApiKey + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_api_key_list_data_item_type(d.pop("type")) + + attributes = ApiKey.from_dict(d.pop("attributes")) + + api_key_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + api_key_list_data_item.additional_properties = d + return api_key_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_list_data_item_type.py b/rootly_sdk/models/api_key_list_data_item_type.py new file mode 100644 index 00000000..09768eb6 --- /dev/null +++ b/rootly_sdk/models/api_key_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ApiKeyListDataItemType = Literal["api_keys"] + +API_KEY_LIST_DATA_ITEM_TYPE_VALUES: set[ApiKeyListDataItemType] = { + "api_keys", +} + + +def check_api_key_list_data_item_type(value: str | None) -> ApiKeyListDataItemType | None: + if value is None: + return None + if value in API_KEY_LIST_DATA_ITEM_TYPE_VALUES: + return cast(ApiKeyListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {API_KEY_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/team_fields_type_0_item.py b/rootly_sdk/models/api_key_response.py similarity index 60% rename from rootly_sdk/models/team_fields_type_0_item.py rename to rootly_sdk/models/api_key_response.py index cb2e325c..cc20822c 100644 --- a/rootly_sdk/models/team_fields_type_0_item.py +++ b/rootly_sdk/models/api_key_response.py @@ -1,36 +1,36 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="TeamFieldsType0Item") +if TYPE_CHECKING: + from ..models.api_key_response_data import ApiKeyResponseData -@_attrs_define -class TeamFieldsType0Item: - """Set a value for a catalog field +T = TypeVar("T", bound="ApiKeyResponse") + +@_attrs_define +class ApiKeyResponse: + """ Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + data (ApiKeyResponseData): """ - catalog_field_id: str - value: str + data: ApiKeyResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id - - value = self.value + data = self.data.to_dict() field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, - "value": value, + "data": data, } ) @@ -38,18 +38,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + from ..models.api_key_response_data import ApiKeyResponseData - value = d.pop("value") + d = dict(src_dict) + data = ApiKeyResponseData.from_dict(d.pop("data")) - team_fields_type_0_item = cls( - catalog_field_id=catalog_field_id, - value=value, + api_key_response = cls( + data=data, ) - team_fields_type_0_item.additional_properties = d - return team_fields_type_0_item + api_key_response.additional_properties = d + return api_key_response @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/api_key_response_data.py b/rootly_sdk/models/api_key_response_data.py new file mode 100644 index 00000000..a0b026d9 --- /dev/null +++ b/rootly_sdk/models/api_key_response_data.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_key_response_data_type import ApiKeyResponseDataType, check_api_key_response_data_type + +if TYPE_CHECKING: + from ..models.api_key import ApiKey + + +T = TypeVar("T", bound="ApiKeyResponseData") + + +@_attrs_define +class ApiKeyResponseData: + """ + Attributes: + id (str): Unique ID of the API key + type_ (ApiKeyResponseDataType): + attributes (ApiKey): + """ + + id: str + type_: ApiKeyResponseDataType + attributes: ApiKey + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key import ApiKey + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_api_key_response_data_type(d.pop("type")) + + attributes = ApiKey.from_dict(d.pop("attributes")) + + api_key_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + api_key_response_data.additional_properties = d + return api_key_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_response_data_type.py b/rootly_sdk/models/api_key_response_data_type.py new file mode 100644 index 00000000..6aeeacdd --- /dev/null +++ b/rootly_sdk/models/api_key_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ApiKeyResponseDataType = Literal["api_keys"] + +API_KEY_RESPONSE_DATA_TYPE_VALUES: set[ApiKeyResponseDataType] = { + "api_keys", +} + + +def check_api_key_response_data_type(value: str | None) -> ApiKeyResponseDataType | None: + if value is None: + return None + if value in API_KEY_RESPONSE_DATA_TYPE_VALUES: + return cast(ApiKeyResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {API_KEY_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/api_key_with_token_response.py b/rootly_sdk/models/api_key_with_token_response.py new file mode 100644 index 00000000..b4c7cf6d --- /dev/null +++ b/rootly_sdk/models/api_key_with_token_response.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData + + +T = TypeVar("T", bound="ApiKeyWithTokenResponse") + + +@_attrs_define +class ApiKeyWithTokenResponse: + """ + Attributes: + data (ApiKeyWithTokenResponseData): + """ + + data: ApiKeyWithTokenResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData + + d = dict(src_dict) + data = ApiKeyWithTokenResponseData.from_dict(d.pop("data")) + + api_key_with_token_response = cls( + data=data, + ) + + api_key_with_token_response.additional_properties = d + return api_key_with_token_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_with_token_response_data.py b/rootly_sdk/models/api_key_with_token_response_data.py new file mode 100644 index 00000000..92e10765 --- /dev/null +++ b/rootly_sdk/models/api_key_with_token_response_data.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_key_with_token_response_data_type import ( + ApiKeyWithTokenResponseDataType, + check_api_key_with_token_response_data_type, +) + +if TYPE_CHECKING: + from ..models.api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes + + +T = TypeVar("T", bound="ApiKeyWithTokenResponseData") + + +@_attrs_define +class ApiKeyWithTokenResponseData: + """ + Attributes: + id (str): Unique ID of the API key + type_ (ApiKeyWithTokenResponseDataType): + attributes (ApiKeyWithTokenResponseDataAttributes): + """ + + id: str + type_: ApiKeyWithTokenResponseDataType + attributes: ApiKeyWithTokenResponseDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_api_key_with_token_response_data_type(d.pop("type")) + + attributes = ApiKeyWithTokenResponseDataAttributes.from_dict(d.pop("attributes")) + + api_key_with_token_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + api_key_with_token_response_data.additional_properties = d + return api_key_with_token_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_with_token_response_data_attributes.py b/rootly_sdk/models/api_key_with_token_response_data_attributes.py new file mode 100644 index 00000000..31d30f84 --- /dev/null +++ b/rootly_sdk/models/api_key_with_token_response_data_attributes.py @@ -0,0 +1,216 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_key_kind import ApiKeyKind, check_api_key_kind +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApiKeyWithTokenResponseDataAttributes") + + +@_attrs_define +class ApiKeyWithTokenResponseDataAttributes: + """ + Attributes: + name (str): The name of the API key + kind (ApiKeyKind): The kind of the API key + created_at (str): Date of creation + updated_at (str): Date of last update + token (str): The API key token (only shown once) + description (None | str | Unset): A description of the API key + role_id (None | str | Unset): The role ID + on_call_role_id (None | str | Unset): The on-call role ID + expires_at (None | str | Unset): Expiration date + last_used_at (None | str | Unset): Date of last use + grace_period_ends_at (None | str | Unset): Grace period end date + """ + + name: str + kind: ApiKeyKind + created_at: str + updated_at: str + token: str + description: None | str | Unset = UNSET + role_id: None | str | Unset = UNSET + on_call_role_id: None | str | Unset = UNSET + expires_at: None | str | Unset = UNSET + last_used_at: None | str | Unset = UNSET + grace_period_ends_at: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + kind: str = self.kind + + created_at = self.created_at + + updated_at = self.updated_at + + token = self.token + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + role_id: None | str | Unset + if isinstance(self.role_id, Unset): + role_id = UNSET + else: + role_id = self.role_id + + on_call_role_id: None | str | Unset + if isinstance(self.on_call_role_id, Unset): + on_call_role_id = UNSET + else: + on_call_role_id = self.on_call_role_id + + expires_at: None | str | Unset + if isinstance(self.expires_at, Unset): + expires_at = UNSET + else: + expires_at = self.expires_at + + last_used_at: None | str | Unset + if isinstance(self.last_used_at, Unset): + last_used_at = UNSET + else: + last_used_at = self.last_used_at + + grace_period_ends_at: None | str | Unset + if isinstance(self.grace_period_ends_at, Unset): + grace_period_ends_at = UNSET + else: + grace_period_ends_at = self.grace_period_ends_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "kind": kind, + "created_at": created_at, + "updated_at": updated_at, + "token": token, + } + ) + if description is not UNSET: + field_dict["description"] = description + if role_id is not UNSET: + field_dict["role_id"] = role_id + if on_call_role_id is not UNSET: + field_dict["on_call_role_id"] = on_call_role_id + if expires_at is not UNSET: + field_dict["expires_at"] = expires_at + if last_used_at is not UNSET: + field_dict["last_used_at"] = last_used_at + if grace_period_ends_at is not UNSET: + field_dict["grace_period_ends_at"] = grace_period_ends_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + kind = check_api_key_kind(d.pop("kind")) + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + token = d.pop("token") + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_role_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + role_id = _parse_role_id(d.pop("role_id", UNSET)) + + def _parse_on_call_role_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + on_call_role_id = _parse_on_call_role_id(d.pop("on_call_role_id", UNSET)) + + def _parse_expires_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + expires_at = _parse_expires_at(d.pop("expires_at", UNSET)) + + def _parse_last_used_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + last_used_at = _parse_last_used_at(d.pop("last_used_at", UNSET)) + + def _parse_grace_period_ends_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + grace_period_ends_at = _parse_grace_period_ends_at(d.pop("grace_period_ends_at", UNSET)) + + api_key_with_token_response_data_attributes = cls( + name=name, + kind=kind, + created_at=created_at, + updated_at=updated_at, + token=token, + description=description, + role_id=role_id, + on_call_role_id=on_call_role_id, + expires_at=expires_at, + last_used_at=last_used_at, + grace_period_ends_at=grace_period_ends_at, + ) + + api_key_with_token_response_data_attributes.additional_properties = d + return api_key_with_token_response_data_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/api_key_with_token_response_data_type.py b/rootly_sdk/models/api_key_with_token_response_data_type.py new file mode 100644 index 00000000..ad7bcdc4 --- /dev/null +++ b/rootly_sdk/models/api_key_with_token_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ApiKeyWithTokenResponseDataType = Literal["api_keys"] + +API_KEY_WITH_TOKEN_RESPONSE_DATA_TYPE_VALUES: set[ApiKeyWithTokenResponseDataType] = { + "api_keys", +} + + +def check_api_key_with_token_response_data_type(value: str | None) -> ApiKeyWithTokenResponseDataType | None: + if value is None: + return None + if value in API_KEY_WITH_TOKEN_RESPONSE_DATA_TYPE_VALUES: + return cast(ApiKeyWithTokenResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {API_KEY_WITH_TOKEN_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py b/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py index 16877c4e..3dfbb94b 100644 --- a/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py +++ b/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,13 +27,13 @@ class ArchiveMicrosoftTeamsChannelsTaskParams: """ Attributes: team (ArchiveMicrosoftTeamsChannelsTaskParamsTeam): - channels (list['ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem']): - task_type (Union[Unset, ArchiveMicrosoftTeamsChannelsTaskParamsTaskType]): + channels (list[ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem]): + task_type (ArchiveMicrosoftTeamsChannelsTaskParamsTaskType | Unset): """ - team: "ArchiveMicrosoftTeamsChannelsTaskParamsTeam" - channels: list["ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem"] - task_type: Unset | ArchiveMicrosoftTeamsChannelsTaskParamsTaskType = UNSET + team: ArchiveMicrosoftTeamsChannelsTaskParamsTeam + channels: list[ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem] + task_type: ArchiveMicrosoftTeamsChannelsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: channels_item = channels_item_data.to_dict() channels.append(channels_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -79,7 +81,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: channels.append(channels_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | ArchiveMicrosoftTeamsChannelsTaskParamsTaskType + task_type: ArchiveMicrosoftTeamsChannelsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/archive_microsoft_teams_channels_task_params_channels_item.py b/rootly_sdk/models/archive_microsoft_teams_channels_task_params_channels_item.py index d22bf87d..bf1a0ca0 100644 --- a/rootly_sdk/models/archive_microsoft_teams_channels_task_params_channels_item.py +++ b/rootly_sdk/models/archive_microsoft_teams_channels_task_params_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/archive_microsoft_teams_channels_task_params_team.py b/rootly_sdk/models/archive_microsoft_teams_channels_task_params_team.py index d254639c..2bc1aa10 100644 --- a/rootly_sdk/models/archive_microsoft_teams_channels_task_params_team.py +++ b/rootly_sdk/models/archive_microsoft_teams_channels_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class ArchiveMicrosoftTeamsChannelsTaskParamsTeam: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/archive_slack_channels_task_params.py b/rootly_sdk/models/archive_slack_channels_task_params.py index 567f8aad..860e6b9b 100644 --- a/rootly_sdk/models/archive_slack_channels_task_params.py +++ b/rootly_sdk/models/archive_slack_channels_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -21,12 +23,12 @@ class ArchiveSlackChannelsTaskParams: """ Attributes: - channels (list['ArchiveSlackChannelsTaskParamsChannelsItem']): - task_type (Union[Unset, ArchiveSlackChannelsTaskParamsTaskType]): + channels (list[ArchiveSlackChannelsTaskParamsChannelsItem]): + task_type (ArchiveSlackChannelsTaskParamsTaskType | Unset): """ - channels: list["ArchiveSlackChannelsTaskParamsChannelsItem"] - task_type: Unset | ArchiveSlackChannelsTaskParamsTaskType = UNSET + channels: list[ArchiveSlackChannelsTaskParamsChannelsItem] + task_type: ArchiveSlackChannelsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,7 +37,7 @@ def to_dict(self) -> dict[str, Any]: channels_item = channels_item_data.to_dict() channels.append(channels_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -64,7 +66,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: channels.append(channels_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | ArchiveSlackChannelsTaskParamsTaskType + task_type: ArchiveSlackChannelsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/archive_slack_channels_task_params_channels_item.py b/rootly_sdk/models/archive_slack_channels_task_params_channels_item.py index 61adea9f..dc246e77 100644 --- a/rootly_sdk/models/archive_slack_channels_task_params_channels_item.py +++ b/rootly_sdk/models/archive_slack_channels_task_params_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class ArchiveSlackChannelsTaskParamsChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/assign_role_to_user.py b/rootly_sdk/models/assign_role_to_user.py index e28725e6..694269f5 100644 --- a/rootly_sdk/models/assign_role_to_user.py +++ b/rootly_sdk/models/assign_role_to_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AssignRoleToUser: data (AssignRoleToUserData): """ - data: "AssignRoleToUserData" + data: AssignRoleToUserData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/assign_role_to_user_data.py b/rootly_sdk/models/assign_role_to_user_data.py index 7586cd3f..89f9c32a 100644 --- a/rootly_sdk/models/assign_role_to_user_data.py +++ b/rootly_sdk/models/assign_role_to_user_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class AssignRoleToUserData: """ type_: AssignRoleToUserDataType - attributes: "AssignRoleToUserDataAttributes" + attributes: AssignRoleToUserDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/assign_role_to_user_data_attributes.py b/rootly_sdk/models/assign_role_to_user_data_attributes.py index 11b176f1..466f8a92 100644 --- a/rootly_sdk/models/assign_role_to_user_data_attributes.py +++ b/rootly_sdk/models/assign_role_to_user_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,12 +14,12 @@ class AssignRoleToUserDataAttributes: """ Attributes: - user_id (Union[Unset, str]): ID of user you wish to assign this incident - incident_role_id (Union[Unset, str]): ID of the incident role + user_id (str | Unset): ID of user you wish to assign this incident + incident_role_id (str | Unset): ID of the incident role """ - user_id: Unset | str = UNSET - incident_role_id: Unset | str = UNSET + user_id: str | Unset = UNSET + incident_role_id: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: user_id = self.user_id diff --git a/rootly_sdk/models/attach_alert.py b/rootly_sdk/models/attach_alert.py index 556ace8e..cd717905 100644 --- a/rootly_sdk/models/attach_alert.py +++ b/rootly_sdk/models/attach_alert.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AttachAlert: data (AttachAlertData): """ - data: "AttachAlertData" + data: AttachAlertData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/attach_alert_data.py b/rootly_sdk/models/attach_alert_data.py index 2fc46472..6e92e6f6 100644 --- a/rootly_sdk/models/attach_alert_data.py +++ b/rootly_sdk/models/attach_alert_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class AttachAlertData: """ type_: AttachAlertDataType - attributes: "AttachAlertDataAttributes" + attributes: AttachAlertDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/attach_alert_data_attributes.py b/rootly_sdk/models/attach_alert_data_attributes.py index 597f3be9..6e524c81 100644 --- a/rootly_sdk/models/attach_alert_data_attributes.py +++ b/rootly_sdk/models/attach_alert_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -10,13 +12,13 @@ class AttachAlertDataAttributes: """ Attributes: - alert_ids (Union[None, list[str]]): Alert Id to attach to the incident + alert_ids (list[str] | None): Alert Id to attach to the incident """ - alert_ids: None | list[str] + alert_ids: list[str] | None def to_dict(self) -> dict[str, Any]: - alert_ids: None | list[str] + alert_ids: list[str] | None if isinstance(self.alert_ids, list): alert_ids = self.alert_ids @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_alert_ids(data: object) -> None | list[str]: + def _parse_alert_ids(data: object) -> list[str] | None: if data is None: return data try: @@ -46,9 +48,9 @@ def _parse_alert_ids(data: object) -> None | list[str]: alert_ids_type_0 = cast(list[str], data) return alert_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | list[str], data) + return cast(list[str] | None, data) alert_ids = _parse_alert_ids(d.pop("alert_ids")) diff --git a/rootly_sdk/models/attach_datadog_dashboards_task_params.py b/rootly_sdk/models/attach_datadog_dashboards_task_params.py index 36c3444b..c9a50936 100644 --- a/rootly_sdk/models/attach_datadog_dashboards_task_params.py +++ b/rootly_sdk/models/attach_datadog_dashboards_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -26,16 +28,16 @@ class AttachDatadogDashboardsTaskParams: """ Attributes: - dashboards (list['AttachDatadogDashboardsTaskParamsDashboardsItem']): - task_type (Union[Unset, AttachDatadogDashboardsTaskParamsTaskType]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem']]): + dashboards (list[AttachDatadogDashboardsTaskParamsDashboardsItem]): + task_type (AttachDatadogDashboardsTaskParamsTaskType | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem] | Unset): """ - dashboards: list["AttachDatadogDashboardsTaskParamsDashboardsItem"] - task_type: Unset | AttachDatadogDashboardsTaskParamsTaskType = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem"] = UNSET + dashboards: list[AttachDatadogDashboardsTaskParamsDashboardsItem] + task_type: AttachDatadogDashboardsTaskParamsTaskType | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,13 +46,13 @@ def to_dict(self) -> dict[str, Any]: dashboards_item = dashboards_item_data.to_dict() dashboards.append(dashboards_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -91,7 +93,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dashboards.append(dashboards_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | AttachDatadogDashboardsTaskParamsTaskType + task_type: AttachDatadogDashboardsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -99,14 +101,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) attach_datadog_dashboards_task_params = cls( dashboards=dashboards, diff --git a/rootly_sdk/models/attach_datadog_dashboards_task_params_dashboards_item.py b/rootly_sdk/models/attach_datadog_dashboards_task_params_dashboards_item.py index 7921c70f..5930e6f9 100644 --- a/rootly_sdk/models/attach_datadog_dashboards_task_params_dashboards_item.py +++ b/rootly_sdk/models/attach_datadog_dashboards_task_params_dashboards_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AttachDatadogDashboardsTaskParamsDashboardsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/attach_datadog_dashboards_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/attach_datadog_dashboards_task_params_post_to_slack_channels_item.py index cb588b97..8436f266 100644 --- a/rootly_sdk/models/attach_datadog_dashboards_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/attach_datadog_dashboards_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/audit.py b/rootly_sdk/models/audit.py index f74cc2fd..d9191468 100644 --- a/rootly_sdk/models/audit.py +++ b/rootly_sdk/models/audit.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,23 +23,23 @@ class Audit: Attributes: event (str): Describes the action that was taken. created_at (str): Date of creation - item_type (Union[Unset, AuditItemType]): Describes the object in which the action was taken on - object_ (Union['AuditObjectType0', None, Unset]): The object in which the action was taken on - object_changes (Union['AuditObjectChangesType0', None, Unset]): The changes that occurred on the object - user_id (Union[None, Unset, int]): The ID of who took action on the object. Together with whodunnit_type can be - used to find the user - item_id (Union[None, Unset, str]): ID of the affected object - id (Union[None, Unset, int]): ID of audit + item_type (AuditItemType | Unset): Describes the object in which the action was taken on + object_ (AuditObjectType0 | None | Unset): The object in which the action was taken on + object_changes (AuditObjectChangesType0 | None | Unset): The changes that occurred on the object + user_id (int | None | Unset): The ID of who took action on the object. Together with whodunnit_type can be used + to find the user + item_id (None | str | Unset): ID of the affected object + id (int | None | Unset): ID of audit """ event: str created_at: str - item_type: Unset | AuditItemType = UNSET - object_: Union["AuditObjectType0", None, Unset] = UNSET - object_changes: Union["AuditObjectChangesType0", None, Unset] = UNSET - user_id: None | Unset | int = UNSET - item_id: None | Unset | str = UNSET - id: None | Unset | int = UNSET + item_type: AuditItemType | Unset = UNSET + object_: AuditObjectType0 | None | Unset = UNSET + object_changes: AuditObjectChangesType0 | None | Unset = UNSET + user_id: int | None | Unset = UNSET + item_id: None | str | Unset = UNSET + id: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,11 +50,11 @@ def to_dict(self) -> dict[str, Any]: created_at = self.created_at - item_type: Unset | str = UNSET + item_type: str | Unset = UNSET if not isinstance(self.item_type, Unset): item_type = self.item_type - object_: None | Unset | dict[str, Any] + object_: dict[str, Any] | None | Unset if isinstance(self.object_, Unset): object_ = UNSET elif isinstance(self.object_, AuditObjectType0): @@ -60,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: else: object_ = self.object_ - object_changes: None | Unset | dict[str, Any] + object_changes: dict[str, Any] | None | Unset if isinstance(self.object_changes, Unset): object_changes = UNSET elif isinstance(self.object_changes, AuditObjectChangesType0): @@ -68,19 +70,19 @@ def to_dict(self) -> dict[str, Any]: else: object_changes = self.object_changes - user_id: None | Unset | int + user_id: int | None | Unset if isinstance(self.user_id, Unset): user_id = UNSET else: user_id = self.user_id - item_id: None | Unset | str + item_id: None | str | Unset if isinstance(self.item_id, Unset): item_id = UNSET else: item_id = self.item_id - id: None | Unset | int + id: int | None | Unset if isinstance(self.id, Unset): id = UNSET else: @@ -120,13 +122,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at") _item_type = d.pop("item_type", UNSET) - item_type: Unset | AuditItemType + item_type: AuditItemType | Unset if isinstance(_item_type, Unset): item_type = UNSET else: item_type = check_audit_item_type(_item_type) - def _parse_object_(data: object) -> Union["AuditObjectType0", None, Unset]: + def _parse_object_(data: object) -> AuditObjectType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -137,13 +139,13 @@ def _parse_object_(data: object) -> Union["AuditObjectType0", None, Unset]: object_type_0 = AuditObjectType0.from_dict(data) return object_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AuditObjectType0", None, Unset], data) + return cast(AuditObjectType0 | None | Unset, data) object_ = _parse_object_(d.pop("object", UNSET)) - def _parse_object_changes(data: object) -> Union["AuditObjectChangesType0", None, Unset]: + def _parse_object_changes(data: object) -> AuditObjectChangesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -154,36 +156,36 @@ def _parse_object_changes(data: object) -> Union["AuditObjectChangesType0", None object_changes_type_0 = AuditObjectChangesType0.from_dict(data) return object_changes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["AuditObjectChangesType0", None, Unset], data) + return cast(AuditObjectChangesType0 | None | Unset, data) object_changes = _parse_object_changes(d.pop("object_changes", UNSET)) - def _parse_user_id(data: object) -> None | Unset | int: + def _parse_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) user_id = _parse_user_id(d.pop("user_id", UNSET)) - def _parse_item_id(data: object) -> None | Unset | str: + def _parse_item_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) item_id = _parse_item_id(d.pop("item_id", UNSET)) - def _parse_id(data: object) -> None | Unset | int: + def _parse_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) id = _parse_id(d.pop("id", UNSET)) diff --git a/rootly_sdk/models/audit_item_type.py b/rootly_sdk/models/audit_item_type.py index 8b85861a..f7d8c330 100644 --- a/rootly_sdk/models/audit_item_type.py +++ b/rootly_sdk/models/audit_item_type.py @@ -1,6 +1,7 @@ from typing import Literal, cast AuditItemType = Literal[ + "Alerts::Source", "ApiKey", "Catalog", "CatalogEntity", @@ -47,6 +48,7 @@ ] AUDIT_ITEM_TYPE_VALUES: set[AuditItemType] = { + "Alerts::Source", "ApiKey", "Catalog", "CatalogEntity", diff --git a/rootly_sdk/models/audit_object_changes_type_0.py b/rootly_sdk/models/audit_object_changes_type_0.py index c26c297b..adacb420 100644 --- a/rootly_sdk/models/audit_object_changes_type_0.py +++ b/rootly_sdk/models/audit_object_changes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class AuditObjectChangesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/audit_object_type_0.py b/rootly_sdk/models/audit_object_type_0.py index 66c54325..2a1a35a1 100644 --- a/rootly_sdk/models/audit_object_type_0.py +++ b/rootly_sdk/models/audit_object_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class AuditObjectType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/audits_list.py b/rootly_sdk/models/audits_list.py index 0e4ec6c2..78fe7360 100644 --- a/rootly_sdk/models/audits_list.py +++ b/rootly_sdk/models/audits_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AuditsList: """ Attributes: - data (list['AuditsListDataItem']): + data (list[AuditsListDataItem]): links (Links): meta (Meta): """ - data: list["AuditsListDataItem"] - links: "Links" - meta: "Meta" + data: list[AuditsListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/audits_list_data_item.py b/rootly_sdk/models/audits_list_data_item.py index 94b30791..f10c5aff 100644 --- a/rootly_sdk/models/audits_list_data_item.py +++ b/rootly_sdk/models/audits_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class AuditsListDataItem: id: str type_: AuditsListDataItemType - attributes: "Audit" + attributes: Audit additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/authorization.py b/rootly_sdk/models/authorization.py index 8e600ea8..62b21259 100644 --- a/rootly_sdk/models/authorization.py +++ b/rootly_sdk/models/authorization.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/authorization_list.py b/rootly_sdk/models/authorization_list.py index 7c9cdc24..0f145c24 100644 --- a/rootly_sdk/models/authorization_list.py +++ b/rootly_sdk/models/authorization_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class AuthorizationList: """ Attributes: - data (list['AuthorizationListDataItem']): + data (list[AuthorizationListDataItem]): links (Links): meta (Meta): """ - data: list["AuthorizationListDataItem"] - links: "Links" - meta: "Meta" + data: list[AuthorizationListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/authorization_list_data_item.py b/rootly_sdk/models/authorization_list_data_item.py index 254bb294..32272298 100644 --- a/rootly_sdk/models/authorization_list_data_item.py +++ b/rootly_sdk/models/authorization_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AuthorizationListDataItem: id: str type_: AuthorizationListDataItemType - attributes: "Authorization" + attributes: Authorization additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/authorization_response.py b/rootly_sdk/models/authorization_response.py index 74e08b37..258ac7b2 100644 --- a/rootly_sdk/models/authorization_response.py +++ b/rootly_sdk/models/authorization_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class AuthorizationResponse: data (AuthorizationResponseData): """ - data: "AuthorizationResponseData" + data: AuthorizationResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/authorization_response_data.py b/rootly_sdk/models/authorization_response_data.py index 0b141026..fc5371a6 100644 --- a/rootly_sdk/models/authorization_response_data.py +++ b/rootly_sdk/models/authorization_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class AuthorizationResponseData: id: str type_: AuthorizationResponseDataType - attributes: "Authorization" + attributes: Authorization additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py b/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py index 7180c666..e3ef0e7c 100644 --- a/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py +++ b/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class AutoAssignRoleOpsgenieTaskParams: Attributes: incident_role_id (str): The role id schedule (AutoAssignRoleOpsgenieTaskParamsSchedule): - task_type (Union[Unset, AutoAssignRoleOpsgenieTaskParamsTaskType]): + task_type (AutoAssignRoleOpsgenieTaskParamsTaskType | Unset): """ incident_role_id: str - schedule: "AutoAssignRoleOpsgenieTaskParamsSchedule" - task_type: Unset | AutoAssignRoleOpsgenieTaskParamsTaskType = UNSET + schedule: AutoAssignRoleOpsgenieTaskParamsSchedule + task_type: AutoAssignRoleOpsgenieTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: schedule = self.schedule.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule = AutoAssignRoleOpsgenieTaskParamsSchedule.from_dict(d.pop("schedule")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | AutoAssignRoleOpsgenieTaskParamsTaskType + task_type: AutoAssignRoleOpsgenieTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/auto_assign_role_opsgenie_task_params_schedule.py b/rootly_sdk/models/auto_assign_role_opsgenie_task_params_schedule.py index f56df6a9..d9929206 100644 --- a/rootly_sdk/models/auto_assign_role_opsgenie_task_params_schedule.py +++ b/rootly_sdk/models/auto_assign_role_opsgenie_task_params_schedule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleOpsgenieTaskParamsSchedule: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params.py b/rootly_sdk/models/auto_assign_role_rootly_task_params.py index 00f9a483..64866bed 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,47 +32,47 @@ class AutoAssignRoleRootlyTaskParams: """ Attributes: incident_role_id (str): The role id - task_type (Union[Unset, AutoAssignRoleRootlyTaskParamsTaskType]): - escalation_policy_target (Union[Unset, AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget]): - service_target (Union[Unset, AutoAssignRoleRootlyTaskParamsServiceTarget]): - user_target (Union[Unset, AutoAssignRoleRootlyTaskParamsUserTarget]): - group_target (Union[Unset, AutoAssignRoleRootlyTaskParamsGroupTarget]): - schedule_target (Union[Unset, AutoAssignRoleRootlyTaskParamsScheduleTarget]): + task_type (AutoAssignRoleRootlyTaskParamsTaskType | Unset): + escalation_policy_target (AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget | Unset): + service_target (AutoAssignRoleRootlyTaskParamsServiceTarget | Unset): + user_target (AutoAssignRoleRootlyTaskParamsUserTarget | Unset): + group_target (AutoAssignRoleRootlyTaskParamsGroupTarget | Unset): + schedule_target (AutoAssignRoleRootlyTaskParamsScheduleTarget | Unset): """ incident_role_id: str - task_type: Unset | AutoAssignRoleRootlyTaskParamsTaskType = UNSET - escalation_policy_target: Union[Unset, "AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget"] = UNSET - service_target: Union[Unset, "AutoAssignRoleRootlyTaskParamsServiceTarget"] = UNSET - user_target: Union[Unset, "AutoAssignRoleRootlyTaskParamsUserTarget"] = UNSET - group_target: Union[Unset, "AutoAssignRoleRootlyTaskParamsGroupTarget"] = UNSET - schedule_target: Union[Unset, "AutoAssignRoleRootlyTaskParamsScheduleTarget"] = UNSET + task_type: AutoAssignRoleRootlyTaskParamsTaskType | Unset = UNSET + escalation_policy_target: AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget | Unset = UNSET + service_target: AutoAssignRoleRootlyTaskParamsServiceTarget | Unset = UNSET + user_target: AutoAssignRoleRootlyTaskParamsUserTarget | Unset = UNSET + group_target: AutoAssignRoleRootlyTaskParamsGroupTarget | Unset = UNSET + schedule_target: AutoAssignRoleRootlyTaskParamsScheduleTarget | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: incident_role_id = self.incident_role_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - escalation_policy_target: Unset | dict[str, Any] = UNSET + escalation_policy_target: dict[str, Any] | Unset = UNSET if not isinstance(self.escalation_policy_target, Unset): escalation_policy_target = self.escalation_policy_target.to_dict() - service_target: Unset | dict[str, Any] = UNSET + service_target: dict[str, Any] | Unset = UNSET if not isinstance(self.service_target, Unset): service_target = self.service_target.to_dict() - user_target: Unset | dict[str, Any] = UNSET + user_target: dict[str, Any] | Unset = UNSET if not isinstance(self.user_target, Unset): user_target = self.user_target.to_dict() - group_target: Unset | dict[str, Any] = UNSET + group_target: dict[str, Any] | Unset = UNSET if not isinstance(self.group_target, Unset): group_target = self.group_target.to_dict() - schedule_target: Unset | dict[str, Any] = UNSET + schedule_target: dict[str, Any] | Unset = UNSET if not isinstance(self.schedule_target, Unset): schedule_target = self.schedule_target.to_dict() @@ -114,14 +116,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_role_id = d.pop("incident_role_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | AutoAssignRoleRootlyTaskParamsTaskType + task_type: AutoAssignRoleRootlyTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_auto_assign_role_rootly_task_params_task_type(_task_type) _escalation_policy_target = d.pop("escalation_policy_target", UNSET) - escalation_policy_target: Unset | AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget + escalation_policy_target: AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget | Unset if isinstance(_escalation_policy_target, Unset): escalation_policy_target = UNSET else: @@ -130,28 +132,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _service_target = d.pop("service_target", UNSET) - service_target: Unset | AutoAssignRoleRootlyTaskParamsServiceTarget + service_target: AutoAssignRoleRootlyTaskParamsServiceTarget | Unset if isinstance(_service_target, Unset): service_target = UNSET else: service_target = AutoAssignRoleRootlyTaskParamsServiceTarget.from_dict(_service_target) _user_target = d.pop("user_target", UNSET) - user_target: Unset | AutoAssignRoleRootlyTaskParamsUserTarget + user_target: AutoAssignRoleRootlyTaskParamsUserTarget | Unset if isinstance(_user_target, Unset): user_target = UNSET else: user_target = AutoAssignRoleRootlyTaskParamsUserTarget.from_dict(_user_target) _group_target = d.pop("group_target", UNSET) - group_target: Unset | AutoAssignRoleRootlyTaskParamsGroupTarget + group_target: AutoAssignRoleRootlyTaskParamsGroupTarget | Unset if isinstance(_group_target, Unset): group_target = UNSET else: group_target = AutoAssignRoleRootlyTaskParamsGroupTarget.from_dict(_group_target) _schedule_target = d.pop("schedule_target", UNSET) - schedule_target: Unset | AutoAssignRoleRootlyTaskParamsScheduleTarget + schedule_target: AutoAssignRoleRootlyTaskParamsScheduleTarget | Unset if isinstance(_schedule_target, Unset): schedule_target = UNSET else: diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params_escalation_policy_target.py b/rootly_sdk/models/auto_assign_role_rootly_task_params_escalation_policy_target.py index 179f1e39..4f2dc0fb 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params_escalation_policy_target.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params_escalation_policy_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params_group_target.py b/rootly_sdk/models/auto_assign_role_rootly_task_params_group_target.py index 5469dd82..f8147e20 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params_group_target.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params_group_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleRootlyTaskParamsGroupTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params_schedule_target.py b/rootly_sdk/models/auto_assign_role_rootly_task_params_schedule_target.py index a043e152..1f6e3338 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params_schedule_target.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params_schedule_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleRootlyTaskParamsScheduleTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params_service_target.py b/rootly_sdk/models/auto_assign_role_rootly_task_params_service_target.py index 95a31d34..e8908713 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params_service_target.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params_service_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleRootlyTaskParamsServiceTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_rootly_task_params_user_target.py b/rootly_sdk/models/auto_assign_role_rootly_task_params_user_target.py index e343b3d9..e0a79a33 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params_user_target.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params_user_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleRootlyTaskParamsUserTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py b/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py index 6071ebbb..af0e0efb 100644 --- a/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py +++ b/rootly_sdk/models/auto_assign_role_victor_ops_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class AutoAssignRoleVictorOpsTaskParams: Attributes: incident_role_id (str): The role id team (AutoAssignRoleVictorOpsTaskParamsTeam): - task_type (Union[Unset, AutoAssignRoleVictorOpsTaskParamsTaskType]): + task_type (AutoAssignRoleVictorOpsTaskParamsTaskType | Unset): """ incident_role_id: str - team: "AutoAssignRoleVictorOpsTaskParamsTeam" - task_type: Unset | AutoAssignRoleVictorOpsTaskParamsTaskType = UNSET + team: AutoAssignRoleVictorOpsTaskParamsTeam + task_type: AutoAssignRoleVictorOpsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: team = self.team.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: team = AutoAssignRoleVictorOpsTaskParamsTeam.from_dict(d.pop("team")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | AutoAssignRoleVictorOpsTaskParamsTaskType + task_type: AutoAssignRoleVictorOpsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/auto_assign_role_victor_ops_task_params_team.py b/rootly_sdk/models/auto_assign_role_victor_ops_task_params_team.py index c4a051fe..aca48451 100644 --- a/rootly_sdk/models/auto_assign_role_victor_ops_task_params_team.py +++ b/rootly_sdk/models/auto_assign_role_victor_ops_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class AutoAssignRoleVictorOpsTaskParamsTeam: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/call_people_task_params.py b/rootly_sdk/models/call_people_task_params.py index 796d763c..c5cebec4 100644 --- a/rootly_sdk/models/call_people_task_params.py +++ b/rootly_sdk/models/call_people_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,13 +22,13 @@ class CallPeopleTaskParams: phone_numbers (list[str]): name (str): The name content (str): The message to be read by text-to-voice - task_type (Union[Unset, CallPeopleTaskParamsTaskType]): + task_type (CallPeopleTaskParamsTaskType | Unset): """ phone_numbers: list[str] name: str content: str - task_type: Unset | CallPeopleTaskParamsTaskType = UNSET + task_type: CallPeopleTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: content = self.content - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -64,7 +66,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CallPeopleTaskParamsTaskType + task_type: CallPeopleTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/cancel_incident.py b/rootly_sdk/models/cancel_incident.py index 452891a0..4db0d2c6 100644 --- a/rootly_sdk/models/cancel_incident.py +++ b/rootly_sdk/models/cancel_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CancelIncident: data (CancelIncidentData): """ - data: "CancelIncidentData" + data: CancelIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/cancel_incident_data.py b/rootly_sdk/models/cancel_incident_data.py index f93f0b30..7dd184bb 100644 --- a/rootly_sdk/models/cancel_incident_data.py +++ b/rootly_sdk/models/cancel_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class CancelIncidentData: """ type_: CancelIncidentDataType - attributes: "CancelIncidentDataAttributes" + attributes: CancelIncidentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/cancel_incident_data_attributes.py b/rootly_sdk/models/cancel_incident_data_attributes.py index 6586a808..c3362192 100644 --- a/rootly_sdk/models/cancel_incident_data_attributes.py +++ b/rootly_sdk/models/cancel_incident_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,13 +14,13 @@ class CancelIncidentDataAttributes: """ Attributes: - cancellation_message (Union[None, Unset, str]): Why was the incident cancelled? + cancellation_message (None | str | Unset): Why was the incident cancelled? """ - cancellation_message: None | Unset | str = UNSET + cancellation_message: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - cancellation_message: None | Unset | str + cancellation_message: None | str | Unset if isinstance(self.cancellation_message, Unset): cancellation_message = UNSET else: @@ -36,12 +38,12 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_cancellation_message(data: object) -> None | Unset | str: + def _parse_cancellation_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cancellation_message = _parse_cancellation_message(d.pop("cancellation_message", UNSET)) diff --git a/rootly_sdk/models/catalog.py b/rootly_sdk/models/catalog.py index c9afb0dc..8f3a5b3e 100644 --- a/rootly_sdk/models/catalog.py +++ b/rootly_sdk/models/catalog.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,18 +18,18 @@ class Catalog: Attributes: name (str): icon (CatalogIcon): - position (Union[None, int]): Default position of the catalog when displayed in a list. + position (int | None): Default position of the catalog when displayed in a list. created_at (str): updated_at (str): - description (Union[None, Unset, str]): + description (None | str | Unset): """ name: str icon: CatalogIcon - position: None | int + position: int | None created_at: str updated_at: str - description: None | Unset | str = UNSET + description: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,14 +37,14 @@ def to_dict(self) -> dict[str, Any]: icon: str = self.icon - position: None | int + position: int | None position = self.position created_at = self.created_at updated_at = self.updated_at - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -71,10 +73,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: icon = check_catalog_icon(d.pop("icon")) - def _parse_position(data: object) -> None | int: + def _parse_position(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) position = _parse_position(d.pop("position")) @@ -82,12 +84,12 @@ def _parse_position(data: object) -> None | int: updated_at = d.pop("updated_at") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/catalog_checklist_template.py b/rootly_sdk/models/catalog_checklist_template.py new file mode 100644 index 00000000..db087dd2 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template.py @@ -0,0 +1,226 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_checklist_template_catalog_type import ( + CatalogChecklistTemplateCatalogType, + check_catalog_checklist_template_catalog_type, +) +from ..models.catalog_checklist_template_scope_type import ( + CatalogChecklistTemplateScopeType, + check_catalog_checklist_template_scope_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_checklist_template_fields_type_0_item import CatalogChecklistTemplateFieldsType0Item + from ..models.catalog_checklist_template_owners_type_0_item import CatalogChecklistTemplateOwnersType0Item + + +T = TypeVar("T", bound="CatalogChecklistTemplate") + + +@_attrs_define +class CatalogChecklistTemplate: + """ + Attributes: + name (str): The name of the checklist template + catalog_type (CatalogChecklistTemplateCatalogType): The catalog type + scope_type (CatalogChecklistTemplateScopeType): The scope type + scope_id (str): The scope ID + created_at (str): Date of creation + updated_at (str): Date of last update + slug (str | Unset): The slug of the checklist template + description (None | str | Unset): The description of the checklist template + fields (list[CatalogChecklistTemplateFieldsType0Item] | None | Unset): Template fields in position order + owners (list[CatalogChecklistTemplateOwnersType0Item] | None | Unset): Template owners + """ + + name: str + catalog_type: CatalogChecklistTemplateCatalogType + scope_type: CatalogChecklistTemplateScopeType + scope_id: str + created_at: str + updated_at: str + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + fields: list[CatalogChecklistTemplateFieldsType0Item] | None | Unset = UNSET + owners: list[CatalogChecklistTemplateOwnersType0Item] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + catalog_type: str = self.catalog_type + + scope_type: str = self.scope_type + + scope_id = self.scope_id + + created_at = self.created_at + + updated_at = self.updated_at + + slug = self.slug + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + fields: list[dict[str, Any]] | None | Unset + if isinstance(self.fields, Unset): + fields = UNSET + elif isinstance(self.fields, list): + fields = [] + for fields_type_0_item_data in self.fields: + fields_type_0_item = fields_type_0_item_data.to_dict() + fields.append(fields_type_0_item) + + else: + fields = self.fields + + owners: list[dict[str, Any]] | None | Unset + if isinstance(self.owners, Unset): + owners = UNSET + elif isinstance(self.owners, list): + owners = [] + for owners_type_0_item_data in self.owners: + owners_type_0_item = owners_type_0_item_data.to_dict() + owners.append(owners_type_0_item) + + else: + owners = self.owners + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "catalog_type": catalog_type, + "scope_type": scope_type, + "scope_id": scope_id, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if slug is not UNSET: + field_dict["slug"] = slug + if description is not UNSET: + field_dict["description"] = description + if fields is not UNSET: + field_dict["fields"] = fields + if owners is not UNSET: + field_dict["owners"] = owners + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_checklist_template_fields_type_0_item import CatalogChecklistTemplateFieldsType0Item + from ..models.catalog_checklist_template_owners_type_0_item import CatalogChecklistTemplateOwnersType0Item + + d = dict(src_dict) + name = d.pop("name") + + catalog_type = check_catalog_checklist_template_catalog_type(d.pop("catalog_type")) + + scope_type = check_catalog_checklist_template_scope_type(d.pop("scope_type")) + + scope_id = d.pop("scope_id") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + slug = d.pop("slug", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_fields(data: object) -> list[CatalogChecklistTemplateFieldsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + fields_type_0 = [] + _fields_type_0 = data + for fields_type_0_item_data in _fields_type_0: + fields_type_0_item = CatalogChecklistTemplateFieldsType0Item.from_dict(fields_type_0_item_data) + + fields_type_0.append(fields_type_0_item) + + return fields_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[CatalogChecklistTemplateFieldsType0Item] | None | Unset, data) + + fields = _parse_fields(d.pop("fields", UNSET)) + + def _parse_owners(data: object) -> list[CatalogChecklistTemplateOwnersType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + owners_type_0 = [] + _owners_type_0 = data + for owners_type_0_item_data in _owners_type_0: + owners_type_0_item = CatalogChecklistTemplateOwnersType0Item.from_dict(owners_type_0_item_data) + + owners_type_0.append(owners_type_0_item) + + return owners_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[CatalogChecklistTemplateOwnersType0Item] | None | Unset, data) + + owners = _parse_owners(d.pop("owners", UNSET)) + + catalog_checklist_template = cls( + name=name, + catalog_type=catalog_type, + scope_type=scope_type, + scope_id=scope_id, + created_at=created_at, + updated_at=updated_at, + slug=slug, + description=description, + fields=fields, + owners=owners, + ) + + catalog_checklist_template.additional_properties = d + return catalog_checklist_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_catalog_type.py b/rootly_sdk/models/catalog_checklist_template_catalog_type.py new file mode 100644 index 00000000..d84f5ad6 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_catalog_type.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +CatalogChecklistTemplateCatalogType = Literal[ + "Catalog", "Cause", "Environment", "Functionality", "Group", "IncidentType", "Service" +] + +CATALOG_CHECKLIST_TEMPLATE_CATALOG_TYPE_VALUES: set[CatalogChecklistTemplateCatalogType] = { + "Catalog", + "Cause", + "Environment", + "Functionality", + "Group", + "IncidentType", + "Service", +} + + +def check_catalog_checklist_template_catalog_type(value: str | None) -> CatalogChecklistTemplateCatalogType | None: + if value is None: + return None + if value in CATALOG_CHECKLIST_TEMPLATE_CATALOG_TYPE_VALUES: + return cast(CatalogChecklistTemplateCatalogType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_CHECKLIST_TEMPLATE_CATALOG_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py b/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py new file mode 100644 index 00000000..c2eaf173 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_checklist_template_fields_type_0_item_field_source import ( + CatalogChecklistTemplateFieldsType0ItemFieldSource, + check_catalog_checklist_template_fields_type_0_item_field_source, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CatalogChecklistTemplateFieldsType0Item") + + +@_attrs_define +class CatalogChecklistTemplateFieldsType0Item: + """ + Attributes: + field_source (CatalogChecklistTemplateFieldsType0ItemFieldSource | Unset): Source of the field + field_key (str | Unset): Key identifying the field + catalog_property_id (None | str | Unset): ID of the catalog property for custom fields + """ + + field_source: CatalogChecklistTemplateFieldsType0ItemFieldSource | Unset = UNSET + field_key: str | Unset = UNSET + catalog_property_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_source: str | Unset = UNSET + if not isinstance(self.field_source, Unset): + field_source = self.field_source + + field_key = self.field_key + + catalog_property_id: None | str | Unset + if isinstance(self.catalog_property_id, Unset): + catalog_property_id = UNSET + else: + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if field_source is not UNSET: + field_dict["field_source"] = field_source + if field_key is not UNSET: + field_dict["field_key"] = field_key + if catalog_property_id is not UNSET: + field_dict["catalog_property_id"] = catalog_property_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _field_source = d.pop("field_source", UNSET) + field_source: CatalogChecklistTemplateFieldsType0ItemFieldSource | Unset + if isinstance(_field_source, Unset): + field_source = UNSET + else: + field_source = check_catalog_checklist_template_fields_type_0_item_field_source(_field_source) + + field_key = d.pop("field_key", UNSET) + + def _parse_catalog_property_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + catalog_property_id = _parse_catalog_property_id(d.pop("catalog_property_id", UNSET)) + + catalog_checklist_template_fields_type_0_item = cls( + field_source=field_source, + field_key=field_key, + catalog_property_id=catalog_property_id, + ) + + catalog_checklist_template_fields_type_0_item.additional_properties = d + return catalog_checklist_template_fields_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_fields_type_0_item_field_source.py b/rootly_sdk/models/catalog_checklist_template_fields_type_0_item_field_source.py new file mode 100644 index 00000000..8dde8781 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_fields_type_0_item_field_source.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +CatalogChecklistTemplateFieldsType0ItemFieldSource = Literal["builtin", "custom"] + +CATALOG_CHECKLIST_TEMPLATE_FIELDS_TYPE_0_ITEM_FIELD_SOURCE_VALUES: set[ + CatalogChecklistTemplateFieldsType0ItemFieldSource +] = { + "builtin", + "custom", +} + + +def check_catalog_checklist_template_fields_type_0_item_field_source( + value: str | None, +) -> CatalogChecklistTemplateFieldsType0ItemFieldSource | None: + if value is None: + return None + if value in CATALOG_CHECKLIST_TEMPLATE_FIELDS_TYPE_0_ITEM_FIELD_SOURCE_VALUES: + return cast(CatalogChecklistTemplateFieldsType0ItemFieldSource, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_CHECKLIST_TEMPLATE_FIELDS_TYPE_0_ITEM_FIELD_SOURCE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_checklist_template_list.py b/rootly_sdk/models/catalog_checklist_template_list.py new file mode 100644 index 00000000..bcce7076 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_list.py @@ -0,0 +1,113 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem + from ..models.links import Links + from ..models.meta import Meta + + +T = TypeVar("T", bound="CatalogChecklistTemplateList") + + +@_attrs_define +class CatalogChecklistTemplateList: + """ + Attributes: + data (list[CatalogChecklistTemplateListDataItem]): + links (Links | Unset): + meta (Meta | Unset): + """ + + data: list[CatalogChecklistTemplateListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links: dict[str, Any] | Unset = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + meta: dict[str, Any] | Unset = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if links is not UNSET: + field_dict["links"] = links + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem + from ..models.links import Links + from ..models.meta import Meta + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = CatalogChecklistTemplateListDataItem.from_dict(data_item_data) + + data.append(data_item) + + _links = d.pop("links", UNSET) + links: Links | Unset + if isinstance(_links, Unset): + links = UNSET + else: + links = Links.from_dict(_links) + + _meta = d.pop("meta", UNSET) + meta: Meta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = Meta.from_dict(_meta) + + catalog_checklist_template_list = cls( + data=data, + links=links, + meta=meta, + ) + + catalog_checklist_template_list.additional_properties = d + return catalog_checklist_template_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_list_data_item.py b/rootly_sdk/models/catalog_checklist_template_list_data_item.py new file mode 100644 index 00000000..005c894f --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_list_data_item.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_checklist_template_list_data_item_type import ( + CatalogChecklistTemplateListDataItemType, + check_catalog_checklist_template_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.catalog_checklist_template import CatalogChecklistTemplate + + +T = TypeVar("T", bound="CatalogChecklistTemplateListDataItem") + + +@_attrs_define +class CatalogChecklistTemplateListDataItem: + """ + Attributes: + id (str): Unique ID of the checklist template + type_ (CatalogChecklistTemplateListDataItemType): + attributes (CatalogChecklistTemplate): + """ + + id: str + type_: CatalogChecklistTemplateListDataItemType + attributes: CatalogChecklistTemplate + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_checklist_template import CatalogChecklistTemplate + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_catalog_checklist_template_list_data_item_type(d.pop("type")) + + attributes = CatalogChecklistTemplate.from_dict(d.pop("attributes")) + + catalog_checklist_template_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_checklist_template_list_data_item.additional_properties = d + return catalog_checklist_template_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_list_data_item_type.py b/rootly_sdk/models/catalog_checklist_template_list_data_item_type.py new file mode 100644 index 00000000..d227dd9d --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_list_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +CatalogChecklistTemplateListDataItemType = Literal["catalog_checklist_templates"] + +CATALOG_CHECKLIST_TEMPLATE_LIST_DATA_ITEM_TYPE_VALUES: set[CatalogChecklistTemplateListDataItemType] = { + "catalog_checklist_templates", +} + + +def check_catalog_checklist_template_list_data_item_type( + value: str | None, +) -> CatalogChecklistTemplateListDataItemType | None: + if value is None: + return None + if value in CATALOG_CHECKLIST_TEMPLATE_LIST_DATA_ITEM_TYPE_VALUES: + return cast(CatalogChecklistTemplateListDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_CHECKLIST_TEMPLATE_LIST_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py b/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py new file mode 100644 index 00000000..23e30f42 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_checklist_template_owners_type_0_item_type import ( + CatalogChecklistTemplateOwnersType0ItemType, + check_catalog_checklist_template_owners_type_0_item_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CatalogChecklistTemplateOwnersType0Item") + + +@_attrs_define +class CatalogChecklistTemplateOwnersType0Item: + """ + Attributes: + id (str | Unset): User ID for user owners, or field key for field owners + type_ (CatalogChecklistTemplateOwnersType0ItemType | Unset): Type of owner + """ + + id: str | Unset = UNSET + type_: CatalogChecklistTemplateOwnersType0ItemType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: CatalogChecklistTemplateOwnersType0ItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_catalog_checklist_template_owners_type_0_item_type(_type_) + + catalog_checklist_template_owners_type_0_item = cls( + id=id, + type_=type_, + ) + + catalog_checklist_template_owners_type_0_item.additional_properties = d + return catalog_checklist_template_owners_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_owners_type_0_item_type.py b/rootly_sdk/models/catalog_checklist_template_owners_type_0_item_type.py new file mode 100644 index 00000000..27450bd7 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_owners_type_0_item_type.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +CatalogChecklistTemplateOwnersType0ItemType = Literal["field", "user"] + +CATALOG_CHECKLIST_TEMPLATE_OWNERS_TYPE_0_ITEM_TYPE_VALUES: set[CatalogChecklistTemplateOwnersType0ItemType] = { + "field", + "user", +} + + +def check_catalog_checklist_template_owners_type_0_item_type( + value: str | None, +) -> CatalogChecklistTemplateOwnersType0ItemType | None: + if value is None: + return None + if value in CATALOG_CHECKLIST_TEMPLATE_OWNERS_TYPE_0_ITEM_TYPE_VALUES: + return cast(CatalogChecklistTemplateOwnersType0ItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_CHECKLIST_TEMPLATE_OWNERS_TYPE_0_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_checklist_template_response.py b/rootly_sdk/models/catalog_checklist_template_response.py new file mode 100644 index 00000000..e1fe20bf --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_response.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData + + +T = TypeVar("T", bound="CatalogChecklistTemplateResponse") + + +@_attrs_define +class CatalogChecklistTemplateResponse: + """ + Attributes: + data (CatalogChecklistTemplateResponseData): + """ + + data: CatalogChecklistTemplateResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData + + d = dict(src_dict) + data = CatalogChecklistTemplateResponseData.from_dict(d.pop("data")) + + catalog_checklist_template_response = cls( + data=data, + ) + + catalog_checklist_template_response.additional_properties = d + return catalog_checklist_template_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_response_data.py b/rootly_sdk/models/catalog_checklist_template_response_data.py new file mode 100644 index 00000000..d58e7592 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_response_data.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_checklist_template_response_data_type import ( + CatalogChecklistTemplateResponseDataType, + check_catalog_checklist_template_response_data_type, +) + +if TYPE_CHECKING: + from ..models.catalog_checklist_template import CatalogChecklistTemplate + + +T = TypeVar("T", bound="CatalogChecklistTemplateResponseData") + + +@_attrs_define +class CatalogChecklistTemplateResponseData: + """ + Attributes: + id (str): Unique ID of the checklist template + type_ (CatalogChecklistTemplateResponseDataType): + attributes (CatalogChecklistTemplate): + """ + + id: str + type_: CatalogChecklistTemplateResponseDataType + attributes: CatalogChecklistTemplate + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_checklist_template import CatalogChecklistTemplate + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_catalog_checklist_template_response_data_type(d.pop("type")) + + attributes = CatalogChecklistTemplate.from_dict(d.pop("attributes")) + + catalog_checklist_template_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_checklist_template_response_data.additional_properties = d + return catalog_checklist_template_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_checklist_template_response_data_type.py b/rootly_sdk/models/catalog_checklist_template_response_data_type.py new file mode 100644 index 00000000..cb700bb8 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_response_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +CatalogChecklistTemplateResponseDataType = Literal["catalog_checklist_templates"] + +CATALOG_CHECKLIST_TEMPLATE_RESPONSE_DATA_TYPE_VALUES: set[CatalogChecklistTemplateResponseDataType] = { + "catalog_checklist_templates", +} + + +def check_catalog_checklist_template_response_data_type( + value: str | None, +) -> CatalogChecklistTemplateResponseDataType | None: + if value is None: + return None + if value in CATALOG_CHECKLIST_TEMPLATE_RESPONSE_DATA_TYPE_VALUES: + return cast(CatalogChecklistTemplateResponseDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_CHECKLIST_TEMPLATE_RESPONSE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_checklist_template_scope_type.py b/rootly_sdk/models/catalog_checklist_template_scope_type.py new file mode 100644 index 00000000..d3bb40b1 --- /dev/null +++ b/rootly_sdk/models/catalog_checklist_template_scope_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +CatalogChecklistTemplateScopeType = Literal["Catalog", "Team"] + +CATALOG_CHECKLIST_TEMPLATE_SCOPE_TYPE_VALUES: set[CatalogChecklistTemplateScopeType] = { + "Catalog", + "Team", +} + + +def check_catalog_checklist_template_scope_type(value: str | None) -> CatalogChecklistTemplateScopeType | None: + if value is None: + return None + if value in CATALOG_CHECKLIST_TEMPLATE_SCOPE_TYPE_VALUES: + return cast(CatalogChecklistTemplateScopeType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_CHECKLIST_TEMPLATE_SCOPE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/catalog_entity.py b/rootly_sdk/models/catalog_entity.py index e7793be4..e984d737 100644 --- a/rootly_sdk/models/catalog_entity.py +++ b/rootly_sdk/models/catalog_entity.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -7,7 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.catalog_entity_fields_item import CatalogEntityFieldsItem + from ..models.catalog_entity_properties_item import CatalogEntityPropertiesItem T = TypeVar("T", bound="CatalogEntity") @@ -18,43 +20,43 @@ class CatalogEntity: """ Attributes: name (str): - position (Union[None, int]): Default position of the item when displayed in a list. + position (int | None): Default position of the item when displayed in a list. created_at (str): updated_at (str): - description (Union[None, Unset, str]): - fields (Union[Unset, list['CatalogEntityFieldsItem']]): Array of field values for this catalog entity + description (None | str | Unset): + properties (list[CatalogEntityPropertiesItem] | Unset): Array of property values for this catalog entity """ name: str - position: None | int + position: int | None created_at: str updated_at: str - description: None | Unset | str = UNSET - fields: Unset | list["CatalogEntityFieldsItem"] = UNSET + description: None | str | Unset = UNSET + properties: list[CatalogEntityPropertiesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - position: None | int + position: int | None position = self.position created_at = self.created_at updated_at = self.updated_at - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -68,22 +70,22 @@ def to_dict(self) -> dict[str, Any]: ) if description is not UNSET: field_dict["description"] = description - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.catalog_entity_fields_item import CatalogEntityFieldsItem + from ..models.catalog_entity_properties_item import CatalogEntityPropertiesItem d = dict(src_dict) name = d.pop("name") - def _parse_position(data: object) -> None | int: + def _parse_position(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) position = _parse_position(d.pop("position")) @@ -91,21 +93,23 @@ def _parse_position(data: object) -> None | int: updated_at = d.pop("updated_at") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = CatalogEntityFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[CatalogEntityPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = CatalogEntityPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) catalog_entity = cls( name=name, @@ -113,7 +117,7 @@ def _parse_description(data: object) -> None | Unset | str: created_at=created_at, updated_at=updated_at, description=description, - fields=fields, + properties=properties, ) catalog_entity.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_checklist.py b/rootly_sdk/models/catalog_entity_checklist.py new file mode 100644 index 00000000..e8d7db76 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist.py @@ -0,0 +1,270 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_entity_checklist_auditable_type import ( + CatalogEntityChecklistAuditableType, + check_catalog_entity_checklist_auditable_type, +) +from ..models.catalog_entity_checklist_status import CatalogEntityChecklistStatus, check_catalog_entity_checklist_status +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item import ( + CatalogEntityChecklistChecklistFieldsType0Item, + ) + from ..models.catalog_entity_checklist_checklist_owners_type_0_item import ( + CatalogEntityChecklistChecklistOwnersType0Item, + ) + + +T = TypeVar("T", bound="CatalogEntityChecklist") + + +@_attrs_define +class CatalogEntityChecklist: + """ + Attributes: + catalog_checklist_template_id (str): The ID of the checklist template + auditable_type (CatalogEntityChecklistAuditableType): The type of the auditable entity + auditable_id (str): The ID of the auditable entity + status (CatalogEntityChecklistStatus): The status of the checklist + created_at (str): Date of creation + updated_at (str): Date of last update + started_at (None | str | Unset): When the checklist was started + completed_at (None | str | Unset): When the checklist was completed + completed_by_user_id (None | str | Unset): The ID of the user who completed the checklist + checklist_fields (list[CatalogEntityChecklistChecklistFieldsType0Item] | None | Unset): Checklist fields + checklist_owners (list[CatalogEntityChecklistChecklistOwnersType0Item] | None | Unset): Checklist owners + """ + + catalog_checklist_template_id: str + auditable_type: CatalogEntityChecklistAuditableType + auditable_id: str + status: CatalogEntityChecklistStatus + created_at: str + updated_at: str + started_at: None | str | Unset = UNSET + completed_at: None | str | Unset = UNSET + completed_by_user_id: None | str | Unset = UNSET + checklist_fields: list[CatalogEntityChecklistChecklistFieldsType0Item] | None | Unset = UNSET + checklist_owners: list[CatalogEntityChecklistChecklistOwnersType0Item] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_checklist_template_id = self.catalog_checklist_template_id + + auditable_type: str = self.auditable_type + + auditable_id = self.auditable_id + + status: str = self.status + + created_at = self.created_at + + updated_at = self.updated_at + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + else: + started_at = self.started_at + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + else: + completed_at = self.completed_at + + completed_by_user_id: None | str | Unset + if isinstance(self.completed_by_user_id, Unset): + completed_by_user_id = UNSET + else: + completed_by_user_id = self.completed_by_user_id + + checklist_fields: list[dict[str, Any]] | None | Unset + if isinstance(self.checklist_fields, Unset): + checklist_fields = UNSET + elif isinstance(self.checklist_fields, list): + checklist_fields = [] + for checklist_fields_type_0_item_data in self.checklist_fields: + checklist_fields_type_0_item = checklist_fields_type_0_item_data.to_dict() + checklist_fields.append(checklist_fields_type_0_item) + + else: + checklist_fields = self.checklist_fields + + checklist_owners: list[dict[str, Any]] | None | Unset + if isinstance(self.checklist_owners, Unset): + checklist_owners = UNSET + elif isinstance(self.checklist_owners, list): + checklist_owners = [] + for checklist_owners_type_0_item_data in self.checklist_owners: + checklist_owners_type_0_item = checklist_owners_type_0_item_data.to_dict() + checklist_owners.append(checklist_owners_type_0_item) + + else: + checklist_owners = self.checklist_owners + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_checklist_template_id": catalog_checklist_template_id, + "auditable_type": auditable_type, + "auditable_id": auditable_id, + "status": status, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if started_at is not UNSET: + field_dict["started_at"] = started_at + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if completed_by_user_id is not UNSET: + field_dict["completed_by_user_id"] = completed_by_user_id + if checklist_fields is not UNSET: + field_dict["checklist_fields"] = checklist_fields + if checklist_owners is not UNSET: + field_dict["checklist_owners"] = checklist_owners + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item import ( + CatalogEntityChecklistChecklistFieldsType0Item, + ) + from ..models.catalog_entity_checklist_checklist_owners_type_0_item import ( + CatalogEntityChecklistChecklistOwnersType0Item, + ) + + d = dict(src_dict) + catalog_checklist_template_id = d.pop("catalog_checklist_template_id") + + auditable_type = check_catalog_entity_checklist_auditable_type(d.pop("auditable_type")) + + auditable_id = d.pop("auditable_id") + + status = check_catalog_entity_checklist_status(d.pop("status")) + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + def _parse_started_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_completed_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + def _parse_completed_by_user_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + completed_by_user_id = _parse_completed_by_user_id(d.pop("completed_by_user_id", UNSET)) + + def _parse_checklist_fields( + data: object, + ) -> list[CatalogEntityChecklistChecklistFieldsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + checklist_fields_type_0 = [] + _checklist_fields_type_0 = data + for checklist_fields_type_0_item_data in _checklist_fields_type_0: + checklist_fields_type_0_item = CatalogEntityChecklistChecklistFieldsType0Item.from_dict( + checklist_fields_type_0_item_data + ) + + checklist_fields_type_0.append(checklist_fields_type_0_item) + + return checklist_fields_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[CatalogEntityChecklistChecklistFieldsType0Item] | None | Unset, data) + + checklist_fields = _parse_checklist_fields(d.pop("checklist_fields", UNSET)) + + def _parse_checklist_owners( + data: object, + ) -> list[CatalogEntityChecklistChecklistOwnersType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + checklist_owners_type_0 = [] + _checklist_owners_type_0 = data + for checklist_owners_type_0_item_data in _checklist_owners_type_0: + checklist_owners_type_0_item = CatalogEntityChecklistChecklistOwnersType0Item.from_dict( + checklist_owners_type_0_item_data + ) + + checklist_owners_type_0.append(checklist_owners_type_0_item) + + return checklist_owners_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[CatalogEntityChecklistChecklistOwnersType0Item] | None | Unset, data) + + checklist_owners = _parse_checklist_owners(d.pop("checklist_owners", UNSET)) + + catalog_entity_checklist = cls( + catalog_checklist_template_id=catalog_checklist_template_id, + auditable_type=auditable_type, + auditable_id=auditable_id, + status=status, + created_at=created_at, + updated_at=updated_at, + started_at=started_at, + completed_at=completed_at, + completed_by_user_id=completed_by_user_id, + checklist_fields=checklist_fields, + checklist_owners=checklist_owners, + ) + + catalog_entity_checklist.additional_properties = d + return catalog_entity_checklist + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_auditable_type.py b/rootly_sdk/models/catalog_entity_checklist_auditable_type.py new file mode 100644 index 00000000..a717f634 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_auditable_type.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +CatalogEntityChecklistAuditableType = Literal[ + "CatalogEntity", "Cause", "Environment", "Functionality", "Group", "IncidentType", "Service" +] + +CATALOG_ENTITY_CHECKLIST_AUDITABLE_TYPE_VALUES: set[CatalogEntityChecklistAuditableType] = { + "CatalogEntity", + "Cause", + "Environment", + "Functionality", + "Group", + "IncidentType", + "Service", +} + + +def check_catalog_entity_checklist_auditable_type(value: str | None) -> CatalogEntityChecklistAuditableType | None: + if value is None: + return None + if value in CATALOG_ENTITY_CHECKLIST_AUDITABLE_TYPE_VALUES: + return cast(CatalogEntityChecklistAuditableType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_CHECKLIST_AUDITABLE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py new file mode 100644 index 00000000..760de6b0 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data import ( + CatalogEntityChecklistChecklistFieldsType0ItemData, + ) + + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistFieldsType0Item") + + +@_attrs_define +class CatalogEntityChecklistChecklistFieldsType0Item: + """ + Attributes: + data (CatalogEntityChecklistChecklistFieldsType0ItemData | Unset): + """ + + data: CatalogEntityChecklistChecklistFieldsType0ItemData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data import ( + CatalogEntityChecklistChecklistFieldsType0ItemData, + ) + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: CatalogEntityChecklistChecklistFieldsType0ItemData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = CatalogEntityChecklistChecklistFieldsType0ItemData.from_dict(_data) + + catalog_entity_checklist_checklist_fields_type_0_item = cls( + data=data, + ) + + catalog_entity_checklist_checklist_fields_type_0_item.additional_properties = d + return catalog_entity_checklist_checklist_fields_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py new file mode 100644 index 00000000..99be75a9 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_type import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataType, + check_catalog_entity_checklist_checklist_fields_type_0_item_data_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes, + ) + + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistFieldsType0ItemData") + + +@_attrs_define +class CatalogEntityChecklistChecklistFieldsType0ItemData: + """ + Attributes: + id (str | Unset): ID of the checklist field + type_ (CatalogEntityChecklistChecklistFieldsType0ItemDataType | Unset): + attributes (CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes | Unset): + """ + + id: str | Unset = UNSET + type_: CatalogEntityChecklistChecklistFieldsType0ItemDataType | Unset = UNSET + attributes: CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes, + ) + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: CatalogEntityChecklistChecklistFieldsType0ItemDataType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_catalog_entity_checklist_checklist_fields_type_0_item_data_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes.from_dict(_attributes) + + catalog_entity_checklist_checklist_fields_type_0_item_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_entity_checklist_checklist_fields_type_0_item_data.additional_properties = d + return catalog_entity_checklist_checklist_fields_type_0_item_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes.py new file mode 100644 index 00000000..21f60c2e --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes.py @@ -0,0 +1,214 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0, + ) + + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes") + + +@_attrs_define +class CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes: + """ + Attributes: + catalog_entity_checklist_id (str | Unset): The ID of the parent checklist + catalog_checklist_template_field_id (None | str | Unset): The ID of the template field + field_key (str | Unset): The field key + checked (bool | Unset): Whether the field is checked + value_snapshot (CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0 | None | Unset): + The value snapshot at time of checking + completed_by_user_id (None | str | Unset): The ID of the user who checked the field + completed_at (None | str | Unset): When the field was checked + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + """ + + catalog_entity_checklist_id: str | Unset = UNSET + catalog_checklist_template_field_id: None | str | Unset = UNSET + field_key: str | Unset = UNSET + checked: bool | Unset = UNSET + value_snapshot: CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0 | None | Unset = ( + UNSET + ) + completed_by_user_id: None | str | Unset = UNSET + completed_at: None | str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0, + ) + + catalog_entity_checklist_id = self.catalog_entity_checklist_id + + catalog_checklist_template_field_id: None | str | Unset + if isinstance(self.catalog_checklist_template_field_id, Unset): + catalog_checklist_template_field_id = UNSET + else: + catalog_checklist_template_field_id = self.catalog_checklist_template_field_id + + field_key = self.field_key + + checked = self.checked + + value_snapshot: dict[str, Any] | None | Unset + if isinstance(self.value_snapshot, Unset): + value_snapshot = UNSET + elif isinstance( + self.value_snapshot, CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0 + ): + value_snapshot = self.value_snapshot.to_dict() + else: + value_snapshot = self.value_snapshot + + completed_by_user_id: None | str | Unset + if isinstance(self.completed_by_user_id, Unset): + completed_by_user_id = UNSET + else: + completed_by_user_id = self.completed_by_user_id + + completed_at: None | str | Unset + if isinstance(self.completed_at, Unset): + completed_at = UNSET + else: + completed_at = self.completed_at + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if catalog_entity_checklist_id is not UNSET: + field_dict["catalog_entity_checklist_id"] = catalog_entity_checklist_id + if catalog_checklist_template_field_id is not UNSET: + field_dict["catalog_checklist_template_field_id"] = catalog_checklist_template_field_id + if field_key is not UNSET: + field_dict["field_key"] = field_key + if checked is not UNSET: + field_dict["checked"] = checked + if value_snapshot is not UNSET: + field_dict["value_snapshot"] = value_snapshot + if completed_by_user_id is not UNSET: + field_dict["completed_by_user_id"] = completed_by_user_id + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0, + ) + + d = dict(src_dict) + catalog_entity_checklist_id = d.pop("catalog_entity_checklist_id", UNSET) + + def _parse_catalog_checklist_template_field_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + catalog_checklist_template_field_id = _parse_catalog_checklist_template_field_id( + d.pop("catalog_checklist_template_field_id", UNSET) + ) + + field_key = d.pop("field_key", UNSET) + + checked = d.pop("checked", UNSET) + + def _parse_value_snapshot( + data: object, + ) -> CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + value_snapshot_type_0 = ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0.from_dict(data) + ) + + return value_snapshot_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0 | None | Unset, data + ) + + value_snapshot = _parse_value_snapshot(d.pop("value_snapshot", UNSET)) + + def _parse_completed_by_user_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + completed_by_user_id = _parse_completed_by_user_id(d.pop("completed_by_user_id", UNSET)) + + def _parse_completed_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + catalog_entity_checklist_checklist_fields_type_0_item_data_attributes = cls( + catalog_entity_checklist_id=catalog_entity_checklist_id, + catalog_checklist_template_field_id=catalog_checklist_template_field_id, + field_key=field_key, + checked=checked, + value_snapshot=value_snapshot, + completed_by_user_id=completed_by_user_id, + completed_at=completed_at, + created_at=created_at, + updated_at=updated_at, + ) + + catalog_entity_checklist_checklist_fields_type_0_item_data_attributes.additional_properties = d + return catalog_entity_checklist_checklist_fields_type_0_item_data_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0.py new file mode 100644 index 00000000..c0b25867 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0") + + +@_attrs_define +class CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0: + """The value snapshot at time of checking""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 = cls() + + catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0.additional_properties = d + return catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_type.py b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_type.py new file mode 100644 index 00000000..94ec6171 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_fields_type_0_item_data_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogEntityChecklistChecklistFieldsType0ItemDataType = Literal["catalog_entity_checklist_fields"] + +CATALOG_ENTITY_CHECKLIST_CHECKLIST_FIELDS_TYPE_0_ITEM_DATA_TYPE_VALUES: set[ + CatalogEntityChecklistChecklistFieldsType0ItemDataType +] = { + "catalog_entity_checklist_fields", +} + + +def check_catalog_entity_checklist_checklist_fields_type_0_item_data_type( + value: str | None, +) -> CatalogEntityChecklistChecklistFieldsType0ItemDataType | None: + if value is None: + return None + if value in CATALOG_ENTITY_CHECKLIST_CHECKLIST_FIELDS_TYPE_0_ITEM_DATA_TYPE_VALUES: + return cast(CatalogEntityChecklistChecklistFieldsType0ItemDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_CHECKLIST_CHECKLIST_FIELDS_TYPE_0_ITEM_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py new file mode 100644 index 00000000..cfcef9a1 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data import ( + CatalogEntityChecklistChecklistOwnersType0ItemData, + ) + + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistOwnersType0Item") + + +@_attrs_define +class CatalogEntityChecklistChecklistOwnersType0Item: + """ + Attributes: + data (CatalogEntityChecklistChecklistOwnersType0ItemData | Unset): + """ + + data: CatalogEntityChecklistChecklistOwnersType0ItemData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data: dict[str, Any] | Unset = UNSET + if not isinstance(self.data, Unset): + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data import ( + CatalogEntityChecklistChecklistOwnersType0ItemData, + ) + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: CatalogEntityChecklistChecklistOwnersType0ItemData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = CatalogEntityChecklistChecklistOwnersType0ItemData.from_dict(_data) + + catalog_entity_checklist_checklist_owners_type_0_item = cls( + data=data, + ) + + catalog_entity_checklist_checklist_owners_type_0_item.additional_properties = d + return catalog_entity_checklist_checklist_owners_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py new file mode 100644 index 00000000..e873ed7a --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_type import ( + CatalogEntityChecklistChecklistOwnersType0ItemDataType, + check_catalog_entity_checklist_checklist_owners_type_0_item_data_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes, + ) + + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistOwnersType0ItemData") + + +@_attrs_define +class CatalogEntityChecklistChecklistOwnersType0ItemData: + """ + Attributes: + id (str | Unset): ID of the checklist owner + type_ (CatalogEntityChecklistChecklistOwnersType0ItemDataType | Unset): + attributes (CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes | Unset): + """ + + id: str | Unset = UNSET + type_: CatalogEntityChecklistChecklistOwnersType0ItemDataType | Unset = UNSET + attributes: CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str | Unset = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if type_ is not UNSET: + field_dict["type"] = type_ + if attributes is not UNSET: + field_dict["attributes"] = attributes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes, + ) + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: CatalogEntityChecklistChecklistOwnersType0ItemDataType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_catalog_entity_checklist_checklist_owners_type_0_item_data_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes.from_dict(_attributes) + + catalog_entity_checklist_checklist_owners_type_0_item_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_entity_checklist_checklist_owners_type_0_item_data.additional_properties = d + return catalog_entity_checklist_checklist_owners_type_0_item_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_attributes.py b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_attributes.py new file mode 100644 index 00000000..923596d6 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_attributes.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes") + + +@_attrs_define +class CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes: + """ + Attributes: + catalog_entity_checklist_id (str | Unset): The ID of the parent checklist + owner_user_id (str | Unset): The ID of the owner user + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + """ + + catalog_entity_checklist_id: str | Unset = UNSET + owner_user_id: str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_entity_checklist_id = self.catalog_entity_checklist_id + + owner_user_id = self.owner_user_id + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if catalog_entity_checklist_id is not UNSET: + field_dict["catalog_entity_checklist_id"] = catalog_entity_checklist_id + if owner_user_id is not UNSET: + field_dict["owner_user_id"] = owner_user_id + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_entity_checklist_id = d.pop("catalog_entity_checklist_id", UNSET) + + owner_user_id = d.pop("owner_user_id", UNSET) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + catalog_entity_checklist_checklist_owners_type_0_item_data_attributes = cls( + catalog_entity_checklist_id=catalog_entity_checklist_id, + owner_user_id=owner_user_id, + created_at=created_at, + updated_at=updated_at, + ) + + catalog_entity_checklist_checklist_owners_type_0_item_data_attributes.additional_properties = d + return catalog_entity_checklist_checklist_owners_type_0_item_data_attributes + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_type.py b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_type.py new file mode 100644 index 00000000..712e9f58 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_checklist_owners_type_0_item_data_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogEntityChecklistChecklistOwnersType0ItemDataType = Literal["catalog_entity_checklist_owners"] + +CATALOG_ENTITY_CHECKLIST_CHECKLIST_OWNERS_TYPE_0_ITEM_DATA_TYPE_VALUES: set[ + CatalogEntityChecklistChecklistOwnersType0ItemDataType +] = { + "catalog_entity_checklist_owners", +} + + +def check_catalog_entity_checklist_checklist_owners_type_0_item_data_type( + value: str | None, +) -> CatalogEntityChecklistChecklistOwnersType0ItemDataType | None: + if value is None: + return None + if value in CATALOG_ENTITY_CHECKLIST_CHECKLIST_OWNERS_TYPE_0_ITEM_DATA_TYPE_VALUES: + return cast(CatalogEntityChecklistChecklistOwnersType0ItemDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_CHECKLIST_CHECKLIST_OWNERS_TYPE_0_ITEM_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_entity_checklist_list.py b/rootly_sdk/models/catalog_entity_checklist_list.py new file mode 100644 index 00000000..f7e46d19 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_list.py @@ -0,0 +1,113 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem + from ..models.links import Links + from ..models.meta import Meta + + +T = TypeVar("T", bound="CatalogEntityChecklistList") + + +@_attrs_define +class CatalogEntityChecklistList: + """ + Attributes: + data (list[CatalogEntityChecklistListDataItem]): + links (Links | Unset): + meta (Meta | Unset): + """ + + data: list[CatalogEntityChecklistListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links: dict[str, Any] | Unset = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + meta: dict[str, Any] | Unset = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if links is not UNSET: + field_dict["links"] = links + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem + from ..models.links import Links + from ..models.meta import Meta + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = CatalogEntityChecklistListDataItem.from_dict(data_item_data) + + data.append(data_item) + + _links = d.pop("links", UNSET) + links: Links | Unset + if isinstance(_links, Unset): + links = UNSET + else: + links = Links.from_dict(_links) + + _meta = d.pop("meta", UNSET) + meta: Meta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = Meta.from_dict(_meta) + + catalog_entity_checklist_list = cls( + data=data, + links=links, + meta=meta, + ) + + catalog_entity_checklist_list.additional_properties = d + return catalog_entity_checklist_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py new file mode 100644 index 00000000..5ce9263e --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_entity_checklist_list_data_item_type import ( + CatalogEntityChecklistListDataItemType, + check_catalog_entity_checklist_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist import CatalogEntityChecklist + + +T = TypeVar("T", bound="CatalogEntityChecklistListDataItem") + + +@_attrs_define +class CatalogEntityChecklistListDataItem: + """ + Attributes: + id (str): Unique ID of the entity checklist + type_ (CatalogEntityChecklistListDataItemType): + attributes (CatalogEntityChecklist): + """ + + id: str + type_: CatalogEntityChecklistListDataItemType + attributes: CatalogEntityChecklist + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist import CatalogEntityChecklist + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_catalog_entity_checklist_list_data_item_type(d.pop("type")) + + attributes = CatalogEntityChecklist.from_dict(d.pop("attributes")) + + catalog_entity_checklist_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_entity_checklist_list_data_item.additional_properties = d + return catalog_entity_checklist_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_list_data_item_type.py b/rootly_sdk/models/catalog_entity_checklist_list_data_item_type.py new file mode 100644 index 00000000..4daf071b --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_list_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +CatalogEntityChecklistListDataItemType = Literal["catalog_entity_checklists"] + +CATALOG_ENTITY_CHECKLIST_LIST_DATA_ITEM_TYPE_VALUES: set[CatalogEntityChecklistListDataItemType] = { + "catalog_entity_checklists", +} + + +def check_catalog_entity_checklist_list_data_item_type( + value: str | None, +) -> CatalogEntityChecklistListDataItemType | None: + if value is None: + return None + if value in CATALOG_ENTITY_CHECKLIST_LIST_DATA_ITEM_TYPE_VALUES: + return cast(CatalogEntityChecklistListDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_CHECKLIST_LIST_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_entity_checklist_response.py b/rootly_sdk/models/catalog_entity_checklist_response.py new file mode 100644 index 00000000..88e502b5 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_response.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData + + +T = TypeVar("T", bound="CatalogEntityChecklistResponse") + + +@_attrs_define +class CatalogEntityChecklistResponse: + """ + Attributes: + data (CatalogEntityChecklistResponseData): + """ + + data: CatalogEntityChecklistResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData + + d = dict(src_dict) + data = CatalogEntityChecklistResponseData.from_dict(d.pop("data")) + + catalog_entity_checklist_response = cls( + data=data, + ) + + catalog_entity_checklist_response.additional_properties = d + return catalog_entity_checklist_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_response_data.py b/rootly_sdk/models/catalog_entity_checklist_response_data.py new file mode 100644 index 00000000..8406b9e3 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_response_data.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_entity_checklist_response_data_type import ( + CatalogEntityChecklistResponseDataType, + check_catalog_entity_checklist_response_data_type, +) + +if TYPE_CHECKING: + from ..models.catalog_entity_checklist import CatalogEntityChecklist + + +T = TypeVar("T", bound="CatalogEntityChecklistResponseData") + + +@_attrs_define +class CatalogEntityChecklistResponseData: + """ + Attributes: + id (str): Unique ID of the entity checklist + type_ (CatalogEntityChecklistResponseDataType): + attributes (CatalogEntityChecklist): + """ + + id: str + type_: CatalogEntityChecklistResponseDataType + attributes: CatalogEntityChecklist + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_entity_checklist import CatalogEntityChecklist + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_catalog_entity_checklist_response_data_type(d.pop("type")) + + attributes = CatalogEntityChecklist.from_dict(d.pop("attributes")) + + catalog_entity_checklist_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_entity_checklist_response_data.additional_properties = d + return catalog_entity_checklist_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_entity_checklist_response_data_type.py b/rootly_sdk/models/catalog_entity_checklist_response_data_type.py new file mode 100644 index 00000000..ddf9c76e --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_response_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +CatalogEntityChecklistResponseDataType = Literal["catalog_entity_checklists"] + +CATALOG_ENTITY_CHECKLIST_RESPONSE_DATA_TYPE_VALUES: set[CatalogEntityChecklistResponseDataType] = { + "catalog_entity_checklists", +} + + +def check_catalog_entity_checklist_response_data_type( + value: str | None, +) -> CatalogEntityChecklistResponseDataType | None: + if value is None: + return None + if value in CATALOG_ENTITY_CHECKLIST_RESPONSE_DATA_TYPE_VALUES: + return cast(CatalogEntityChecklistResponseDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_CHECKLIST_RESPONSE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/catalog_entity_checklist_status.py b/rootly_sdk/models/catalog_entity_checklist_status.py new file mode 100644 index 00000000..2f34bd30 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_checklist_status.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +CatalogEntityChecklistStatus = Literal["cancelled", "completed", "in_progress", "triggered"] + +CATALOG_ENTITY_CHECKLIST_STATUS_VALUES: set[CatalogEntityChecklistStatus] = { + "cancelled", + "completed", + "in_progress", + "triggered", +} + + +def check_catalog_entity_checklist_status(value: str | None) -> CatalogEntityChecklistStatus | None: + if value is None: + return None + if value in CATALOG_ENTITY_CHECKLIST_STATUS_VALUES: + return cast(CatalogEntityChecklistStatus, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_CHECKLIST_STATUS_VALUES!r}") diff --git a/rootly_sdk/models/catalog_entity_list.py b/rootly_sdk/models/catalog_entity_list.py index b93659e2..4beee503 100644 --- a/rootly_sdk/models/catalog_entity_list.py +++ b/rootly_sdk/models/catalog_entity_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CatalogEntityList: """ Attributes: - data (list['CatalogEntityListDataItem']): + data (list[CatalogEntityListDataItem]): links (Links): meta (Meta): """ - data: list["CatalogEntityListDataItem"] - links: "Links" - meta: "Meta" + data: list[CatalogEntityListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_list_data_item.py b/rootly_sdk/models/catalog_entity_list_data_item.py index e71d7885..5a17fc87 100644 --- a/rootly_sdk/models/catalog_entity_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CatalogEntityListDataItem: id: str type_: CatalogEntityListDataItemType - attributes: "CatalogEntity" + attributes: CatalogEntity additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_fields_item.py b/rootly_sdk/models/catalog_entity_properties_item.py similarity index 65% rename from rootly_sdk/models/catalog_entity_fields_item.py rename to rootly_sdk/models/catalog_entity_properties_item.py index de173681..a96d631a 100644 --- a/rootly_sdk/models/catalog_entity_fields_item.py +++ b/rootly_sdk/models/catalog_entity_properties_item.py @@ -1,26 +1,28 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="CatalogEntityFieldsItem") +T = TypeVar("T", bound="CatalogEntityPropertiesItem") @_attrs_define -class CatalogEntityFieldsItem: +class CatalogEntityPropertiesItem: """ Attributes: - catalog_field_id (str): Unique ID of the catalog field - value (str): The value for this field + catalog_property_id (str): Unique ID of the catalog property + value (str): The value for this property """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -28,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -38,17 +40,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - catalog_entity_fields_item = cls( - catalog_field_id=catalog_field_id, + catalog_entity_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - catalog_entity_fields_item.additional_properties = d - return catalog_entity_fields_item + catalog_entity_properties_item.additional_properties = d + return catalog_entity_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/catalog_entity_property.py b/rootly_sdk/models/catalog_entity_property.py index 28079807..36c57257 100644 --- a/rootly_sdk/models/catalog_entity_property.py +++ b/rootly_sdk/models/catalog_entity_property.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/catalog_entity_property_key.py b/rootly_sdk/models/catalog_entity_property_key.py index 69ae0af0..29725ca6 100644 --- a/rootly_sdk/models/catalog_entity_property_key.py +++ b/rootly_sdk/models/catalog_entity_property_key.py @@ -1,9 +1,10 @@ from typing import Literal, cast -CatalogEntityPropertyKey = Literal["catalog_entity", "text"] +CatalogEntityPropertyKey = Literal["catalog_entity", "slack", "text"] CATALOG_ENTITY_PROPERTY_KEY_VALUES: set[CatalogEntityPropertyKey] = { "catalog_entity", + "slack", "text", } diff --git a/rootly_sdk/models/catalog_entity_property_list.py b/rootly_sdk/models/catalog_entity_property_list.py index f709d77f..935a2814 100644 --- a/rootly_sdk/models/catalog_entity_property_list.py +++ b/rootly_sdk/models/catalog_entity_property_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,14 +21,14 @@ class CatalogEntityPropertyList: endpoints (teams, services, functionalities, incident_types, causes, environments) to retrieve field values instead. Attributes: - data (list['CatalogEntityPropertyListDataItem']): + data (list[CatalogEntityPropertyListDataItem]): links (Links): meta (Meta): """ - data: list["CatalogEntityPropertyListDataItem"] - links: "Links" - meta: "Meta" + data: list[CatalogEntityPropertyListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_property_list_data_item.py b/rootly_sdk/models/catalog_entity_property_list_data_item.py index 5296266a..283fee04 100644 --- a/rootly_sdk/models/catalog_entity_property_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_property_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -29,7 +31,7 @@ class CatalogEntityPropertyListDataItem: id: str type_: CatalogEntityPropertyListDataItemType - attributes: "CatalogEntityProperty" + attributes: CatalogEntityProperty additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_property_response.py b/rootly_sdk/models/catalog_entity_property_response.py index 33fc3103..8d7907af 100644 --- a/rootly_sdk/models/catalog_entity_property_response.py +++ b/rootly_sdk/models/catalog_entity_property_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -20,7 +22,7 @@ class CatalogEntityPropertyResponse: data (CatalogEntityPropertyResponseData): """ - data: "CatalogEntityPropertyResponseData" + data: CatalogEntityPropertyResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_property_response_data.py b/rootly_sdk/models/catalog_entity_property_response_data.py index 2eadd03a..197549c8 100644 --- a/rootly_sdk/models/catalog_entity_property_response_data.py +++ b/rootly_sdk/models/catalog_entity_property_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -29,7 +31,7 @@ class CatalogEntityPropertyResponseData: id: str type_: CatalogEntityPropertyResponseDataType - attributes: "CatalogEntityProperty" + attributes: CatalogEntityProperty additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_response.py b/rootly_sdk/models/catalog_entity_response.py index 8844085e..bf8fcf59 100644 --- a/rootly_sdk/models/catalog_entity_response.py +++ b/rootly_sdk/models/catalog_entity_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CatalogEntityResponse: data (CatalogEntityResponseData): """ - data: "CatalogEntityResponseData" + data: CatalogEntityResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_entity_response_data.py b/rootly_sdk/models/catalog_entity_response_data.py index de40e5fb..d68be342 100644 --- a/rootly_sdk/models/catalog_entity_response_data.py +++ b/rootly_sdk/models/catalog_entity_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CatalogEntityResponseData: id: str type_: CatalogEntityResponseDataType - attributes: "CatalogEntity" + attributes: CatalogEntity additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_field.py b/rootly_sdk/models/catalog_field.py index 3a6dcf40..914f85eb 100644 --- a/rootly_sdk/models/catalog_field.py +++ b/rootly_sdk/models/catalog_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -15,30 +17,30 @@ class CatalogField: """ Attributes: - catalog_id (Union[None, str]): + catalog_id (None | str): name (str): kind (CatalogFieldKind): multiple (bool): Whether the attribute accepts multiple values. - position (Union[None, int]): Default position of the item when displayed in a list. + position (int | None): Default position of the item when displayed in a list. created_at (str): updated_at (str): - slug (Union[Unset, str]): - kind_catalog_id (Union[None, Unset, str]): Restricts values to items of specified catalog. - required (Union[Unset, bool]): Whether the field is required. - catalog_type (Union[Unset, CatalogFieldCatalogType]): The type of catalog the field belongs to. + slug (str | Unset): + kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. + required (bool | Unset): Whether the field is required. + catalog_type (CatalogFieldCatalogType | Unset): The type of catalog the field belongs to. """ catalog_id: None | str name: str kind: CatalogFieldKind multiple: bool - position: None | int + position: int | None created_at: str updated_at: str - slug: Unset | str = UNSET - kind_catalog_id: None | Unset | str = UNSET - required: Unset | bool = UNSET - catalog_type: Unset | CatalogFieldCatalogType = UNSET + slug: str | Unset = UNSET + kind_catalog_id: None | str | Unset = UNSET + required: bool | Unset = UNSET + catalog_type: CatalogFieldCatalogType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: multiple = self.multiple - position: None | int + position: int | None position = self.position created_at = self.created_at @@ -60,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - kind_catalog_id: None | Unset | str + kind_catalog_id: None | str | Unset if isinstance(self.kind_catalog_id, Unset): kind_catalog_id = UNSET else: @@ -68,7 +70,7 @@ def to_dict(self) -> dict[str, Any]: required = self.required - catalog_type: Unset | str = UNSET + catalog_type: str | Unset = UNSET if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type @@ -113,10 +115,10 @@ def _parse_catalog_id(data: object) -> None | str: multiple = d.pop("multiple") - def _parse_position(data: object) -> None | int: + def _parse_position(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) position = _parse_position(d.pop("position")) @@ -126,19 +128,19 @@ def _parse_position(data: object) -> None | int: slug = d.pop("slug", UNSET) - def _parse_kind_catalog_id(data: object) -> None | Unset | str: + def _parse_kind_catalog_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kind_catalog_id = _parse_kind_catalog_id(d.pop("kind_catalog_id", UNSET)) required = d.pop("required", UNSET) _catalog_type = d.pop("catalog_type", UNSET) - catalog_type: Unset | CatalogFieldCatalogType + catalog_type: CatalogFieldCatalogType | Unset if isinstance(_catalog_type, Unset): catalog_type = UNSET else: diff --git a/rootly_sdk/models/catalog_field_list.py b/rootly_sdk/models/catalog_field_list.py index 6bb6fa2b..10bfa106 100644 --- a/rootly_sdk/models/catalog_field_list.py +++ b/rootly_sdk/models/catalog_field_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CatalogFieldList: """ Attributes: - data (list['CatalogFieldListDataItem']): + data (list[CatalogFieldListDataItem]): links (Links): meta (Meta): """ - data: list["CatalogFieldListDataItem"] - links: "Links" - meta: "Meta" + data: list[CatalogFieldListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_field_list_data_item.py b/rootly_sdk/models/catalog_field_list_data_item.py index 744cc909..b5ed471d 100644 --- a/rootly_sdk/models/catalog_field_list_data_item.py +++ b/rootly_sdk/models/catalog_field_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CatalogFieldListDataItem: id: str type_: CatalogFieldListDataItemType - attributes: "CatalogField" + attributes: CatalogField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_field_list_data_item_type.py b/rootly_sdk/models/catalog_field_list_data_item_type.py index 132d1541..405e0401 100644 --- a/rootly_sdk/models/catalog_field_list_data_item_type.py +++ b/rootly_sdk/models/catalog_field_list_data_item_type.py @@ -1,9 +1,9 @@ from typing import Literal, cast -CatalogFieldListDataItemType = Literal["catalog_fields"] +CatalogFieldListDataItemType = Literal["catalog_properties"] CATALOG_FIELD_LIST_DATA_ITEM_TYPE_VALUES: set[CatalogFieldListDataItemType] = { - "catalog_fields", + "catalog_properties", } diff --git a/rootly_sdk/models/catalog_field_response.py b/rootly_sdk/models/catalog_field_response.py index bd866512..a4811f5a 100644 --- a/rootly_sdk/models/catalog_field_response.py +++ b/rootly_sdk/models/catalog_field_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CatalogFieldResponse: data (CatalogFieldResponseData): """ - data: "CatalogFieldResponseData" + data: CatalogFieldResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_field_response_data.py b/rootly_sdk/models/catalog_field_response_data.py index 21e16252..fcec088c 100644 --- a/rootly_sdk/models/catalog_field_response_data.py +++ b/rootly_sdk/models/catalog_field_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CatalogFieldResponseData: id: str type_: CatalogFieldResponseDataType - attributes: "CatalogField" + attributes: CatalogField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_field_response_data_type.py b/rootly_sdk/models/catalog_field_response_data_type.py index 43ccf868..e60413d4 100644 --- a/rootly_sdk/models/catalog_field_response_data_type.py +++ b/rootly_sdk/models/catalog_field_response_data_type.py @@ -1,9 +1,9 @@ from typing import Literal, cast -CatalogFieldResponseDataType = Literal["catalog_fields"] +CatalogFieldResponseDataType = Literal["catalog_properties"] CATALOG_FIELD_RESPONSE_DATA_TYPE_VALUES: set[CatalogFieldResponseDataType] = { - "catalog_fields", + "catalog_properties", } diff --git a/rootly_sdk/models/catalog_list.py b/rootly_sdk/models/catalog_list.py index 715730ea..9abab448 100644 --- a/rootly_sdk/models/catalog_list.py +++ b/rootly_sdk/models/catalog_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CatalogList: """ Attributes: - data (list['CatalogListDataItem']): + data (list[CatalogListDataItem]): links (Links): meta (Meta): """ - data: list["CatalogListDataItem"] - links: "Links" - meta: "Meta" + data: list[CatalogListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_list_data_item.py b/rootly_sdk/models/catalog_list_data_item.py index 7c497c89..64ef65d2 100644 --- a/rootly_sdk/models/catalog_list_data_item.py +++ b/rootly_sdk/models/catalog_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CatalogListDataItem: id: str type_: CatalogListDataItemType - attributes: "Catalog" + attributes: Catalog additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_property.py b/rootly_sdk/models/catalog_property.py new file mode 100644 index 00000000..9d363915 --- /dev/null +++ b/rootly_sdk/models/catalog_property.py @@ -0,0 +1,180 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_property_catalog_type import CatalogPropertyCatalogType, check_catalog_property_catalog_type +from ..models.catalog_property_kind import CatalogPropertyKind, check_catalog_property_kind +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CatalogProperty") + + +@_attrs_define +class CatalogProperty: + """ + Attributes: + catalog_id (None | str): + name (str): + kind (CatalogPropertyKind): + multiple (bool): Whether the attribute accepts multiple values. + position (int | None): Default position of the item when displayed in a list. + created_at (str): + updated_at (str): + slug (str | Unset): + kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. + required (bool | Unset): Whether the property is required. + catalog_type (CatalogPropertyCatalogType | Unset): The type of catalog the property belongs to. + """ + + catalog_id: None | str + name: str + kind: CatalogPropertyKind + multiple: bool + position: int | None + created_at: str + updated_at: str + slug: str | Unset = UNSET + kind_catalog_id: None | str | Unset = UNSET + required: bool | Unset = UNSET + catalog_type: CatalogPropertyCatalogType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_id: None | str + catalog_id = self.catalog_id + + name = self.name + + kind: str = self.kind + + multiple = self.multiple + + position: int | None + position = self.position + + created_at = self.created_at + + updated_at = self.updated_at + + slug = self.slug + + kind_catalog_id: None | str | Unset + if isinstance(self.kind_catalog_id, Unset): + kind_catalog_id = UNSET + else: + kind_catalog_id = self.kind_catalog_id + + required = self.required + + catalog_type: str | Unset = UNSET + if not isinstance(self.catalog_type, Unset): + catalog_type = self.catalog_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_id": catalog_id, + "name": name, + "kind": kind, + "multiple": multiple, + "position": position, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if slug is not UNSET: + field_dict["slug"] = slug + if kind_catalog_id is not UNSET: + field_dict["kind_catalog_id"] = kind_catalog_id + if required is not UNSET: + field_dict["required"] = required + if catalog_type is not UNSET: + field_dict["catalog_type"] = catalog_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_catalog_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + catalog_id = _parse_catalog_id(d.pop("catalog_id")) + + name = d.pop("name") + + kind = check_catalog_property_kind(d.pop("kind")) + + multiple = d.pop("multiple") + + def _parse_position(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + position = _parse_position(d.pop("position")) + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + slug = d.pop("slug", UNSET) + + def _parse_kind_catalog_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kind_catalog_id = _parse_kind_catalog_id(d.pop("kind_catalog_id", UNSET)) + + required = d.pop("required", UNSET) + + _catalog_type = d.pop("catalog_type", UNSET) + catalog_type: CatalogPropertyCatalogType | Unset + if isinstance(_catalog_type, Unset): + catalog_type = UNSET + else: + catalog_type = check_catalog_property_catalog_type(_catalog_type) + + catalog_property = cls( + catalog_id=catalog_id, + name=name, + kind=kind, + multiple=multiple, + position=position, + created_at=created_at, + updated_at=updated_at, + slug=slug, + kind_catalog_id=kind_catalog_id, + required=required, + catalog_type=catalog_type, + ) + + catalog_property.additional_properties = d + return catalog_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_property_catalog_type.py b/rootly_sdk/models/catalog_property_catalog_type.py new file mode 100644 index 00000000..025e0b2c --- /dev/null +++ b/rootly_sdk/models/catalog_property_catalog_type.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +CatalogPropertyCatalogType = Literal[ + "catalog", "cause", "environment", "functionality", "incident_type", "service", "team" +] + +CATALOG_PROPERTY_CATALOG_TYPE_VALUES: set[CatalogPropertyCatalogType] = { + "catalog", + "cause", + "environment", + "functionality", + "incident_type", + "service", + "team", +} + + +def check_catalog_property_catalog_type(value: str | None) -> CatalogPropertyCatalogType | None: + if value is None: + return None + if value in CATALOG_PROPERTY_CATALOG_TYPE_VALUES: + return cast(CatalogPropertyCatalogType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_PROPERTY_CATALOG_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/catalog_property_kind.py b/rootly_sdk/models/catalog_property_kind.py new file mode 100644 index 00000000..862e1c8b --- /dev/null +++ b/rootly_sdk/models/catalog_property_kind.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +CatalogPropertyKind = Literal["reference", "text"] + +CATALOG_PROPERTY_KIND_VALUES: set[CatalogPropertyKind] = { + "reference", + "text", +} + + +def check_catalog_property_kind(value: str | None) -> CatalogPropertyKind | None: + if value is None: + return None + if value in CATALOG_PROPERTY_KIND_VALUES: + return cast(CatalogPropertyKind, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_PROPERTY_KIND_VALUES!r}") diff --git a/rootly_sdk/models/catalog_property_list.py b/rootly_sdk/models/catalog_property_list.py new file mode 100644 index 00000000..20ba1204 --- /dev/null +++ b/rootly_sdk/models/catalog_property_list.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem + from ..models.links import Links + from ..models.meta import Meta + + +T = TypeVar("T", bound="CatalogPropertyList") + + +@_attrs_define +class CatalogPropertyList: + """ + Attributes: + data (list[CatalogPropertyListDataItem]): + links (Links): + meta (Meta): + """ + + data: list[CatalogPropertyListDataItem] + links: Links + meta: Meta + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links = self.links.to_dict() + + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "links": links, + "meta": meta, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem + from ..models.links import Links + from ..models.meta import Meta + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = CatalogPropertyListDataItem.from_dict(data_item_data) + + data.append(data_item) + + links = Links.from_dict(d.pop("links")) + + meta = Meta.from_dict(d.pop("meta")) + + catalog_property_list = cls( + data=data, + links=links, + meta=meta, + ) + + catalog_property_list.additional_properties = d + return catalog_property_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_property_list_data_item.py b/rootly_sdk/models/catalog_property_list_data_item.py new file mode 100644 index 00000000..992dea68 --- /dev/null +++ b/rootly_sdk/models/catalog_property_list_data_item.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_property_list_data_item_type import ( + CatalogPropertyListDataItemType, + check_catalog_property_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.catalog_property import CatalogProperty + + +T = TypeVar("T", bound="CatalogPropertyListDataItem") + + +@_attrs_define +class CatalogPropertyListDataItem: + """ + Attributes: + id (str): Unique ID of the catalog_property + type_ (CatalogPropertyListDataItemType): + attributes (CatalogProperty): + """ + + id: str + type_: CatalogPropertyListDataItemType + attributes: CatalogProperty + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_property import CatalogProperty + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_catalog_property_list_data_item_type(d.pop("type")) + + attributes = CatalogProperty.from_dict(d.pop("attributes")) + + catalog_property_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_property_list_data_item.additional_properties = d + return catalog_property_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_property_list_data_item_type.py b/rootly_sdk/models/catalog_property_list_data_item_type.py new file mode 100644 index 00000000..6497458b --- /dev/null +++ b/rootly_sdk/models/catalog_property_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +CatalogPropertyListDataItemType = Literal["catalog_properties"] + +CATALOG_PROPERTY_LIST_DATA_ITEM_TYPE_VALUES: set[CatalogPropertyListDataItemType] = { + "catalog_properties", +} + + +def check_catalog_property_list_data_item_type(value: str | None) -> CatalogPropertyListDataItemType | None: + if value is None: + return None + if value in CATALOG_PROPERTY_LIST_DATA_ITEM_TYPE_VALUES: + return cast(CatalogPropertyListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_PROPERTY_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/service_fields_type_0_item.py b/rootly_sdk/models/catalog_property_response.py similarity index 59% rename from rootly_sdk/models/service_fields_type_0_item.py rename to rootly_sdk/models/catalog_property_response.py index 2447982c..c23b9039 100644 --- a/rootly_sdk/models/service_fields_type_0_item.py +++ b/rootly_sdk/models/catalog_property_response.py @@ -1,36 +1,36 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="ServiceFieldsType0Item") +if TYPE_CHECKING: + from ..models.catalog_property_response_data import CatalogPropertyResponseData -@_attrs_define -class ServiceFieldsType0Item: - """Set a value for a catalog field +T = TypeVar("T", bound="CatalogPropertyResponse") + +@_attrs_define +class CatalogPropertyResponse: + """ Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + data (CatalogPropertyResponseData): """ - catalog_field_id: str - value: str + data: CatalogPropertyResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id - - value = self.value + data = self.data.to_dict() field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, - "value": value, + "data": data, } ) @@ -38,18 +38,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + from ..models.catalog_property_response_data import CatalogPropertyResponseData - value = d.pop("value") + d = dict(src_dict) + data = CatalogPropertyResponseData.from_dict(d.pop("data")) - service_fields_type_0_item = cls( - catalog_field_id=catalog_field_id, - value=value, + catalog_property_response = cls( + data=data, ) - service_fields_type_0_item.additional_properties = d - return service_fields_type_0_item + catalog_property_response.additional_properties = d + return catalog_property_response @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/catalog_property_response_data.py b/rootly_sdk/models/catalog_property_response_data.py new file mode 100644 index 00000000..a5922b8d --- /dev/null +++ b/rootly_sdk/models/catalog_property_response_data.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.catalog_property_response_data_type import ( + CatalogPropertyResponseDataType, + check_catalog_property_response_data_type, +) + +if TYPE_CHECKING: + from ..models.catalog_property import CatalogProperty + + +T = TypeVar("T", bound="CatalogPropertyResponseData") + + +@_attrs_define +class CatalogPropertyResponseData: + """ + Attributes: + id (str): Unique ID of the catalog_property + type_ (CatalogPropertyResponseDataType): + attributes (CatalogProperty): + """ + + id: str + type_: CatalogPropertyResponseDataType + attributes: CatalogProperty + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.catalog_property import CatalogProperty + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_catalog_property_response_data_type(d.pop("type")) + + attributes = CatalogProperty.from_dict(d.pop("attributes")) + + catalog_property_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + catalog_property_response_data.additional_properties = d + return catalog_property_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/catalog_property_response_data_type.py b/rootly_sdk/models/catalog_property_response_data_type.py new file mode 100644 index 00000000..9a7984c7 --- /dev/null +++ b/rootly_sdk/models/catalog_property_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +CatalogPropertyResponseDataType = Literal["catalog_properties"] + +CATALOG_PROPERTY_RESPONSE_DATA_TYPE_VALUES: set[CatalogPropertyResponseDataType] = { + "catalog_properties", +} + + +def check_catalog_property_response_data_type(value: str | None) -> CatalogPropertyResponseDataType | None: + if value is None: + return None + if value in CATALOG_PROPERTY_RESPONSE_DATA_TYPE_VALUES: + return cast(CatalogPropertyResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_PROPERTY_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/catalog_response.py b/rootly_sdk/models/catalog_response.py index 8d9638a0..9e034c2d 100644 --- a/rootly_sdk/models/catalog_response.py +++ b/rootly_sdk/models/catalog_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CatalogResponse: data (CatalogResponseData): """ - data: "CatalogResponseData" + data: CatalogResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/catalog_response_data.py b/rootly_sdk/models/catalog_response_data.py index 84cb45e7..d4be5b4b 100644 --- a/rootly_sdk/models/catalog_response_data.py +++ b/rootly_sdk/models/catalog_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CatalogResponseData: id: str type_: CatalogResponseDataType - attributes: "Catalog" + attributes: Catalog additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/cause.py b/rootly_sdk/models/cause.py index 0422639e..cdb7a08c 100644 --- a/rootly_sdk/models/cause.py +++ b/rootly_sdk/models/cause.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -7,7 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.cause_fields_item import CauseFieldsItem + from ..models.cause_properties_item import CausePropertiesItem T = TypeVar("T", bound="Cause") @@ -20,19 +22,19 @@ class Cause: name (str): The name of the cause created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the cause - description (Union[None, Unset, str]): The description of the cause - position (Union[None, Unset, int]): Position of the cause - fields (Union[Unset, list['CauseFieldsItem']]): Array of field values for this cause. + slug (str | Unset): The slug of the cause + description (None | str | Unset): The description of the cause + position (int | None | Unset): Position of the cause + properties (list[CausePropertiesItem] | Unset): Array of property values for this cause. """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - fields: Unset | list["CauseFieldsItem"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + properties: list[CausePropertiesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,24 +46,24 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -78,14 +80,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.cause_fields_item import CauseFieldsItem + from ..models.cause_properties_item import CausePropertiesItem d = dict(src_dict) name = d.pop("name") @@ -96,30 +98,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = CauseFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[CausePropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = CausePropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) cause = cls( name=name, @@ -128,7 +132,7 @@ def _parse_position(data: object) -> None | Unset | int: slug=slug, description=description, position=position, - fields=fields, + properties=properties, ) cause.additional_properties = d diff --git a/rootly_sdk/models/cause_list.py b/rootly_sdk/models/cause_list.py index b34616ad..e408bb35 100644 --- a/rootly_sdk/models/cause_list.py +++ b/rootly_sdk/models/cause_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CauseList: """ Attributes: - data (list['CauseListDataItem']): + data (list[CauseListDataItem]): links (Links): meta (Meta): """ - data: list["CauseListDataItem"] - links: "Links" - meta: "Meta" + data: list[CauseListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/cause_list_data_item.py b/rootly_sdk/models/cause_list_data_item.py index be1f6faa..56624359 100644 --- a/rootly_sdk/models/cause_list_data_item.py +++ b/rootly_sdk/models/cause_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CauseListDataItem: id: str type_: CauseListDataItemType - attributes: "Cause" + attributes: Cause additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/environment_fields_type_0_item.py b/rootly_sdk/models/cause_properties_item.py similarity index 66% rename from rootly_sdk/models/environment_fields_type_0_item.py rename to rootly_sdk/models/cause_properties_item.py index 0bb6530d..ada1e890 100644 --- a/rootly_sdk/models/environment_fields_type_0_item.py +++ b/rootly_sdk/models/cause_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="EnvironmentFieldsType0Item") +T = TypeVar("T", bound="CausePropertiesItem") @_attrs_define -class EnvironmentFieldsType0Item: - """Set a value for a catalog field +class CausePropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - environment_fields_type_0_item = cls( - catalog_field_id=catalog_field_id, + cause_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - environment_fields_type_0_item.additional_properties = d - return environment_fields_type_0_item + cause_properties_item.additional_properties = d + return cause_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/cause_response.py b/rootly_sdk/models/cause_response.py index 724fb414..88e8eda4 100644 --- a/rootly_sdk/models/cause_response.py +++ b/rootly_sdk/models/cause_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CauseResponse: data (CauseResponseData): """ - data: "CauseResponseData" + data: CauseResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/cause_response_data.py b/rootly_sdk/models/cause_response_data.py index 474e138f..6249d136 100644 --- a/rootly_sdk/models/cause_response_data.py +++ b/rootly_sdk/models/cause_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CauseResponseData: id: str type_: CauseResponseDataType - attributes: "Cause" + attributes: Cause additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/change_slack_channel_privacy_task_params.py b/rootly_sdk/models/change_slack_channel_privacy_task_params.py index 2733e3dd..f812ce4b 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,23 +28,23 @@ class ChangeSlackChannelPrivacyTaskParams: """ Attributes: privacy (ChangeSlackChannelPrivacyTaskParamsPrivacy): - task_type (Union[Unset, ChangeSlackChannelPrivacyTaskParamsTaskType]): - channel (Union[Unset, ChangeSlackChannelPrivacyTaskParamsChannel]): + task_type (ChangeSlackChannelPrivacyTaskParamsTaskType | Unset): + channel (ChangeSlackChannelPrivacyTaskParamsChannel | Unset): """ privacy: ChangeSlackChannelPrivacyTaskParamsPrivacy - task_type: Unset | ChangeSlackChannelPrivacyTaskParamsTaskType = UNSET - channel: Union[Unset, "ChangeSlackChannelPrivacyTaskParamsChannel"] = UNSET + task_type: ChangeSlackChannelPrivacyTaskParamsTaskType | Unset = UNSET + channel: ChangeSlackChannelPrivacyTaskParamsChannel | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: privacy: str = self.privacy - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - channel: Unset | dict[str, Any] = UNSET + channel: dict[str, Any] | Unset = UNSET if not isinstance(self.channel, Unset): channel = self.channel.to_dict() @@ -68,14 +70,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: privacy = check_change_slack_channel_privacy_task_params_privacy(d.pop("privacy")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | ChangeSlackChannelPrivacyTaskParamsTaskType + task_type: ChangeSlackChannelPrivacyTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_change_slack_channel_privacy_task_params_task_type(_task_type) _channel = d.pop("channel", UNSET) - channel: Unset | ChangeSlackChannelPrivacyTaskParamsChannel + channel: ChangeSlackChannelPrivacyTaskParamsChannel | Unset if isinstance(_channel, Unset): channel = UNSET else: diff --git a/rootly_sdk/models/change_slack_channel_privacy_task_params_channel.py b/rootly_sdk/models/change_slack_channel_privacy_task_params_channel.py index 4457d494..1dd7d904 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params_channel.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params_channel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class ChangeSlackChannelPrivacyTaskParamsChannel: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_group.py b/rootly_sdk/models/communications_group.py index 5c8f0903..1c187a2a 100644 --- a/rootly_sdk/models/communications_group.py +++ b/rootly_sdk/models/communications_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -34,14 +36,14 @@ class CommunicationsGroup: email_channel (bool): Email channel enabled created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the communications group - description (Union[None, Unset, str]): The description of the communications group - communication_group_conditions (Union[None, Unset, - list['CommunicationsGroupCommunicationGroupConditionsType0Item']]): Group conditions attributes - member_ids (Union[None, Unset, list[int]]): Array of member user IDs - slack_channel_ids (Union[None, Unset, list[str]]): Array of Slack channel IDs - communication_external_group_members (Union[None, Unset, - list['CommunicationsGroupCommunicationExternalGroupMembersType0Item']]): External group members + slug (str | Unset): The slug of the communications group + description (None | str | Unset): The description of the communications group + communication_group_conditions (list[CommunicationsGroupCommunicationGroupConditionsType0Item] | None | Unset): + Group conditions attributes + member_ids (list[int] | None | Unset): Array of member user IDs + slack_channel_ids (list[str] | None | Unset): Array of Slack channel IDs + communication_external_group_members (list[CommunicationsGroupCommunicationExternalGroupMembersType0Item] | None + | Unset): External group members """ name: str @@ -52,15 +54,15 @@ class CommunicationsGroup: email_channel: bool created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - communication_group_conditions: None | Unset | list["CommunicationsGroupCommunicationGroupConditionsType0Item"] = ( + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + communication_group_conditions: list[CommunicationsGroupCommunicationGroupConditionsType0Item] | None | Unset = ( UNSET ) - member_ids: None | Unset | list[int] = UNSET - slack_channel_ids: None | Unset | list[str] = UNSET + member_ids: list[int] | None | Unset = UNSET + slack_channel_ids: list[str] | None | Unset = UNSET communication_external_group_members: ( - None | Unset | list["CommunicationsGroupCommunicationExternalGroupMembersType0Item"] + list[CommunicationsGroupCommunicationExternalGroupMembersType0Item] | None | Unset ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -83,13 +85,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - communication_group_conditions: None | Unset | list[dict[str, Any]] + communication_group_conditions: list[dict[str, Any]] | None | Unset if isinstance(self.communication_group_conditions, Unset): communication_group_conditions = UNSET elif isinstance(self.communication_group_conditions, list): @@ -101,7 +103,7 @@ def to_dict(self) -> dict[str, Any]: else: communication_group_conditions = self.communication_group_conditions - member_ids: None | Unset | list[int] + member_ids: list[int] | None | Unset if isinstance(self.member_ids, Unset): member_ids = UNSET elif isinstance(self.member_ids, list): @@ -110,7 +112,7 @@ def to_dict(self) -> dict[str, Any]: else: member_ids = self.member_ids - slack_channel_ids: None | Unset | list[str] + slack_channel_ids: list[str] | None | Unset if isinstance(self.slack_channel_ids, Unset): slack_channel_ids = UNSET elif isinstance(self.slack_channel_ids, list): @@ -119,7 +121,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channel_ids = self.slack_channel_ids - communication_external_group_members: None | Unset | list[dict[str, Any]] + communication_external_group_members: list[dict[str, Any]] | None | Unset if isinstance(self.communication_external_group_members, Unset): communication_external_group_members = UNSET elif isinstance(self.communication_external_group_members, list): @@ -190,18 +192,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) def _parse_communication_group_conditions( data: object, - ) -> None | Unset | list["CommunicationsGroupCommunicationGroupConditionsType0Item"]: + ) -> list[CommunicationsGroupCommunicationGroupConditionsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -221,15 +223,15 @@ def _parse_communication_group_conditions( communication_group_conditions_type_0.append(communication_group_conditions_type_0_item) return communication_group_conditions_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["CommunicationsGroupCommunicationGroupConditionsType0Item"], data) + return cast(list[CommunicationsGroupCommunicationGroupConditionsType0Item] | None | Unset, data) communication_group_conditions = _parse_communication_group_conditions( d.pop("communication_group_conditions", UNSET) ) - def _parse_member_ids(data: object) -> None | Unset | list[int]: + def _parse_member_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -240,13 +242,13 @@ def _parse_member_ids(data: object) -> None | Unset | list[int]: member_ids_type_0 = cast(list[int], data) return member_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) member_ids = _parse_member_ids(d.pop("member_ids", UNSET)) - def _parse_slack_channel_ids(data: object) -> None | Unset | list[str]: + def _parse_slack_channel_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -257,15 +259,15 @@ def _parse_slack_channel_ids(data: object) -> None | Unset | list[str]: slack_channel_ids_type_0 = cast(list[str], data) return slack_channel_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) slack_channel_ids = _parse_slack_channel_ids(d.pop("slack_channel_ids", UNSET)) def _parse_communication_external_group_members( data: object, - ) -> None | Unset | list["CommunicationsGroupCommunicationExternalGroupMembersType0Item"]: + ) -> list[CommunicationsGroupCommunicationExternalGroupMembersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -287,9 +289,9 @@ def _parse_communication_external_group_members( communication_external_group_members_type_0.append(communication_external_group_members_type_0_item) return communication_external_group_members_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["CommunicationsGroupCommunicationExternalGroupMembersType0Item"], data) + return cast(list[CommunicationsGroupCommunicationExternalGroupMembersType0Item] | None | Unset, data) communication_external_group_members = _parse_communication_external_group_members( d.pop("communication_external_group_members", UNSET) diff --git a/rootly_sdk/models/communications_group_communication_external_group_members_type_0_item.py b/rootly_sdk/models/communications_group_communication_external_group_members_type_0_item.py index 51c6093d..7edf9df3 100644 --- a/rootly_sdk/models/communications_group_communication_external_group_members_type_0_item.py +++ b/rootly_sdk/models/communications_group_communication_external_group_members_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,16 +15,16 @@ class CommunicationsGroupCommunicationExternalGroupMembersType0Item: """ Attributes: - id (Union[Unset, str]): ID of the external group member - name (Union[Unset, str]): Name of the external member - email (Union[Unset, str]): Email of the external member - phone_number (Union[Unset, str]): Phone number of the external member + id (str | Unset): ID of the external group member + name (str | Unset): Name of the external member + email (str | Unset): Email of the external member + phone_number (str | Unset): Phone number of the external member """ - id: Unset | str = UNSET - name: Unset | str = UNSET - email: Unset | str = UNSET - phone_number: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + email: str | Unset = UNSET + phone_number: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_group_communication_group_conditions_type_0_item.py b/rootly_sdk/models/communications_group_communication_group_conditions_type_0_item.py index 49c2521d..8f0cfd6e 100644 --- a/rootly_sdk/models/communications_group_communication_group_conditions_type_0_item.py +++ b/rootly_sdk/models/communications_group_communication_group_conditions_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,29 +19,28 @@ class CommunicationsGroupCommunicationGroupConditionsType0Item: """ Attributes: - property_type (Union[Unset, CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType]): Property - type - service_ids (Union[None, Unset, list[str]]): Array of service IDs - severity_ids (Union[None, Unset, list[str]]): Array of severity IDs - functionality_ids (Union[None, Unset, list[str]]): Array of functionality IDs - group_ids (Union[None, Unset, list[str]]): Array of group IDs - incident_type_ids (Union[None, Unset, list[str]]): Array of incident type IDs + property_type (CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType | Unset): Property type + service_ids (list[str] | None | Unset): Array of service IDs + severity_ids (list[str] | None | Unset): Array of severity IDs + functionality_ids (list[str] | None | Unset): Array of functionality IDs + group_ids (list[str] | None | Unset): Array of group IDs + incident_type_ids (list[str] | None | Unset): Array of incident type IDs """ - property_type: Unset | CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType = UNSET - service_ids: None | Unset | list[str] = UNSET - severity_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + property_type: CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - property_type: Unset | str = UNSET + property_type: str | Unset = UNSET if not isinstance(self.property_type, Unset): property_type = self.property_type - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -48,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -57,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -66,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -75,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -106,7 +107,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _property_type = d.pop("property_type", UNSET) - property_type: Unset | CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType + property_type: CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType | Unset if isinstance(_property_type, Unset): property_type = UNSET else: @@ -114,7 +115,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _property_type ) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -125,13 +126,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -142,13 +143,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -159,13 +160,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -176,13 +177,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -193,9 +194,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/communications_group_response.py b/rootly_sdk/models/communications_group_response.py index 5dc851c4..ba98fbdd 100644 --- a/rootly_sdk/models/communications_group_response.py +++ b/rootly_sdk/models/communications_group_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CommunicationsGroupResponse: data (CommunicationsGroupResponseData): """ - data: "CommunicationsGroupResponseData" + data: CommunicationsGroupResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_group_response_data.py b/rootly_sdk/models/communications_group_response_data.py index c2a3a20f..3b64c804 100644 --- a/rootly_sdk/models/communications_group_response_data.py +++ b/rootly_sdk/models/communications_group_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsGroupResponseData: id: str type_: CommunicationsGroupResponseDataType - attributes: "CommunicationsGroup" + attributes: CommunicationsGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_groups_response.py b/rootly_sdk/models/communications_groups_response.py index 1fabfeb0..64e7c7a3 100644 --- a/rootly_sdk/models/communications_groups_response.py +++ b/rootly_sdk/models/communications_groups_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class CommunicationsGroupsResponse: """ Attributes: - data (list['CommunicationsGroupsResponseDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[CommunicationsGroupsResponseDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["CommunicationsGroupsResponseDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[CommunicationsGroupsResponseDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/communications_groups_response_data_item.py b/rootly_sdk/models/communications_groups_response_data_item.py index 137cf52e..ee9f830d 100644 --- a/rootly_sdk/models/communications_groups_response_data_item.py +++ b/rootly_sdk/models/communications_groups_response_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsGroupsResponseDataItem: id: str type_: CommunicationsGroupsResponseDataItemType - attributes: "CommunicationsGroup" + attributes: CommunicationsGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_stage.py b/rootly_sdk/models/communications_stage.py index fadd1b8c..a32faca1 100644 --- a/rootly_sdk/models/communications_stage.py +++ b/rootly_sdk/models/communications_stage.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -14,25 +16,25 @@ class CommunicationsStage: """ Attributes: name (str): The name of the communications stage - position (Union[None, int]): Position of the communications stage + position (int | None): Position of the communications stage created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the communications stage - description (Union[None, Unset, str]): The description of the communications stage + slug (str | Unset): The slug of the communications stage + description (None | str | Unset): The description of the communications stage """ name: str - position: None | int + position: int | None created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - position: None | int + position: int | None position = self.position created_at = self.created_at @@ -41,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -69,10 +71,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_position(data: object) -> None | int: + def _parse_position(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) position = _parse_position(d.pop("position")) @@ -82,12 +84,12 @@ def _parse_position(data: object) -> None | int: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/communications_stage_response.py b/rootly_sdk/models/communications_stage_response.py index e0783ebe..b031c5b6 100644 --- a/rootly_sdk/models/communications_stage_response.py +++ b/rootly_sdk/models/communications_stage_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CommunicationsStageResponse: data (CommunicationsStageResponseData): """ - data: "CommunicationsStageResponseData" + data: CommunicationsStageResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_stage_response_data.py b/rootly_sdk/models/communications_stage_response_data.py index e1c9d1b4..4d7295dd 100644 --- a/rootly_sdk/models/communications_stage_response_data.py +++ b/rootly_sdk/models/communications_stage_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsStageResponseData: id: str type_: CommunicationsStageResponseDataType - attributes: "CommunicationsStage" + attributes: CommunicationsStage additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_stages_response.py b/rootly_sdk/models/communications_stages_response.py index 143bf0aa..2df29ea0 100644 --- a/rootly_sdk/models/communications_stages_response.py +++ b/rootly_sdk/models/communications_stages_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class CommunicationsStagesResponse: """ Attributes: - data (list['CommunicationsStagesResponseDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[CommunicationsStagesResponseDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["CommunicationsStagesResponseDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[CommunicationsStagesResponseDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/communications_stages_response_data_item.py b/rootly_sdk/models/communications_stages_response_data_item.py index 97a69037..f4cf324c 100644 --- a/rootly_sdk/models/communications_stages_response_data_item.py +++ b/rootly_sdk/models/communications_stages_response_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsStagesResponseDataItem: id: str type_: CommunicationsStagesResponseDataItemType - attributes: "CommunicationsStage" + attributes: CommunicationsStage additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_template.py b/rootly_sdk/models/communications_template.py index 1e892142..ec359696 100644 --- a/rootly_sdk/models/communications_template.py +++ b/rootly_sdk/models/communications_template.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,34 +23,34 @@ class CommunicationsTemplate: """ Attributes: name (str): The name of the communications template - position (Union[None, int]): Position of the communications template + position (int | None): Position of the communications template created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the communications template - description (Union[None, Unset, str]): The description of the communications template - communication_type_id (Union[Unset, str]): The communication type ID - communication_template_stages (Union[None, Unset, - list['CommunicationsTemplateCommunicationTemplateStagesType0Item']]): Communication template stages - communication_type (Union[Unset, CommunicationsTemplateCommunicationType]): + slug (str | Unset): The slug of the communications template + description (None | str | Unset): The description of the communications template + communication_type_id (str | Unset): The communication type ID + communication_template_stages (list[CommunicationsTemplateCommunicationTemplateStagesType0Item] | None | Unset): + Communication template stages + communication_type (CommunicationsTemplateCommunicationType | Unset): """ name: str - position: None | int + position: int | None created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - communication_type_id: Unset | str = UNSET - communication_template_stages: None | Unset | list["CommunicationsTemplateCommunicationTemplateStagesType0Item"] = ( + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + communication_type_id: str | Unset = UNSET + communication_template_stages: list[CommunicationsTemplateCommunicationTemplateStagesType0Item] | None | Unset = ( UNSET ) - communication_type: Union[Unset, "CommunicationsTemplateCommunicationType"] = UNSET + communication_type: CommunicationsTemplateCommunicationType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - position: None | int + position: int | None position = self.position created_at = self.created_at @@ -57,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -65,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: communication_type_id = self.communication_type_id - communication_template_stages: None | Unset | list[dict[str, Any]] + communication_template_stages: list[dict[str, Any]] | None | Unset if isinstance(self.communication_template_stages, Unset): communication_template_stages = UNSET elif isinstance(self.communication_template_stages, list): @@ -77,7 +79,7 @@ def to_dict(self) -> dict[str, Any]: else: communication_template_stages = self.communication_template_stages - communication_type: Unset | dict[str, Any] = UNSET + communication_type: dict[str, Any] | Unset = UNSET if not isinstance(self.communication_type, Unset): communication_type = self.communication_type.to_dict() @@ -114,10 +116,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_position(data: object) -> None | int: + def _parse_position(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) position = _parse_position(d.pop("position")) @@ -127,12 +129,12 @@ def _parse_position(data: object) -> None | int: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -140,7 +142,7 @@ def _parse_description(data: object) -> None | Unset | str: def _parse_communication_template_stages( data: object, - ) -> None | Unset | list["CommunicationsTemplateCommunicationTemplateStagesType0Item"]: + ) -> list[CommunicationsTemplateCommunicationTemplateStagesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -160,16 +162,16 @@ def _parse_communication_template_stages( communication_template_stages_type_0.append(communication_template_stages_type_0_item) return communication_template_stages_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["CommunicationsTemplateCommunicationTemplateStagesType0Item"], data) + return cast(list[CommunicationsTemplateCommunicationTemplateStagesType0Item] | None | Unset, data) communication_template_stages = _parse_communication_template_stages( d.pop("communication_template_stages", UNSET) ) _communication_type = d.pop("communication_type", UNSET) - communication_type: Unset | CommunicationsTemplateCommunicationType + communication_type: CommunicationsTemplateCommunicationType | Unset if isinstance(_communication_type, Unset): communication_type = UNSET else: diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py index 94f47d8b..08867b37 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class CommunicationsTemplateCommunicationTemplateStagesType0Item: """ Attributes: - data (Union[Unset, CommunicationsTemplateCommunicationTemplateStagesType0ItemData]): + data (CommunicationsTemplateCommunicationTemplateStagesType0ItemData | Unset): """ - data: Union[Unset, "CommunicationsTemplateCommunicationTemplateStagesType0ItemData"] = UNSET + data: CommunicationsTemplateCommunicationTemplateStagesType0ItemData | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -46,7 +48,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | CommunicationsTemplateCommunicationTemplateStagesType0ItemData + data: CommunicationsTemplateCommunicationTemplateStagesType0ItemData | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py index 318d79c6..8b36ddcb 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,24 +25,24 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemData: """ Attributes: - id (Union[Unset, str]): ID of the communication template stage - type_ (Union[Unset, CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType]): - attributes (Union[Unset, CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes]): + id (str | Unset): ID of the communication template stage + type_ (CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType | Unset): + attributes (CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes | Unset): """ - id: Unset | str = UNSET - type_: Unset | CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType = UNSET - attributes: Union[Unset, "CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes"] = UNSET + id: str | Unset = UNSET + type_: CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType | Unset = UNSET + attributes: CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -66,14 +68,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType + type_: CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_communications_template_communication_template_stages_type_0_item_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes + attributes: CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py index cabf8621..4f9dcc5b 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,52 +24,52 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes: """ Attributes: - email_body (Union[None, Unset, str]): Email body for the stage - email_subject (Union[None, Unset, str]): Email subject for the stage - slack_content (Union[None, Unset, str]): Slack content for the stage - sms_content (Union[None, Unset, str]): SMS content for the stage - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update - communication_stage (Union[Unset, - CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage]): - communication_template (Union[Unset, - CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate]): + email_body (None | str | Unset): Email body for the stage + email_subject (None | str | Unset): Email subject for the stage + slack_content (None | str | Unset): Slack content for the stage + sms_content (None | str | Unset): SMS content for the stage + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + communication_stage (CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage + | Unset): + communication_template + (CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate | Unset): """ - email_body: None | Unset | str = UNSET - email_subject: None | Unset | str = UNSET - slack_content: None | Unset | str = UNSET - sms_content: None | Unset | str = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET - communication_stage: Union[ - Unset, "CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage" - ] = UNSET - communication_template: Union[ - Unset, "CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate" - ] = UNSET + email_body: None | str | Unset = UNSET + email_subject: None | str | Unset = UNSET + slack_content: None | str | Unset = UNSET + sms_content: None | str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + communication_stage: ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage | Unset + ) = UNSET + communication_template: ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate | Unset + ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - email_body: None | Unset | str + email_body: None | str | Unset if isinstance(self.email_body, Unset): email_body = UNSET else: email_body = self.email_body - email_subject: None | Unset | str + email_subject: None | str | Unset if isinstance(self.email_subject, Unset): email_subject = UNSET else: email_subject = self.email_subject - slack_content: None | Unset | str + slack_content: None | str | Unset if isinstance(self.slack_content, Unset): slack_content = UNSET else: slack_content = self.slack_content - sms_content: None | Unset | str + sms_content: None | str | Unset if isinstance(self.sms_content, Unset): sms_content = UNSET else: @@ -77,11 +79,11 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - communication_stage: Unset | dict[str, Any] = UNSET + communication_stage: dict[str, Any] | Unset = UNSET if not isinstance(self.communication_stage, Unset): communication_stage = self.communication_stage.to_dict() - communication_template: Unset | dict[str, Any] = UNSET + communication_template: dict[str, Any] | Unset = UNSET if not isinstance(self.communication_template, Unset): communication_template = self.communication_template.to_dict() @@ -118,39 +120,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_email_body(data: object) -> None | Unset | str: + def _parse_email_body(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_body = _parse_email_body(d.pop("email_body", UNSET)) - def _parse_email_subject(data: object) -> None | Unset | str: + def _parse_email_subject(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_subject = _parse_email_subject(d.pop("email_subject", UNSET)) - def _parse_slack_content(data: object) -> None | Unset | str: + def _parse_slack_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_content = _parse_slack_content(d.pop("slack_content", UNSET)) - def _parse_sms_content(data: object) -> None | Unset | str: + def _parse_sms_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) sms_content = _parse_sms_content(d.pop("sms_content", UNSET)) @@ -160,7 +162,7 @@ def _parse_sms_content(data: object) -> None | Unset | str: _communication_stage = d.pop("communication_stage", UNSET) communication_stage: ( - Unset | CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage | Unset ) if isinstance(_communication_stage, Unset): communication_stage = UNSET @@ -173,7 +175,7 @@ def _parse_sms_content(data: object) -> None | Unset | str: _communication_template = d.pop("communication_template", UNSET) communication_template: ( - Unset | CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate | Unset ) if isinstance(_communication_template, Unset): communication_template = UNSET diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage.py index aa63f20b..9d3a2edc 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage: """ Attributes: - id (Union[Unset, str]): The communication stage ID - name (Union[Unset, str]): The communication stage name + id (str | Unset): The communication stage ID + name (str | Unset): The communication stage name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_template.py b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_template.py index b5b69095..b490ec24 100644 --- a/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_template.py +++ b/rootly_sdk/models/communications_template_communication_template_stages_type_0_item_data_attributes_communication_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate: """ Attributes: - id (Union[Unset, str]): The communication template ID - name (Union[Unset, str]): The communication template name + id (str | Unset): The communication template ID + name (str | Unset): The communication template name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_template_communication_type.py b/rootly_sdk/models/communications_template_communication_type.py index 48cfce89..c4b73f8c 100644 --- a/rootly_sdk/models/communications_template_communication_type.py +++ b/rootly_sdk/models/communications_template_communication_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CommunicationsTemplateCommunicationType: """ Attributes: - id (Union[Unset, str]): ID of the communication type - name (Union[Unset, str]): Name of the communication type + id (str | Unset): ID of the communication type + name (str | Unset): Name of the communication type """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_template_response.py b/rootly_sdk/models/communications_template_response.py index 4b6520ea..84eda97a 100644 --- a/rootly_sdk/models/communications_template_response.py +++ b/rootly_sdk/models/communications_template_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CommunicationsTemplateResponse: data (CommunicationsTemplateResponseData): """ - data: "CommunicationsTemplateResponseData" + data: CommunicationsTemplateResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_template_response_data.py b/rootly_sdk/models/communications_template_response_data.py index 26697651..0149545c 100644 --- a/rootly_sdk/models/communications_template_response_data.py +++ b/rootly_sdk/models/communications_template_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsTemplateResponseData: id: str type_: CommunicationsTemplateResponseDataType - attributes: "CommunicationsTemplate" + attributes: CommunicationsTemplate additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_templates_response.py b/rootly_sdk/models/communications_templates_response.py index c0e95e51..85397b27 100644 --- a/rootly_sdk/models/communications_templates_response.py +++ b/rootly_sdk/models/communications_templates_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class CommunicationsTemplatesResponse: """ Attributes: - data (list['CommunicationsTemplatesResponseDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[CommunicationsTemplatesResponseDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["CommunicationsTemplatesResponseDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[CommunicationsTemplatesResponseDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/communications_templates_response_data_item.py b/rootly_sdk/models/communications_templates_response_data_item.py index f3bcaee6..bc9e42bf 100644 --- a/rootly_sdk/models/communications_templates_response_data_item.py +++ b/rootly_sdk/models/communications_templates_response_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsTemplatesResponseDataItem: id: str type_: CommunicationsTemplatesResponseDataItemType - attributes: "CommunicationsTemplate" + attributes: CommunicationsTemplate additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_type.py b/rootly_sdk/models/communications_type.py index 4574bcae..0323e1ec 100644 --- a/rootly_sdk/models/communications_type.py +++ b/rootly_sdk/models/communications_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -14,12 +16,12 @@ class CommunicationsType: """ Attributes: name (str): The name of the communications type - color (Union[None, str]): The color of the communications type + color (None | str): The color of the communications type position (int): Position of the communications type created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the communications type - description (Union[None, Unset, str]): The description of the communications type + slug (str | Unset): The slug of the communications type + description (None | str | Unset): The description of the communications type """ name: str @@ -27,8 +29,8 @@ class CommunicationsType: position: int created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -45,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -89,12 +91,12 @@ def _parse_color(data: object) -> None | str: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/communications_type_response.py b/rootly_sdk/models/communications_type_response.py index 5c6e7b54..1da7911a 100644 --- a/rootly_sdk/models/communications_type_response.py +++ b/rootly_sdk/models/communications_type_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CommunicationsTypeResponse: data (CommunicationsTypeResponseData): """ - data: "CommunicationsTypeResponseData" + data: CommunicationsTypeResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_type_response_data.py b/rootly_sdk/models/communications_type_response_data.py index 9d97ff64..5d78c846 100644 --- a/rootly_sdk/models/communications_type_response_data.py +++ b/rootly_sdk/models/communications_type_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsTypeResponseData: id: str type_: CommunicationsTypeResponseDataType - attributes: "CommunicationsType" + attributes: CommunicationsType additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/communications_types_response.py b/rootly_sdk/models/communications_types_response.py index 63381ae3..699a6aac 100644 --- a/rootly_sdk/models/communications_types_response.py +++ b/rootly_sdk/models/communications_types_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class CommunicationsTypesResponse: """ Attributes: - data (list['CommunicationsTypesResponseDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[CommunicationsTypesResponseDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["CommunicationsTypesResponseDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[CommunicationsTypesResponseDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/communications_types_response_data_item.py b/rootly_sdk/models/communications_types_response_data_item.py index ad9a0474..22874284 100644 --- a/rootly_sdk/models/communications_types_response_data_item.py +++ b/rootly_sdk/models/communications_types_response_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CommunicationsTypesResponseDataItem: id: str type_: CommunicationsTypesResponseDataItemType - attributes: "CommunicationsType" + attributes: CommunicationsType additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_airtable_table_record_task_params.py b/rootly_sdk/models/create_airtable_table_record_task_params.py index 02aa62ba..e1277c8a 100644 --- a/rootly_sdk/models/create_airtable_table_record_task_params.py +++ b/rootly_sdk/models/create_airtable_table_record_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -24,15 +26,15 @@ class CreateAirtableTableRecordTaskParams: Attributes: base (CreateAirtableTableRecordTaskParamsBase): table (CreateAirtableTableRecordTaskParamsTable): - task_type (Union[Unset, CreateAirtableTableRecordTaskParamsTaskType]): - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateAirtableTableRecordTaskParamsTaskType | Unset): + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON """ - base: "CreateAirtableTableRecordTaskParamsBase" - table: "CreateAirtableTableRecordTaskParamsTable" - task_type: Unset | CreateAirtableTableRecordTaskParamsTaskType = UNSET - custom_fields_mapping: None | Unset | str = UNSET + base: CreateAirtableTableRecordTaskParamsBase + table: CreateAirtableTableRecordTaskParamsTable + task_type: CreateAirtableTableRecordTaskParamsTaskType | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,11 +42,11 @@ def to_dict(self) -> dict[str, Any]: table = self.table.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -76,18 +78,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: table = CreateAirtableTableRecordTaskParamsTable.from_dict(d.pop("table")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateAirtableTableRecordTaskParamsTaskType + task_type: CreateAirtableTableRecordTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_airtable_table_record_task_params_task_type(_task_type) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/create_airtable_table_record_task_params_base.py b/rootly_sdk/models/create_airtable_table_record_task_params_base.py index e4dac884..f8402d23 100644 --- a/rootly_sdk/models/create_airtable_table_record_task_params_base.py +++ b/rootly_sdk/models/create_airtable_table_record_task_params_base.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateAirtableTableRecordTaskParamsBase: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_airtable_table_record_task_params_table.py b/rootly_sdk/models/create_airtable_table_record_task_params_table.py index 77f8f3bb..dc5d3a10 100644 --- a/rootly_sdk/models/create_airtable_table_record_task_params_table.py +++ b/rootly_sdk/models/create_airtable_table_record_task_params_table.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateAirtableTableRecordTaskParamsTable: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_anthropic_chat_completion_task_params.py b/rootly_sdk/models/create_anthropic_chat_completion_task_params.py index f5c0ce04..c6b4f284 100644 --- a/rootly_sdk/models/create_anthropic_chat_completion_task_params.py +++ b/rootly_sdk/models/create_anthropic_chat_completion_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,14 +25,14 @@ class CreateAnthropicChatCompletionTaskParams: Attributes: model (CreateAnthropicChatCompletionTaskParamsModel): The Anthropic model. eg: claude-3-5-sonnet-20241022 prompt (str): The prompt to send to Anthropic - task_type (Union[Unset, CreateAnthropicChatCompletionTaskParamsTaskType]): - system_prompt (Union[Unset, str]): The system prompt to send to Anthropic (optional) + task_type (CreateAnthropicChatCompletionTaskParamsTaskType | Unset): + system_prompt (str | Unset): The system prompt to send to Anthropic (optional) """ - model: "CreateAnthropicChatCompletionTaskParamsModel" + model: CreateAnthropicChatCompletionTaskParamsModel prompt: str - task_type: Unset | CreateAnthropicChatCompletionTaskParamsTaskType = UNSET - system_prompt: Unset | str = UNSET + task_type: CreateAnthropicChatCompletionTaskParamsTaskType | Unset = UNSET + system_prompt: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: prompt = self.prompt - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -71,7 +73,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: prompt = d.pop("prompt") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateAnthropicChatCompletionTaskParamsTaskType + task_type: CreateAnthropicChatCompletionTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_anthropic_chat_completion_task_params_model.py b/rootly_sdk/models/create_anthropic_chat_completion_task_params_model.py index 9eeddadf..0d5723dd 100644 --- a/rootly_sdk/models/create_anthropic_chat_completion_task_params_model.py +++ b/rootly_sdk/models/create_anthropic_chat_completion_task_params_model.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateAnthropicChatCompletionTaskParamsModel: """The Anthropic model. eg: claude-3-5-sonnet-20241022 Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_asana_subtask_task_params.py b/rootly_sdk/models/create_asana_subtask_task_params.py index fc23a420..7e4076e8 100644 --- a/rootly_sdk/models/create_asana_subtask_task_params.py +++ b/rootly_sdk/models/create_asana_subtask_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -28,26 +30,26 @@ class CreateAsanaSubtaskTaskParams: parent_task_id (str): The parent task id title (str): The subtask title completion (CreateAsanaSubtaskTaskParamsCompletion): - task_type (Union[Unset, CreateAsanaSubtaskTaskParamsTaskType]): - notes (Union[Unset, str]): - assign_user_email (Union[Unset, str]): The assigned user's email - due_date (Union[Unset, str]): The due date - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateAsanaSubtaskTaskParamsTaskType | Unset): + notes (str | Unset): + assign_user_email (str | Unset): The assigned user's email + due_date (str | Unset): The due date + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - dependency_direction (Union[Unset, CreateAsanaSubtaskTaskParamsDependencyDirection]): Default: 'blocking'. - dependent_task_ids (Union[None, Unset, list[str]]): Dependent task ids. Supports liquid syntax + dependency_direction (CreateAsanaSubtaskTaskParamsDependencyDirection | Unset): Default: 'blocking'. + dependent_task_ids (list[str] | None | Unset): Dependent task ids. Supports liquid syntax """ parent_task_id: str title: str - completion: "CreateAsanaSubtaskTaskParamsCompletion" - task_type: Unset | CreateAsanaSubtaskTaskParamsTaskType = UNSET - notes: Unset | str = UNSET - assign_user_email: Unset | str = UNSET - due_date: Unset | str = UNSET - custom_fields_mapping: None | Unset | str = UNSET - dependency_direction: Unset | CreateAsanaSubtaskTaskParamsDependencyDirection = "blocking" - dependent_task_ids: None | Unset | list[str] = UNSET + completion: CreateAsanaSubtaskTaskParamsCompletion + task_type: CreateAsanaSubtaskTaskParamsTaskType | Unset = UNSET + notes: str | Unset = UNSET + assign_user_email: str | Unset = UNSET + due_date: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + dependency_direction: CreateAsanaSubtaskTaskParamsDependencyDirection | Unset = "blocking" + dependent_task_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -57,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -67,17 +69,17 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - dependency_direction: Unset | str = UNSET + dependency_direction: str | Unset = UNSET if not isinstance(self.dependency_direction, Unset): dependency_direction = self.dependency_direction - dependent_task_ids: None | Unset | list[str] + dependent_task_ids: list[str] | None | Unset if isinstance(self.dependent_task_ids, Unset): dependent_task_ids = UNSET elif isinstance(self.dependent_task_ids, list): @@ -124,7 +126,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = CreateAsanaSubtaskTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateAsanaSubtaskTaskParamsTaskType + task_type: CreateAsanaSubtaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -136,23 +138,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) _dependency_direction = d.pop("dependency_direction", UNSET) - dependency_direction: Unset | CreateAsanaSubtaskTaskParamsDependencyDirection + dependency_direction: CreateAsanaSubtaskTaskParamsDependencyDirection | Unset if isinstance(_dependency_direction, Unset): dependency_direction = UNSET else: dependency_direction = check_create_asana_subtask_task_params_dependency_direction(_dependency_direction) - def _parse_dependent_task_ids(data: object) -> None | Unset | list[str]: + def _parse_dependent_task_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -163,9 +165,9 @@ def _parse_dependent_task_ids(data: object) -> None | Unset | list[str]: dependent_task_ids_type_0 = cast(list[str], data) return dependent_task_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) dependent_task_ids = _parse_dependent_task_ids(d.pop("dependent_task_ids", UNSET)) diff --git a/rootly_sdk/models/create_asana_subtask_task_params_completion.py b/rootly_sdk/models/create_asana_subtask_task_params_completion.py index a4a99573..1bd94c1d 100644 --- a/rootly_sdk/models/create_asana_subtask_task_params_completion.py +++ b/rootly_sdk/models/create_asana_subtask_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateAsanaSubtaskTaskParamsCompletion: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_asana_task_task_params.py b/rootly_sdk/models/create_asana_task_task_params.py index cfb6cc5c..ca6f82fd 100644 --- a/rootly_sdk/models/create_asana_task_task_params.py +++ b/rootly_sdk/models/create_asana_task_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -28,30 +30,30 @@ class CreateAsanaTaskTaskParams: """ Attributes: workspace (CreateAsanaTaskTaskParamsWorkspace): - projects (list['CreateAsanaTaskTaskParamsProjectsItem']): + projects (list[CreateAsanaTaskTaskParamsProjectsItem]): title (str): The task title completion (CreateAsanaTaskTaskParamsCompletion): - task_type (Union[Unset, CreateAsanaTaskTaskParamsTaskType]): - notes (Union[Unset, str]): - assign_user_email (Union[Unset, str]): The assigned user's email - due_date (Union[Unset, str]): The due date - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateAsanaTaskTaskParamsTaskType | Unset): + notes (str | Unset): + assign_user_email (str | Unset): The assigned user's email + due_date (str | Unset): The due date + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - dependency_direction (Union[Unset, CreateAsanaTaskTaskParamsDependencyDirection]): Default: 'blocking'. - dependent_task_ids (Union[None, Unset, list[str]]): Dependent task ids. Supports liquid syntax + dependency_direction (CreateAsanaTaskTaskParamsDependencyDirection | Unset): Default: 'blocking'. + dependent_task_ids (list[str] | None | Unset): Dependent task ids. Supports liquid syntax """ - workspace: "CreateAsanaTaskTaskParamsWorkspace" - projects: list["CreateAsanaTaskTaskParamsProjectsItem"] + workspace: CreateAsanaTaskTaskParamsWorkspace + projects: list[CreateAsanaTaskTaskParamsProjectsItem] title: str - completion: "CreateAsanaTaskTaskParamsCompletion" - task_type: Unset | CreateAsanaTaskTaskParamsTaskType = UNSET - notes: Unset | str = UNSET - assign_user_email: Unset | str = UNSET - due_date: Unset | str = UNSET - custom_fields_mapping: None | Unset | str = UNSET - dependency_direction: Unset | CreateAsanaTaskTaskParamsDependencyDirection = "blocking" - dependent_task_ids: None | Unset | list[str] = UNSET + completion: CreateAsanaTaskTaskParamsCompletion + task_type: CreateAsanaTaskTaskParamsTaskType | Unset = UNSET + notes: str | Unset = UNSET + assign_user_email: str | Unset = UNSET + due_date: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + dependency_direction: CreateAsanaTaskTaskParamsDependencyDirection | Unset = "blocking" + dependent_task_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -66,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -76,17 +78,17 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - dependency_direction: Unset | str = UNSET + dependency_direction: str | Unset = UNSET if not isinstance(self.dependency_direction, Unset): dependency_direction = self.dependency_direction - dependent_task_ids: None | Unset | list[str] + dependent_task_ids: list[str] | None | Unset if isinstance(self.dependent_task_ids, Unset): dependent_task_ids = UNSET elif isinstance(self.dependent_task_ids, list): @@ -143,7 +145,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = CreateAsanaTaskTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateAsanaTaskTaskParamsTaskType + task_type: CreateAsanaTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -155,23 +157,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) _dependency_direction = d.pop("dependency_direction", UNSET) - dependency_direction: Unset | CreateAsanaTaskTaskParamsDependencyDirection + dependency_direction: CreateAsanaTaskTaskParamsDependencyDirection | Unset if isinstance(_dependency_direction, Unset): dependency_direction = UNSET else: dependency_direction = check_create_asana_task_task_params_dependency_direction(_dependency_direction) - def _parse_dependent_task_ids(data: object) -> None | Unset | list[str]: + def _parse_dependent_task_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -182,9 +184,9 @@ def _parse_dependent_task_ids(data: object) -> None | Unset | list[str]: dependent_task_ids_type_0 = cast(list[str], data) return dependent_task_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) dependent_task_ids = _parse_dependent_task_ids(d.pop("dependent_task_ids", UNSET)) diff --git a/rootly_sdk/models/create_asana_task_task_params_completion.py b/rootly_sdk/models/create_asana_task_task_params_completion.py index a64d8b2b..11ef1e82 100644 --- a/rootly_sdk/models/create_asana_task_task_params_completion.py +++ b/rootly_sdk/models/create_asana_task_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateAsanaTaskTaskParamsCompletion: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_asana_task_task_params_projects_item.py b/rootly_sdk/models/create_asana_task_task_params_projects_item.py index 88723252..41cafec6 100644 --- a/rootly_sdk/models/create_asana_task_task_params_projects_item.py +++ b/rootly_sdk/models/create_asana_task_task_params_projects_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateAsanaTaskTaskParamsProjectsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_asana_task_task_params_workspace.py b/rootly_sdk/models/create_asana_task_task_params_workspace.py index e21ea450..4359c902 100644 --- a/rootly_sdk/models/create_asana_task_task_params_workspace.py +++ b/rootly_sdk/models/create_asana_task_task_params_workspace.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateAsanaTaskTaskParamsWorkspace: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_clickup_task_task_params.py b/rootly_sdk/models/create_clickup_task_task_params.py index 86972848..346f7454 100644 --- a/rootly_sdk/models/create_clickup_task_task_params.py +++ b/rootly_sdk/models/create_clickup_task_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,31 +24,31 @@ class CreateClickupTaskTaskParams: """ Attributes: title (str): The task title - task_type (Union[Unset, CreateClickupTaskTaskParamsTaskType]): - description (Union[Unset, str]): The task description - tags (Union[Unset, str]): The task tags - priority (Union[Unset, CreateClickupTaskTaskParamsPriority]): The priority id and display name - due_date (Union[Unset, str]): The due date - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateClickupTaskTaskParamsTaskType | Unset): + description (str | Unset): The task description + tags (str | Unset): The task tags + priority (CreateClickupTaskTaskParamsPriority | Unset): The priority id and display name + due_date (str | Unset): The due date + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - task_payload (Union[None, Unset, str]): Additional ClickUp task attributes. Will be merged into whatever was + task_payload (None | str | Unset): Additional ClickUp task attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON """ title: str - task_type: Unset | CreateClickupTaskTaskParamsTaskType = UNSET - description: Unset | str = UNSET - tags: Unset | str = UNSET - priority: Union[Unset, "CreateClickupTaskTaskParamsPriority"] = UNSET - due_date: Unset | str = UNSET - custom_fields_mapping: None | Unset | str = UNSET - task_payload: None | Unset | str = UNSET + task_type: CreateClickupTaskTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + tags: str | Unset = UNSET + priority: CreateClickupTaskTaskParamsPriority | Unset = UNSET + due_date: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + task_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -54,19 +56,19 @@ def to_dict(self) -> dict[str, Any]: tags = self.tags - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() due_date = self.due_date - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - task_payload: None | Unset | str + task_payload: None | str | Unset if isinstance(self.task_payload, Unset): task_payload = UNSET else: @@ -104,7 +106,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateClickupTaskTaskParamsTaskType + task_type: CreateClickupTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -115,7 +117,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: tags = d.pop("tags", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | CreateClickupTaskTaskParamsPriority + priority: CreateClickupTaskTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: @@ -123,21 +125,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_task_payload(data: object) -> None | Unset | str: + def _parse_task_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) task_payload = _parse_task_payload(d.pop("task_payload", UNSET)) diff --git a/rootly_sdk/models/create_clickup_task_task_params_priority.py b/rootly_sdk/models/create_clickup_task_task_params_priority.py index 21c4a7c6..34e2271a 100644 --- a/rootly_sdk/models/create_clickup_task_task_params_priority.py +++ b/rootly_sdk/models/create_clickup_task_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateClickupTaskTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_coda_page_task_params.py b/rootly_sdk/models/create_coda_page_task_params.py index 6819d148..2579e2d2 100644 --- a/rootly_sdk/models/create_coda_page_task_params.py +++ b/rootly_sdk/models/create_coda_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,31 +25,31 @@ class CreateCodaPageTaskParams: """ Attributes: title (str): The Coda page title - task_type (Union[Unset, CreateCodaPageTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page, if desired - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. - subtitle (Union[Unset, str]): The Coda page subtitle - content (Union[Unset, str]): The Coda page content - template (Union[Unset, CreateCodaPageTaskParamsTemplate]): - folder_id (Union[Unset, str]): The Coda folder id - doc (Union[Unset, CreateCodaPageTaskParamsDoc]): The Coda doc object with id and name + task_type (CreateCodaPageTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating page, if desired + mark_post_mortem_as_published (bool | Unset): Default: True. + subtitle (str | Unset): The Coda page subtitle + content (str | Unset): The Coda page content + template (CreateCodaPageTaskParamsTemplate | Unset): + folder_id (str | Unset): The Coda folder id + doc (CreateCodaPageTaskParamsDoc | Unset): The Coda doc object with id and name """ title: str - task_type: Unset | CreateCodaPageTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True - subtitle: Unset | str = UNSET - content: Unset | str = UNSET - template: Union[Unset, "CreateCodaPageTaskParamsTemplate"] = UNSET - folder_id: Unset | str = UNSET - doc: Union[Unset, "CreateCodaPageTaskParamsDoc"] = UNSET + task_type: CreateCodaPageTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True + subtitle: str | Unset = UNSET + content: str | Unset = UNSET + template: CreateCodaPageTaskParamsTemplate | Unset = UNSET + folder_id: str | Unset = UNSET + doc: CreateCodaPageTaskParamsDoc | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -59,13 +61,13 @@ def to_dict(self) -> dict[str, Any]: content = self.content - template: Unset | dict[str, Any] = UNSET + template: dict[str, Any] | Unset = UNSET if not isinstance(self.template, Unset): template = self.template.to_dict() folder_id = self.folder_id - doc: Unset | dict[str, Any] = UNSET + doc: dict[str, Any] | Unset = UNSET if not isinstance(self.doc, Unset): doc = self.doc.to_dict() @@ -104,7 +106,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateCodaPageTaskParamsTaskType + task_type: CreateCodaPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -119,7 +121,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content", UNSET) _template = d.pop("template", UNSET) - template: Unset | CreateCodaPageTaskParamsTemplate + template: CreateCodaPageTaskParamsTemplate | Unset if isinstance(_template, Unset): template = UNSET else: @@ -128,7 +130,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: folder_id = d.pop("folder_id", UNSET) _doc = d.pop("doc", UNSET) - doc: Unset | CreateCodaPageTaskParamsDoc + doc: CreateCodaPageTaskParamsDoc | Unset if isinstance(_doc, Unset): doc = UNSET else: diff --git a/rootly_sdk/models/create_coda_page_task_params_doc.py b/rootly_sdk/models/create_coda_page_task_params_doc.py index ae70fa93..ea0354bb 100644 --- a/rootly_sdk/models/create_coda_page_task_params_doc.py +++ b/rootly_sdk/models/create_coda_page_task_params_doc.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateCodaPageTaskParamsDoc: """The Coda doc object with id and name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_coda_page_task_params_template.py b/rootly_sdk/models/create_coda_page_task_params_template.py index 54bfee21..b2b94318 100644 --- a/rootly_sdk/models/create_coda_page_task_params_template.py +++ b/rootly_sdk/models/create_coda_page_task_params_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateCodaPageTaskParamsTemplate: """ Attributes: - id (Union[Unset, str]): Combined doc_id/page_id in format 'doc_id/page_id' - name (Union[Unset, str]): + id (str | Unset): Combined doc_id/page_id in format 'doc_id/page_id' + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_confluence_page_task_params.py b/rootly_sdk/models/create_confluence_page_task_params.py index 8a555374..f7923c9e 100644 --- a/rootly_sdk/models/create_confluence_page_task_params.py +++ b/rootly_sdk/models/create_confluence_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,25 +28,25 @@ class CreateConfluencePageTaskParams: Attributes: space (CreateConfluencePageTaskParamsSpace): title (str): The page title - task_type (Union[Unset, CreateConfluencePageTaskParamsTaskType]): - integration (Union[Unset, CreateConfluencePageTaskParamsIntegration]): Specify integration id if you have more - than one Confluence instance - ancestor (Union[Unset, CreateConfluencePageTaskParamsAncestor]): - template (Union[Unset, CreateConfluencePageTaskParamsTemplate]): - content (Union[Unset, str]): The page content - post_mortem_template_id (Union[Unset, str]): The Retrospective template to use - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. + task_type (CreateConfluencePageTaskParamsTaskType | Unset): + integration (CreateConfluencePageTaskParamsIntegration | Unset): Specify integration id if you have more than + one Confluence instance + ancestor (CreateConfluencePageTaskParamsAncestor | Unset): + template (CreateConfluencePageTaskParamsTemplate | Unset): + content (str | Unset): The page content + post_mortem_template_id (str | Unset): The Retrospective template to use + mark_post_mortem_as_published (bool | Unset): Default: True. """ - space: "CreateConfluencePageTaskParamsSpace" + space: CreateConfluencePageTaskParamsSpace title: str - task_type: Unset | CreateConfluencePageTaskParamsTaskType = UNSET - integration: Union[Unset, "CreateConfluencePageTaskParamsIntegration"] = UNSET - ancestor: Union[Unset, "CreateConfluencePageTaskParamsAncestor"] = UNSET - template: Union[Unset, "CreateConfluencePageTaskParamsTemplate"] = UNSET - content: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True + task_type: CreateConfluencePageTaskParamsTaskType | Unset = UNSET + integration: CreateConfluencePageTaskParamsIntegration | Unset = UNSET + ancestor: CreateConfluencePageTaskParamsAncestor | Unset = UNSET + template: CreateConfluencePageTaskParamsTemplate | Unset = UNSET + content: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,19 +54,19 @@ def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - integration: Unset | dict[str, Any] = UNSET + integration: dict[str, Any] | Unset = UNSET if not isinstance(self.integration, Unset): integration = self.integration.to_dict() - ancestor: Unset | dict[str, Any] = UNSET + ancestor: dict[str, Any] | Unset = UNSET if not isinstance(self.ancestor, Unset): ancestor = self.ancestor.to_dict() - template: Unset | dict[str, Any] = UNSET + template: dict[str, Any] | Unset = UNSET if not isinstance(self.template, Unset): template = self.template.to_dict() @@ -112,28 +114,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateConfluencePageTaskParamsTaskType + task_type: CreateConfluencePageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_confluence_page_task_params_task_type(_task_type) _integration = d.pop("integration", UNSET) - integration: Unset | CreateConfluencePageTaskParamsIntegration + integration: CreateConfluencePageTaskParamsIntegration | Unset if isinstance(_integration, Unset): integration = UNSET else: integration = CreateConfluencePageTaskParamsIntegration.from_dict(_integration) _ancestor = d.pop("ancestor", UNSET) - ancestor: Unset | CreateConfluencePageTaskParamsAncestor + ancestor: CreateConfluencePageTaskParamsAncestor | Unset if isinstance(_ancestor, Unset): ancestor = UNSET else: ancestor = CreateConfluencePageTaskParamsAncestor.from_dict(_ancestor) _template = d.pop("template", UNSET) - template: Unset | CreateConfluencePageTaskParamsTemplate + template: CreateConfluencePageTaskParamsTemplate | Unset if isinstance(_template, Unset): template = UNSET else: diff --git a/rootly_sdk/models/create_confluence_page_task_params_ancestor.py b/rootly_sdk/models/create_confluence_page_task_params_ancestor.py index 42829d65..2ce7713b 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_ancestor.py +++ b/rootly_sdk/models/create_confluence_page_task_params_ancestor.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateConfluencePageTaskParamsAncestor: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_confluence_page_task_params_integration.py b/rootly_sdk/models/create_confluence_page_task_params_integration.py index 0479d651..8414aaf5 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_integration.py +++ b/rootly_sdk/models/create_confluence_page_task_params_integration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateConfluencePageTaskParamsIntegration: """Specify integration id if you have more than one Confluence instance Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_confluence_page_task_params_space.py b/rootly_sdk/models/create_confluence_page_task_params_space.py index 2e7b2651..a5ac23bd 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_space.py +++ b/rootly_sdk/models/create_confluence_page_task_params_space.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateConfluencePageTaskParamsSpace: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_confluence_page_task_params_template.py b/rootly_sdk/models/create_confluence_page_task_params_template.py index 4b7df4c3..3c78e534 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_template.py +++ b/rootly_sdk/models/create_confluence_page_task_params_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateConfluencePageTaskParamsTemplate: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_datadog_notebook_task_params.py b/rootly_sdk/models/create_datadog_notebook_task_params.py index bf7881c1..d765ca54 100644 --- a/rootly_sdk/models/create_datadog_notebook_task_params.py +++ b/rootly_sdk/models/create_datadog_notebook_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,20 +29,20 @@ class CreateDatadogNotebookTaskParams: Attributes: title (str): The notebook title kind (CreateDatadogNotebookTaskParamsKind): The notebook kind - task_type (Union[Unset, CreateDatadogNotebookTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating notebook, if desired - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. - template (Union[Unset, CreateDatadogNotebookTaskParamsTemplate]): - content (Union[Unset, str]): The notebook content + task_type (CreateDatadogNotebookTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating notebook, if desired + mark_post_mortem_as_published (bool | Unset): Default: True. + template (CreateDatadogNotebookTaskParamsTemplate | Unset): + content (str | Unset): The notebook content """ title: str kind: CreateDatadogNotebookTaskParamsKind - task_type: Unset | CreateDatadogNotebookTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True - template: Union[Unset, "CreateDatadogNotebookTaskParamsTemplate"] = UNSET - content: Unset | str = UNSET + task_type: CreateDatadogNotebookTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True + template: CreateDatadogNotebookTaskParamsTemplate | Unset = UNSET + content: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: kind: str = self.kind - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -56,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: mark_post_mortem_as_published = self.mark_post_mortem_as_published - template: Unset | dict[str, Any] = UNSET + template: dict[str, Any] | Unset = UNSET if not isinstance(self.template, Unset): template = self.template.to_dict() @@ -93,7 +95,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: kind = check_create_datadog_notebook_task_params_kind(d.pop("kind")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateDatadogNotebookTaskParamsTaskType + task_type: CreateDatadogNotebookTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -104,7 +106,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: mark_post_mortem_as_published = d.pop("mark_post_mortem_as_published", UNSET) _template = d.pop("template", UNSET) - template: Unset | CreateDatadogNotebookTaskParamsTemplate + template: CreateDatadogNotebookTaskParamsTemplate | Unset if isinstance(_template, Unset): template = UNSET else: diff --git a/rootly_sdk/models/create_datadog_notebook_task_params_template.py b/rootly_sdk/models/create_datadog_notebook_task_params_template.py index 7191fa50..1ba885b5 100644 --- a/rootly_sdk/models/create_datadog_notebook_task_params_template.py +++ b/rootly_sdk/models/create_datadog_notebook_task_params_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateDatadogNotebookTaskParamsTemplate: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_dropbox_paper_page_task_params.py b/rootly_sdk/models/create_dropbox_paper_page_task_params.py index 4fcdee63..ff1a1fdb 100644 --- a/rootly_sdk/models/create_dropbox_paper_page_task_params.py +++ b/rootly_sdk/models/create_dropbox_paper_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,27 +27,27 @@ class CreateDropboxPaperPageTaskParams: """ Attributes: title (str): The page task title - task_type (Union[Unset, CreateDropboxPaperPageTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page task, if desired - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. - content (Union[Unset, str]): The page content - namespace (Union[Unset, CreateDropboxPaperPageTaskParamsNamespace]): - parent_folder (Union[Unset, CreateDropboxPaperPageTaskParamsParentFolder]): + task_type (CreateDropboxPaperPageTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating page task, if desired + mark_post_mortem_as_published (bool | Unset): Default: True. + content (str | Unset): The page content + namespace (CreateDropboxPaperPageTaskParamsNamespace | Unset): + parent_folder (CreateDropboxPaperPageTaskParamsParentFolder | Unset): """ title: str - task_type: Unset | CreateDropboxPaperPageTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True - content: Unset | str = UNSET - namespace: Union[Unset, "CreateDropboxPaperPageTaskParamsNamespace"] = UNSET - parent_folder: Union[Unset, "CreateDropboxPaperPageTaskParamsParentFolder"] = UNSET + task_type: CreateDropboxPaperPageTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True + content: str | Unset = UNSET + namespace: CreateDropboxPaperPageTaskParamsNamespace | Unset = UNSET + parent_folder: CreateDropboxPaperPageTaskParamsParentFolder | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -55,11 +57,11 @@ def to_dict(self) -> dict[str, Any]: content = self.content - namespace: Unset | dict[str, Any] = UNSET + namespace: dict[str, Any] | Unset = UNSET if not isinstance(self.namespace, Unset): namespace = self.namespace.to_dict() - parent_folder: Unset | dict[str, Any] = UNSET + parent_folder: dict[str, Any] | Unset = UNSET if not isinstance(self.parent_folder, Unset): parent_folder = self.parent_folder.to_dict() @@ -96,7 +98,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateDropboxPaperPageTaskParamsTaskType + task_type: CreateDropboxPaperPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -109,14 +111,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content", UNSET) _namespace = d.pop("namespace", UNSET) - namespace: Unset | CreateDropboxPaperPageTaskParamsNamespace + namespace: CreateDropboxPaperPageTaskParamsNamespace | Unset if isinstance(_namespace, Unset): namespace = UNSET else: namespace = CreateDropboxPaperPageTaskParamsNamespace.from_dict(_namespace) _parent_folder = d.pop("parent_folder", UNSET) - parent_folder: Unset | CreateDropboxPaperPageTaskParamsParentFolder + parent_folder: CreateDropboxPaperPageTaskParamsParentFolder | Unset if isinstance(_parent_folder, Unset): parent_folder = UNSET else: diff --git a/rootly_sdk/models/create_dropbox_paper_page_task_params_namespace.py b/rootly_sdk/models/create_dropbox_paper_page_task_params_namespace.py index 93b1ef98..9a83f04b 100644 --- a/rootly_sdk/models/create_dropbox_paper_page_task_params_namespace.py +++ b/rootly_sdk/models/create_dropbox_paper_page_task_params_namespace.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateDropboxPaperPageTaskParamsNamespace: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_dropbox_paper_page_task_params_parent_folder.py b/rootly_sdk/models/create_dropbox_paper_page_task_params_parent_folder.py index ca4e271f..5c31099d 100644 --- a/rootly_sdk/models/create_dropbox_paper_page_task_params_parent_folder.py +++ b/rootly_sdk/models/create_dropbox_paper_page_task_params_parent_folder.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateDropboxPaperPageTaskParamsParentFolder: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_edge_connector_action_body.py b/rootly_sdk/models/create_edge_connector_action_body.py index b5e7af64..ed3410af 100644 --- a/rootly_sdk/models/create_edge_connector_action_body.py +++ b/rootly_sdk/models/create_edge_connector_action_body.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class CreateEdgeConnectorActionBody: """ Attributes: - action (Union[Unset, CreateEdgeConnectorActionBodyAction]): + action (CreateEdgeConnectorActionBodyAction | Unset): """ - action: Union[Unset, "CreateEdgeConnectorActionBodyAction"] = UNSET + action: CreateEdgeConnectorActionBodyAction | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - action: Unset | dict[str, Any] = UNSET + action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): action = self.action.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _action = d.pop("action", UNSET) - action: Unset | CreateEdgeConnectorActionBodyAction + action: CreateEdgeConnectorActionBodyAction | Unset if isinstance(_action, Unset): action = UNSET else: diff --git a/rootly_sdk/models/create_edge_connector_action_body_action.py b/rootly_sdk/models/create_edge_connector_action_body_action.py index 47bc8d5a..15620225 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,12 +25,12 @@ class CreateEdgeConnectorActionBodyAction: Attributes: name (str): Action name action_type (CreateEdgeConnectorActionBodyActionActionType): Action type - metadata (Union[Unset, CreateEdgeConnectorActionBodyActionMetadata]): + metadata (CreateEdgeConnectorActionBodyActionMetadata | Unset): """ name: str action_type: CreateEdgeConnectorActionBodyActionActionType - metadata: Union[Unset, "CreateEdgeConnectorActionBodyActionMetadata"] = UNSET + metadata: CreateEdgeConnectorActionBodyActionMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: action_type: str = self.action_type - metadata: Unset | dict[str, Any] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -65,7 +67,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_type = check_create_edge_connector_action_body_action_action_type(d.pop("action_type")) _metadata = d.pop("metadata", UNSET) - metadata: Unset | CreateEdgeConnectorActionBodyActionMetadata + metadata: CreateEdgeConnectorActionBodyActionMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py b/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py index e32305e3..b536dde0 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,14 +21,14 @@ class CreateEdgeConnectorActionBodyActionMetadata: """ Attributes: - description (Union[Unset, str]): - timeout (Union[Unset, int]): - parameters (Union[Unset, list['CreateEdgeConnectorActionBodyActionMetadataParametersItem']]): + description (str | Unset): + timeout (int | Unset): + parameters (list[CreateEdgeConnectorActionBodyActionMetadataParametersItem] | Unset): """ - description: Unset | str = UNSET - timeout: Unset | int = UNSET - parameters: Unset | list["CreateEdgeConnectorActionBodyActionMetadataParametersItem"] = UNSET + description: str | Unset = UNSET + timeout: int | Unset = UNSET + parameters: list[CreateEdgeConnectorActionBodyActionMetadataParametersItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: timeout = self.timeout - parameters: Unset | list[dict[str, Any]] = UNSET + parameters: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.parameters, Unset): parameters = [] for parameters_item_data in self.parameters: @@ -64,12 +66,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: timeout = d.pop("timeout", UNSET) - parameters = [] _parameters = d.pop("parameters", UNSET) - for parameters_item_data in _parameters or []: - parameters_item = CreateEdgeConnectorActionBodyActionMetadataParametersItem.from_dict(parameters_item_data) + parameters: list[CreateEdgeConnectorActionBodyActionMetadataParametersItem] | Unset = UNSET + if _parameters is not UNSET: + parameters = [] + for parameters_item_data in _parameters: + parameters_item = CreateEdgeConnectorActionBodyActionMetadataParametersItem.from_dict( + parameters_item_data + ) - parameters.append(parameters_item) + parameters.append(parameters_item) create_edge_connector_action_body_action_metadata = cls( description=description, diff --git a/rootly_sdk/models/create_edge_connector_action_body_action_metadata_parameters_item.py b/rootly_sdk/models/create_edge_connector_action_body_action_metadata_parameters_item.py index 8da7d329..f6694bc1 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action_metadata_parameters_item.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action_metadata_parameters_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,24 +19,24 @@ class CreateEdgeConnectorActionBodyActionMetadataParametersItem: """ Attributes: - name (Union[Unset, str]): - type_ (Union[Unset, CreateEdgeConnectorActionBodyActionMetadataParametersItemType]): - required (Union[Unset, bool]): - description (Union[Unset, str]): - options (Union[Unset, list[str]]): + name (str | Unset): + type_ (CreateEdgeConnectorActionBodyActionMetadataParametersItemType | Unset): + required (bool | Unset): + description (str | Unset): + options (list[str] | Unset): """ - name: Unset | str = UNSET - type_: Unset | CreateEdgeConnectorActionBodyActionMetadataParametersItemType = UNSET - required: Unset | bool = UNSET - description: Unset | str = UNSET - options: Unset | list[str] = UNSET + name: str | Unset = UNSET + type_: CreateEdgeConnectorActionBodyActionMetadataParametersItemType | Unset = UNSET + required: bool | Unset = UNSET + description: str | Unset = UNSET + options: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: description = self.description - options: Unset | list[str] = UNSET + options: list[str] | Unset = UNSET if not isinstance(self.options, Unset): options = self.options @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | CreateEdgeConnectorActionBodyActionMetadataParametersItemType + type_: CreateEdgeConnectorActionBodyActionMetadataParametersItemType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/create_edge_connector_body.py b/rootly_sdk/models/create_edge_connector_body.py index d0719ab5..bfe6de95 100644 --- a/rootly_sdk/models/create_edge_connector_body.py +++ b/rootly_sdk/models/create_edge_connector_body.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CreateEdgeConnectorBody: data (CreateEdgeConnectorBodyData): """ - data: "CreateEdgeConnectorBodyData" + data: CreateEdgeConnectorBodyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_edge_connector_body_data.py b/rootly_sdk/models/create_edge_connector_body_data.py index 744f7e51..77191b2b 100644 --- a/rootly_sdk/models/create_edge_connector_body_data.py +++ b/rootly_sdk/models/create_edge_connector_body_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class CreateEdgeConnectorBodyData: """ type_: CreateEdgeConnectorBodyDataType - attributes: "CreateEdgeConnectorBodyDataAttributes" + attributes: CreateEdgeConnectorBodyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_edge_connector_body_data_attributes.py b/rootly_sdk/models/create_edge_connector_body_data_attributes.py index 76bb9b5a..44b5844e 100644 --- a/rootly_sdk/models/create_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,15 +20,15 @@ class CreateEdgeConnectorBodyDataAttributes: """ Attributes: name (str): Connector name - description (Union[Unset, str]): Connector description - status (Union[Unset, CreateEdgeConnectorBodyDataAttributesStatus]): Connector status - subscriptions (Union[Unset, list[str]]): Array of event types to subscribe to + description (str | Unset): Connector description + status (CreateEdgeConnectorBodyDataAttributesStatus | Unset): Connector status + subscriptions (list[str] | Unset): Array of event types to subscribe to """ name: str - description: Unset | str = UNSET - status: Unset | CreateEdgeConnectorBodyDataAttributesStatus = UNSET - subscriptions: Unset | list[str] = UNSET + description: str | Unset = UNSET + status: CreateEdgeConnectorBodyDataAttributesStatus | Unset = UNSET + subscriptions: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,11 +36,11 @@ def to_dict(self) -> dict[str, Any]: description = self.description - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - subscriptions: Unset | list[str] = UNSET + subscriptions: list[str] | Unset = UNSET if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions @@ -66,7 +68,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _status = d.pop("status", UNSET) - status: Unset | CreateEdgeConnectorBodyDataAttributesStatus + status: CreateEdgeConnectorBodyDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/rootly_sdk/models/create_github_issue_task_params.py b/rootly_sdk/models/create_github_issue_task_params.py index a87e6000..d1a579e0 100644 --- a/rootly_sdk/models/create_github_issue_task_params.py +++ b/rootly_sdk/models/create_github_issue_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -11,6 +13,8 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.create_github_issue_task_params_issue_type import CreateGithubIssueTaskParamsIssueType + from ..models.create_github_issue_task_params_labels_item import CreateGithubIssueTaskParamsLabelsItem from ..models.create_github_issue_task_params_repository import CreateGithubIssueTaskParamsRepository @@ -23,14 +27,20 @@ class CreateGithubIssueTaskParams: Attributes: title (str): The issue title repository (CreateGithubIssueTaskParamsRepository): - task_type (Union[Unset, CreateGithubIssueTaskParamsTaskType]): - body (Union[Unset, str]): The issue body + task_type (CreateGithubIssueTaskParamsTaskType | Unset): + body (str | Unset): The issue body + labels (list[CreateGithubIssueTaskParamsLabelsItem] | Unset): The issue labels + issue_type (CreateGithubIssueTaskParamsIssueType | Unset): The issue type + parent_issue_number (None | str | Unset): The parent issue number for sub-issue linking """ title: str - repository: "CreateGithubIssueTaskParamsRepository" - task_type: Unset | CreateGithubIssueTaskParamsTaskType = UNSET - body: Unset | str = UNSET + repository: CreateGithubIssueTaskParamsRepository + task_type: CreateGithubIssueTaskParamsTaskType | Unset = UNSET + body: str | Unset = UNSET + labels: list[CreateGithubIssueTaskParamsLabelsItem] | Unset = UNSET + issue_type: CreateGithubIssueTaskParamsIssueType | Unset = UNSET + parent_issue_number: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,12 +48,29 @@ def to_dict(self) -> dict[str, Any]: repository = self.repository.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type body = self.body + labels: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.labels, Unset): + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + issue_type: dict[str, Any] | Unset = UNSET + if not isinstance(self.issue_type, Unset): + issue_type = self.issue_type.to_dict() + + parent_issue_number: None | str | Unset + if isinstance(self.parent_issue_number, Unset): + parent_issue_number = UNSET + else: + parent_issue_number = self.parent_issue_number + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,11 +83,19 @@ def to_dict(self) -> dict[str, Any]: field_dict["task_type"] = task_type if body is not UNSET: field_dict["body"] = body + if labels is not UNSET: + field_dict["labels"] = labels + if issue_type is not UNSET: + field_dict["issue_type"] = issue_type + if parent_issue_number is not UNSET: + field_dict["parent_issue_number"] = parent_issue_number return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_github_issue_task_params_issue_type import CreateGithubIssueTaskParamsIssueType + from ..models.create_github_issue_task_params_labels_item import CreateGithubIssueTaskParamsLabelsItem from ..models.create_github_issue_task_params_repository import CreateGithubIssueTaskParamsRepository d = dict(src_dict) @@ -69,7 +104,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: repository = CreateGithubIssueTaskParamsRepository.from_dict(d.pop("repository")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGithubIssueTaskParamsTaskType + task_type: CreateGithubIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -77,11 +112,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: body = d.pop("body", UNSET) + _labels = d.pop("labels", UNSET) + labels: list[CreateGithubIssueTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = CreateGithubIssueTaskParamsLabelsItem.from_dict(labels_item_data) + + labels.append(labels_item) + + _issue_type = d.pop("issue_type", UNSET) + issue_type: CreateGithubIssueTaskParamsIssueType | Unset + if isinstance(_issue_type, Unset): + issue_type = UNSET + else: + issue_type = CreateGithubIssueTaskParamsIssueType.from_dict(_issue_type) + + def _parse_parent_issue_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + parent_issue_number = _parse_parent_issue_number(d.pop("parent_issue_number", UNSET)) + create_github_issue_task_params = cls( title=title, repository=repository, task_type=task_type, body=body, + labels=labels, + issue_type=issue_type, + parent_issue_number=parent_issue_number, ) create_github_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/create_github_issue_task_params_issue_type.py b/rootly_sdk/models/create_github_issue_task_params_issue_type.py new file mode 100644 index 00000000..8dcdb1a0 --- /dev/null +++ b/rootly_sdk/models/create_github_issue_task_params_issue_type.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateGithubIssueTaskParamsIssueType") + + +@_attrs_define +class CreateGithubIssueTaskParamsIssueType: + """The issue type + + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_github_issue_task_params_issue_type = cls( + id=id, + name=name, + ) + + create_github_issue_task_params_issue_type.additional_properties = d + return create_github_issue_task_params_issue_type + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_github_issue_task_params_labels_item.py b/rootly_sdk/models/create_github_issue_task_params_labels_item.py new file mode 100644 index 00000000..ae8e2abb --- /dev/null +++ b/rootly_sdk/models/create_github_issue_task_params_labels_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateGithubIssueTaskParamsLabelsItem") + + +@_attrs_define +class CreateGithubIssueTaskParamsLabelsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_github_issue_task_params_labels_item = cls( + id=id, + name=name, + ) + + create_github_issue_task_params_labels_item.additional_properties = d + return create_github_issue_task_params_labels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_github_issue_task_params_repository.py b/rootly_sdk/models/create_github_issue_task_params_repository.py index 75501b1d..a46c14d5 100644 --- a/rootly_sdk/models/create_github_issue_task_params_repository.py +++ b/rootly_sdk/models/create_github_issue_task_params_repository.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGithubIssueTaskParamsRepository: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_gitlab_issue_task_params.py b/rootly_sdk/models/create_gitlab_issue_task_params.py index 4e19ef55..10502043 100644 --- a/rootly_sdk/models/create_gitlab_issue_task_params.py +++ b/rootly_sdk/models/create_gitlab_issue_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,20 +29,20 @@ class CreateGitlabIssueTaskParams: Attributes: title (str): The issue title repository (CreateGitlabIssueTaskParamsRepository): - task_type (Union[Unset, CreateGitlabIssueTaskParamsTaskType]): - issue_type (Union[Unset, CreateGitlabIssueTaskParamsIssueType]): The issue type - description (Union[Unset, str]): The issue description - labels (Union[Unset, str]): The issue labels - due_date (Union[Unset, str]): The due date + task_type (CreateGitlabIssueTaskParamsTaskType | Unset): + issue_type (CreateGitlabIssueTaskParamsIssueType | Unset): The issue type + description (str | Unset): The issue description + labels (str | Unset): The issue labels + due_date (str | Unset): The due date """ title: str - repository: "CreateGitlabIssueTaskParamsRepository" - task_type: Unset | CreateGitlabIssueTaskParamsTaskType = UNSET - issue_type: Unset | CreateGitlabIssueTaskParamsIssueType = UNSET - description: Unset | str = UNSET - labels: Unset | str = UNSET - due_date: Unset | str = UNSET + repository: CreateGitlabIssueTaskParamsRepository + task_type: CreateGitlabIssueTaskParamsTaskType | Unset = UNSET + issue_type: CreateGitlabIssueTaskParamsIssueType | Unset = UNSET + description: str | Unset = UNSET + labels: str | Unset = UNSET + due_date: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,11 +50,11 @@ def to_dict(self) -> dict[str, Any]: repository = self.repository.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - issue_type: Unset | str = UNSET + issue_type: str | Unset = UNSET if not isinstance(self.issue_type, Unset): issue_type = self.issue_type @@ -93,14 +95,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: repository = CreateGitlabIssueTaskParamsRepository.from_dict(d.pop("repository")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGitlabIssueTaskParamsTaskType + task_type: CreateGitlabIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_gitlab_issue_task_params_task_type(_task_type) _issue_type = d.pop("issue_type", UNSET) - issue_type: Unset | CreateGitlabIssueTaskParamsIssueType + issue_type: CreateGitlabIssueTaskParamsIssueType | Unset if isinstance(_issue_type, Unset): issue_type = UNSET else: diff --git a/rootly_sdk/models/create_gitlab_issue_task_params_repository.py b/rootly_sdk/models/create_gitlab_issue_task_params_repository.py index 5b377efe..4193b887 100644 --- a/rootly_sdk/models/create_gitlab_issue_task_params_repository.py +++ b/rootly_sdk/models/create_gitlab_issue_task_params_repository.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGitlabIssueTaskParamsRepository: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_go_to_meeting_task_params.py b/rootly_sdk/models/create_go_to_meeting_task_params.py index 5144ec0b..2b9b4c58 100644 --- a/rootly_sdk/models/create_go_to_meeting_task_params.py +++ b/rootly_sdk/models/create_go_to_meeting_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -28,34 +30,33 @@ class CreateGoToMeetingTaskParams: """ Attributes: subject (str): The meeting subject - task_type (Union[Unset, CreateGoToMeetingTaskParamsTaskType]): - conference_call_info (Union[Unset, CreateGoToMeetingTaskParamsConferenceCallInfo]): Default: 'voip'. Example: - voip. - password_required (Union[None, Unset, bool]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateGoToMeetingTaskParamsPostToSlackChannelsItem']]): + task_type (CreateGoToMeetingTaskParamsTaskType | Unset): + conference_call_info (CreateGoToMeetingTaskParamsConferenceCallInfo | Unset): Default: 'voip'. Example: voip. + password_required (bool | None | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateGoToMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ subject: str - task_type: Unset | CreateGoToMeetingTaskParamsTaskType = UNSET - conference_call_info: Unset | CreateGoToMeetingTaskParamsConferenceCallInfo = "voip" - password_required: None | Unset | bool = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateGoToMeetingTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateGoToMeetingTaskParamsTaskType | Unset = UNSET + conference_call_info: CreateGoToMeetingTaskParamsConferenceCallInfo | Unset = "voip" + password_required: bool | None | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateGoToMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: subject = self.subject - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - conference_call_info: Unset | str = UNSET + conference_call_info: str | Unset = UNSET if not isinstance(self.conference_call_info, Unset): conference_call_info = self.conference_call_info - password_required: None | Unset | bool + password_required: bool | None | Unset if isinstance(self.password_required, Unset): password_required = UNSET else: @@ -63,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -100,38 +101,40 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subject = d.pop("subject") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGoToMeetingTaskParamsTaskType + task_type: CreateGoToMeetingTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_go_to_meeting_task_params_task_type(_task_type) _conference_call_info = d.pop("conference_call_info", UNSET) - conference_call_info: Unset | CreateGoToMeetingTaskParamsConferenceCallInfo + conference_call_info: CreateGoToMeetingTaskParamsConferenceCallInfo | Unset if isinstance(_conference_call_info, Unset): conference_call_info = UNSET else: conference_call_info = check_create_go_to_meeting_task_params_conference_call_info(_conference_call_info) - def _parse_password_required(data: object) -> None | Unset | bool: + def _parse_password_required(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) password_required = _parse_password_required(d.pop("password_required", UNSET)) post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateGoToMeetingTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateGoToMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateGoToMeetingTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_go_to_meeting_task_params = cls( subject=subject, diff --git a/rootly_sdk/models/create_go_to_meeting_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_go_to_meeting_task_params_post_to_slack_channels_item.py index fdc0eebb..f666dea2 100644 --- a/rootly_sdk/models/create_go_to_meeting_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_go_to_meeting_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGoToMeetingTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_google_calendar_event_task_params.py b/rootly_sdk/models/create_google_calendar_event_task_params.py index fe8900b0..84ce97a8 100644 --- a/rootly_sdk/models/create_google_calendar_event_task_params.py +++ b/rootly_sdk/models/create_google_calendar_event_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -32,19 +34,19 @@ class CreateGoogleCalendarEventTaskParams: meeting_duration (str): Meeting duration in format like '1 hour', '30 minutes' Example: 1 hour. summary (str): The event summary description (str): The event description - task_type (Union[Unset, CreateGoogleCalendarEventTaskParamsTaskType]): - attendees (Union[Unset, list[str]]): Emails of attendees - time_zone (Union[None, Unset, str]): A valid IANA time zone name. - calendar_id (Union[None, Unset, str]): Default: 'primary'. - send_updates (Union[Unset, bool]): Send an email to the attendees notifying them of the event - can_guests_modify_event (Union[Unset, bool]): - can_guests_see_other_guests (Union[Unset, bool]): - can_guests_invite_others (Union[Unset, bool]): - exclude_weekends (Union[Unset, bool]): - conference_solution_key (Union[Unset, CreateGoogleCalendarEventTaskParamsConferenceSolutionKey]): Sets the video + task_type (CreateGoogleCalendarEventTaskParamsTaskType | Unset): + attendees (list[str] | Unset): Emails of attendees + time_zone (None | str | Unset): A valid IANA time zone name. + calendar_id (None | str | Unset): Default: 'primary'. + send_updates (bool | Unset): Send an email to the attendees notifying them of the event + can_guests_modify_event (bool | Unset): + can_guests_see_other_guests (bool | Unset): + can_guests_invite_others (bool | Unset): + exclude_weekends (bool | Unset): + conference_solution_key (CreateGoogleCalendarEventTaskParamsConferenceSolutionKey | Unset): Sets the video conference type attached to the meeting - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem']]): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem] | Unset): """ days_until_meeting: int @@ -52,18 +54,18 @@ class CreateGoogleCalendarEventTaskParams: meeting_duration: str summary: str description: str - task_type: Unset | CreateGoogleCalendarEventTaskParamsTaskType = UNSET - attendees: Unset | list[str] = UNSET - time_zone: None | Unset | str = UNSET - calendar_id: None | Unset | str = "primary" - send_updates: Unset | bool = UNSET - can_guests_modify_event: Unset | bool = UNSET - can_guests_see_other_guests: Unset | bool = UNSET - can_guests_invite_others: Unset | bool = UNSET - exclude_weekends: Unset | bool = UNSET - conference_solution_key: Unset | CreateGoogleCalendarEventTaskParamsConferenceSolutionKey = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateGoogleCalendarEventTaskParamsTaskType | Unset = UNSET + attendees: list[str] | Unset = UNSET + time_zone: None | str | Unset = UNSET + calendar_id: None | str | Unset = "primary" + send_updates: bool | Unset = UNSET + can_guests_modify_event: bool | Unset = UNSET + can_guests_see_other_guests: bool | Unset = UNSET + can_guests_invite_others: bool | Unset = UNSET + exclude_weekends: bool | Unset = UNSET + conference_solution_key: CreateGoogleCalendarEventTaskParamsConferenceSolutionKey | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -77,21 +79,21 @@ def to_dict(self) -> dict[str, Any]: description = self.description - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - attendees: Unset | list[str] = UNSET + attendees: list[str] | Unset = UNSET if not isinstance(self.attendees, Unset): attendees = self.attendees - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: time_zone = self.time_zone - calendar_id: None | Unset | str + calendar_id: None | str | Unset if isinstance(self.calendar_id, Unset): calendar_id = UNSET else: @@ -107,13 +109,13 @@ def to_dict(self) -> dict[str, Any]: exclude_weekends = self.exclude_weekends - conference_solution_key: Unset | str = UNSET + conference_solution_key: str | Unset = UNSET if not isinstance(self.conference_solution_key, Unset): conference_solution_key = self.conference_solution_key post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -176,7 +178,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGoogleCalendarEventTaskParamsTaskType + task_type: CreateGoogleCalendarEventTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -184,21 +186,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attendees = cast(list[str], d.pop("attendees", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) - def _parse_calendar_id(data: object) -> None | Unset | str: + def _parse_calendar_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) calendar_id = _parse_calendar_id(d.pop("calendar_id", UNSET)) @@ -213,7 +215,7 @@ def _parse_calendar_id(data: object) -> None | Unset | str: exclude_weekends = d.pop("exclude_weekends", UNSET) _conference_solution_key = d.pop("conference_solution_key", UNSET) - conference_solution_key: Unset | CreateGoogleCalendarEventTaskParamsConferenceSolutionKey + conference_solution_key: CreateGoogleCalendarEventTaskParamsConferenceSolutionKey | Unset if isinstance(_conference_solution_key, Unset): conference_solution_key = UNSET else: @@ -223,14 +225,16 @@ def _parse_calendar_id(data: object) -> None | Unset | str: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_google_calendar_event_task_params = cls( days_until_meeting=days_until_meeting, diff --git a/rootly_sdk/models/create_google_calendar_event_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_google_calendar_event_task_params_post_to_slack_channels_item.py index bd006c20..0720c337 100644 --- a/rootly_sdk/models/create_google_calendar_event_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_google_calendar_event_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_google_docs_page_task_params.py b/rootly_sdk/models/create_google_docs_page_task_params.py index 0dcebca1..3d993738 100644 --- a/rootly_sdk/models/create_google_docs_page_task_params.py +++ b/rootly_sdk/models/create_google_docs_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,31 +25,31 @@ class CreateGoogleDocsPageTaskParams: """ Attributes: title (str): The page title - task_type (Union[Unset, CreateGoogleDocsPageTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page, if desired - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. - drive (Union[Unset, CreateGoogleDocsPageTaskParamsDrive]): - parent_folder (Union[Unset, CreateGoogleDocsPageTaskParamsParentFolder]): - content (Union[Unset, str]): The page content - template_id (Union[Unset, str]): The Google Doc file ID to use as a template - permissions (Union[Unset, str]): Page permissions JSON + task_type (CreateGoogleDocsPageTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating page, if desired + mark_post_mortem_as_published (bool | Unset): Default: True. + drive (CreateGoogleDocsPageTaskParamsDrive | Unset): + parent_folder (CreateGoogleDocsPageTaskParamsParentFolder | Unset): + content (str | Unset): The page content + template_id (str | Unset): The Google Doc file ID to use as a template + permissions (str | Unset): Page permissions JSON """ title: str - task_type: Unset | CreateGoogleDocsPageTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True - drive: Union[Unset, "CreateGoogleDocsPageTaskParamsDrive"] = UNSET - parent_folder: Union[Unset, "CreateGoogleDocsPageTaskParamsParentFolder"] = UNSET - content: Unset | str = UNSET - template_id: Unset | str = UNSET - permissions: Unset | str = UNSET + task_type: CreateGoogleDocsPageTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True + drive: CreateGoogleDocsPageTaskParamsDrive | Unset = UNSET + parent_folder: CreateGoogleDocsPageTaskParamsParentFolder | Unset = UNSET + content: str | Unset = UNSET + template_id: str | Unset = UNSET + permissions: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -55,11 +57,11 @@ def to_dict(self) -> dict[str, Any]: mark_post_mortem_as_published = self.mark_post_mortem_as_published - drive: Unset | dict[str, Any] = UNSET + drive: dict[str, Any] | Unset = UNSET if not isinstance(self.drive, Unset): drive = self.drive.to_dict() - parent_folder: Unset | dict[str, Any] = UNSET + parent_folder: dict[str, Any] | Unset = UNSET if not isinstance(self.parent_folder, Unset): parent_folder = self.parent_folder.to_dict() @@ -106,7 +108,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGoogleDocsPageTaskParamsTaskType + task_type: CreateGoogleDocsPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -117,14 +119,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: mark_post_mortem_as_published = d.pop("mark_post_mortem_as_published", UNSET) _drive = d.pop("drive", UNSET) - drive: Unset | CreateGoogleDocsPageTaskParamsDrive + drive: CreateGoogleDocsPageTaskParamsDrive | Unset if isinstance(_drive, Unset): drive = UNSET else: drive = CreateGoogleDocsPageTaskParamsDrive.from_dict(_drive) _parent_folder = d.pop("parent_folder", UNSET) - parent_folder: Unset | CreateGoogleDocsPageTaskParamsParentFolder + parent_folder: CreateGoogleDocsPageTaskParamsParentFolder | Unset if isinstance(_parent_folder, Unset): parent_folder = UNSET else: diff --git a/rootly_sdk/models/create_google_docs_page_task_params_drive.py b/rootly_sdk/models/create_google_docs_page_task_params_drive.py index 9bc8cd93..ed347ba9 100644 --- a/rootly_sdk/models/create_google_docs_page_task_params_drive.py +++ b/rootly_sdk/models/create_google_docs_page_task_params_drive.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGoogleDocsPageTaskParamsDrive: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_google_docs_page_task_params_parent_folder.py b/rootly_sdk/models/create_google_docs_page_task_params_parent_folder.py index aa73628a..0f00ca78 100644 --- a/rootly_sdk/models/create_google_docs_page_task_params_parent_folder.py +++ b/rootly_sdk/models/create_google_docs_page_task_params_parent_folder.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGoogleDocsPageTaskParamsParentFolder: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_google_docs_permissions_task_params.py b/rootly_sdk/models/create_google_docs_permissions_task_params.py index 90211d3f..f685b609 100644 --- a/rootly_sdk/models/create_google_docs_permissions_task_params.py +++ b/rootly_sdk/models/create_google_docs_permissions_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,16 +21,16 @@ class CreateGoogleDocsPermissionsTaskParams: Attributes: file_id (str): The Google Doc file ID permissions (str): Page permissions JSON - task_type (Union[Unset, CreateGoogleDocsPermissionsTaskParamsTaskType]): - send_notification_email (Union[Unset, bool]): - email_message (Union[None, Unset, str]): Email message notification + task_type (CreateGoogleDocsPermissionsTaskParamsTaskType | Unset): + send_notification_email (bool | Unset): + email_message (None | str | Unset): Email message notification """ file_id: str permissions: str - task_type: Unset | CreateGoogleDocsPermissionsTaskParamsTaskType = UNSET - send_notification_email: Unset | bool = UNSET - email_message: None | Unset | str = UNSET + task_type: CreateGoogleDocsPermissionsTaskParamsTaskType | Unset = UNSET + send_notification_email: bool | Unset = UNSET + email_message: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,13 +38,13 @@ def to_dict(self) -> dict[str, Any]: permissions = self.permissions - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type send_notification_email = self.send_notification_email - email_message: None | Unset | str + email_message: None | str | Unset if isinstance(self.email_message, Unset): email_message = UNSET else: @@ -73,7 +75,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: permissions = d.pop("permissions") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGoogleDocsPermissionsTaskParamsTaskType + task_type: CreateGoogleDocsPermissionsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -81,12 +83,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: send_notification_email = d.pop("send_notification_email", UNSET) - def _parse_email_message(data: object) -> None | Unset | str: + def _parse_email_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_message = _parse_email_message(d.pop("email_message", UNSET)) diff --git a/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py b/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py index 87e49bf1..8800e746 100644 --- a/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py +++ b/rootly_sdk/models/create_google_gemini_chat_completion_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,14 +27,14 @@ class CreateGoogleGeminiChatCompletionTaskParams: Attributes: model (CreateGoogleGeminiChatCompletionTaskParamsModel): The Gemini model. eg: gemini-2.0-flash prompt (str): The prompt to send to Gemini - task_type (Union[Unset, CreateGoogleGeminiChatCompletionTaskParamsTaskType]): - system_prompt (Union[Unset, str]): The system prompt to send to Gemini (optional) + task_type (CreateGoogleGeminiChatCompletionTaskParamsTaskType | Unset): + system_prompt (str | Unset): The system prompt to send to Gemini (optional) """ - model: "CreateGoogleGeminiChatCompletionTaskParamsModel" + model: CreateGoogleGeminiChatCompletionTaskParamsModel prompt: str - task_type: Unset | CreateGoogleGeminiChatCompletionTaskParamsTaskType = UNSET - system_prompt: Unset | str = UNSET + task_type: CreateGoogleGeminiChatCompletionTaskParamsTaskType | Unset = UNSET + system_prompt: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: prompt = self.prompt - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -73,7 +75,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: prompt = d.pop("prompt") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGoogleGeminiChatCompletionTaskParamsTaskType + task_type: CreateGoogleGeminiChatCompletionTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_google_gemini_chat_completion_task_params_model.py b/rootly_sdk/models/create_google_gemini_chat_completion_task_params_model.py index c0099766..9eb379c8 100644 --- a/rootly_sdk/models/create_google_gemini_chat_completion_task_params_model.py +++ b/rootly_sdk/models/create_google_gemini_chat_completion_task_params_model.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateGoogleGeminiChatCompletionTaskParamsModel: """The Gemini model. eg: gemini-2.0-flash Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_google_meeting_task_params.py b/rootly_sdk/models/create_google_meeting_task_params.py index 89e2e1e3..f567d61f 100644 --- a/rootly_sdk/models/create_google_meeting_task_params.py +++ b/rootly_sdk/models/create_google_meeting_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -31,27 +33,27 @@ class CreateGoogleMeetingTaskParams: """ Attributes: - summary (Union[None, str]): [DEPRECATED] The meeting summary - description (Union[None, str]): [DEPRECATED] The meeting description - task_type (Union[Unset, CreateGoogleMeetingTaskParamsTaskType]): - conference_solution_key (Union[Unset, CreateGoogleMeetingTaskParamsConferenceSolutionKey]): [DEPRECATED] Sets - the video conference type attached to the meeting - record_meeting (Union[Unset, bool]): Rootly AI will record the meeting and automatically generate a transcript - and summary from your meeting - recording_mode (Union[Unset, CreateGoogleMeetingTaskParamsRecordingMode]): The video layout for the bot's - recording (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateGoogleMeetingTaskParamsPostToSlackChannelsItem']]): + summary (None | str): [DEPRECATED] The meeting summary + description (None | str): [DEPRECATED] The meeting description + task_type (CreateGoogleMeetingTaskParamsTaskType | Unset): + conference_solution_key (CreateGoogleMeetingTaskParamsConferenceSolutionKey | Unset): [DEPRECATED] Sets the + video conference type attached to the meeting + record_meeting (bool | Unset): Rootly AI will record the meeting and automatically generate a transcript and + summary from your meeting + recording_mode (CreateGoogleMeetingTaskParamsRecordingMode | Unset): The video layout for the bot's recording + (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateGoogleMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ summary: None | str description: None | str - task_type: Unset | CreateGoogleMeetingTaskParamsTaskType = UNSET - conference_solution_key: Unset | CreateGoogleMeetingTaskParamsConferenceSolutionKey = UNSET - record_meeting: Unset | bool = UNSET - recording_mode: Unset | CreateGoogleMeetingTaskParamsRecordingMode = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateGoogleMeetingTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateGoogleMeetingTaskParamsTaskType | Unset = UNSET + conference_solution_key: CreateGoogleMeetingTaskParamsConferenceSolutionKey | Unset = UNSET + record_meeting: bool | Unset = UNSET + recording_mode: CreateGoogleMeetingTaskParamsRecordingMode | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateGoogleMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -61,23 +63,23 @@ def to_dict(self) -> dict[str, Any]: description: None | str description = self.description - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - conference_solution_key: Unset | str = UNSET + conference_solution_key: str | Unset = UNSET if not isinstance(self.conference_solution_key, Unset): conference_solution_key = self.conference_solution_key record_meeting = self.record_meeting - recording_mode: Unset | str = UNSET + recording_mode: str | Unset = UNSET if not isinstance(self.recording_mode, Unset): recording_mode = self.recording_mode post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -130,14 +132,14 @@ def _parse_description(data: object) -> None | str: description = _parse_description(d.pop("description")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateGoogleMeetingTaskParamsTaskType + task_type: CreateGoogleMeetingTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_google_meeting_task_params_task_type(_task_type) _conference_solution_key = d.pop("conference_solution_key", UNSET) - conference_solution_key: Unset | CreateGoogleMeetingTaskParamsConferenceSolutionKey + conference_solution_key: CreateGoogleMeetingTaskParamsConferenceSolutionKey | Unset if isinstance(_conference_solution_key, Unset): conference_solution_key = UNSET else: @@ -148,7 +150,7 @@ def _parse_description(data: object) -> None | str: record_meeting = d.pop("record_meeting", UNSET) _recording_mode = d.pop("recording_mode", UNSET) - recording_mode: Unset | CreateGoogleMeetingTaskParamsRecordingMode + recording_mode: CreateGoogleMeetingTaskParamsRecordingMode | Unset if isinstance(_recording_mode, Unset): recording_mode = UNSET else: @@ -156,14 +158,16 @@ def _parse_description(data: object) -> None | str: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateGoogleMeetingTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateGoogleMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateGoogleMeetingTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_google_meeting_task_params = cls( summary=summary, diff --git a/rootly_sdk/models/create_google_meeting_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_google_meeting_task_params_post_to_slack_channels_item.py index 596f6f21..091a9f63 100644 --- a/rootly_sdk/models/create_google_meeting_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_google_meeting_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateGoogleMeetingTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_incident_postmortem_task_params.py b/rootly_sdk/models/create_incident_postmortem_task_params.py index 1a875f38..8c8d0253 100644 --- a/rootly_sdk/models/create_incident_postmortem_task_params.py +++ b/rootly_sdk/models/create_incident_postmortem_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,16 +27,16 @@ class CreateIncidentPostmortemTaskParams: Attributes: incident_id (str): UUID of the incident that needs a retrospective title (str): The retrospective title - task_type (Union[Unset, CreateIncidentPostmortemTaskParamsTaskType]): - status (Union[None, Unset, str]): - template (Union['CreateIncidentPostmortemTaskParamsTemplateType0', None, Unset]): Retrospective template to use + task_type (CreateIncidentPostmortemTaskParamsTaskType | Unset): + status (None | str | Unset): + template (CreateIncidentPostmortemTaskParamsTemplateType0 | None | Unset): Retrospective template to use """ incident_id: str title: str - task_type: Unset | CreateIncidentPostmortemTaskParamsTaskType = UNSET - status: None | Unset | str = UNSET - template: Union["CreateIncidentPostmortemTaskParamsTemplateType0", None, Unset] = UNSET + task_type: CreateIncidentPostmortemTaskParamsTaskType | Unset = UNSET + status: None | str | Unset = UNSET + template: CreateIncidentPostmortemTaskParamsTemplateType0 | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,17 +48,17 @@ def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - status: None | Unset | str + status: None | str | Unset if isinstance(self.status, Unset): status = UNSET else: status = self.status - template: None | Unset | dict[str, Any] + template: dict[str, Any] | None | Unset if isinstance(self.template, Unset): template = UNSET elif isinstance(self.template, CreateIncidentPostmortemTaskParamsTemplateType0): @@ -93,22 +95,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateIncidentPostmortemTaskParamsTaskType + task_type: CreateIncidentPostmortemTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_incident_postmortem_task_params_task_type(_task_type) - def _parse_status(data: object) -> None | Unset | str: + def _parse_status(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) status = _parse_status(d.pop("status", UNSET)) - def _parse_template(data: object) -> Union["CreateIncidentPostmortemTaskParamsTemplateType0", None, Unset]: + def _parse_template(data: object) -> CreateIncidentPostmortemTaskParamsTemplateType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -119,9 +121,9 @@ def _parse_template(data: object) -> Union["CreateIncidentPostmortemTaskParamsTe template_type_0 = CreateIncidentPostmortemTaskParamsTemplateType0.from_dict(data) return template_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["CreateIncidentPostmortemTaskParamsTemplateType0", None, Unset], data) + return cast(CreateIncidentPostmortemTaskParamsTemplateType0 | None | Unset, data) template = _parse_template(d.pop("template", UNSET)) diff --git a/rootly_sdk/models/create_incident_postmortem_task_params_template_type_0.py b/rootly_sdk/models/create_incident_postmortem_task_params_template_type_0.py index c5ad478e..5baec603 100644 --- a/rootly_sdk/models/create_incident_postmortem_task_params_template_type_0.py +++ b/rootly_sdk/models/create_incident_postmortem_task_params_template_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateIncidentPostmortemTaskParamsTemplateType0: """Retrospective template to use Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_incident_task_params.py b/rootly_sdk/models/create_incident_task_params.py index 1065a82a..0431e24c 100644 --- a/rootly_sdk/models/create_incident_task_params.py +++ b/rootly_sdk/models/create_incident_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,36 +20,36 @@ class CreateIncidentTaskParams: """ Attributes: title (str): The incident title - task_type (Union[Unset, CreateIncidentTaskParamsTaskType]): - summary (Union[Unset, str]): The incident summary - severity_id (Union[Unset, str]): - incident_type_ids (Union[Unset, list[str]]): - service_ids (Union[Unset, list[str]]): Array of service UUIDs - functionality_ids (Union[Unset, list[str]]): Array of functionality UUIDs - environment_ids (Union[Unset, list[str]]): - group_ids (Union[Unset, list[str]]): Array of group/team UUIDs - private (Union[Unset, bool]): - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateIncidentTaskParamsTaskType | Unset): + summary (str | Unset): The incident summary + severity_id (str | Unset): + incident_type_ids (list[str] | Unset): + service_ids (list[str] | Unset): Array of service UUIDs + functionality_ids (list[str] | Unset): Array of functionality UUIDs + environment_ids (list[str] | Unset): + group_ids (list[str] | Unset): Array of group/team UUIDs + private (bool | Unset): + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON. Use 'services', 'functionalities', or 'groups' keys with arrays of names/slugs for name/slug lookup """ title: str - task_type: Unset | CreateIncidentTaskParamsTaskType = UNSET - summary: Unset | str = UNSET - severity_id: Unset | str = UNSET - incident_type_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - environment_ids: Unset | list[str] = UNSET - group_ids: Unset | list[str] = UNSET - private: Unset | bool = UNSET - custom_fields_mapping: None | Unset | str = UNSET + task_type: CreateIncidentTaskParamsTaskType | Unset = UNSET + summary: str | Unset = UNSET + severity_id: str | Unset = UNSET + incident_type_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + environment_ids: list[str] | Unset = UNSET + group_ids: list[str] | Unset = UNSET + private: bool | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -55,29 +57,29 @@ def to_dict(self) -> dict[str, Any]: severity_id = self.severity_id - incident_type_ids: Unset | list[str] = UNSET + incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.incident_type_ids, Unset): incident_type_ids = self.incident_type_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - environment_ids: Unset | list[str] = UNSET + environment_ids: list[str] | Unset = UNSET if not isinstance(self.environment_ids, Unset): environment_ids = self.environment_ids - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids private = self.private - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -119,7 +121,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateIncidentTaskParamsTaskType + task_type: CreateIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -141,12 +143,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: private = d.pop("private", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/create_jira_issue_task_params.py b/rootly_sdk/models/create_jira_issue_task_params.py index 9bc15102..c46a1a12 100644 --- a/rootly_sdk/models/create_jira_issue_task_params.py +++ b/rootly_sdk/models/create_jira_issue_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,35 +29,35 @@ class CreateJiraIssueTaskParams: title (str): The issue title project_key (str): The project key issue_type (CreateJiraIssueTaskParamsIssueType): The issue type id and display name - task_type (Union[Unset, CreateJiraIssueTaskParamsTaskType]): - integration (Union[Unset, CreateJiraIssueTaskParamsIntegration]): Specify integration id if you have more than - one Jira instance - description (Union[Unset, str]): The issue description - labels (Union[Unset, str]): The issue labels - assign_user_email (Union[Unset, str]): The assigned user's email - reporter_user_email (Union[Unset, str]): The reporter user's email - due_date (Union[Unset, str]): The due date - priority (Union[Unset, CreateJiraIssueTaskParamsPriority]): The priority id and display name - status (Union[Unset, CreateJiraIssueTaskParamsStatus]): The status id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateJiraIssueTaskParamsTaskType | Unset): + integration (CreateJiraIssueTaskParamsIntegration | Unset): Specify integration id if you have more than one + Jira instance + description (str | Unset): The issue description + labels (str | Unset): The issue labels + assign_user_email (str | Unset): The assigned user's email + reporter_user_email (str | Unset): The reporter user's email + due_date (str | Unset): The due date + priority (CreateJiraIssueTaskParamsPriority | Unset): The priority id and display name + status (CreateJiraIssueTaskParamsStatus | Unset): The status id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - update_payload (Union[None, Unset, str]): Update payload. Can contain liquid markup and need to be valid JSON + update_payload (None | str | Unset): Update payload. Can contain liquid markup and need to be valid JSON """ title: str project_key: str - issue_type: "CreateJiraIssueTaskParamsIssueType" - task_type: Unset | CreateJiraIssueTaskParamsTaskType = UNSET - integration: Union[Unset, "CreateJiraIssueTaskParamsIntegration"] = UNSET - description: Unset | str = UNSET - labels: Unset | str = UNSET - assign_user_email: Unset | str = UNSET - reporter_user_email: Unset | str = UNSET - due_date: Unset | str = UNSET - priority: Union[Unset, "CreateJiraIssueTaskParamsPriority"] = UNSET - status: Union[Unset, "CreateJiraIssueTaskParamsStatus"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET - update_payload: None | Unset | str = UNSET + issue_type: CreateJiraIssueTaskParamsIssueType + task_type: CreateJiraIssueTaskParamsTaskType | Unset = UNSET + integration: CreateJiraIssueTaskParamsIntegration | Unset = UNSET + description: str | Unset = UNSET + labels: str | Unset = UNSET + assign_user_email: str | Unset = UNSET + reporter_user_email: str | Unset = UNSET + due_date: str | Unset = UNSET + priority: CreateJiraIssueTaskParamsPriority | Unset = UNSET + status: CreateJiraIssueTaskParamsStatus | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + update_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -65,11 +67,11 @@ def to_dict(self) -> dict[str, Any]: issue_type = self.issue_type.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - integration: Unset | dict[str, Any] = UNSET + integration: dict[str, Any] | Unset = UNSET if not isinstance(self.integration, Unset): integration = self.integration.to_dict() @@ -83,21 +85,21 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - status: Unset | dict[str, Any] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - update_payload: None | Unset | str + update_payload: None | str | Unset if isinstance(self.update_payload, Unset): update_payload = UNSET else: @@ -152,14 +154,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: issue_type = CreateJiraIssueTaskParamsIssueType.from_dict(d.pop("issue_type")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateJiraIssueTaskParamsTaskType + task_type: CreateJiraIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_jira_issue_task_params_task_type(_task_type) _integration = d.pop("integration", UNSET) - integration: Unset | CreateJiraIssueTaskParamsIntegration + integration: CreateJiraIssueTaskParamsIntegration | Unset if isinstance(_integration, Unset): integration = UNSET else: @@ -176,34 +178,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | CreateJiraIssueTaskParamsPriority + priority: CreateJiraIssueTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = CreateJiraIssueTaskParamsPriority.from_dict(_priority) _status = d.pop("status", UNSET) - status: Unset | CreateJiraIssueTaskParamsStatus + status: CreateJiraIssueTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = CreateJiraIssueTaskParamsStatus.from_dict(_status) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_update_payload(data: object) -> None | Unset | str: + def _parse_update_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_payload = _parse_update_payload(d.pop("update_payload", UNSET)) diff --git a/rootly_sdk/models/create_jira_issue_task_params_integration.py b/rootly_sdk/models/create_jira_issue_task_params_integration.py index b3fe98a6..9537af66 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_integration.py +++ b/rootly_sdk/models/create_jira_issue_task_params_integration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraIssueTaskParamsIntegration: """Specify integration id if you have more than one Jira instance Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_issue_task_params_issue_type.py b/rootly_sdk/models/create_jira_issue_task_params_issue_type.py index 8e6dfd69..c774aed2 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_issue_type.py +++ b/rootly_sdk/models/create_jira_issue_task_params_issue_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraIssueTaskParamsIssueType: """The issue type id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_issue_task_params_priority.py b/rootly_sdk/models/create_jira_issue_task_params_priority.py index 7f761ba0..cca943f4 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_priority.py +++ b/rootly_sdk/models/create_jira_issue_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraIssueTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_issue_task_params_status.py b/rootly_sdk/models/create_jira_issue_task_params_status.py index 1fbaa1b7..719aa1ff 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_status.py +++ b/rootly_sdk/models/create_jira_issue_task_params_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraIssueTaskParamsStatus: """The status id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_subtask_task_params.py b/rootly_sdk/models/create_jira_subtask_task_params.py index 7817c651..3320dad5 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params.py +++ b/rootly_sdk/models/create_jira_subtask_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,36 +30,36 @@ class CreateJiraSubtaskTaskParams: parent_issue_id (str): The parent issue title (str): The issue title subtask_issue_type (CreateJiraSubtaskTaskParamsSubtaskIssueType): The issue type id and display name - task_type (Union[Unset, CreateJiraSubtaskTaskParamsTaskType]): - integration (Union[Unset, CreateJiraSubtaskTaskParamsIntegration]): Specify integration id if you have more than - one Jira instance - description (Union[Unset, str]): The issue description - labels (Union[Unset, str]): The issue labels - due_date (Union[Unset, str]): The due date - assign_user_email (Union[Unset, str]): The assigned user's email - reporter_user_email (Union[Unset, str]): The reporter user's email - priority (Union[Unset, CreateJiraSubtaskTaskParamsPriority]): The priority id and display name - status (Union[Unset, CreateJiraSubtaskTaskParamsStatus]): The status id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateJiraSubtaskTaskParamsTaskType | Unset): + integration (CreateJiraSubtaskTaskParamsIntegration | Unset): Specify integration id if you have more than one + Jira instance + description (str | Unset): The issue description + labels (str | Unset): The issue labels + due_date (str | Unset): The due date + assign_user_email (str | Unset): The assigned user's email + reporter_user_email (str | Unset): The reporter user's email + priority (CreateJiraSubtaskTaskParamsPriority | Unset): The priority id and display name + status (CreateJiraSubtaskTaskParamsStatus | Unset): The status id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - update_payload (Union[None, Unset, str]): Update payload. Can contain liquid markup and need to be valid JSON + update_payload (None | str | Unset): Update payload. Can contain liquid markup and need to be valid JSON """ project_key: str parent_issue_id: str title: str - subtask_issue_type: "CreateJiraSubtaskTaskParamsSubtaskIssueType" - task_type: Unset | CreateJiraSubtaskTaskParamsTaskType = UNSET - integration: Union[Unset, "CreateJiraSubtaskTaskParamsIntegration"] = UNSET - description: Unset | str = UNSET - labels: Unset | str = UNSET - due_date: Unset | str = UNSET - assign_user_email: Unset | str = UNSET - reporter_user_email: Unset | str = UNSET - priority: Union[Unset, "CreateJiraSubtaskTaskParamsPriority"] = UNSET - status: Union[Unset, "CreateJiraSubtaskTaskParamsStatus"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET - update_payload: None | Unset | str = UNSET + subtask_issue_type: CreateJiraSubtaskTaskParamsSubtaskIssueType + task_type: CreateJiraSubtaskTaskParamsTaskType | Unset = UNSET + integration: CreateJiraSubtaskTaskParamsIntegration | Unset = UNSET + description: str | Unset = UNSET + labels: str | Unset = UNSET + due_date: str | Unset = UNSET + assign_user_email: str | Unset = UNSET + reporter_user_email: str | Unset = UNSET + priority: CreateJiraSubtaskTaskParamsPriority | Unset = UNSET + status: CreateJiraSubtaskTaskParamsStatus | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + update_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -69,11 +71,11 @@ def to_dict(self) -> dict[str, Any]: subtask_issue_type = self.subtask_issue_type.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - integration: Unset | dict[str, Any] = UNSET + integration: dict[str, Any] | Unset = UNSET if not isinstance(self.integration, Unset): integration = self.integration.to_dict() @@ -87,21 +89,21 @@ def to_dict(self) -> dict[str, Any]: reporter_user_email = self.reporter_user_email - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - status: Unset | dict[str, Any] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - update_payload: None | Unset | str + update_payload: None | str | Unset if isinstance(self.update_payload, Unset): update_payload = UNSET else: @@ -161,14 +163,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subtask_issue_type = CreateJiraSubtaskTaskParamsSubtaskIssueType.from_dict(d.pop("subtask_issue_type")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateJiraSubtaskTaskParamsTaskType + task_type: CreateJiraSubtaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_jira_subtask_task_params_task_type(_task_type) _integration = d.pop("integration", UNSET) - integration: Unset | CreateJiraSubtaskTaskParamsIntegration + integration: CreateJiraSubtaskTaskParamsIntegration | Unset if isinstance(_integration, Unset): integration = UNSET else: @@ -185,34 +187,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: reporter_user_email = d.pop("reporter_user_email", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | CreateJiraSubtaskTaskParamsPriority + priority: CreateJiraSubtaskTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = CreateJiraSubtaskTaskParamsPriority.from_dict(_priority) _status = d.pop("status", UNSET) - status: Unset | CreateJiraSubtaskTaskParamsStatus + status: CreateJiraSubtaskTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = CreateJiraSubtaskTaskParamsStatus.from_dict(_status) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_update_payload(data: object) -> None | Unset | str: + def _parse_update_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_payload = _parse_update_payload(d.pop("update_payload", UNSET)) diff --git a/rootly_sdk/models/create_jira_subtask_task_params_integration.py b/rootly_sdk/models/create_jira_subtask_task_params_integration.py index da42dd97..7ce38be3 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_integration.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_integration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraSubtaskTaskParamsIntegration: """Specify integration id if you have more than one Jira instance Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_subtask_task_params_priority.py b/rootly_sdk/models/create_jira_subtask_task_params_priority.py index 0c90227e..d6f31b38 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_priority.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraSubtaskTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_subtask_task_params_status.py b/rootly_sdk/models/create_jira_subtask_task_params_status.py index 3bc133f4..5c9cbdd1 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_status.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraSubtaskTaskParamsStatus: """The status id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jira_subtask_task_params_subtask_issue_type.py b/rootly_sdk/models/create_jira_subtask_task_params_subtask_issue_type.py index dd079064..a99b33ac 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_subtask_issue_type.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_subtask_issue_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateJiraSubtaskTaskParamsSubtaskIssueType: """The issue type id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_jsmops_alert_task_params.py b/rootly_sdk/models/create_jsmops_alert_task_params.py new file mode 100644 index 00000000..10b48b77 --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params.py @@ -0,0 +1,240 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.create_jsmops_alert_task_params_priority import ( + CreateJsmopsAlertTaskParamsPriority, + check_create_jsmops_alert_task_params_priority, +) +from ..models.create_jsmops_alert_task_params_task_type import ( + CreateJsmopsAlertTaskParamsTaskType, + check_create_jsmops_alert_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_jsmops_alert_task_params_escalations_item import CreateJsmopsAlertTaskParamsEscalationsItem + from ..models.create_jsmops_alert_task_params_schedules_item import CreateJsmopsAlertTaskParamsSchedulesItem + from ..models.create_jsmops_alert_task_params_teams_item import CreateJsmopsAlertTaskParamsTeamsItem + from ..models.create_jsmops_alert_task_params_users_item import CreateJsmopsAlertTaskParamsUsersItem + + +T = TypeVar("T", bound="CreateJsmopsAlertTaskParams") + + +@_attrs_define +class CreateJsmopsAlertTaskParams: + """ + Attributes: + message (str): Message of the alert + task_type (CreateJsmopsAlertTaskParamsTaskType | Unset): + description (None | str | Unset): Description field of the alert that is generally used to provide a detailed + information about the alert + teams (list[CreateJsmopsAlertTaskParamsTeamsItem] | Unset): + users (list[CreateJsmopsAlertTaskParamsUsersItem] | Unset): + schedules (list[CreateJsmopsAlertTaskParamsSchedulesItem] | Unset): + escalations (list[CreateJsmopsAlertTaskParamsEscalationsItem] | Unset): + priority (CreateJsmopsAlertTaskParamsPriority | Unset): Default: 'P3'. + details (None | str | Unset): Details payload. Can contain liquid markup and need to be valid JSON + """ + + message: str + task_type: CreateJsmopsAlertTaskParamsTaskType | Unset = UNSET + description: None | str | Unset = UNSET + teams: list[CreateJsmopsAlertTaskParamsTeamsItem] | Unset = UNSET + users: list[CreateJsmopsAlertTaskParamsUsersItem] | Unset = UNSET + schedules: list[CreateJsmopsAlertTaskParamsSchedulesItem] | Unset = UNSET + escalations: list[CreateJsmopsAlertTaskParamsEscalationsItem] | Unset = UNSET + priority: CreateJsmopsAlertTaskParamsPriority | Unset = "P3" + details: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + message = self.message + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + teams: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.teams, Unset): + teams = [] + for teams_item_data in self.teams: + teams_item = teams_item_data.to_dict() + teams.append(teams_item) + + users: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.users, Unset): + users = [] + for users_item_data in self.users: + users_item = users_item_data.to_dict() + users.append(users_item) + + schedules: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.schedules, Unset): + schedules = [] + for schedules_item_data in self.schedules: + schedules_item = schedules_item_data.to_dict() + schedules.append(schedules_item) + + escalations: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.escalations, Unset): + escalations = [] + for escalations_item_data in self.escalations: + escalations_item = escalations_item_data.to_dict() + escalations.append(escalations_item) + + priority: str | Unset = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority + + details: None | str | Unset + if isinstance(self.details, Unset): + details = UNSET + else: + details = self.details + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "message": message, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if description is not UNSET: + field_dict["description"] = description + if teams is not UNSET: + field_dict["teams"] = teams + if users is not UNSET: + field_dict["users"] = users + if schedules is not UNSET: + field_dict["schedules"] = schedules + if escalations is not UNSET: + field_dict["escalations"] = escalations + if priority is not UNSET: + field_dict["priority"] = priority + if details is not UNSET: + field_dict["details"] = details + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_jsmops_alert_task_params_escalations_item import CreateJsmopsAlertTaskParamsEscalationsItem + from ..models.create_jsmops_alert_task_params_schedules_item import CreateJsmopsAlertTaskParamsSchedulesItem + from ..models.create_jsmops_alert_task_params_teams_item import CreateJsmopsAlertTaskParamsTeamsItem + from ..models.create_jsmops_alert_task_params_users_item import CreateJsmopsAlertTaskParamsUsersItem + + d = dict(src_dict) + message = d.pop("message") + + _task_type = d.pop("task_type", UNSET) + task_type: CreateJsmopsAlertTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_create_jsmops_alert_task_params_task_type(_task_type) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + _teams = d.pop("teams", UNSET) + teams: list[CreateJsmopsAlertTaskParamsTeamsItem] | Unset = UNSET + if _teams is not UNSET: + teams = [] + for teams_item_data in _teams: + teams_item = CreateJsmopsAlertTaskParamsTeamsItem.from_dict(teams_item_data) + + teams.append(teams_item) + + _users = d.pop("users", UNSET) + users: list[CreateJsmopsAlertTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = CreateJsmopsAlertTaskParamsUsersItem.from_dict(users_item_data) + + users.append(users_item) + + _schedules = d.pop("schedules", UNSET) + schedules: list[CreateJsmopsAlertTaskParamsSchedulesItem] | Unset = UNSET + if _schedules is not UNSET: + schedules = [] + for schedules_item_data in _schedules: + schedules_item = CreateJsmopsAlertTaskParamsSchedulesItem.from_dict(schedules_item_data) + + schedules.append(schedules_item) + + _escalations = d.pop("escalations", UNSET) + escalations: list[CreateJsmopsAlertTaskParamsEscalationsItem] | Unset = UNSET + if _escalations is not UNSET: + escalations = [] + for escalations_item_data in _escalations: + escalations_item = CreateJsmopsAlertTaskParamsEscalationsItem.from_dict(escalations_item_data) + + escalations.append(escalations_item) + + _priority = d.pop("priority", UNSET) + priority: CreateJsmopsAlertTaskParamsPriority | Unset + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = check_create_jsmops_alert_task_params_priority(_priority) + + def _parse_details(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + details = _parse_details(d.pop("details", UNSET)) + + create_jsmops_alert_task_params = cls( + message=message, + task_type=task_type, + description=description, + teams=teams, + users=users, + schedules=schedules, + escalations=escalations, + priority=priority, + details=details, + ) + + create_jsmops_alert_task_params.additional_properties = d + return create_jsmops_alert_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py b/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py new file mode 100644 index 00000000..933c82bf --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsEscalationsItem") + + +@_attrs_define +class CreateJsmopsAlertTaskParamsEscalationsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_jsmops_alert_task_params_escalations_item = cls( + id=id, + name=name, + ) + + create_jsmops_alert_task_params_escalations_item.additional_properties = d + return create_jsmops_alert_task_params_escalations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_jsmops_alert_task_params_priority.py b/rootly_sdk/models/create_jsmops_alert_task_params_priority.py new file mode 100644 index 00000000..46747de0 --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params_priority.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +CreateJsmopsAlertTaskParamsPriority = Literal["auto", "P1", "P2", "P3", "P4", "P5"] + +CREATE_JSMOPS_ALERT_TASK_PARAMS_PRIORITY_VALUES: set[CreateJsmopsAlertTaskParamsPriority] = { + "auto", + "P1", + "P2", + "P3", + "P4", + "P5", +} + + +def check_create_jsmops_alert_task_params_priority(value: str | None) -> CreateJsmopsAlertTaskParamsPriority | None: + if value is None: + return None + if value in CREATE_JSMOPS_ALERT_TASK_PARAMS_PRIORITY_VALUES: + return cast(CreateJsmopsAlertTaskParamsPriority, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CREATE_JSMOPS_ALERT_TASK_PARAMS_PRIORITY_VALUES!r}") diff --git a/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py b/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py new file mode 100644 index 00000000..0ab25c3f --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsSchedulesItem") + + +@_attrs_define +class CreateJsmopsAlertTaskParamsSchedulesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_jsmops_alert_task_params_schedules_item = cls( + id=id, + name=name, + ) + + create_jsmops_alert_task_params_schedules_item.additional_properties = d + return create_jsmops_alert_task_params_schedules_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_jsmops_alert_task_params_task_type.py b/rootly_sdk/models/create_jsmops_alert_task_params_task_type.py new file mode 100644 index 00000000..b8902253 --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params_task_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +CreateJsmopsAlertTaskParamsTaskType = Literal["create_jsmops_alert"] + +CREATE_JSMOPS_ALERT_TASK_PARAMS_TASK_TYPE_VALUES: set[CreateJsmopsAlertTaskParamsTaskType] = { + "create_jsmops_alert", +} + + +def check_create_jsmops_alert_task_params_task_type(value: str | None) -> CreateJsmopsAlertTaskParamsTaskType | None: + if value is None: + return None + if value in CREATE_JSMOPS_ALERT_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(CreateJsmopsAlertTaskParamsTaskType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CREATE_JSMOPS_ALERT_TASK_PARAMS_TASK_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py b/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py new file mode 100644 index 00000000..802141da --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsTeamsItem") + + +@_attrs_define +class CreateJsmopsAlertTaskParamsTeamsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_jsmops_alert_task_params_teams_item = cls( + id=id, + name=name, + ) + + create_jsmops_alert_task_params_teams_item.additional_properties = d + return create_jsmops_alert_task_params_teams_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py b/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py new file mode 100644 index 00000000..92d7c0a2 --- /dev/null +++ b/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsUsersItem") + + +@_attrs_define +class CreateJsmopsAlertTaskParamsUsersItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + create_jsmops_alert_task_params_users_item = cls( + id=id, + name=name, + ) + + create_jsmops_alert_task_params_users_item.additional_properties = d + return create_jsmops_alert_task_params_users_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/create_linear_issue_comment_task_params.py b/rootly_sdk/models/create_linear_issue_comment_task_params.py index 85aa5e0e..7bd6f8ce 100644 --- a/rootly_sdk/models/create_linear_issue_comment_task_params.py +++ b/rootly_sdk/models/create_linear_issue_comment_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -19,12 +21,12 @@ class CreateLinearIssueCommentTaskParams: Attributes: issue_id (str): The issue id body (str): The issue description - task_type (Union[Unset, CreateLinearIssueCommentTaskParamsTaskType]): + task_type (CreateLinearIssueCommentTaskParamsTaskType | Unset): """ issue_id: str body: str - task_type: Unset | CreateLinearIssueCommentTaskParamsTaskType = UNSET + task_type: CreateLinearIssueCommentTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: body = self.body - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -57,7 +59,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: body = d.pop("body") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateLinearIssueCommentTaskParamsTaskType + task_type: CreateLinearIssueCommentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_linear_issue_task_params.py b/rootly_sdk/models/create_linear_issue_task_params.py index 584f8fe3..6c282acc 100644 --- a/rootly_sdk/models/create_linear_issue_task_params.py +++ b/rootly_sdk/models/create_linear_issue_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,23 +30,23 @@ class CreateLinearIssueTaskParams: title (str): The issue title team (CreateLinearIssueTaskParamsTeam): The team id and display name state (CreateLinearIssueTaskParamsState): The state id and display name - task_type (Union[Unset, CreateLinearIssueTaskParamsTaskType]): - description (Union[Unset, str]): The issue description - project (Union[Unset, CreateLinearIssueTaskParamsProject]): The project id and display name - labels (Union[Unset, list['CreateLinearIssueTaskParamsLabelsItem']]): - priority (Union[Unset, CreateLinearIssueTaskParamsPriority]): The priority id and display name - assign_user_email (Union[Unset, str]): The assigned user's email + task_type (CreateLinearIssueTaskParamsTaskType | Unset): + description (str | Unset): The issue description + project (CreateLinearIssueTaskParamsProject | Unset): The project id and display name + labels (list[CreateLinearIssueTaskParamsLabelsItem] | Unset): + priority (CreateLinearIssueTaskParamsPriority | Unset): The priority id and display name + assign_user_email (str | Unset): The assigned user's email """ title: str - team: "CreateLinearIssueTaskParamsTeam" - state: "CreateLinearIssueTaskParamsState" - task_type: Unset | CreateLinearIssueTaskParamsTaskType = UNSET - description: Unset | str = UNSET - project: Union[Unset, "CreateLinearIssueTaskParamsProject"] = UNSET - labels: Unset | list["CreateLinearIssueTaskParamsLabelsItem"] = UNSET - priority: Union[Unset, "CreateLinearIssueTaskParamsPriority"] = UNSET - assign_user_email: Unset | str = UNSET + team: CreateLinearIssueTaskParamsTeam + state: CreateLinearIssueTaskParamsState + task_type: CreateLinearIssueTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + project: CreateLinearIssueTaskParamsProject | Unset = UNSET + labels: list[CreateLinearIssueTaskParamsLabelsItem] | Unset = UNSET + priority: CreateLinearIssueTaskParamsPriority | Unset = UNSET + assign_user_email: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,24 +56,24 @@ def to_dict(self) -> dict[str, Any]: state = self.state.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type description = self.description - project: Unset | dict[str, Any] = UNSET + project: dict[str, Any] | Unset = UNSET if not isinstance(self.project, Unset): project = self.project.to_dict() - labels: Unset | list[dict[str, Any]] = UNSET + labels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: labels_item = labels_item_data.to_dict() labels.append(labels_item) - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() @@ -117,7 +119,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: state = CreateLinearIssueTaskParamsState.from_dict(d.pop("state")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateLinearIssueTaskParamsTaskType + task_type: CreateLinearIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -126,21 +128,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _project = d.pop("project", UNSET) - project: Unset | CreateLinearIssueTaskParamsProject + project: CreateLinearIssueTaskParamsProject | Unset if isinstance(_project, Unset): project = UNSET else: project = CreateLinearIssueTaskParamsProject.from_dict(_project) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: - labels_item = CreateLinearIssueTaskParamsLabelsItem.from_dict(labels_item_data) + labels: list[CreateLinearIssueTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = CreateLinearIssueTaskParamsLabelsItem.from_dict(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) _priority = d.pop("priority", UNSET) - priority: Unset | CreateLinearIssueTaskParamsPriority + priority: CreateLinearIssueTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/create_linear_issue_task_params_labels_item.py b/rootly_sdk/models/create_linear_issue_task_params_labels_item.py index 7caa9c5c..d2c67738 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_labels_item.py +++ b/rootly_sdk/models/create_linear_issue_task_params_labels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateLinearIssueTaskParamsLabelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_issue_task_params_priority.py b/rootly_sdk/models/create_linear_issue_task_params_priority.py index fd8fe0cb..d281895e 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_priority.py +++ b/rootly_sdk/models/create_linear_issue_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateLinearIssueTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_issue_task_params_project.py b/rootly_sdk/models/create_linear_issue_task_params_project.py index 44dcbb73..02bf0115 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_project.py +++ b/rootly_sdk/models/create_linear_issue_task_params_project.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateLinearIssueTaskParamsProject: """The project id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_issue_task_params_state.py b/rootly_sdk/models/create_linear_issue_task_params_state.py index 8b9b28bb..4bbea5fa 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_state.py +++ b/rootly_sdk/models/create_linear_issue_task_params_state.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateLinearIssueTaskParamsState: """The state id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_issue_task_params_team.py b/rootly_sdk/models/create_linear_issue_task_params_team.py index b87cee57..6a4aaa55 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_team.py +++ b/rootly_sdk/models/create_linear_issue_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateLinearIssueTaskParamsTeam: """The team id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_subtask_issue_task_params.py b/rootly_sdk/models/create_linear_subtask_issue_task_params.py index 46027ee4..5843d380 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,21 +30,21 @@ class CreateLinearSubtaskIssueTaskParams: parent_issue_id (str): The parent issue title (str): The issue title state (CreateLinearSubtaskIssueTaskParamsState): The state id and display name - task_type (Union[Unset, CreateLinearSubtaskIssueTaskParamsTaskType]): - description (Union[Unset, str]): The issue description - priority (Union[Unset, CreateLinearSubtaskIssueTaskParamsPriority]): The priority id and display name - labels (Union[Unset, list['CreateLinearSubtaskIssueTaskParamsLabelsItem']]): - assign_user_email (Union[Unset, str]): The assigned user's email + task_type (CreateLinearSubtaskIssueTaskParamsTaskType | Unset): + description (str | Unset): The issue description + priority (CreateLinearSubtaskIssueTaskParamsPriority | Unset): The priority id and display name + labels (list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset): + assign_user_email (str | Unset): The assigned user's email """ parent_issue_id: str title: str - state: "CreateLinearSubtaskIssueTaskParamsState" - task_type: Unset | CreateLinearSubtaskIssueTaskParamsTaskType = UNSET - description: Unset | str = UNSET - priority: Union[Unset, "CreateLinearSubtaskIssueTaskParamsPriority"] = UNSET - labels: Unset | list["CreateLinearSubtaskIssueTaskParamsLabelsItem"] = UNSET - assign_user_email: Unset | str = UNSET + state: CreateLinearSubtaskIssueTaskParamsState + task_type: CreateLinearSubtaskIssueTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + priority: CreateLinearSubtaskIssueTaskParamsPriority | Unset = UNSET + labels: list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset = UNSET + assign_user_email: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,17 +54,17 @@ def to_dict(self) -> dict[str, Any]: state = self.state.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type description = self.description - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - labels: Unset | list[dict[str, Any]] = UNSET + labels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: @@ -109,7 +111,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: state = CreateLinearSubtaskIssueTaskParamsState.from_dict(d.pop("state")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateLinearSubtaskIssueTaskParamsTaskType + task_type: CreateLinearSubtaskIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -118,18 +120,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | CreateLinearSubtaskIssueTaskParamsPriority + priority: CreateLinearSubtaskIssueTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = CreateLinearSubtaskIssueTaskParamsPriority.from_dict(_priority) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: - labels_item = CreateLinearSubtaskIssueTaskParamsLabelsItem.from_dict(labels_item_data) + labels: list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = CreateLinearSubtaskIssueTaskParamsLabelsItem.from_dict(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) assign_user_email = d.pop("assign_user_email", UNSET) diff --git a/rootly_sdk/models/create_linear_subtask_issue_task_params_labels_item.py b/rootly_sdk/models/create_linear_subtask_issue_task_params_labels_item.py index 21339bcd..ca04ec13 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params_labels_item.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params_labels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateLinearSubtaskIssueTaskParamsLabelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_subtask_issue_task_params_priority.py b/rootly_sdk/models/create_linear_subtask_issue_task_params_priority.py index 93f710e2..d605d101 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params_priority.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateLinearSubtaskIssueTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_linear_subtask_issue_task_params_state.py b/rootly_sdk/models/create_linear_subtask_issue_task_params_state.py index 1a12777e..8c1e27be 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params_state.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params_state.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateLinearSubtaskIssueTaskParamsState: """The state id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_meeting_recording_platform.py b/rootly_sdk/models/create_meeting_recording_platform.py new file mode 100644 index 00000000..c8072539 --- /dev/null +++ b/rootly_sdk/models/create_meeting_recording_platform.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +CreateMeetingRecordingPlatform = Literal["google_meet", "microsoft_teams", "webex", "zoom"] + +CREATE_MEETING_RECORDING_PLATFORM_VALUES: set[CreateMeetingRecordingPlatform] = { + "google_meet", + "microsoft_teams", + "webex", + "zoom", +} + + +def check_create_meeting_recording_platform(value: str | None) -> CreateMeetingRecordingPlatform | None: + if value is None: + return None + if value in CREATE_MEETING_RECORDING_PLATFORM_VALUES: + return cast(CreateMeetingRecordingPlatform, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CREATE_MEETING_RECORDING_PLATFORM_VALUES!r}") diff --git a/rootly_sdk/models/create_microsoft_teams_channel_task_params.py b/rootly_sdk/models/create_microsoft_teams_channel_task_params.py index 31307ba5..03b404cc 100644 --- a/rootly_sdk/models/create_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_channel_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,33 +28,33 @@ class CreateMicrosoftTeamsChannelTaskParams: """ Attributes: title (str): Microsoft Team channel title - task_type (Union[Unset, CreateMicrosoftTeamsChannelTaskParamsTaskType]): - team (Union[Unset, CreateMicrosoftTeamsChannelTaskParamsTeam]): - description (Union[Unset, str]): Microsoft Team channel description - private (Union[Unset, CreateMicrosoftTeamsChannelTaskParamsPrivate]): Default: 'auto'. + task_type (CreateMicrosoftTeamsChannelTaskParamsTaskType | Unset): + team (CreateMicrosoftTeamsChannelTaskParamsTeam | Unset): + description (str | Unset): Microsoft Team channel description + private (CreateMicrosoftTeamsChannelTaskParamsPrivate | Unset): Default: 'auto'. """ title: str - task_type: Unset | CreateMicrosoftTeamsChannelTaskParamsTaskType = UNSET - team: Union[Unset, "CreateMicrosoftTeamsChannelTaskParamsTeam"] = UNSET - description: Unset | str = UNSET - private: Unset | CreateMicrosoftTeamsChannelTaskParamsPrivate = "auto" + task_type: CreateMicrosoftTeamsChannelTaskParamsTaskType | Unset = UNSET + team: CreateMicrosoftTeamsChannelTaskParamsTeam | Unset = UNSET + description: str | Unset = UNSET + private: CreateMicrosoftTeamsChannelTaskParamsPrivate | Unset = "auto" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - team: Unset | dict[str, Any] = UNSET + team: dict[str, Any] | Unset = UNSET if not isinstance(self.team, Unset): team = self.team.to_dict() description = self.description - private: Unset | str = UNSET + private: str | Unset = UNSET if not isinstance(self.private, Unset): private = self.private @@ -82,14 +84,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateMicrosoftTeamsChannelTaskParamsTaskType + task_type: CreateMicrosoftTeamsChannelTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_microsoft_teams_channel_task_params_task_type(_task_type) _team = d.pop("team", UNSET) - team: Unset | CreateMicrosoftTeamsChannelTaskParamsTeam + team: CreateMicrosoftTeamsChannelTaskParamsTeam | Unset if isinstance(_team, Unset): team = UNSET else: @@ -98,7 +100,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _private = d.pop("private", UNSET) - private: Unset | CreateMicrosoftTeamsChannelTaskParamsPrivate + private: CreateMicrosoftTeamsChannelTaskParamsPrivate | Unset if isinstance(_private, Unset): private = UNSET else: diff --git a/rootly_sdk/models/create_microsoft_teams_channel_task_params_team.py b/rootly_sdk/models/create_microsoft_teams_channel_task_params_team.py index 32f51411..3d7128e5 100644 --- a/rootly_sdk/models/create_microsoft_teams_channel_task_params_team.py +++ b/rootly_sdk/models/create_microsoft_teams_channel_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateMicrosoftTeamsChannelTaskParamsTeam: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_microsoft_teams_chat_task_params.py b/rootly_sdk/models/create_microsoft_teams_chat_task_params.py index b02e3b4a..00563ed0 100644 --- a/rootly_sdk/models/create_microsoft_teams_chat_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_chat_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -27,16 +29,16 @@ class CreateMicrosoftTeamsChatTaskParams: """ Attributes: - members (list['CreateMicrosoftTeamsChatTaskParamsMembersItem']): Array of members to include in the chat - task_type (Union[Unset, CreateMicrosoftTeamsChatTaskParamsTaskType]): - topic (Union[None, Unset, str]): Chat topic (only for group chats) - chat_type (Union[Unset, CreateMicrosoftTeamsChatTaskParamsChatType]): Type of chat to create Default: 'group'. + members (list[CreateMicrosoftTeamsChatTaskParamsMembersItem]): Array of members to include in the chat + task_type (CreateMicrosoftTeamsChatTaskParamsTaskType | Unset): + topic (None | str | Unset): Chat topic (only for group chats) + chat_type (CreateMicrosoftTeamsChatTaskParamsChatType | Unset): Type of chat to create Default: 'group'. """ - members: list["CreateMicrosoftTeamsChatTaskParamsMembersItem"] - task_type: Unset | CreateMicrosoftTeamsChatTaskParamsTaskType = UNSET - topic: None | Unset | str = UNSET - chat_type: Unset | CreateMicrosoftTeamsChatTaskParamsChatType = "group" + members: list[CreateMicrosoftTeamsChatTaskParamsMembersItem] + task_type: CreateMicrosoftTeamsChatTaskParamsTaskType | Unset = UNSET + topic: None | str | Unset = UNSET + chat_type: CreateMicrosoftTeamsChatTaskParamsChatType | Unset = "group" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -45,17 +47,17 @@ def to_dict(self) -> dict[str, Any]: members_item = members_item_data.to_dict() members.append(members_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - topic: None | Unset | str + topic: None | str | Unset if isinstance(self.topic, Unset): topic = UNSET else: topic = self.topic - chat_type: Unset | str = UNSET + chat_type: str | Unset = UNSET if not isinstance(self.chat_type, Unset): chat_type = self.chat_type @@ -90,23 +92,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: members.append(members_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateMicrosoftTeamsChatTaskParamsTaskType + task_type: CreateMicrosoftTeamsChatTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_microsoft_teams_chat_task_params_task_type(_task_type) - def _parse_topic(data: object) -> None | Unset | str: + def _parse_topic(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) topic = _parse_topic(d.pop("topic", UNSET)) _chat_type = d.pop("chat_type", UNSET) - chat_type: Unset | CreateMicrosoftTeamsChatTaskParamsChatType + chat_type: CreateMicrosoftTeamsChatTaskParamsChatType | Unset if isinstance(_chat_type, Unset): chat_type = UNSET else: diff --git a/rootly_sdk/models/create_microsoft_teams_chat_task_params_members_item.py b/rootly_sdk/models/create_microsoft_teams_chat_task_params_members_item.py index 5c2b3733..714d243e 100644 --- a/rootly_sdk/models/create_microsoft_teams_chat_task_params_members_item.py +++ b/rootly_sdk/models/create_microsoft_teams_chat_task_params_members_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateMicrosoftTeamsChatTaskParamsMembersItem: """ Attributes: - email (Union[Unset, str]): - name (Union[Unset, str]): + email (str | Unset): + name (str | Unset): """ - email: Unset | str = UNSET - name: Unset | str = UNSET + email: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py b/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py index af680a85..96f5022e 100644 --- a/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -29,22 +31,22 @@ class CreateMicrosoftTeamsMeetingTaskParams: Attributes: name (str): The meeting name subject (str): The meeting subject - task_type (Union[Unset, CreateMicrosoftTeamsMeetingTaskParamsTaskType]): - record_meeting (Union[Unset, bool]): Rootly AI will record the meeting and automatically generate a transcript - and summary from your meeting - recording_mode (Union[Unset, CreateMicrosoftTeamsMeetingTaskParamsRecordingMode]): The video layout for the - bot's recording (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem']]): + task_type (CreateMicrosoftTeamsMeetingTaskParamsTaskType | Unset): + record_meeting (bool | Unset): Rootly AI will record the meeting and automatically generate a transcript and + summary from your meeting + recording_mode (CreateMicrosoftTeamsMeetingTaskParamsRecordingMode | Unset): The video layout for the bot's + recording (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ name: str subject: str - task_type: Unset | CreateMicrosoftTeamsMeetingTaskParamsTaskType = UNSET - record_meeting: Unset | bool = UNSET - recording_mode: Unset | CreateMicrosoftTeamsMeetingTaskParamsRecordingMode = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateMicrosoftTeamsMeetingTaskParamsTaskType | Unset = UNSET + record_meeting: bool | Unset = UNSET + recording_mode: CreateMicrosoftTeamsMeetingTaskParamsRecordingMode | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,19 +54,19 @@ def to_dict(self) -> dict[str, Any]: subject = self.subject - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type record_meeting = self.record_meeting - recording_mode: Unset | str = UNSET + recording_mode: str | Unset = UNSET if not isinstance(self.recording_mode, Unset): recording_mode = self.recording_mode post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -104,7 +106,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subject = d.pop("subject") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateMicrosoftTeamsMeetingTaskParamsTaskType + task_type: CreateMicrosoftTeamsMeetingTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -113,7 +115,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: record_meeting = d.pop("record_meeting", UNSET) _recording_mode = d.pop("recording_mode", UNSET) - recording_mode: Unset | CreateMicrosoftTeamsMeetingTaskParamsRecordingMode + recording_mode: CreateMicrosoftTeamsMeetingTaskParamsRecordingMode | Unset if isinstance(_recording_mode, Unset): recording_mode = UNSET else: @@ -121,14 +123,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_microsoft_teams_meeting_task_params = cls( name=name, diff --git a/rootly_sdk/models/create_microsoft_teams_meeting_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_microsoft_teams_meeting_task_params_post_to_slack_channels_item.py index 7e910bdb..dc99a191 100644 --- a/rootly_sdk/models/create_microsoft_teams_meeting_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_microsoft_teams_meeting_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_mistral_chat_completion_task_params.py b/rootly_sdk/models/create_mistral_chat_completion_task_params.py index efd67bc9..98d6bef7 100644 --- a/rootly_sdk/models/create_mistral_chat_completion_task_params.py +++ b/rootly_sdk/models/create_mistral_chat_completion_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,20 +25,20 @@ class CreateMistralChatCompletionTaskParams: Attributes: model (CreateMistralChatCompletionTaskParamsModel): The Mistral model. eg: mistral-large-latest prompt (str): The prompt to send to Mistral - task_type (Union[Unset, CreateMistralChatCompletionTaskParamsTaskType]): - system_prompt (Union[Unset, str]): The system prompt to send to Mistral (optional) - temperature (Union[Unset, float]): Sampling temperature (0.0-1.5). Higher values make output more random. - max_tokens (Union[Unset, int]): Maximum number of tokens to generate - top_p (Union[Unset, float]): Nucleus sampling parameter (0.0-1.0) + task_type (CreateMistralChatCompletionTaskParamsTaskType | Unset): + system_prompt (str | Unset): The system prompt to send to Mistral (optional) + temperature (float | Unset): Sampling temperature (0.0-1.5). Higher values make output more random. + max_tokens (int | Unset): Maximum number of tokens to generate + top_p (float | Unset): Nucleus sampling parameter (0.0-1.0) """ - model: "CreateMistralChatCompletionTaskParamsModel" + model: CreateMistralChatCompletionTaskParamsModel prompt: str - task_type: Unset | CreateMistralChatCompletionTaskParamsTaskType = UNSET - system_prompt: Unset | str = UNSET - temperature: Unset | float = UNSET - max_tokens: Unset | int = UNSET - top_p: Unset | float = UNSET + task_type: CreateMistralChatCompletionTaskParamsTaskType | Unset = UNSET + system_prompt: str | Unset = UNSET + temperature: float | Unset = UNSET + max_tokens: int | Unset = UNSET + top_p: float | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: prompt = self.prompt - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: prompt = d.pop("prompt") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateMistralChatCompletionTaskParamsTaskType + task_type: CreateMistralChatCompletionTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_mistral_chat_completion_task_params_model.py b/rootly_sdk/models/create_mistral_chat_completion_task_params_model.py index aa4b56d8..7cda8fef 100644 --- a/rootly_sdk/models/create_mistral_chat_completion_task_params_model.py +++ b/rootly_sdk/models/create_mistral_chat_completion_task_params_model.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateMistralChatCompletionTaskParamsModel: """The Mistral model. eg: mistral-large-latest Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_motion_task_task_params.py b/rootly_sdk/models/create_motion_task_task_params.py index c07821b4..acd46aab 100644 --- a/rootly_sdk/models/create_motion_task_task_params.py +++ b/rootly_sdk/models/create_motion_task_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,26 +28,26 @@ class CreateMotionTaskTaskParams: Attributes: workspace (CreateMotionTaskTaskParamsWorkspace): title (str): The task title - task_type (Union[Unset, CreateMotionTaskTaskParamsTaskType]): - project (Union[Unset, CreateMotionTaskTaskParamsProject]): - status (Union[Unset, CreateMotionTaskTaskParamsStatus]): - description (Union[Unset, str]): The task description - labels (Union[Unset, list[str]]): - priority (Union[Unset, CreateMotionTaskTaskParamsPriority]): The priority id and display name - duration (Union[Unset, str]): The duration. Eg. "NONE", "REMINDER", or a integer greater than 0. - due_date (Union[Unset, str]): The due date + task_type (CreateMotionTaskTaskParamsTaskType | Unset): + project (CreateMotionTaskTaskParamsProject | Unset): + status (CreateMotionTaskTaskParamsStatus | Unset): + description (str | Unset): The task description + labels (list[str] | Unset): + priority (CreateMotionTaskTaskParamsPriority | Unset): The priority id and display name + duration (str | Unset): The duration. Eg. "NONE", "REMINDER", or a integer greater than 0. + due_date (str | Unset): The due date """ - workspace: "CreateMotionTaskTaskParamsWorkspace" + workspace: CreateMotionTaskTaskParamsWorkspace title: str - task_type: Unset | CreateMotionTaskTaskParamsTaskType = UNSET - project: Union[Unset, "CreateMotionTaskTaskParamsProject"] = UNSET - status: Union[Unset, "CreateMotionTaskTaskParamsStatus"] = UNSET - description: Unset | str = UNSET - labels: Unset | list[str] = UNSET - priority: Union[Unset, "CreateMotionTaskTaskParamsPriority"] = UNSET - duration: Unset | str = UNSET - due_date: Unset | str = UNSET + task_type: CreateMotionTaskTaskParamsTaskType | Unset = UNSET + project: CreateMotionTaskTaskParamsProject | Unset = UNSET + status: CreateMotionTaskTaskParamsStatus | Unset = UNSET + description: str | Unset = UNSET + labels: list[str] | Unset = UNSET + priority: CreateMotionTaskTaskParamsPriority | Unset = UNSET + duration: str | Unset = UNSET + due_date: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -53,25 +55,25 @@ def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - project: Unset | dict[str, Any] = UNSET + project: dict[str, Any] | Unset = UNSET if not isinstance(self.project, Unset): project = self.project.to_dict() - status: Unset | dict[str, Any] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() description = self.description - labels: Unset | list[str] = UNSET + labels: list[str] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() @@ -119,21 +121,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateMotionTaskTaskParamsTaskType + task_type: CreateMotionTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_motion_task_task_params_task_type(_task_type) _project = d.pop("project", UNSET) - project: Unset | CreateMotionTaskTaskParamsProject + project: CreateMotionTaskTaskParamsProject | Unset if isinstance(_project, Unset): project = UNSET else: project = CreateMotionTaskTaskParamsProject.from_dict(_project) _status = d.pop("status", UNSET) - status: Unset | CreateMotionTaskTaskParamsStatus + status: CreateMotionTaskTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: @@ -144,7 +146,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: labels = cast(list[str], d.pop("labels", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | CreateMotionTaskTaskParamsPriority + priority: CreateMotionTaskTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/create_motion_task_task_params_priority.py b/rootly_sdk/models/create_motion_task_task_params_priority.py index e8a31af7..493c01f5 100644 --- a/rootly_sdk/models/create_motion_task_task_params_priority.py +++ b/rootly_sdk/models/create_motion_task_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateMotionTaskTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_motion_task_task_params_project.py b/rootly_sdk/models/create_motion_task_task_params_project.py index a76a9455..4843b381 100644 --- a/rootly_sdk/models/create_motion_task_task_params_project.py +++ b/rootly_sdk/models/create_motion_task_task_params_project.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateMotionTaskTaskParamsProject: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_motion_task_task_params_status.py b/rootly_sdk/models/create_motion_task_task_params_status.py index 43522fa2..97abb0ea 100644 --- a/rootly_sdk/models/create_motion_task_task_params_status.py +++ b/rootly_sdk/models/create_motion_task_task_params_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateMotionTaskTaskParamsStatus: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_motion_task_task_params_workspace.py b/rootly_sdk/models/create_motion_task_task_params_workspace.py index ff425137..13cf3220 100644 --- a/rootly_sdk/models/create_motion_task_task_params_workspace.py +++ b/rootly_sdk/models/create_motion_task_task_params_workspace.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateMotionTaskTaskParamsWorkspace: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_notion_page_task_params.py b/rootly_sdk/models/create_notion_page_task_params.py index 28bae0df..e07077d6 100644 --- a/rootly_sdk/models/create_notion_page_task_params.py +++ b/rootly_sdk/models/create_notion_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,23 +25,23 @@ class CreateNotionPageTaskParams: Attributes: title (str): The Notion page title parent_page (CreateNotionPageTaskParamsParentPage): The parent page id and display name - task_type (Union[Unset, CreateNotionPageTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page task, if desired - content (Union[Unset, str]): Custom page content with liquid templating support. When provided, only this - content will be rendered (no default sections) - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. - show_timeline_as_table (Union[Unset, bool]): - show_action_items_as_table (Union[Unset, bool]): + task_type (CreateNotionPageTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating page task, if desired + content (str | Unset): Custom page content with liquid templating support. When provided, only this content will + be rendered (no default sections) + mark_post_mortem_as_published (bool | Unset): Default: True. + show_timeline_as_table (bool | Unset): + show_action_items_as_table (bool | Unset): """ title: str - parent_page: "CreateNotionPageTaskParamsParentPage" - task_type: Unset | CreateNotionPageTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - content: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True - show_timeline_as_table: Unset | bool = UNSET - show_action_items_as_table: Unset | bool = UNSET + parent_page: CreateNotionPageTaskParamsParentPage + task_type: CreateNotionPageTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + content: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True + show_timeline_as_table: bool | Unset = UNSET + show_action_items_as_table: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -47,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: parent_page = self.parent_page.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -94,7 +96,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: parent_page = CreateNotionPageTaskParamsParentPage.from_dict(d.pop("parent_page")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateNotionPageTaskParamsTaskType + task_type: CreateNotionPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_notion_page_task_params_parent_page.py b/rootly_sdk/models/create_notion_page_task_params_parent_page.py index 21c4244a..08a6d60c 100644 --- a/rootly_sdk/models/create_notion_page_task_params_parent_page.py +++ b/rootly_sdk/models/create_notion_page_task_params_parent_page.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateNotionPageTaskParamsParentPage: """The parent page id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_openai_chat_completion_task_params.py b/rootly_sdk/models/create_openai_chat_completion_task_params.py index a917e34d..03ea154c 100644 --- a/rootly_sdk/models/create_openai_chat_completion_task_params.py +++ b/rootly_sdk/models/create_openai_chat_completion_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -31,26 +33,26 @@ class CreateOpenaiChatCompletionTaskParams: Attributes: model (CreateOpenaiChatCompletionTaskParamsModel): The OpenAI model. eg: gpt-5-nano prompt (str): The prompt to send to OpenAI - task_type (Union[Unset, CreateOpenaiChatCompletionTaskParamsTaskType]): - system_prompt (Union[Unset, str]): The system prompt to send to OpenAI (optional) - temperature (Union[Unset, float]): Controls randomness in the response. Higher values make output more random - max_tokens (Union[Unset, int]): Maximum number of tokens to generate in the response - top_p (Union[Unset, float]): Controls diversity via nucleus sampling. Lower values make output more focused - reasoning_effort (Union[Unset, CreateOpenaiChatCompletionTaskParamsReasoningEffort]): Constrains effort on - reasoning for GPT-5 and o-series models - reasoning_summary (Union[Unset, CreateOpenaiChatCompletionTaskParamsReasoningSummary]): Summary of the reasoning + task_type (CreateOpenaiChatCompletionTaskParamsTaskType | Unset): + system_prompt (str | Unset): The system prompt to send to OpenAI (optional) + temperature (float | Unset): Controls randomness in the response. Higher values make output more random + max_tokens (int | Unset): Maximum number of tokens to generate in the response + top_p (float | Unset): Controls diversity via nucleus sampling. Lower values make output more focused + reasoning_effort (CreateOpenaiChatCompletionTaskParamsReasoningEffort | Unset): Constrains effort on reasoning + for GPT-5 and o-series models + reasoning_summary (CreateOpenaiChatCompletionTaskParamsReasoningSummary | Unset): Summary of the reasoning performed by the model for GPT-5 and o-series models """ - model: "CreateOpenaiChatCompletionTaskParamsModel" + model: CreateOpenaiChatCompletionTaskParamsModel prompt: str - task_type: Unset | CreateOpenaiChatCompletionTaskParamsTaskType = UNSET - system_prompt: Unset | str = UNSET - temperature: Unset | float = UNSET - max_tokens: Unset | int = UNSET - top_p: Unset | float = UNSET - reasoning_effort: Unset | CreateOpenaiChatCompletionTaskParamsReasoningEffort = UNSET - reasoning_summary: Unset | CreateOpenaiChatCompletionTaskParamsReasoningSummary = UNSET + task_type: CreateOpenaiChatCompletionTaskParamsTaskType | Unset = UNSET + system_prompt: str | Unset = UNSET + temperature: float | Unset = UNSET + max_tokens: int | Unset = UNSET + top_p: float | Unset = UNSET + reasoning_effort: CreateOpenaiChatCompletionTaskParamsReasoningEffort | Unset = UNSET + reasoning_summary: CreateOpenaiChatCompletionTaskParamsReasoningSummary | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -58,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: prompt = self.prompt - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -70,11 +72,11 @@ def to_dict(self) -> dict[str, Any]: top_p = self.top_p - reasoning_effort: Unset | str = UNSET + reasoning_effort: str | Unset = UNSET if not isinstance(self.reasoning_effort, Unset): reasoning_effort = self.reasoning_effort - reasoning_summary: Unset | str = UNSET + reasoning_summary: str | Unset = UNSET if not isinstance(self.reasoning_summary, Unset): reasoning_summary = self.reasoning_summary @@ -113,7 +115,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: prompt = d.pop("prompt") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateOpenaiChatCompletionTaskParamsTaskType + task_type: CreateOpenaiChatCompletionTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -128,14 +130,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: top_p = d.pop("top_p", UNSET) _reasoning_effort = d.pop("reasoning_effort", UNSET) - reasoning_effort: Unset | CreateOpenaiChatCompletionTaskParamsReasoningEffort + reasoning_effort: CreateOpenaiChatCompletionTaskParamsReasoningEffort | Unset if isinstance(_reasoning_effort, Unset): reasoning_effort = UNSET else: reasoning_effort = check_create_openai_chat_completion_task_params_reasoning_effort(_reasoning_effort) _reasoning_summary = d.pop("reasoning_summary", UNSET) - reasoning_summary: Unset | CreateOpenaiChatCompletionTaskParamsReasoningSummary + reasoning_summary: CreateOpenaiChatCompletionTaskParamsReasoningSummary | Unset if isinstance(_reasoning_summary, Unset): reasoning_summary = UNSET else: diff --git a/rootly_sdk/models/create_openai_chat_completion_task_params_model.py b/rootly_sdk/models/create_openai_chat_completion_task_params_model.py index 9e40d263..927f4f61 100644 --- a/rootly_sdk/models/create_openai_chat_completion_task_params_model.py +++ b/rootly_sdk/models/create_openai_chat_completion_task_params_model.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateOpenaiChatCompletionTaskParamsModel: """The OpenAI model. eg: gpt-5-nano Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params.py b/rootly_sdk/models/create_opsgenie_alert_task_params.py index fa9ee991..47f1806c 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -29,70 +31,70 @@ class CreateOpsgenieAlertTaskParams: """ Attributes: message (str): Message of the alert - task_type (Union[Unset, CreateOpsgenieAlertTaskParamsTaskType]): - description (Union[Unset, str]): Description field of the alert that is generally used to provide a detailed + task_type (CreateOpsgenieAlertTaskParamsTaskType | Unset): + description (str | Unset): Description field of the alert that is generally used to provide a detailed information about the alert - teams (Union[Unset, list['CreateOpsgenieAlertTaskParamsTeamsItem']]): - users (Union[Unset, list['CreateOpsgenieAlertTaskParamsUsersItem']]): - schedules (Union[Unset, list['CreateOpsgenieAlertTaskParamsSchedulesItem']]): - escalations (Union[Unset, list['CreateOpsgenieAlertTaskParamsEscalationsItem']]): - priority (Union[Unset, CreateOpsgenieAlertTaskParamsPriority]): Default: 'P1'. - details (Union[None, Unset, str]): Details payload. Can contain liquid markup and need to be valid JSON + teams (list[CreateOpsgenieAlertTaskParamsTeamsItem] | Unset): + users (list[CreateOpsgenieAlertTaskParamsUsersItem] | Unset): + schedules (list[CreateOpsgenieAlertTaskParamsSchedulesItem] | Unset): + escalations (list[CreateOpsgenieAlertTaskParamsEscalationsItem] | Unset): + priority (CreateOpsgenieAlertTaskParamsPriority | Unset): Default: 'P1'. + details (None | str | Unset): Details payload. Can contain liquid markup and need to be valid JSON """ message: str - task_type: Unset | CreateOpsgenieAlertTaskParamsTaskType = UNSET - description: Unset | str = UNSET - teams: Unset | list["CreateOpsgenieAlertTaskParamsTeamsItem"] = UNSET - users: Unset | list["CreateOpsgenieAlertTaskParamsUsersItem"] = UNSET - schedules: Unset | list["CreateOpsgenieAlertTaskParamsSchedulesItem"] = UNSET - escalations: Unset | list["CreateOpsgenieAlertTaskParamsEscalationsItem"] = UNSET - priority: Unset | CreateOpsgenieAlertTaskParamsPriority = "P1" - details: None | Unset | str = UNSET + task_type: CreateOpsgenieAlertTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + teams: list[CreateOpsgenieAlertTaskParamsTeamsItem] | Unset = UNSET + users: list[CreateOpsgenieAlertTaskParamsUsersItem] | Unset = UNSET + schedules: list[CreateOpsgenieAlertTaskParamsSchedulesItem] | Unset = UNSET + escalations: list[CreateOpsgenieAlertTaskParamsEscalationsItem] | Unset = UNSET + priority: CreateOpsgenieAlertTaskParamsPriority | Unset = "P1" + details: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: message = self.message - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type description = self.description - teams: Unset | list[dict[str, Any]] = UNSET + teams: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.teams, Unset): teams = [] for teams_item_data in self.teams: teams_item = teams_item_data.to_dict() teams.append(teams_item) - users: Unset | list[dict[str, Any]] = UNSET + users: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.users, Unset): users = [] for users_item_data in self.users: users_item = users_item_data.to_dict() users.append(users_item) - schedules: Unset | list[dict[str, Any]] = UNSET + schedules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.schedules, Unset): schedules = [] for schedules_item_data in self.schedules: schedules_item = schedules_item_data.to_dict() schedules.append(schedules_item) - escalations: Unset | list[dict[str, Any]] = UNSET + escalations: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.escalations, Unset): escalations = [] for escalations_item_data in self.escalations: escalations_item = escalations_item_data.to_dict() escalations.append(escalations_item) - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority - details: None | Unset | str + details: None | str | Unset if isinstance(self.details, Unset): details = UNSET else: @@ -137,7 +139,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: message = d.pop("message") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateOpsgenieAlertTaskParamsTaskType + task_type: CreateOpsgenieAlertTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -145,47 +147,55 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) - teams = [] _teams = d.pop("teams", UNSET) - for teams_item_data in _teams or []: - teams_item = CreateOpsgenieAlertTaskParamsTeamsItem.from_dict(teams_item_data) + teams: list[CreateOpsgenieAlertTaskParamsTeamsItem] | Unset = UNSET + if _teams is not UNSET: + teams = [] + for teams_item_data in _teams: + teams_item = CreateOpsgenieAlertTaskParamsTeamsItem.from_dict(teams_item_data) - teams.append(teams_item) + teams.append(teams_item) - users = [] _users = d.pop("users", UNSET) - for users_item_data in _users or []: - users_item = CreateOpsgenieAlertTaskParamsUsersItem.from_dict(users_item_data) + users: list[CreateOpsgenieAlertTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = CreateOpsgenieAlertTaskParamsUsersItem.from_dict(users_item_data) - users.append(users_item) + users.append(users_item) - schedules = [] _schedules = d.pop("schedules", UNSET) - for schedules_item_data in _schedules or []: - schedules_item = CreateOpsgenieAlertTaskParamsSchedulesItem.from_dict(schedules_item_data) + schedules: list[CreateOpsgenieAlertTaskParamsSchedulesItem] | Unset = UNSET + if _schedules is not UNSET: + schedules = [] + for schedules_item_data in _schedules: + schedules_item = CreateOpsgenieAlertTaskParamsSchedulesItem.from_dict(schedules_item_data) - schedules.append(schedules_item) + schedules.append(schedules_item) - escalations = [] _escalations = d.pop("escalations", UNSET) - for escalations_item_data in _escalations or []: - escalations_item = CreateOpsgenieAlertTaskParamsEscalationsItem.from_dict(escalations_item_data) + escalations: list[CreateOpsgenieAlertTaskParamsEscalationsItem] | Unset = UNSET + if _escalations is not UNSET: + escalations = [] + for escalations_item_data in _escalations: + escalations_item = CreateOpsgenieAlertTaskParamsEscalationsItem.from_dict(escalations_item_data) - escalations.append(escalations_item) + escalations.append(escalations_item) _priority = d.pop("priority", UNSET) - priority: Unset | CreateOpsgenieAlertTaskParamsPriority + priority: CreateOpsgenieAlertTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = check_create_opsgenie_alert_task_params_priority(_priority) - def _parse_details(data: object) -> None | Unset | str: + def _parse_details(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) details = _parse_details(d.pop("details", UNSET)) diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params_escalations_item.py b/rootly_sdk/models/create_opsgenie_alert_task_params_escalations_item.py index 23830de1..57756e03 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params_escalations_item.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params_escalations_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateOpsgenieAlertTaskParamsEscalationsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params_schedules_item.py b/rootly_sdk/models/create_opsgenie_alert_task_params_schedules_item.py index 8e712954..47a772c1 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params_schedules_item.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params_schedules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateOpsgenieAlertTaskParamsSchedulesItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params_teams_item.py b/rootly_sdk/models/create_opsgenie_alert_task_params_teams_item.py index 9da5b53b..4a3bbc40 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params_teams_item.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params_teams_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateOpsgenieAlertTaskParamsTeamsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params_users_item.py b/rootly_sdk/models/create_opsgenie_alert_task_params_users_item.py index f631ad3d..940b0635 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params_users_item.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params_users_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateOpsgenieAlertTaskParamsUsersItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_outlook_event_task_params.py b/rootly_sdk/models/create_outlook_event_task_params.py index ff18c799..585ca1e6 100644 --- a/rootly_sdk/models/create_outlook_event_task_params.py +++ b/rootly_sdk/models/create_outlook_event_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -30,28 +32,28 @@ class CreateOutlookEventTaskParams: meeting_duration (str): Meeting duration in format like '1 hour', '30 minutes' Example: 1 hour. summary (str): The event summary description (str): The event description - task_type (Union[Unset, CreateOutlookEventTaskParamsTaskType]): - attendees (Union[Unset, list[str]]): Emails of attendees - time_zone (Union[None, Unset, str]): A valid IANA time zone name. - exclude_weekends (Union[Unset, bool]): - enable_online_meeting (Union[Unset, bool]): Enable Microsoft Teams online meeting - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateOutlookEventTaskParamsPostToSlackChannelsItem']]): + task_type (CreateOutlookEventTaskParamsTaskType | Unset): + attendees (list[str] | Unset): Emails of attendees + time_zone (None | str | Unset): A valid IANA time zone name. + exclude_weekends (bool | Unset): + enable_online_meeting (bool | Unset): Enable Microsoft Teams online meeting + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateOutlookEventTaskParamsPostToSlackChannelsItem] | Unset): """ - calendar: "CreateOutlookEventTaskParamsCalendar" + calendar: CreateOutlookEventTaskParamsCalendar days_until_meeting: int time_of_meeting: str meeting_duration: str summary: str description: str - task_type: Unset | CreateOutlookEventTaskParamsTaskType = UNSET - attendees: Unset | list[str] = UNSET - time_zone: None | Unset | str = UNSET - exclude_weekends: Unset | bool = UNSET - enable_online_meeting: Unset | bool = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateOutlookEventTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateOutlookEventTaskParamsTaskType | Unset = UNSET + attendees: list[str] | Unset = UNSET + time_zone: None | str | Unset = UNSET + exclude_weekends: bool | Unset = UNSET + enable_online_meeting: bool | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateOutlookEventTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -67,15 +69,15 @@ def to_dict(self) -> dict[str, Any]: description = self.description - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - attendees: Unset | list[str] = UNSET + attendees: list[str] | Unset = UNSET if not isinstance(self.attendees, Unset): attendees = self.attendees - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: @@ -87,7 +89,7 @@ def to_dict(self) -> dict[str, Any]: post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -144,7 +146,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateOutlookEventTaskParamsTaskType + task_type: CreateOutlookEventTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -152,12 +154,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attendees = cast(list[str], d.pop("attendees", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) @@ -167,14 +169,16 @@ def _parse_time_zone(data: object) -> None | Unset | str: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateOutlookEventTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateOutlookEventTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateOutlookEventTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_outlook_event_task_params = cls( calendar=calendar, diff --git a/rootly_sdk/models/create_outlook_event_task_params_calendar.py b/rootly_sdk/models/create_outlook_event_task_params_calendar.py index 5f79c9ee..887dfaf4 100644 --- a/rootly_sdk/models/create_outlook_event_task_params_calendar.py +++ b/rootly_sdk/models/create_outlook_event_task_params_calendar.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateOutlookEventTaskParamsCalendar: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_outlook_event_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_outlook_event_task_params_post_to_slack_channels_item.py index 2349ee5e..fefe788e 100644 --- a/rootly_sdk/models/create_outlook_event_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_outlook_event_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateOutlookEventTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_pagerduty_status_update_task_params.py b/rootly_sdk/models/create_pagerduty_status_update_task_params.py index f836a566..f40fb4aa 100644 --- a/rootly_sdk/models/create_pagerduty_status_update_task_params.py +++ b/rootly_sdk/models/create_pagerduty_status_update_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -19,12 +21,12 @@ class CreatePagerdutyStatusUpdateTaskParams: Attributes: pagerduty_incident_id (str): PagerDuty incident id message (str): A message outlining the incident's resolution in PagerDuty - task_type (Union[Unset, CreatePagerdutyStatusUpdateTaskParamsTaskType]): + task_type (CreatePagerdutyStatusUpdateTaskParamsTaskType | Unset): """ pagerduty_incident_id: str message: str - task_type: Unset | CreatePagerdutyStatusUpdateTaskParamsTaskType = UNSET + task_type: CreatePagerdutyStatusUpdateTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: message = self.message - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -57,7 +59,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: message = d.pop("message") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreatePagerdutyStatusUpdateTaskParamsTaskType + task_type: CreatePagerdutyStatusUpdateTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_pagertree_alert_task_params.py b/rootly_sdk/models/create_pagertree_alert_task_params.py index 78a31a09..8ea30592 100644 --- a/rootly_sdk/models/create_pagertree_alert_task_params.py +++ b/rootly_sdk/models/create_pagertree_alert_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -30,28 +32,28 @@ class CreatePagertreeAlertTaskParams: """ Attributes: - task_type (Union[Unset, CreatePagertreeAlertTaskParamsTaskType]): - title (Union[Unset, str]): Title of alert as text - description (Union[Unset, str]): Description of alert as text - urgency (Union[Unset, CreatePagertreeAlertTaskParamsUrgency]): - severity (Union[Unset, CreatePagertreeAlertTaskParamsSeverity]): - teams (Union[Unset, list['CreatePagertreeAlertTaskParamsTeamsItem']]): - users (Union[Unset, list['CreatePagertreeAlertTaskParamsUsersItem']]): - incident (Union[Unset, bool]): Setting to true makes an alert a Pagertree incident + task_type (CreatePagertreeAlertTaskParamsTaskType | Unset): + title (str | Unset): Title of alert as text + description (str | Unset): Description of alert as text + urgency (CreatePagertreeAlertTaskParamsUrgency | Unset): + severity (CreatePagertreeAlertTaskParamsSeverity | Unset): + teams (list[CreatePagertreeAlertTaskParamsTeamsItem] | Unset): + users (list[CreatePagertreeAlertTaskParamsUsersItem] | Unset): + incident (bool | Unset): Setting to true makes an alert a Pagertree incident """ - task_type: Unset | CreatePagertreeAlertTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - urgency: Unset | CreatePagertreeAlertTaskParamsUrgency = UNSET - severity: Unset | CreatePagertreeAlertTaskParamsSeverity = UNSET - teams: Unset | list["CreatePagertreeAlertTaskParamsTeamsItem"] = UNSET - users: Unset | list["CreatePagertreeAlertTaskParamsUsersItem"] = UNSET - incident: Unset | bool = UNSET + task_type: CreatePagertreeAlertTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + urgency: CreatePagertreeAlertTaskParamsUrgency | Unset = UNSET + severity: CreatePagertreeAlertTaskParamsSeverity | Unset = UNSET + teams: list[CreatePagertreeAlertTaskParamsTeamsItem] | Unset = UNSET + users: list[CreatePagertreeAlertTaskParamsUsersItem] | Unset = UNSET + incident: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -59,22 +61,22 @@ def to_dict(self) -> dict[str, Any]: description = self.description - urgency: Unset | str = UNSET + urgency: str | Unset = UNSET if not isinstance(self.urgency, Unset): urgency = self.urgency - severity: Unset | str = UNSET + severity: str | Unset = UNSET if not isinstance(self.severity, Unset): severity = self.severity - teams: Unset | list[dict[str, Any]] = UNSET + teams: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.teams, Unset): teams = [] for teams_item_data in self.teams: teams_item = teams_item_data.to_dict() teams.append(teams_item) - users: Unset | list[dict[str, Any]] = UNSET + users: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.users, Unset): users = [] for users_item_data in self.users: @@ -112,7 +114,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreatePagertreeAlertTaskParamsTaskType + task_type: CreatePagertreeAlertTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -123,32 +125,36 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _urgency = d.pop("urgency", UNSET) - urgency: Unset | CreatePagertreeAlertTaskParamsUrgency + urgency: CreatePagertreeAlertTaskParamsUrgency | Unset if isinstance(_urgency, Unset): urgency = UNSET else: urgency = check_create_pagertree_alert_task_params_urgency(_urgency) _severity = d.pop("severity", UNSET) - severity: Unset | CreatePagertreeAlertTaskParamsSeverity + severity: CreatePagertreeAlertTaskParamsSeverity | Unset if isinstance(_severity, Unset): severity = UNSET else: severity = check_create_pagertree_alert_task_params_severity(_severity) - teams = [] _teams = d.pop("teams", UNSET) - for teams_item_data in _teams or []: - teams_item = CreatePagertreeAlertTaskParamsTeamsItem.from_dict(teams_item_data) + teams: list[CreatePagertreeAlertTaskParamsTeamsItem] | Unset = UNSET + if _teams is not UNSET: + teams = [] + for teams_item_data in _teams: + teams_item = CreatePagertreeAlertTaskParamsTeamsItem.from_dict(teams_item_data) - teams.append(teams_item) + teams.append(teams_item) - users = [] _users = d.pop("users", UNSET) - for users_item_data in _users or []: - users_item = CreatePagertreeAlertTaskParamsUsersItem.from_dict(users_item_data) + users: list[CreatePagertreeAlertTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = CreatePagertreeAlertTaskParamsUsersItem.from_dict(users_item_data) - users.append(users_item) + users.append(users_item) incident = d.pop("incident", UNSET) diff --git a/rootly_sdk/models/create_pagertree_alert_task_params_teams_item.py b/rootly_sdk/models/create_pagertree_alert_task_params_teams_item.py index b863b3bb..5d81a118 100644 --- a/rootly_sdk/models/create_pagertree_alert_task_params_teams_item.py +++ b/rootly_sdk/models/create_pagertree_alert_task_params_teams_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreatePagertreeAlertTaskParamsTeamsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_pagertree_alert_task_params_users_item.py b/rootly_sdk/models/create_pagertree_alert_task_params_users_item.py index 2855febc..bfe6bbb0 100644 --- a/rootly_sdk/models/create_pagertree_alert_task_params_users_item.py +++ b/rootly_sdk/models/create_pagertree_alert_task_params_users_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreatePagertreeAlertTaskParamsUsersItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_quip_page_task_params.py b/rootly_sdk/models/create_quip_page_task_params.py index 619a1f99..9265d881 100644 --- a/rootly_sdk/models/create_quip_page_task_params.py +++ b/rootly_sdk/models/create_quip_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,27 +20,27 @@ class CreateQuipPageTaskParams: """ Attributes: title (str): The page title - task_type (Union[Unset, CreateQuipPageTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page, if desired - parent_folder_id (Union[Unset, str]): The parent folder id - content (Union[Unset, str]): The page content - template_id (Union[Unset, str]): The Quip file ID to use as a template - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. + task_type (CreateQuipPageTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating page, if desired + parent_folder_id (str | Unset): The parent folder id + content (str | Unset): The page content + template_id (str | Unset): The Quip file ID to use as a template + mark_post_mortem_as_published (bool | Unset): Default: True. """ title: str - task_type: Unset | CreateQuipPageTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - parent_folder_id: Unset | str = UNSET - content: Unset | str = UNSET - template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True + task_type: CreateQuipPageTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + parent_folder_id: str | Unset = UNSET + content: str | Unset = UNSET + template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -80,7 +82,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateQuipPageTaskParamsTaskType + task_type: CreateQuipPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_service_now_incident_task_params.py b/rootly_sdk/models/create_service_now_incident_task_params.py index 14cdd261..a6f71fb9 100644 --- a/rootly_sdk/models/create_service_now_incident_task_params.py +++ b/rootly_sdk/models/create_service_now_incident_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,40 +25,40 @@ class CreateServiceNowIncidentTaskParams: """ Attributes: title (str): The incident title - task_type (Union[Unset, CreateServiceNowIncidentTaskParamsTaskType]): - description (Union[Unset, str]): The incident description - priority (Union[Unset, CreateServiceNowIncidentTaskParamsPriority]): The priority id and display name - completion (Union[Unset, CreateServiceNowIncidentTaskParamsCompletion]): The completion id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateServiceNowIncidentTaskParamsTaskType | Unset): + description (str | Unset): The incident description + priority (CreateServiceNowIncidentTaskParamsPriority | Unset): The priority id and display name + completion (CreateServiceNowIncidentTaskParamsCompletion | Unset): The completion id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON """ title: str - task_type: Unset | CreateServiceNowIncidentTaskParamsTaskType = UNSET - description: Unset | str = UNSET - priority: Union[Unset, "CreateServiceNowIncidentTaskParamsPriority"] = UNSET - completion: Union[Unset, "CreateServiceNowIncidentTaskParamsCompletion"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET + task_type: CreateServiceNowIncidentTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + priority: CreateServiceNowIncidentTaskParamsPriority | Unset = UNSET + completion: CreateServiceNowIncidentTaskParamsCompletion | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type description = self.description - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - completion: Unset | dict[str, Any] = UNSET + completion: dict[str, Any] | Unset = UNSET if not isinstance(self.completion, Unset): completion = self.completion.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -93,7 +95,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateServiceNowIncidentTaskParamsTaskType + task_type: CreateServiceNowIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -102,25 +104,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | CreateServiceNowIncidentTaskParamsPriority + priority: CreateServiceNowIncidentTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = CreateServiceNowIncidentTaskParamsPriority.from_dict(_priority) _completion = d.pop("completion", UNSET) - completion: Unset | CreateServiceNowIncidentTaskParamsCompletion + completion: CreateServiceNowIncidentTaskParamsCompletion | Unset if isinstance(_completion, Unset): completion = UNSET else: completion = CreateServiceNowIncidentTaskParamsCompletion.from_dict(_completion) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/create_service_now_incident_task_params_completion.py b/rootly_sdk/models/create_service_now_incident_task_params_completion.py index ec01454d..550f0f18 100644 --- a/rootly_sdk/models/create_service_now_incident_task_params_completion.py +++ b/rootly_sdk/models/create_service_now_incident_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateServiceNowIncidentTaskParamsCompletion: """The completion id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_service_now_incident_task_params_priority.py b/rootly_sdk/models/create_service_now_incident_task_params_priority.py index b1d196e4..186be050 100644 --- a/rootly_sdk/models/create_service_now_incident_task_params_priority.py +++ b/rootly_sdk/models/create_service_now_incident_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateServiceNowIncidentTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_sharepoint_page_task_params.py b/rootly_sdk/models/create_sharepoint_page_task_params.py index b75eb1f2..d914148c 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,23 +28,23 @@ class CreateSharepointPageTaskParams: title (str): The page title site (CreateSharepointPageTaskParamsSite): drive (CreateSharepointPageTaskParamsDrive): - task_type (Union[Unset, CreateSharepointPageTaskParamsTaskType]): - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page, if desired - mark_post_mortem_as_published (Union[Unset, bool]): Default: True. - parent_folder (Union[Unset, CreateSharepointPageTaskParamsParentFolder]): - content (Union[Unset, str]): The page content - template_id (Union[Unset, str]): The SharePoint file ID to use as a template + task_type (CreateSharepointPageTaskParamsTaskType | Unset): + post_mortem_template_id (str | Unset): Retrospective template to use when creating page, if desired + mark_post_mortem_as_published (bool | Unset): Default: True. + parent_folder (CreateSharepointPageTaskParamsParentFolder | Unset): + content (str | Unset): The page content + template_id (str | Unset): The SharePoint file ID to use as a template """ title: str - site: "CreateSharepointPageTaskParamsSite" - drive: "CreateSharepointPageTaskParamsDrive" - task_type: Unset | CreateSharepointPageTaskParamsTaskType = UNSET - post_mortem_template_id: Unset | str = UNSET - mark_post_mortem_as_published: Unset | bool = True - parent_folder: Union[Unset, "CreateSharepointPageTaskParamsParentFolder"] = UNSET - content: Unset | str = UNSET - template_id: Unset | str = UNSET + site: CreateSharepointPageTaskParamsSite + drive: CreateSharepointPageTaskParamsDrive + task_type: CreateSharepointPageTaskParamsTaskType | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + mark_post_mortem_as_published: bool | Unset = True + parent_folder: CreateSharepointPageTaskParamsParentFolder | Unset = UNSET + content: str | Unset = UNSET + template_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,7 +54,7 @@ def to_dict(self) -> dict[str, Any]: drive = self.drive.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -60,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: mark_post_mortem_as_published = self.mark_post_mortem_as_published - parent_folder: Unset | dict[str, Any] = UNSET + parent_folder: dict[str, Any] | Unset = UNSET if not isinstance(self.parent_folder, Unset): parent_folder = self.parent_folder.to_dict() @@ -106,7 +108,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: drive = CreateSharepointPageTaskParamsDrive.from_dict(d.pop("drive")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateSharepointPageTaskParamsTaskType + task_type: CreateSharepointPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -117,7 +119,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: mark_post_mortem_as_published = d.pop("mark_post_mortem_as_published", UNSET) _parent_folder = d.pop("parent_folder", UNSET) - parent_folder: Unset | CreateSharepointPageTaskParamsParentFolder + parent_folder: CreateSharepointPageTaskParamsParentFolder | Unset if isinstance(_parent_folder, Unset): parent_folder = UNSET else: diff --git a/rootly_sdk/models/create_sharepoint_page_task_params_drive.py b/rootly_sdk/models/create_sharepoint_page_task_params_drive.py index eb8f611c..cbf15f10 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params_drive.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params_drive.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateSharepointPageTaskParamsDrive: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_sharepoint_page_task_params_parent_folder.py b/rootly_sdk/models/create_sharepoint_page_task_params_parent_folder.py index 8bf706ee..16f35526 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params_parent_folder.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params_parent_folder.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateSharepointPageTaskParamsParentFolder: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_sharepoint_page_task_params_site.py b/rootly_sdk/models/create_sharepoint_page_task_params_site.py index 10269545..638cc4f0 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params_site.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params_site.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateSharepointPageTaskParamsSite: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_shortcut_task_task_params.py b/rootly_sdk/models/create_shortcut_task_task_params.py index 13958785..be8cd214 100644 --- a/rootly_sdk/models/create_shortcut_task_task_params.py +++ b/rootly_sdk/models/create_shortcut_task_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,13 +26,13 @@ class CreateShortcutTaskTaskParams: parent_story_id (str): The parent story description (str): The task description completion (CreateShortcutTaskTaskParamsCompletion): The completion id and display name - task_type (Union[Unset, CreateShortcutTaskTaskParamsTaskType]): + task_type (CreateShortcutTaskTaskParamsTaskType | Unset): """ parent_story_id: str description: str - completion: "CreateShortcutTaskTaskParamsCompletion" - task_type: Unset | CreateShortcutTaskTaskParamsTaskType = UNSET + completion: CreateShortcutTaskTaskParamsCompletion + task_type: CreateShortcutTaskTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -70,7 +72,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = CreateShortcutTaskTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateShortcutTaskTaskParamsTaskType + task_type: CreateShortcutTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_shortcut_task_task_params_completion.py b/rootly_sdk/models/create_shortcut_task_task_params_completion.py index be24cd42..01333610 100644 --- a/rootly_sdk/models/create_shortcut_task_task_params_completion.py +++ b/rootly_sdk/models/create_shortcut_task_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateShortcutTaskTaskParamsCompletion: """The completion id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_slack_channel_task_params.py b/rootly_sdk/models/create_slack_channel_task_params.py index 18954329..5f21ab2b 100644 --- a/rootly_sdk/models/create_slack_channel_task_params.py +++ b/rootly_sdk/models/create_slack_channel_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,14 +29,14 @@ class CreateSlackChannelTaskParams: Attributes: workspace (CreateSlackChannelTaskParamsWorkspace): title (str): Slack channel title - task_type (Union[Unset, CreateSlackChannelTaskParamsTaskType]): - private (Union[Unset, CreateSlackChannelTaskParamsPrivate]): Default: 'auto'. + task_type (CreateSlackChannelTaskParamsTaskType | Unset): + private (CreateSlackChannelTaskParamsPrivate | Unset): Default: 'auto'. """ - workspace: "CreateSlackChannelTaskParamsWorkspace" + workspace: CreateSlackChannelTaskParamsWorkspace title: str - task_type: Unset | CreateSlackChannelTaskParamsTaskType = UNSET - private: Unset | CreateSlackChannelTaskParamsPrivate = "auto" + task_type: CreateSlackChannelTaskParamsTaskType | Unset = UNSET + private: CreateSlackChannelTaskParamsPrivate | Unset = "auto" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,11 +44,11 @@ def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - private: Unset | str = UNSET + private: str | Unset = UNSET if not isinstance(self.private, Unset): private = self.private @@ -75,14 +77,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateSlackChannelTaskParamsTaskType + task_type: CreateSlackChannelTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_create_slack_channel_task_params_task_type(_task_type) _private = d.pop("private", UNSET) - private: Unset | CreateSlackChannelTaskParamsPrivate + private: CreateSlackChannelTaskParamsPrivate | Unset if isinstance(_private, Unset): private = UNSET else: diff --git a/rootly_sdk/models/create_slack_channel_task_params_workspace.py b/rootly_sdk/models/create_slack_channel_task_params_workspace.py index c2f64805..6c6f4e33 100644 --- a/rootly_sdk/models/create_slack_channel_task_params_workspace.py +++ b/rootly_sdk/models/create_slack_channel_task_params_workspace.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateSlackChannelTaskParamsWorkspace: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_sub_incident_task_params.py b/rootly_sdk/models/create_sub_incident_task_params.py index 4a0a9236..0f2a0359 100644 --- a/rootly_sdk/models/create_sub_incident_task_params.py +++ b/rootly_sdk/models/create_sub_incident_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,19 +20,19 @@ class CreateSubIncidentTaskParams: """ Attributes: title (str): The sub incident title - task_type (Union[Unset, CreateSubIncidentTaskParamsTaskType]): - summary (Union[Unset, str]): The sub incident summary + task_type (CreateSubIncidentTaskParamsTaskType | Unset): + summary (str | Unset): The sub incident summary """ title: str - task_type: Unset | CreateSubIncidentTaskParamsTaskType = UNSET - summary: Unset | str = UNSET + task_type: CreateSubIncidentTaskParamsTaskType | Unset = UNSET + summary: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -56,7 +58,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateSubIncidentTaskParamsTaskType + task_type: CreateSubIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_trello_card_task_params.py b/rootly_sdk/models/create_trello_card_task_params.py index af6370a8..8522b681 100644 --- a/rootly_sdk/models/create_trello_card_task_params.py +++ b/rootly_sdk/models/create_trello_card_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,21 +29,21 @@ class CreateTrelloCardTaskParams: title (str): The card title board (CreateTrelloCardTaskParamsBoard): The board id and display name list_ (CreateTrelloCardTaskParamsList): The list id and display name - task_type (Union[Unset, CreateTrelloCardTaskParamsTaskType]): - description (Union[Unset, str]): The card description - due_date (Union[Unset, str]): The due date - labels (Union[Unset, list['CreateTrelloCardTaskParamsLabelsItem']]): - archivation (Union[Unset, CreateTrelloCardTaskParamsArchivation]): The archivation id and display name + task_type (CreateTrelloCardTaskParamsTaskType | Unset): + description (str | Unset): The card description + due_date (str | Unset): The due date + labels (list[CreateTrelloCardTaskParamsLabelsItem] | Unset): + archivation (CreateTrelloCardTaskParamsArchivation | Unset): The archivation id and display name """ title: str - board: "CreateTrelloCardTaskParamsBoard" - list_: "CreateTrelloCardTaskParamsList" - task_type: Unset | CreateTrelloCardTaskParamsTaskType = UNSET - description: Unset | str = UNSET - due_date: Unset | str = UNSET - labels: Unset | list["CreateTrelloCardTaskParamsLabelsItem"] = UNSET - archivation: Union[Unset, "CreateTrelloCardTaskParamsArchivation"] = UNSET + board: CreateTrelloCardTaskParamsBoard + list_: CreateTrelloCardTaskParamsList + task_type: CreateTrelloCardTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + due_date: str | Unset = UNSET + labels: list[CreateTrelloCardTaskParamsLabelsItem] | Unset = UNSET + archivation: CreateTrelloCardTaskParamsArchivation | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: list_ = self.list_.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -59,14 +61,14 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - labels: Unset | list[dict[str, Any]] = UNSET + labels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: labels_item = labels_item_data.to_dict() labels.append(labels_item) - archivation: Unset | dict[str, Any] = UNSET + archivation: dict[str, Any] | Unset = UNSET if not isinstance(self.archivation, Unset): archivation = self.archivation.to_dict() @@ -107,7 +109,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: list_ = CreateTrelloCardTaskParamsList.from_dict(d.pop("list")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateTrelloCardTaskParamsTaskType + task_type: CreateTrelloCardTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -117,15 +119,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: - labels_item = CreateTrelloCardTaskParamsLabelsItem.from_dict(labels_item_data) + labels: list[CreateTrelloCardTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = CreateTrelloCardTaskParamsLabelsItem.from_dict(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) _archivation = d.pop("archivation", UNSET) - archivation: Unset | CreateTrelloCardTaskParamsArchivation + archivation: CreateTrelloCardTaskParamsArchivation | Unset if isinstance(_archivation, Unset): archivation = UNSET else: diff --git a/rootly_sdk/models/create_trello_card_task_params_archivation.py b/rootly_sdk/models/create_trello_card_task_params_archivation.py index 34647fb8..156c86c7 100644 --- a/rootly_sdk/models/create_trello_card_task_params_archivation.py +++ b/rootly_sdk/models/create_trello_card_task_params_archivation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateTrelloCardTaskParamsArchivation: """The archivation id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_trello_card_task_params_board.py b/rootly_sdk/models/create_trello_card_task_params_board.py index 792a44b2..358d9808 100644 --- a/rootly_sdk/models/create_trello_card_task_params_board.py +++ b/rootly_sdk/models/create_trello_card_task_params_board.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateTrelloCardTaskParamsBoard: """The board id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_trello_card_task_params_labels_item.py b/rootly_sdk/models/create_trello_card_task_params_labels_item.py index 75cb16c4..42ad31bb 100644 --- a/rootly_sdk/models/create_trello_card_task_params_labels_item.py +++ b/rootly_sdk/models/create_trello_card_task_params_labels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateTrelloCardTaskParamsLabelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_trello_card_task_params_list.py b/rootly_sdk/models/create_trello_card_task_params_list.py index 7c2b9197..6c584b6b 100644 --- a/rootly_sdk/models/create_trello_card_task_params_list.py +++ b/rootly_sdk/models/create_trello_card_task_params_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateTrelloCardTaskParamsList: """The list id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_watsonx_chat_completion_task_params.py b/rootly_sdk/models/create_watsonx_chat_completion_task_params.py index ecf53077..ddc592bc 100644 --- a/rootly_sdk/models/create_watsonx_chat_completion_task_params.py +++ b/rootly_sdk/models/create_watsonx_chat_completion_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,15 +26,15 @@ class CreateWatsonxChatCompletionTaskParams: model (CreateWatsonxChatCompletionTaskParamsModel): The WatsonX model. eg: ibm/granite-3-b8b-instruct prompt (str): The prompt to send to WatsonX project_id (str): - task_type (Union[Unset, CreateWatsonxChatCompletionTaskParamsTaskType]): - system_prompt (Union[Unset, str]): The system prompt to send to WatsonX (optional) + task_type (CreateWatsonxChatCompletionTaskParamsTaskType | Unset): + system_prompt (str | Unset): The system prompt to send to WatsonX (optional) """ - model: "CreateWatsonxChatCompletionTaskParamsModel" + model: CreateWatsonxChatCompletionTaskParamsModel prompt: str project_id: str - task_type: Unset | CreateWatsonxChatCompletionTaskParamsTaskType = UNSET - system_prompt: Unset | str = UNSET + task_type: CreateWatsonxChatCompletionTaskParamsTaskType | Unset = UNSET + system_prompt: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: project_id = self.project_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -76,7 +78,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: project_id = d.pop("project_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateWatsonxChatCompletionTaskParamsTaskType + task_type: CreateWatsonxChatCompletionTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_watsonx_chat_completion_task_params_model.py b/rootly_sdk/models/create_watsonx_chat_completion_task_params_model.py index 1a1b5d64..e26a08fb 100644 --- a/rootly_sdk/models/create_watsonx_chat_completion_task_params_model.py +++ b/rootly_sdk/models/create_watsonx_chat_completion_task_params_model.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateWatsonxChatCompletionTaskParamsModel: """The WatsonX model. eg: ibm/granite-3-b8b-instruct Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_webex_meeting_task_params.py b/rootly_sdk/models/create_webex_meeting_task_params.py index 895ac35f..cffd1878 100644 --- a/rootly_sdk/models/create_webex_meeting_task_params.py +++ b/rootly_sdk/models/create_webex_meeting_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -28,29 +30,29 @@ class CreateWebexMeetingTaskParams: """ Attributes: topic (str): The meeting topic - task_type (Union[Unset, CreateWebexMeetingTaskParamsTaskType]): - password (Union[Unset, str]): The meeting password - record_meeting (Union[Unset, bool]): Rootly AI will record the meeting and automatically generate a transcript - and summary from your meeting - recording_mode (Union[Unset, CreateWebexMeetingTaskParamsRecordingMode]): The video layout for the bot's - recording (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateWebexMeetingTaskParamsPostToSlackChannelsItem']]): + task_type (CreateWebexMeetingTaskParamsTaskType | Unset): + password (str | Unset): The meeting password + record_meeting (bool | Unset): Rootly AI will record the meeting and automatically generate a transcript and + summary from your meeting + recording_mode (CreateWebexMeetingTaskParamsRecordingMode | Unset): The video layout for the bot's recording + (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateWebexMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ topic: str - task_type: Unset | CreateWebexMeetingTaskParamsTaskType = UNSET - password: Unset | str = UNSET - record_meeting: Unset | bool = UNSET - recording_mode: Unset | CreateWebexMeetingTaskParamsRecordingMode = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateWebexMeetingTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateWebexMeetingTaskParamsTaskType | Unset = UNSET + password: str | Unset = UNSET + record_meeting: bool | Unset = UNSET + recording_mode: CreateWebexMeetingTaskParamsRecordingMode | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateWebexMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: topic = self.topic - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -58,13 +60,13 @@ def to_dict(self) -> dict[str, Any]: record_meeting = self.record_meeting - recording_mode: Unset | str = UNSET + recording_mode: str | Unset = UNSET if not isinstance(self.recording_mode, Unset): recording_mode = self.recording_mode post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -103,7 +105,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: topic = d.pop("topic") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateWebexMeetingTaskParamsTaskType + task_type: CreateWebexMeetingTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -114,7 +116,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: record_meeting = d.pop("record_meeting", UNSET) _recording_mode = d.pop("recording_mode", UNSET) - recording_mode: Unset | CreateWebexMeetingTaskParamsRecordingMode + recording_mode: CreateWebexMeetingTaskParamsRecordingMode | Unset if isinstance(_recording_mode, Unset): recording_mode = UNSET else: @@ -122,14 +124,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateWebexMeetingTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateWebexMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateWebexMeetingTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_webex_meeting_task_params = cls( topic=topic, diff --git a/rootly_sdk/models/create_webex_meeting_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_webex_meeting_task_params_post_to_slack_channels_item.py index 8ed5a6db..6e3cd47d 100644 --- a/rootly_sdk/models/create_webex_meeting_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_webex_meeting_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateWebexMeetingTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_zendesk_jira_link_task_params.py b/rootly_sdk/models/create_zendesk_jira_link_task_params.py index 26ac50a0..79171b39 100644 --- a/rootly_sdk/models/create_zendesk_jira_link_task_params.py +++ b/rootly_sdk/models/create_zendesk_jira_link_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -20,13 +22,13 @@ class CreateZendeskJiraLinkTaskParams: jira_issue_id (str): Jira Issue Id. jira_issue_key (str): Jira Issue Key. zendesk_ticket_id (str): Zendesk Ticket Id. - task_type (Union[Unset, CreateZendeskJiraLinkTaskParamsTaskType]): + task_type (CreateZendeskJiraLinkTaskParamsTaskType | Unset): """ jira_issue_id: str jira_issue_key: str zendesk_ticket_id: str - task_type: Unset | CreateZendeskJiraLinkTaskParamsTaskType = UNSET + task_type: CreateZendeskJiraLinkTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: zendesk_ticket_id = self.zendesk_ticket_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -64,7 +66,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: zendesk_ticket_id = d.pop("zendesk_ticket_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateZendeskJiraLinkTaskParamsTaskType + task_type: CreateZendeskJiraLinkTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/create_zendesk_ticket_task_params.py b/rootly_sdk/models/create_zendesk_ticket_task_params.py index 8e5038ed..e0358ab7 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,26 +30,26 @@ class CreateZendeskTicketTaskParams: Attributes: kind (CreateZendeskTicketTaskParamsKind): subject (str): The ticket subject - task_type (Union[Unset, CreateZendeskTicketTaskParamsTaskType]): - comment (Union[Unset, str]): The ticket comment - tags (Union[Unset, str]): The ticket tags - priority (Union[Unset, CreateZendeskTicketTaskParamsPriority]): The priority id and display name - completion (Union[Unset, CreateZendeskTicketTaskParamsCompletion]): The completion id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (CreateZendeskTicketTaskParamsTaskType | Unset): + comment (str | Unset): The ticket comment + tags (str | Unset): The ticket tags + priority (CreateZendeskTicketTaskParamsPriority | Unset): The priority id and display name + completion (CreateZendeskTicketTaskParamsCompletion | Unset): The completion id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - ticket_payload (Union[None, Unset, str]): Additional Zendesk ticket attributes. Will be merged into whatever was + ticket_payload (None | str | Unset): Additional Zendesk ticket attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON """ kind: CreateZendeskTicketTaskParamsKind subject: str - task_type: Unset | CreateZendeskTicketTaskParamsTaskType = UNSET - comment: Unset | str = UNSET - tags: Unset | str = UNSET - priority: Union[Unset, "CreateZendeskTicketTaskParamsPriority"] = UNSET - completion: Union[Unset, "CreateZendeskTicketTaskParamsCompletion"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET - ticket_payload: None | Unset | str = UNSET + task_type: CreateZendeskTicketTaskParamsTaskType | Unset = UNSET + comment: str | Unset = UNSET + tags: str | Unset = UNSET + priority: CreateZendeskTicketTaskParamsPriority | Unset = UNSET + completion: CreateZendeskTicketTaskParamsCompletion | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + ticket_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: subject = self.subject - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -63,21 +65,21 @@ def to_dict(self) -> dict[str, Any]: tags = self.tags - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - completion: Unset | dict[str, Any] = UNSET + completion: dict[str, Any] | Unset = UNSET if not isinstance(self.completion, Unset): completion = self.completion.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - ticket_payload: None | Unset | str + ticket_payload: None | str | Unset if isinstance(self.ticket_payload, Unset): ticket_payload = UNSET else: @@ -119,7 +121,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subject = d.pop("subject") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateZendeskTicketTaskParamsTaskType + task_type: CreateZendeskTicketTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -130,34 +132,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: tags = d.pop("tags", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | CreateZendeskTicketTaskParamsPriority + priority: CreateZendeskTicketTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = CreateZendeskTicketTaskParamsPriority.from_dict(_priority) _completion = d.pop("completion", UNSET) - completion: Unset | CreateZendeskTicketTaskParamsCompletion + completion: CreateZendeskTicketTaskParamsCompletion | Unset if isinstance(_completion, Unset): completion = UNSET else: completion = CreateZendeskTicketTaskParamsCompletion.from_dict(_completion) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_ticket_payload(data: object) -> None | Unset | str: + def _parse_ticket_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) ticket_payload = _parse_ticket_payload(d.pop("ticket_payload", UNSET)) diff --git a/rootly_sdk/models/create_zendesk_ticket_task_params_completion.py b/rootly_sdk/models/create_zendesk_ticket_task_params_completion.py index e6192bfd..2554ba85 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params_completion.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateZendeskTicketTaskParamsCompletion: """The completion id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_zendesk_ticket_task_params_priority.py b/rootly_sdk/models/create_zendesk_ticket_task_params_priority.py index eaeb09b3..8a7902cb 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params_priority.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class CreateZendeskTicketTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/create_zoom_meeting_task_params.py b/rootly_sdk/models/create_zoom_meeting_task_params.py index 43938ba6..ac986319 100644 --- a/rootly_sdk/models/create_zoom_meeting_task_params.py +++ b/rootly_sdk/models/create_zoom_meeting_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -32,35 +34,35 @@ class CreateZoomMeetingTaskParams: """ Attributes: topic (str): The meeting topic - task_type (Union[Unset, CreateZoomMeetingTaskParamsTaskType]): - password (Union[Unset, str]): The meeting password - create_as_email (Union[Unset, str]): The email to use if creating as email - alternative_hosts (Union[Unset, list[str]]): - auto_recording (Union[Unset, CreateZoomMeetingTaskParamsAutoRecording]): Default: 'none'. - record_meeting (Union[Unset, bool]): Rootly AI will record the meeting and automatically generate a transcript - and summary from your meeting - recording_mode (Union[Unset, CreateZoomMeetingTaskParamsRecordingMode]): The video layout for the bot's - recording (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['CreateZoomMeetingTaskParamsPostToSlackChannelsItem']]): + task_type (CreateZoomMeetingTaskParamsTaskType | Unset): + password (str | Unset): The meeting password + create_as_email (str | Unset): The email to use if creating as email + alternative_hosts (list[str] | Unset): + auto_recording (CreateZoomMeetingTaskParamsAutoRecording | Unset): Default: 'none'. + record_meeting (bool | Unset): Rootly AI will record the meeting and automatically generate a transcript and + summary from your meeting + recording_mode (CreateZoomMeetingTaskParamsRecordingMode | Unset): The video layout for the bot's recording + (e.g. speaker_view, gallery_view, gallery_view_v2, audio_only) + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[CreateZoomMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ topic: str - task_type: Unset | CreateZoomMeetingTaskParamsTaskType = UNSET - password: Unset | str = UNSET - create_as_email: Unset | str = UNSET - alternative_hosts: Unset | list[str] = UNSET - auto_recording: Unset | CreateZoomMeetingTaskParamsAutoRecording = "none" - record_meeting: Unset | bool = UNSET - recording_mode: Unset | CreateZoomMeetingTaskParamsRecordingMode = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["CreateZoomMeetingTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: CreateZoomMeetingTaskParamsTaskType | Unset = UNSET + password: str | Unset = UNSET + create_as_email: str | Unset = UNSET + alternative_hosts: list[str] | Unset = UNSET + auto_recording: CreateZoomMeetingTaskParamsAutoRecording | Unset = "none" + record_meeting: bool | Unset = UNSET + recording_mode: CreateZoomMeetingTaskParamsRecordingMode | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[CreateZoomMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: topic = self.topic - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -68,23 +70,23 @@ def to_dict(self) -> dict[str, Any]: create_as_email = self.create_as_email - alternative_hosts: Unset | list[str] = UNSET + alternative_hosts: list[str] | Unset = UNSET if not isinstance(self.alternative_hosts, Unset): alternative_hosts = self.alternative_hosts - auto_recording: Unset | str = UNSET + auto_recording: str | Unset = UNSET if not isinstance(self.auto_recording, Unset): auto_recording = self.auto_recording record_meeting = self.record_meeting - recording_mode: Unset | str = UNSET + recording_mode: str | Unset = UNSET if not isinstance(self.recording_mode, Unset): recording_mode = self.recording_mode post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -129,7 +131,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: topic = d.pop("topic") _task_type = d.pop("task_type", UNSET) - task_type: Unset | CreateZoomMeetingTaskParamsTaskType + task_type: CreateZoomMeetingTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -142,7 +144,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alternative_hosts = cast(list[str], d.pop("alternative_hosts", UNSET)) _auto_recording = d.pop("auto_recording", UNSET) - auto_recording: Unset | CreateZoomMeetingTaskParamsAutoRecording + auto_recording: CreateZoomMeetingTaskParamsAutoRecording | Unset if isinstance(_auto_recording, Unset): auto_recording = UNSET else: @@ -151,7 +153,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: record_meeting = d.pop("record_meeting", UNSET) _recording_mode = d.pop("recording_mode", UNSET) - recording_mode: Unset | CreateZoomMeetingTaskParamsRecordingMode + recording_mode: CreateZoomMeetingTaskParamsRecordingMode | Unset if isinstance(_recording_mode, Unset): recording_mode = UNSET else: @@ -159,14 +161,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = CreateZoomMeetingTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[CreateZoomMeetingTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = CreateZoomMeetingTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) create_zoom_meeting_task_params = cls( topic=topic, diff --git a/rootly_sdk/models/create_zoom_meeting_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/create_zoom_meeting_task_params_post_to_slack_channels_item.py index e468c08c..7a669f7c 100644 --- a/rootly_sdk/models/create_zoom_meeting_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/create_zoom_meeting_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class CreateZoomMeetingTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field.py b/rootly_sdk/models/custom_field.py index 4ac40434..b4fbada2 100644 --- a/rootly_sdk/models/custom_field.py +++ b/rootly_sdk/models/custom_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,28 +22,28 @@ class CustomField: Attributes: label (str): The name of the custom_field shown (list[CustomFieldShownItem]): - required (Union[None, list[CustomFieldRequiredType0Item]]): + required (list[CustomFieldRequiredType0Item] | None): position (int): The position of the custom_field created_at (str): Date of creation updated_at (str): Date of last update - kind (Union[Unset, str]): The kind of the custom_field - enabled (Union[Unset, bool]): Whether the custom_field is enabled - slug (Union[Unset, str]): The slug of the custom_field - description (Union[None, Unset, str]): The description of the custom_field - default (Union[None, Unset, str]): The default value for text field kinds + kind (str | Unset): The kind of the custom_field + enabled (bool | Unset): Whether the custom_field is enabled + slug (str | Unset): The slug of the custom_field + description (None | str | Unset): The description of the custom_field + default (None | str | Unset): The default value for text field kinds """ label: str shown: list[CustomFieldShownItem] - required: None | list[CustomFieldRequiredType0Item] + required: list[CustomFieldRequiredType0Item] | None position: int created_at: str updated_at: str - kind: Unset | str = UNSET - enabled: Unset | bool = UNSET - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - default: None | Unset | str = UNSET + kind: str | Unset = UNSET + enabled: bool | Unset = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + default: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,7 +54,7 @@ def to_dict(self) -> dict[str, Any]: shown_item: str = shown_item_data shown.append(shown_item) - required: None | list[str] + required: list[str] | None if isinstance(self.required, list): required = [] for required_type_0_item_data in self.required: @@ -74,13 +76,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - default: None | Unset | str + default: None | str | Unset if isinstance(self.default, Unset): default = UNSET else: @@ -123,7 +125,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: shown.append(shown_item) - def _parse_required(data: object) -> None | list[CustomFieldRequiredType0Item]: + def _parse_required(data: object) -> list[CustomFieldRequiredType0Item] | None: if data is None: return data try: @@ -137,9 +139,9 @@ def _parse_required(data: object) -> None | list[CustomFieldRequiredType0Item]: required_type_0.append(required_type_0_item) return required_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | list[CustomFieldRequiredType0Item], data) + return cast(list[CustomFieldRequiredType0Item] | None, data) required = _parse_required(d.pop("required")) @@ -155,21 +157,21 @@ def _parse_required(data: object) -> None | list[CustomFieldRequiredType0Item]: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_default(data: object) -> None | Unset | str: + def _parse_default(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) default = _parse_default(d.pop("default", UNSET)) diff --git a/rootly_sdk/models/custom_field_list.py b/rootly_sdk/models/custom_field_list.py index e6815940..6ebec51c 100644 --- a/rootly_sdk/models/custom_field_list.py +++ b/rootly_sdk/models/custom_field_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CustomFieldList: """ Attributes: - data (list['CustomFieldListDataItem']): + data (list[CustomFieldListDataItem]): links (Links): meta (Meta): """ - data: list["CustomFieldListDataItem"] - links: "Links" - meta: "Meta" + data: list[CustomFieldListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_list_data_item.py b/rootly_sdk/models/custom_field_list_data_item.py index 608b0c38..51f85834 100644 --- a/rootly_sdk/models/custom_field_list_data_item.py +++ b/rootly_sdk/models/custom_field_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CustomFieldListDataItem: id: str type_: CustomFieldListDataItemType - attributes: "CustomField" + attributes: CustomField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_option.py b/rootly_sdk/models/custom_field_option.py index 68edd831..74f9d516 100644 --- a/rootly_sdk/models/custom_field_option.py +++ b/rootly_sdk/models/custom_field_option.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,8 +20,8 @@ class CustomFieldOption: position (int): The position of the custom_field_option created_at (str): Date of creation updated_at (str): Date of last update - custom_field_id (Union[Unset, int]): The ID of the parent custom field - default (Union[Unset, bool]): + custom_field_id (int | Unset): The ID of the parent custom field + default (bool | Unset): """ value: str @@ -27,8 +29,8 @@ class CustomFieldOption: position: int created_at: str updated_at: str - custom_field_id: Unset | int = UNSET - default: Unset | bool = UNSET + custom_field_id: int | Unset = UNSET + default: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_option_list.py b/rootly_sdk/models/custom_field_option_list.py index 8d19a07b..cdc9c37d 100644 --- a/rootly_sdk/models/custom_field_option_list.py +++ b/rootly_sdk/models/custom_field_option_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CustomFieldOptionList: """ Attributes: - data (list['CustomFieldOptionListDataItem']): + data (list[CustomFieldOptionListDataItem]): links (Links): meta (Meta): """ - data: list["CustomFieldOptionListDataItem"] - links: "Links" - meta: "Meta" + data: list[CustomFieldOptionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_option_list_data_item.py b/rootly_sdk/models/custom_field_option_list_data_item.py index 1807c6b6..43e459bf 100644 --- a/rootly_sdk/models/custom_field_option_list_data_item.py +++ b/rootly_sdk/models/custom_field_option_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CustomFieldOptionListDataItem: id: str type_: CustomFieldOptionListDataItemType - attributes: "CustomFieldOption" + attributes: CustomFieldOption additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_option_response.py b/rootly_sdk/models/custom_field_option_response.py index adfeba4f..a2e6ac19 100644 --- a/rootly_sdk/models/custom_field_option_response.py +++ b/rootly_sdk/models/custom_field_option_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CustomFieldOptionResponse: data (CustomFieldOptionResponseData): """ - data: "CustomFieldOptionResponseData" + data: CustomFieldOptionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_option_response_data.py b/rootly_sdk/models/custom_field_option_response_data.py index 93ea8892..4255f099 100644 --- a/rootly_sdk/models/custom_field_option_response_data.py +++ b/rootly_sdk/models/custom_field_option_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class CustomFieldOptionResponseData: id: str type_: CustomFieldOptionResponseDataType - attributes: "CustomFieldOption" + attributes: CustomFieldOption additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_response.py b/rootly_sdk/models/custom_field_response.py index c0ec15e8..2825b94a 100644 --- a/rootly_sdk/models/custom_field_response.py +++ b/rootly_sdk/models/custom_field_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CustomFieldResponse: data (CustomFieldResponseData): """ - data: "CustomFieldResponseData" + data: CustomFieldResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_field_response_data.py b/rootly_sdk/models/custom_field_response_data.py index a33f5985..54ea82aa 100644 --- a/rootly_sdk/models/custom_field_response_data.py +++ b/rootly_sdk/models/custom_field_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CustomFieldResponseData: id: str type_: CustomFieldResponseDataType - attributes: "CustomField" + attributes: CustomField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_form.py b/rootly_sdk/models/custom_form.py index 5e5b7092..78ee24bb 100644 --- a/rootly_sdk/models/custom_form.py +++ b/rootly_sdk/models/custom_form.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,9 +20,9 @@ class CustomForm: command (str): The Slack command used to trigger this form. created_at (str): Date of creation. updated_at (str): Date of last update. - slug (Union[Unset, str]): The custom form slug. Add this to form_field.shown or form_field.required to associate - form fields with custom forms. - description (Union[None, Unset, str]): + slug (str | Unset): The custom form slug. Add this to form_field.shown or form_field.required to associate form + fields with custom forms. + description (None | str | Unset): """ name: str @@ -28,8 +30,8 @@ class CustomForm: command: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -45,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -84,12 +86,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/custom_form_list.py b/rootly_sdk/models/custom_form_list.py index 909b9927..9df0e52e 100644 --- a/rootly_sdk/models/custom_form_list.py +++ b/rootly_sdk/models/custom_form_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class CustomFormList: """ Attributes: - data (list['CustomFormListDataItem']): + data (list[CustomFormListDataItem]): links (Links): meta (Meta): """ - data: list["CustomFormListDataItem"] - links: "Links" - meta: "Meta" + data: list[CustomFormListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_form_list_data_item.py b/rootly_sdk/models/custom_form_list_data_item.py index 3f36ae0d..ecf82fbb 100644 --- a/rootly_sdk/models/custom_form_list_data_item.py +++ b/rootly_sdk/models/custom_form_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CustomFormListDataItem: id: str type_: CustomFormListDataItemType - attributes: "CustomForm" + attributes: CustomForm additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_form_response.py b/rootly_sdk/models/custom_form_response.py index 7fab746a..e74e6e7b 100644 --- a/rootly_sdk/models/custom_form_response.py +++ b/rootly_sdk/models/custom_form_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class CustomFormResponse: data (CustomFormResponseData): """ - data: "CustomFormResponseData" + data: CustomFormResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/custom_form_response_data.py b/rootly_sdk/models/custom_form_response_data.py index ae29c003..fb42a220 100644 --- a/rootly_sdk/models/custom_form_response_data.py +++ b/rootly_sdk/models/custom_form_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class CustomFormResponseData: id: str type_: CustomFormResponseDataType - attributes: "CustomForm" + attributes: CustomForm additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard.py b/rootly_sdk/models/dashboard.py index ce1b6222..f83fc0c9 100644 --- a/rootly_sdk/models/dashboard.py +++ b/rootly_sdk/models/dashboard.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,31 +20,31 @@ class Dashboard: name (str): The name of the dashboard owner (DashboardOwner): The owner type of the dashboard public (bool): Whether the dashboard is public - team_id (Union[Unset, int]): The dashboard team - user_id (Union[None, Unset, int]): The dashboard user owner if owner is of type user - description (Union[None, Unset, str]): The description of the dashboard - range_ (Union[None, Unset, str]): The date range for dashboard panel data - period (Union[None, Unset, str]): The grouping period for dashboard panel data - auto_refresh (Union[Unset, bool]): Whether the dashboard auto-updates the UI with new data. - color (Union[Unset, DashboardColor]): The hex color of the dashboard - icon (Union[Unset, str]): The emoji icon of the dashboard - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + team_id (int | Unset): The dashboard team + user_id (int | None | Unset): The dashboard user owner if owner is of type user + description (None | str | Unset): The description of the dashboard + range_ (None | str | Unset): The date range for dashboard panel data + period (None | str | Unset): The grouping period for dashboard panel data + auto_refresh (bool | Unset): Whether the dashboard auto-updates the UI with new data. + color (DashboardColor | Unset): The hex color of the dashboard + icon (str | Unset): The emoji icon of the dashboard + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ name: str owner: DashboardOwner public: bool - team_id: Unset | int = UNSET - user_id: None | Unset | int = UNSET - description: None | Unset | str = UNSET - range_: None | Unset | str = UNSET - period: None | Unset | str = UNSET - auto_refresh: Unset | bool = UNSET - color: Unset | DashboardColor = UNSET - icon: Unset | str = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + team_id: int | Unset = UNSET + user_id: int | None | Unset = UNSET + description: None | str | Unset = UNSET + range_: None | str | Unset = UNSET + period: None | str | Unset = UNSET + auto_refresh: bool | Unset = UNSET + color: DashboardColor | Unset = UNSET + icon: str | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,25 +56,25 @@ def to_dict(self) -> dict[str, Any]: team_id = self.team_id - user_id: None | Unset | int + user_id: int | None | Unset if isinstance(self.user_id, Unset): user_id = UNSET else: user_id = self.user_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - range_: None | Unset | str + range_: None | str | Unset if isinstance(self.range_, Unset): range_ = UNSET else: range_ = self.range_ - period: None | Unset | str + period: None | str | Unset if isinstance(self.period, Unset): period = UNSET else: @@ -80,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: auto_refresh = self.auto_refresh - color: Unset | str = UNSET + color: str | Unset = UNSET if not isinstance(self.color, Unset): color = self.color @@ -133,46 +135,46 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: team_id = d.pop("team_id", UNSET) - def _parse_user_id(data: object) -> None | Unset | int: + def _parse_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) user_id = _parse_user_id(d.pop("user_id", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_range_(data: object) -> None | Unset | str: + def _parse_range_(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) range_ = _parse_range_(d.pop("range", UNSET)) - def _parse_period(data: object) -> None | Unset | str: + def _parse_period(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) period = _parse_period(d.pop("period", UNSET)) auto_refresh = d.pop("auto_refresh", UNSET) _color = d.pop("color", UNSET) - color: Unset | DashboardColor + color: DashboardColor | Unset if isinstance(_color, Unset): color = UNSET else: diff --git a/rootly_sdk/models/dashboard_list.py b/rootly_sdk/models/dashboard_list.py index 957af49c..b7a9f817 100644 --- a/rootly_sdk/models/dashboard_list.py +++ b/rootly_sdk/models/dashboard_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class DashboardList: """ Attributes: - data (list['DashboardListDataItem']): + data (list[DashboardListDataItem]): links (Links): meta (Meta): """ - data: list["DashboardListDataItem"] - links: "Links" - meta: "Meta" + data: list[DashboardListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_list_data_item.py b/rootly_sdk/models/dashboard_list_data_item.py index 86d1b13b..af7c1f78 100644 --- a/rootly_sdk/models/dashboard_list_data_item.py +++ b/rootly_sdk/models/dashboard_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class DashboardListDataItem: id: str type_: DashboardListDataItemType - attributes: "Dashboard" + attributes: Dashboard additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_panel.py b/rootly_sdk/models/dashboard_panel.py index 26995283..4cd0dbe5 100644 --- a/rootly_sdk/models/dashboard_panel.py +++ b/rootly_sdk/models/dashboard_panel.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,17 +22,17 @@ class DashboardPanel: """ Attributes: params (DashboardPanelParams): - dashboard_id (Union[Unset, str]): The panel dashboard - name (Union[None, Unset, str]): The name of the dashboard_panel - position (Union['DashboardPanelPositionType0', None, Unset]): - data (Union[Unset, list['DashboardPanelDataItem']]): + dashboard_id (str | Unset): The panel dashboard + name (None | str | Unset): The name of the dashboard_panel + position (DashboardPanelPositionType0 | None | Unset): + data (list[DashboardPanelDataItem] | Unset): """ - params: "DashboardPanelParams" - dashboard_id: Unset | str = UNSET - name: None | Unset | str = UNSET - position: Union["DashboardPanelPositionType0", None, Unset] = UNSET - data: Unset | list["DashboardPanelDataItem"] = UNSET + params: DashboardPanelParams + dashboard_id: str | Unset = UNSET + name: None | str | Unset = UNSET + position: DashboardPanelPositionType0 | None | Unset = UNSET + data: list[DashboardPanelDataItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,13 +42,13 @@ def to_dict(self) -> dict[str, Any]: dashboard_id = self.dashboard_id - name: None | Unset | str + name: None | str | Unset if isinstance(self.name, Unset): name = UNSET else: name = self.name - position: None | Unset | dict[str, Any] + position: dict[str, Any] | None | Unset if isinstance(self.position, Unset): position = UNSET elif isinstance(self.position, DashboardPanelPositionType0): @@ -54,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position - data: Unset | list[dict[str, Any]] = UNSET + data: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.data, Unset): data = [] for data_item_data in self.data: @@ -90,16 +92,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dashboard_id = d.pop("dashboard_id", UNSET) - def _parse_name(data: object) -> None | Unset | str: + def _parse_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) name = _parse_name(d.pop("name", UNSET)) - def _parse_position(data: object) -> Union["DashboardPanelPositionType0", None, Unset]: + def _parse_position(data: object) -> DashboardPanelPositionType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -110,18 +112,20 @@ def _parse_position(data: object) -> Union["DashboardPanelPositionType0", None, position_type_0 = DashboardPanelPositionType0.from_dict(data) return position_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["DashboardPanelPositionType0", None, Unset], data) + return cast(DashboardPanelPositionType0 | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - data = [] _data = d.pop("data", UNSET) - for data_item_data in _data or []: - data_item = DashboardPanelDataItem.from_dict(data_item_data) + data: list[DashboardPanelDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = DashboardPanelDataItem.from_dict(data_item_data) - data.append(data_item) + data.append(data_item) dashboard_panel = cls( params=params, diff --git a/rootly_sdk/models/dashboard_panel_data_item.py b/rootly_sdk/models/dashboard_panel_data_item.py index 67ba809f..3e9c8030 100644 --- a/rootly_sdk/models/dashboard_panel_data_item.py +++ b/rootly_sdk/models/dashboard_panel_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class DashboardPanelDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/dashboard_panel_list.py b/rootly_sdk/models/dashboard_panel_list.py index 54fda89f..cda76597 100644 --- a/rootly_sdk/models/dashboard_panel_list.py +++ b/rootly_sdk/models/dashboard_panel_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class DashboardPanelList: """ Attributes: - data (list['DashboardPanelListDataItem']): + data (list[DashboardPanelListDataItem]): links (Links): meta (Meta): """ - data: list["DashboardPanelListDataItem"] - links: "Links" - meta: "Meta" + data: list[DashboardPanelListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_panel_list_data_item.py b/rootly_sdk/models/dashboard_panel_list_data_item.py index e773636f..dcb89dd9 100644 --- a/rootly_sdk/models/dashboard_panel_list_data_item.py +++ b/rootly_sdk/models/dashboard_panel_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class DashboardPanelListDataItem: id: str type_: DashboardPanelListDataItemType - attributes: "DashboardPanel" + attributes: DashboardPanel additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_panel_params.py b/rootly_sdk/models/dashboard_panel_params.py index 14a50bbc..90a15121 100644 --- a/rootly_sdk/models/dashboard_panel_params.py +++ b/rootly_sdk/models/dashboard_panel_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,42 +22,42 @@ class DashboardPanelParams: """ Attributes: - display (Union[Unset, DashboardPanelParamsDisplay]): - description (Union[Unset, str]): - table_fields (Union[Unset, list[str]]): - legend (Union[Unset, DashboardPanelParamsLegend]): - datalabels (Union[Unset, DashboardPanelParamsDatalabels]): - datasets (Union[Unset, list['DashboardPanelParamsDatasetsItem']]): + display (DashboardPanelParamsDisplay | Unset): + description (str | Unset): + table_fields (list[str] | Unset): + legend (DashboardPanelParamsLegend | Unset): + datalabels (DashboardPanelParamsDatalabels | Unset): + datasets (list[DashboardPanelParamsDatasetsItem] | Unset): """ - display: Unset | DashboardPanelParamsDisplay = UNSET - description: Unset | str = UNSET - table_fields: Unset | list[str] = UNSET - legend: Union[Unset, "DashboardPanelParamsLegend"] = UNSET - datalabels: Union[Unset, "DashboardPanelParamsDatalabels"] = UNSET - datasets: Unset | list["DashboardPanelParamsDatasetsItem"] = UNSET + display: DashboardPanelParamsDisplay | Unset = UNSET + description: str | Unset = UNSET + table_fields: list[str] | Unset = UNSET + legend: DashboardPanelParamsLegend | Unset = UNSET + datalabels: DashboardPanelParamsDatalabels | Unset = UNSET + datasets: list[DashboardPanelParamsDatasetsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - display: Unset | str = UNSET + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display description = self.description - table_fields: Unset | list[str] = UNSET + table_fields: list[str] | Unset = UNSET if not isinstance(self.table_fields, Unset): table_fields = self.table_fields - legend: Unset | dict[str, Any] = UNSET + legend: dict[str, Any] | Unset = UNSET if not isinstance(self.legend, Unset): legend = self.legend.to_dict() - datalabels: Unset | dict[str, Any] = UNSET + datalabels: dict[str, Any] | Unset = UNSET if not isinstance(self.datalabels, Unset): datalabels = self.datalabels.to_dict() - datasets: Unset | list[dict[str, Any]] = UNSET + datasets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.datasets, Unset): datasets = [] for datasets_item_data in self.datasets: @@ -88,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _display = d.pop("display", UNSET) - display: Unset | DashboardPanelParamsDisplay + display: DashboardPanelParamsDisplay | Unset if isinstance(_display, Unset): display = UNSET else: @@ -99,25 +101,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: table_fields = cast(list[str], d.pop("table_fields", UNSET)) _legend = d.pop("legend", UNSET) - legend: Unset | DashboardPanelParamsLegend + legend: DashboardPanelParamsLegend | Unset if isinstance(_legend, Unset): legend = UNSET else: legend = DashboardPanelParamsLegend.from_dict(_legend) _datalabels = d.pop("datalabels", UNSET) - datalabels: Unset | DashboardPanelParamsDatalabels + datalabels: DashboardPanelParamsDatalabels | Unset if isinstance(_datalabels, Unset): datalabels = UNSET else: datalabels = DashboardPanelParamsDatalabels.from_dict(_datalabels) - datasets = [] _datasets = d.pop("datasets", UNSET) - for datasets_item_data in _datasets or []: - datasets_item = DashboardPanelParamsDatasetsItem.from_dict(datasets_item_data) + datasets: list[DashboardPanelParamsDatasetsItem] | Unset = UNSET + if _datasets is not UNSET: + datasets = [] + for datasets_item_data in _datasets: + datasets_item = DashboardPanelParamsDatasetsItem.from_dict(datasets_item_data) - datasets.append(datasets_item) + datasets.append(datasets_item) dashboard_panel_params = cls( display=display, diff --git a/rootly_sdk/models/dashboard_panel_params_datalabels.py b/rootly_sdk/models/dashboard_panel_params_datalabels.py index c1e1055e..be9de80e 100644 --- a/rootly_sdk/models/dashboard_panel_params_datalabels.py +++ b/rootly_sdk/models/dashboard_panel_params_datalabels.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class DashboardPanelParamsDatalabels: """ Attributes: - enabled (Union[Unset, bool]): + enabled (bool | Unset): """ - enabled: Unset | bool = UNSET + enabled: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item.py b/rootly_sdk/models/dashboard_panel_params_datasets_item.py index 36291daf..21e85bab 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,18 +29,18 @@ class DashboardPanelParamsDatasetsItem: """ Attributes: - name (Union[None, Unset, str]): - collection (Union[Unset, DashboardPanelParamsDatasetsItemCollection]): - filter_ (Union[Unset, list['DashboardPanelParamsDatasetsItemFilterItem']]): - group_by (Union['DashboardPanelParamsDatasetsItemGroupByType1Type0', None, Unset, str]): - aggregate (Union['DashboardPanelParamsDatasetsItemAggregateType0', None, Unset]): + name (None | str | Unset): + collection (DashboardPanelParamsDatasetsItemCollection | Unset): + filter_ (list[DashboardPanelParamsDatasetsItemFilterItem] | Unset): + group_by (DashboardPanelParamsDatasetsItemGroupByType1Type0 | None | str | Unset): + aggregate (DashboardPanelParamsDatasetsItemAggregateType0 | None | Unset): """ - name: None | Unset | str = UNSET - collection: Unset | DashboardPanelParamsDatasetsItemCollection = UNSET - filter_: Unset | list["DashboardPanelParamsDatasetsItemFilterItem"] = UNSET - group_by: Union["DashboardPanelParamsDatasetsItemGroupByType1Type0", None, Unset, str] = UNSET - aggregate: Union["DashboardPanelParamsDatasetsItemAggregateType0", None, Unset] = UNSET + name: None | str | Unset = UNSET + collection: DashboardPanelParamsDatasetsItemCollection | Unset = UNSET + filter_: list[DashboardPanelParamsDatasetsItemFilterItem] | Unset = UNSET + group_by: DashboardPanelParamsDatasetsItemGroupByType1Type0 | None | str | Unset = UNSET + aggregate: DashboardPanelParamsDatasetsItemAggregateType0 | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -49,24 +51,24 @@ def to_dict(self) -> dict[str, Any]: DashboardPanelParamsDatasetsItemGroupByType1Type0, ) - name: None | Unset | str + name: None | str | Unset if isinstance(self.name, Unset): name = UNSET else: name = self.name - collection: Unset | str = UNSET + collection: str | Unset = UNSET if not isinstance(self.collection, Unset): collection = self.collection - filter_: Unset | list[dict[str, Any]] = UNSET + filter_: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.filter_, Unset): filter_ = [] for filter_item_data in self.filter_: filter_item = filter_item_data.to_dict() filter_.append(filter_item) - group_by: None | Unset | dict[str, Any] | str + group_by: dict[str, Any] | None | str | Unset if isinstance(self.group_by, Unset): group_by = UNSET elif isinstance(self.group_by, DashboardPanelParamsDatasetsItemGroupByType1Type0): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: group_by = self.group_by - aggregate: None | Unset | dict[str, Any] + aggregate: dict[str, Any] | None | Unset if isinstance(self.aggregate, Unset): aggregate = UNSET elif isinstance(self.aggregate, DashboardPanelParamsDatasetsItemAggregateType0): @@ -110,32 +112,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_name(data: object) -> None | Unset | str: + def _parse_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) name = _parse_name(d.pop("name", UNSET)) _collection = d.pop("collection", UNSET) - collection: Unset | DashboardPanelParamsDatasetsItemCollection + collection: DashboardPanelParamsDatasetsItemCollection | Unset if isinstance(_collection, Unset): collection = UNSET else: collection = check_dashboard_panel_params_datasets_item_collection(_collection) - filter_ = [] _filter_ = d.pop("filter", UNSET) - for filter_item_data in _filter_ or []: - filter_item = DashboardPanelParamsDatasetsItemFilterItem.from_dict(filter_item_data) + filter_: list[DashboardPanelParamsDatasetsItemFilterItem] | Unset = UNSET + if _filter_ is not UNSET: + filter_ = [] + for filter_item_data in _filter_: + filter_item = DashboardPanelParamsDatasetsItemFilterItem.from_dict(filter_item_data) - filter_.append(filter_item) + filter_.append(filter_item) - def _parse_group_by( - data: object, - ) -> Union["DashboardPanelParamsDatasetsItemGroupByType1Type0", None, Unset, str]: + def _parse_group_by(data: object) -> DashboardPanelParamsDatasetsItemGroupByType1Type0 | None | str | Unset: if data is None: return data if isinstance(data, Unset): @@ -146,13 +148,13 @@ def _parse_group_by( group_by_type_1_type_0 = DashboardPanelParamsDatasetsItemGroupByType1Type0.from_dict(data) return group_by_type_1_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["DashboardPanelParamsDatasetsItemGroupByType1Type0", None, Unset, str], data) + return cast(DashboardPanelParamsDatasetsItemGroupByType1Type0 | None | str | Unset, data) group_by = _parse_group_by(d.pop("group_by", UNSET)) - def _parse_aggregate(data: object) -> Union["DashboardPanelParamsDatasetsItemAggregateType0", None, Unset]: + def _parse_aggregate(data: object) -> DashboardPanelParamsDatasetsItemAggregateType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -163,9 +165,9 @@ def _parse_aggregate(data: object) -> Union["DashboardPanelParamsDatasetsItemAgg aggregate_type_0 = DashboardPanelParamsDatasetsItemAggregateType0.from_dict(data) return aggregate_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["DashboardPanelParamsDatasetsItemAggregateType0", None, Unset], data) + return cast(DashboardPanelParamsDatasetsItemAggregateType0 | None | Unset, data) aggregate = _parse_aggregate(d.pop("aggregate", UNSET)) diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item_aggregate_type_0.py b/rootly_sdk/models/dashboard_panel_params_datasets_item_aggregate_type_0.py index 3cd5dba9..1c0d2a95 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item_aggregate_type_0.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item_aggregate_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,28 +19,28 @@ class DashboardPanelParamsDatasetsItemAggregateType0: """ Attributes: - operation (Union[Unset, DashboardPanelParamsDatasetsItemAggregateType0Operation]): - key (Union[None, Unset, str]): - cumulative (Union[None, Unset, bool]): + operation (DashboardPanelParamsDatasetsItemAggregateType0Operation | Unset): + key (None | str | Unset): + cumulative (bool | None | Unset): """ - operation: Unset | DashboardPanelParamsDatasetsItemAggregateType0Operation = UNSET - key: None | Unset | str = UNSET - cumulative: None | Unset | bool = UNSET + operation: DashboardPanelParamsDatasetsItemAggregateType0Operation | Unset = UNSET + key: None | str | Unset = UNSET + cumulative: bool | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - key: None | Unset | str + key: None | str | Unset if isinstance(self.key, Unset): key = UNSET else: key = self.key - cumulative: None | Unset | bool + cumulative: bool | None | Unset if isinstance(self.cumulative, Unset): cumulative = UNSET else: @@ -60,27 +62,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | DashboardPanelParamsDatasetsItemAggregateType0Operation + operation: DashboardPanelParamsDatasetsItemAggregateType0Operation | Unset if isinstance(_operation, Unset): operation = UNSET else: operation = check_dashboard_panel_params_datasets_item_aggregate_type_0_operation(_operation) - def _parse_key(data: object) -> None | Unset | str: + def _parse_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) key = _parse_key(d.pop("key", UNSET)) - def _parse_cumulative(data: object) -> None | Unset | bool: + def _parse_cumulative(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) cumulative = _parse_cumulative(d.pop("cumulative", UNSET)) diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py b/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py index fc6cf609..7d73ee70 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,20 +25,20 @@ class DashboardPanelParamsDatasetsItemFilterItem: """ Attributes: - operation (Union[Unset, DashboardPanelParamsDatasetsItemFilterItemOperation]): - rules (Union[Unset, list['DashboardPanelParamsDatasetsItemFilterItemRulesItem']]): + operation (DashboardPanelParamsDatasetsItemFilterItemOperation | Unset): + rules (list[DashboardPanelParamsDatasetsItemFilterItemRulesItem] | Unset): """ - operation: Unset | DashboardPanelParamsDatasetsItemFilterItemOperation = UNSET - rules: Unset | list["DashboardPanelParamsDatasetsItemFilterItemRulesItem"] = UNSET + operation: DashboardPanelParamsDatasetsItemFilterItemOperation | Unset = UNSET + rules: list[DashboardPanelParamsDatasetsItemFilterItemRulesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -61,18 +63,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | DashboardPanelParamsDatasetsItemFilterItemOperation + operation: DashboardPanelParamsDatasetsItemFilterItemOperation | Unset if isinstance(_operation, Unset): operation = UNSET else: operation = check_dashboard_panel_params_datasets_item_filter_item_operation(_operation) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = DashboardPanelParamsDatasetsItemFilterItemRulesItem.from_dict(rules_item_data) + rules: list[DashboardPanelParamsDatasetsItemFilterItemRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = DashboardPanelParamsDatasetsItemFilterItemRulesItem.from_dict(rules_item_data) - rules.append(rules_item) + rules.append(rules_item) dashboard_panel_params_datasets_item_filter_item = cls( operation=operation, diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item_rules_item.py b/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item_rules_item.py index 172edea7..8358c43c 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item_rules_item.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item_filter_item_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,24 +23,24 @@ class DashboardPanelParamsDatasetsItemFilterItemRulesItem: """ Attributes: - operation (Union[Unset, DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation]): - condition (Union[Unset, DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition]): - key (Union[Unset, str]): - value (Union[Unset, str]): + operation (DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation | Unset): + condition (DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition | Unset): + key (str | Unset): + value (str | Unset): """ - operation: Unset | DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation = UNSET - condition: Unset | DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition = UNSET - key: Unset | str = UNSET - value: Unset | str = UNSET + operation: DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation | Unset = UNSET + condition: DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition | Unset = UNSET + key: str | Unset = UNSET + value: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - condition: Unset | str = UNSET + condition: str | Unset = UNSET if not isinstance(self.condition, Unset): condition = self.condition @@ -64,14 +66,14 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation + operation: DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation | Unset if isinstance(_operation, Unset): operation = UNSET else: operation = check_dashboard_panel_params_datasets_item_filter_item_rules_item_operation(_operation) _condition = d.pop("condition", UNSET) - condition: Unset | DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition + condition: DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition | Unset if isinstance(_condition, Unset): condition = UNSET else: diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0.py b/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0.py index cbafb095..2bbe0ace 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0_key.py b/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0_key.py index 9ecbed9e..ef31aadb 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0_key.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item_group_by_type_1_type_0_key.py @@ -1,10 +1,11 @@ from typing import Literal, cast -DashboardPanelParamsDatasetsItemGroupByType1Type0Key = Literal["custom_field", "incident_role"] +DashboardPanelParamsDatasetsItemGroupByType1Type0Key = Literal["alert_field", "custom_field", "incident_role"] DASHBOARD_PANEL_PARAMS_DATASETS_ITEM_GROUP_BY_TYPE_1_TYPE_0_KEY_VALUES: set[ DashboardPanelParamsDatasetsItemGroupByType1Type0Key ] = { + "alert_field", "custom_field", "incident_role", } diff --git a/rootly_sdk/models/dashboard_panel_params_legend.py b/rootly_sdk/models/dashboard_panel_params_legend.py index 51b35f9d..e39a194f 100644 --- a/rootly_sdk/models/dashboard_panel_params_legend.py +++ b/rootly_sdk/models/dashboard_panel_params_legend.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,14 +19,14 @@ class DashboardPanelParamsLegend: """ Attributes: - groups (Union[Unset, DashboardPanelParamsLegendGroups]): Default: 'all'. + groups (DashboardPanelParamsLegendGroups | Unset): Default: 'all'. """ - groups: Unset | DashboardPanelParamsLegendGroups = "all" + groups: DashboardPanelParamsLegendGroups | Unset = "all" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - groups: Unset | str = UNSET + groups: str | Unset = UNSET if not isinstance(self.groups, Unset): groups = self.groups @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _groups = d.pop("groups", UNSET) - groups: Unset | DashboardPanelParamsLegendGroups + groups: DashboardPanelParamsLegendGroups | Unset if isinstance(_groups, Unset): groups = UNSET else: diff --git a/rootly_sdk/models/dashboard_panel_position_type_0.py b/rootly_sdk/models/dashboard_panel_position_type_0.py index 29f03cc9..f64f7720 100644 --- a/rootly_sdk/models/dashboard_panel_position_type_0.py +++ b/rootly_sdk/models/dashboard_panel_position_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/dashboard_panel_response.py b/rootly_sdk/models/dashboard_panel_response.py index 98ccded0..93f0c50c 100644 --- a/rootly_sdk/models/dashboard_panel_response.py +++ b/rootly_sdk/models/dashboard_panel_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class DashboardPanelResponse: data (DashboardPanelResponseData): """ - data: "DashboardPanelResponseData" + data: DashboardPanelResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_panel_response_data.py b/rootly_sdk/models/dashboard_panel_response_data.py index f60ca138..5e5cd3ee 100644 --- a/rootly_sdk/models/dashboard_panel_response_data.py +++ b/rootly_sdk/models/dashboard_panel_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class DashboardPanelResponseData: id: str type_: DashboardPanelResponseDataType - attributes: "DashboardPanel" + attributes: DashboardPanel additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_response.py b/rootly_sdk/models/dashboard_response.py index 8585f43b..7d73d1e1 100644 --- a/rootly_sdk/models/dashboard_response.py +++ b/rootly_sdk/models/dashboard_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class DashboardResponse: data (DashboardResponseData): """ - data: "DashboardResponseData" + data: DashboardResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/dashboard_response_data.py b/rootly_sdk/models/dashboard_response_data.py index cf64ee80..a650842b 100644 --- a/rootly_sdk/models/dashboard_response_data.py +++ b/rootly_sdk/models/dashboard_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class DashboardResponseData: id: str type_: DashboardResponseDataType - attributes: "Dashboard" + attributes: Dashboard additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/delete_alert_route_response_200.py b/rootly_sdk/models/delete_alert_route_response_200.py index 01c2a996..87303581 100644 --- a/rootly_sdk/models/delete_alert_route_response_200.py +++ b/rootly_sdk/models/delete_alert_route_response_200.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class DeleteAlertRouteResponse200: """ Attributes: - data (Union[Unset, DeleteAlertRouteResponse200Data]): + data (DeleteAlertRouteResponse200Data | Unset): """ - data: Union[Unset, "DeleteAlertRouteResponse200Data"] = UNSET + data: DeleteAlertRouteResponse200Data | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | DeleteAlertRouteResponse200Data + data: DeleteAlertRouteResponse200Data | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/delete_alert_route_response_200_data.py b/rootly_sdk/models/delete_alert_route_response_200_data.py index 4d975e7f..2913fe1f 100644 --- a/rootly_sdk/models/delete_alert_route_response_200_data.py +++ b/rootly_sdk/models/delete_alert_route_response_200_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class DeleteAlertRouteResponse200Data: """ Attributes: - id (Union[Unset, str]): - type_ (Union[Unset, str]): - attributes (Union[Unset, DeleteAlertRouteResponse200DataAttributes]): + id (str | Unset): + type_ (str | Unset): + attributes (DeleteAlertRouteResponse200DataAttributes | Unset): """ - id: Unset | str = UNSET - type_: Unset | str = UNSET - attributes: Union[Unset, "DeleteAlertRouteResponse200DataAttributes"] = UNSET + id: str | Unset = UNSET + type_: str | Unset = UNSET + attributes: DeleteAlertRouteResponse200DataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -58,7 +60,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: type_ = d.pop("type", UNSET) _attributes = d.pop("attributes", UNSET) - attributes: Unset | DeleteAlertRouteResponse200DataAttributes + attributes: DeleteAlertRouteResponse200DataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/delete_alert_route_response_200_data_attributes.py b/rootly_sdk/models/delete_alert_route_response_200_data_attributes.py index 1010554d..a811a57e 100644 --- a/rootly_sdk/models/delete_alert_route_response_200_data_attributes.py +++ b/rootly_sdk/models/delete_alert_route_response_200_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class DeleteAlertRouteResponse200DataAttributes: """ Attributes: - deleted (Union[Unset, bool]): + deleted (bool | Unset): """ - deleted: Unset | bool = UNSET + deleted: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/duplicate_incident.py b/rootly_sdk/models/duplicate_incident.py index f750b447..cbd34466 100644 --- a/rootly_sdk/models/duplicate_incident.py +++ b/rootly_sdk/models/duplicate_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class DuplicateIncident: data (DuplicateIncidentData): """ - data: "DuplicateIncidentData" + data: DuplicateIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/duplicate_incident_data.py b/rootly_sdk/models/duplicate_incident_data.py index aab0a6cb..638fc79a 100644 --- a/rootly_sdk/models/duplicate_incident_data.py +++ b/rootly_sdk/models/duplicate_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class DuplicateIncidentData: """ type_: DuplicateIncidentDataType - attributes: "DuplicateIncidentDataAttributes" + attributes: DuplicateIncidentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/duplicate_incident_data_attributes.py b/rootly_sdk/models/duplicate_incident_data_attributes.py index 3ff52dac..61946c43 100644 --- a/rootly_sdk/models/duplicate_incident_data_attributes.py +++ b/rootly_sdk/models/duplicate_incident_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,25 +14,25 @@ class DuplicateIncidentDataAttributes: """ Attributes: - duplicate_incident_id (Union[Unset, str]): - auto_cancel_incident (Union[None, Unset, bool]): Default: True. - reason_for_cancellation (Union[None, Unset, str]): Why was the incident cancelled? + duplicate_incident_id (str | Unset): + auto_cancel_incident (bool | None | Unset): Default: True. + reason_for_cancellation (None | str | Unset): Why was the incident cancelled? """ - duplicate_incident_id: Unset | str = UNSET - auto_cancel_incident: None | Unset | bool = True - reason_for_cancellation: None | Unset | str = UNSET + duplicate_incident_id: str | Unset = UNSET + auto_cancel_incident: bool | None | Unset = True + reason_for_cancellation: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: duplicate_incident_id = self.duplicate_incident_id - auto_cancel_incident: None | Unset | bool + auto_cancel_incident: bool | None | Unset if isinstance(self.auto_cancel_incident, Unset): auto_cancel_incident = UNSET else: auto_cancel_incident = self.auto_cancel_incident - reason_for_cancellation: None | Unset | str + reason_for_cancellation: None | str | Unset if isinstance(self.reason_for_cancellation, Unset): reason_for_cancellation = UNSET else: @@ -53,21 +55,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) duplicate_incident_id = d.pop("duplicate_incident_id", UNSET) - def _parse_auto_cancel_incident(data: object) -> None | Unset | bool: + def _parse_auto_cancel_incident(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) auto_cancel_incident = _parse_auto_cancel_incident(d.pop("auto_cancel_incident", UNSET)) - def _parse_reason_for_cancellation(data: object) -> None | Unset | str: + def _parse_reason_for_cancellation(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) reason_for_cancellation = _parse_reason_for_cancellation(d.pop("reason_for_cancellation", UNSET)) diff --git a/rootly_sdk/models/edge_connector.py b/rootly_sdk/models/edge_connector.py index d58e562c..c2289131 100644 --- a/rootly_sdk/models/edge_connector.py +++ b/rootly_sdk/models/edge_connector.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class EdgeConnector: data (EdgeConnectorData): """ - data: "EdgeConnectorData" + data: EdgeConnectorData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/edge_connector_action.py b/rootly_sdk/models/edge_connector_action.py index 9876c156..c805f1fa 100644 --- a/rootly_sdk/models/edge_connector_action.py +++ b/rootly_sdk/models/edge_connector_action.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class EdgeConnectorAction: data (EdgeConnectorActionData): """ - data: "EdgeConnectorActionData" + data: EdgeConnectorActionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/edge_connector_action_data.py b/rootly_sdk/models/edge_connector_action_data.py index 591a761b..91db467a 100644 --- a/rootly_sdk/models/edge_connector_action_data.py +++ b/rootly_sdk/models/edge_connector_action_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -25,7 +27,7 @@ class EdgeConnectorActionData: type_: EdgeConnectorActionDataType id: UUID - attributes: "EdgeConnectorActionDataAttributes" + attributes: EdgeConnectorActionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/edge_connector_action_data_attributes.py b/rootly_sdk/models/edge_connector_action_data_attributes.py index 4ab3bd1f..c0deb032 100644 --- a/rootly_sdk/models/edge_connector_action_data_attributes.py +++ b/rootly_sdk/models/edge_connector_action_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -31,27 +33,26 @@ class EdgeConnectorActionDataAttributes: Attributes: name (str): Action name action_type (EdgeConnectorActionDataAttributesActionType): Action type - slug (Union[Unset, str]): Action slug - icon (Union[Unset, EdgeConnectorActionDataAttributesIcon]): Action icon - description (Union[None, Unset, str]): Action description - timeout (Union[None, Unset, int]): Timeout in seconds - parameters (Union[None, Unset, list['EdgeConnectorActionDataAttributesParametersType0Item']]): Parameter - definitions - last_executed_at (Union[None, Unset, datetime.datetime]): - created_at (Union[Unset, datetime.datetime]): - updated_at (Union[Unset, datetime.datetime]): + slug (str | Unset): Action slug + icon (EdgeConnectorActionDataAttributesIcon | Unset): Action icon + description (None | str | Unset): Action description + timeout (int | None | Unset): Timeout in seconds + parameters (list[EdgeConnectorActionDataAttributesParametersType0Item] | None | Unset): Parameter definitions + last_executed_at (datetime.datetime | None | Unset): + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): """ name: str action_type: EdgeConnectorActionDataAttributesActionType - slug: Unset | str = UNSET - icon: Unset | EdgeConnectorActionDataAttributesIcon = UNSET - description: None | Unset | str = UNSET - timeout: None | Unset | int = UNSET - parameters: None | Unset | list["EdgeConnectorActionDataAttributesParametersType0Item"] = UNSET - last_executed_at: None | Unset | datetime.datetime = UNSET - created_at: Unset | datetime.datetime = UNSET - updated_at: Unset | datetime.datetime = UNSET + slug: str | Unset = UNSET + icon: EdgeConnectorActionDataAttributesIcon | Unset = UNSET + description: None | str | Unset = UNSET + timeout: int | None | Unset = UNSET + parameters: list[EdgeConnectorActionDataAttributesParametersType0Item] | None | Unset = UNSET + last_executed_at: datetime.datetime | None | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -61,23 +62,23 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - icon: Unset | str = UNSET + icon: str | Unset = UNSET if not isinstance(self.icon, Unset): icon = self.icon - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - timeout: None | Unset | int + timeout: int | None | Unset if isinstance(self.timeout, Unset): timeout = UNSET else: timeout = self.timeout - parameters: None | Unset | list[dict[str, Any]] + parameters: list[dict[str, Any]] | None | Unset if isinstance(self.parameters, Unset): parameters = UNSET elif isinstance(self.parameters, list): @@ -89,7 +90,7 @@ def to_dict(self) -> dict[str, Any]: else: parameters = self.parameters - last_executed_at: None | Unset | str + last_executed_at: None | str | Unset if isinstance(self.last_executed_at, Unset): last_executed_at = UNSET elif isinstance(self.last_executed_at, datetime.datetime): @@ -97,11 +98,11 @@ def to_dict(self) -> dict[str, Any]: else: last_executed_at = self.last_executed_at - created_at: Unset | str = UNSET + created_at: str | Unset = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Unset | str = UNSET + updated_at: str | Unset = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -146,33 +147,33 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) _icon = d.pop("icon", UNSET) - icon: Unset | EdgeConnectorActionDataAttributesIcon + icon: EdgeConnectorActionDataAttributesIcon | Unset if isinstance(_icon, Unset): icon = UNSET else: icon = check_edge_connector_action_data_attributes_icon(_icon) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_timeout(data: object) -> None | Unset | int: + def _parse_timeout(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) timeout = _parse_timeout(d.pop("timeout", UNSET)) def _parse_parameters( data: object, - ) -> None | Unset | list["EdgeConnectorActionDataAttributesParametersType0Item"]: + ) -> list[EdgeConnectorActionDataAttributesParametersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -190,13 +191,13 @@ def _parse_parameters( parameters_type_0.append(parameters_type_0_item) return parameters_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["EdgeConnectorActionDataAttributesParametersType0Item"], data) + return cast(list[EdgeConnectorActionDataAttributesParametersType0Item] | None | Unset, data) parameters = _parse_parameters(d.pop("parameters", UNSET)) - def _parse_last_executed_at(data: object) -> None | Unset | datetime.datetime: + def _parse_last_executed_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -207,21 +208,21 @@ def _parse_last_executed_at(data: object) -> None | Unset | datetime.datetime: last_executed_at_type_0 = isoparse(data) return last_executed_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) last_executed_at = _parse_last_executed_at(d.pop("last_executed_at", UNSET)) _created_at = d.pop("created_at", UNSET) - created_at: Unset | datetime.datetime + created_at: datetime.datetime | Unset if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updated_at", UNSET) - updated_at: Unset | datetime.datetime + updated_at: datetime.datetime | Unset if isinstance(_updated_at, Unset): updated_at = UNSET else: diff --git a/rootly_sdk/models/edge_connector_action_data_attributes_parameters_type_0_item.py b/rootly_sdk/models/edge_connector_action_data_attributes_parameters_type_0_item.py index 1f89cdc2..b7212cb9 100644 --- a/rootly_sdk/models/edge_connector_action_data_attributes_parameters_type_0_item.py +++ b/rootly_sdk/models/edge_connector_action_data_attributes_parameters_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,44 +19,44 @@ class EdgeConnectorActionDataAttributesParametersType0Item: """ Attributes: - name (Union[Unset, str]): - type_ (Union[Unset, EdgeConnectorActionDataAttributesParametersType0ItemType]): - required (Union[Unset, bool]): - description (Union[None, Unset, str]): - default (Union[None, Unset, str]): Default value (any type) - options (Union[None, Unset, list[str]]): + name (str | Unset): + type_ (EdgeConnectorActionDataAttributesParametersType0ItemType | Unset): + required (bool | Unset): + description (None | str | Unset): + default (None | str | Unset): Default value (any type) + options (list[str] | None | Unset): """ - name: Unset | str = UNSET - type_: Unset | EdgeConnectorActionDataAttributesParametersType0ItemType = UNSET - required: Unset | bool = UNSET - description: None | Unset | str = UNSET - default: None | Unset | str = UNSET - options: None | Unset | list[str] = UNSET + name: str | Unset = UNSET + type_: EdgeConnectorActionDataAttributesParametersType0ItemType | Unset = UNSET + required: bool | Unset = UNSET + description: None | str | Unset = UNSET + default: None | str | Unset = UNSET + options: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ required = self.required - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - default: None | Unset | str + default: None | str | Unset if isinstance(self.default, Unset): default = UNSET else: default = self.default - options: None | Unset | list[str] + options: list[str] | None | Unset if isinstance(self.options, Unset): options = UNSET elif isinstance(self.options, list): @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | EdgeConnectorActionDataAttributesParametersType0ItemType + type_: EdgeConnectorActionDataAttributesParametersType0ItemType | Unset if isinstance(_type_, Unset): type_ = UNSET else: @@ -95,25 +97,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: required = d.pop("required", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_default(data: object) -> None | Unset | str: + def _parse_default(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) default = _parse_default(d.pop("default", UNSET)) - def _parse_options(data: object) -> None | Unset | list[str]: + def _parse_options(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -124,9 +126,9 @@ def _parse_options(data: object) -> None | Unset | list[str]: options_type_0 = cast(list[str], data) return options_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) options = _parse_options(d.pop("options", UNSET)) diff --git a/rootly_sdk/models/edge_connector_data.py b/rootly_sdk/models/edge_connector_data.py index be9d7e20..dc408332 100644 --- a/rootly_sdk/models/edge_connector_data.py +++ b/rootly_sdk/models/edge_connector_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -25,7 +27,7 @@ class EdgeConnectorData: type_: EdgeConnectorDataType id: UUID - attributes: "EdgeConnectorDataAttributes" + attributes: EdgeConnectorDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/edge_connector_data_attributes.py b/rootly_sdk/models/edge_connector_data_attributes.py index 07ae460c..8281a4d4 100644 --- a/rootly_sdk/models/edge_connector_data_attributes.py +++ b/rootly_sdk/models/edge_connector_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,32 +23,32 @@ class EdgeConnectorDataAttributes: Attributes: name (str): Connector name status (EdgeConnectorDataAttributesStatus): Connector status - description (Union[None, Unset, str]): Connector description - subscriptions (Union[Unset, list[str]]): Array of event types to subscribe to - last_poll_at (Union[None, Unset, datetime.datetime]): Last time connector polled - online (Union[Unset, bool]): Whether connector is currently online - deliveries_count (Union[Unset, int]): Total number of deliveries - deliveries_queued_count (Union[Unset, int]): Number of queued deliveries - deliveries_running_count (Union[Unset, int]): Number of running deliveries - deliveries_completed_count (Union[Unset, int]): Number of completed deliveries - deliveries_failed_count (Union[Unset, int]): Number of failed deliveries - created_at (Union[Unset, datetime.datetime]): - updated_at (Union[Unset, datetime.datetime]): + description (None | str | Unset): Connector description + subscriptions (list[str] | Unset): Array of event types to subscribe to + last_poll_at (datetime.datetime | None | Unset): Last time connector polled + online (bool | Unset): Whether connector is currently online + deliveries_count (int | Unset): Total number of deliveries + deliveries_queued_count (int | Unset): Number of queued deliveries + deliveries_running_count (int | Unset): Number of running deliveries + deliveries_completed_count (int | Unset): Number of completed deliveries + deliveries_failed_count (int | Unset): Number of failed deliveries + created_at (datetime.datetime | Unset): + updated_at (datetime.datetime | Unset): """ name: str status: EdgeConnectorDataAttributesStatus - description: None | Unset | str = UNSET - subscriptions: Unset | list[str] = UNSET - last_poll_at: None | Unset | datetime.datetime = UNSET - online: Unset | bool = UNSET - deliveries_count: Unset | int = UNSET - deliveries_queued_count: Unset | int = UNSET - deliveries_running_count: Unset | int = UNSET - deliveries_completed_count: Unset | int = UNSET - deliveries_failed_count: Unset | int = UNSET - created_at: Unset | datetime.datetime = UNSET - updated_at: Unset | datetime.datetime = UNSET + description: None | str | Unset = UNSET + subscriptions: list[str] | Unset = UNSET + last_poll_at: datetime.datetime | None | Unset = UNSET + online: bool | Unset = UNSET + deliveries_count: int | Unset = UNSET + deliveries_queued_count: int | Unset = UNSET + deliveries_running_count: int | Unset = UNSET + deliveries_completed_count: int | Unset = UNSET + deliveries_failed_count: int | Unset = UNSET + created_at: datetime.datetime | Unset = UNSET + updated_at: datetime.datetime | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,17 +56,17 @@ def to_dict(self) -> dict[str, Any]: status: str = self.status - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - subscriptions: Unset | list[str] = UNSET + subscriptions: list[str] | Unset = UNSET if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions - last_poll_at: None | Unset | str + last_poll_at: None | str | Unset if isinstance(self.last_poll_at, Unset): last_poll_at = UNSET elif isinstance(self.last_poll_at, datetime.datetime): @@ -84,11 +86,11 @@ def to_dict(self) -> dict[str, Any]: deliveries_failed_count = self.deliveries_failed_count - created_at: Unset | str = UNSET + created_at: str | Unset = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Unset | str = UNSET + updated_at: str | Unset = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -132,18 +134,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = check_edge_connector_data_attributes_status(d.pop("status")) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) subscriptions = cast(list[str], d.pop("subscriptions", UNSET)) - def _parse_last_poll_at(data: object) -> None | Unset | datetime.datetime: + def _parse_last_poll_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -154,9 +156,9 @@ def _parse_last_poll_at(data: object) -> None | Unset | datetime.datetime: last_poll_at_type_0 = isoparse(data) return last_poll_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) last_poll_at = _parse_last_poll_at(d.pop("last_poll_at", UNSET)) @@ -173,14 +175,14 @@ def _parse_last_poll_at(data: object) -> None | Unset | datetime.datetime: deliveries_failed_count = d.pop("deliveries_failed_count", UNSET) _created_at = d.pop("created_at", UNSET) - created_at: Unset | datetime.datetime + created_at: datetime.datetime | Unset if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updated_at", UNSET) - updated_at: Unset | datetime.datetime + updated_at: datetime.datetime | Unset if isinstance(_updated_at, Unset): updated_at = UNSET else: diff --git a/rootly_sdk/models/environment.py b/rootly_sdk/models/environment.py index 7aa99747..86d757c2 100644 --- a/rootly_sdk/models/environment.py +++ b/rootly_sdk/models/environment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -7,7 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.environment_fields_type_0_item import EnvironmentFieldsType0Item + from ..models.environment_properties_type_0_item import EnvironmentPropertiesType0Item from ..models.environment_slack_aliases_type_0_item import EnvironmentSlackAliasesType0Item from ..models.environment_slack_channels_type_0_item import EnvironmentSlackChannelsType0Item @@ -22,29 +24,29 @@ class Environment: name (str): The name of the environment created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the environment - description (Union[None, Unset, str]): The description of the environment - notify_emails (Union[None, Unset, list[str]]): Emails attached to the environment - color (Union[None, Unset, str]): The hex color of the environment - position (Union[None, Unset, int]): Position of the environment - slack_channels (Union[None, Unset, list['EnvironmentSlackChannelsType0Item']]): Slack Channels associated with - this environment - slack_aliases (Union[None, Unset, list['EnvironmentSlackAliasesType0Item']]): Slack Aliases associated with this + slug (str | Unset): The slug of the environment + description (None | str | Unset): The description of the environment + notify_emails (list[str] | None | Unset): Emails attached to the environment + color (None | str | Unset): The hex color of the environment + position (int | None | Unset): Position of the environment + slack_channels (list[EnvironmentSlackChannelsType0Item] | None | Unset): Slack Channels associated with this + environment + slack_aliases (list[EnvironmentSlackAliasesType0Item] | None | Unset): Slack Aliases associated with this environment - fields (Union[None, Unset, list['EnvironmentFieldsType0Item']]): Array of field values for this environment. + properties (list[EnvironmentPropertiesType0Item] | None | Unset): Array of property values for this environment. """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - slack_channels: None | Unset | list["EnvironmentSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["EnvironmentSlackAliasesType0Item"] = UNSET - fields: None | Unset | list["EnvironmentFieldsType0Item"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + slack_channels: list[EnvironmentSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[EnvironmentSlackAliasesType0Item] | None | Unset = UNSET + properties: list[EnvironmentPropertiesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,13 +58,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -71,19 +73,19 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -95,7 +97,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -107,17 +109,17 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: None | Unset | list[dict[str, Any]] - if isinstance(self.fields, Unset): - fields = UNSET - elif isinstance(self.fields, list): - fields = [] - for fields_type_0_item_data in self.fields: - fields_type_0_item = fields_type_0_item_data.to_dict() - fields.append(fields_type_0_item) + properties: list[dict[str, Any]] | None | Unset + if isinstance(self.properties, Unset): + properties = UNSET + elif isinstance(self.properties, list): + properties = [] + for properties_type_0_item_data in self.properties: + properties_type_0_item = properties_type_0_item_data.to_dict() + properties.append(properties_type_0_item) else: - fields = self.fields + properties = self.properties field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -142,14 +144,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.environment_fields_type_0_item import EnvironmentFieldsType0Item + from ..models.environment_properties_type_0_item import EnvironmentPropertiesType0Item from ..models.environment_slack_aliases_type_0_item import EnvironmentSlackAliasesType0Item from ..models.environment_slack_channels_type_0_item import EnvironmentSlackChannelsType0Item @@ -162,16 +164,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -182,31 +184,31 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_slack_channels(data: object) -> None | Unset | list["EnvironmentSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[EnvironmentSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -224,13 +226,13 @@ def _parse_slack_channels(data: object) -> None | Unset | list["EnvironmentSlack slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["EnvironmentSlackChannelsType0Item"], data) + return cast(list[EnvironmentSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases(data: object) -> None | Unset | list["EnvironmentSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[EnvironmentSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -248,13 +250,13 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["EnvironmentSlackA slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["EnvironmentSlackAliasesType0Item"], data) + return cast(list[EnvironmentSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_fields(data: object) -> None | Unset | list["EnvironmentFieldsType0Item"]: + def _parse_properties(data: object) -> list[EnvironmentPropertiesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -262,19 +264,19 @@ def _parse_fields(data: object) -> None | Unset | list["EnvironmentFieldsType0It try: if not isinstance(data, list): raise TypeError() - fields_type_0 = [] - _fields_type_0 = data - for fields_type_0_item_data in _fields_type_0: - fields_type_0_item = EnvironmentFieldsType0Item.from_dict(fields_type_0_item_data) + properties_type_0 = [] + _properties_type_0 = data + for properties_type_0_item_data in _properties_type_0: + properties_type_0_item = EnvironmentPropertiesType0Item.from_dict(properties_type_0_item_data) - fields_type_0.append(fields_type_0_item) + properties_type_0.append(properties_type_0_item) - return fields_type_0 - except: # noqa: E722 + return properties_type_0 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["EnvironmentFieldsType0Item"], data) + return cast(list[EnvironmentPropertiesType0Item] | None | Unset, data) - fields = _parse_fields(d.pop("fields", UNSET)) + properties = _parse_properties(d.pop("properties", UNSET)) environment = cls( name=name, @@ -287,7 +289,7 @@ def _parse_fields(data: object) -> None | Unset | list["EnvironmentFieldsType0It position=position, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) environment.additional_properties = d diff --git a/rootly_sdk/models/environment_list.py b/rootly_sdk/models/environment_list.py index 5c324e98..9339bf0d 100644 --- a/rootly_sdk/models/environment_list.py +++ b/rootly_sdk/models/environment_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class EnvironmentList: """ Attributes: - data (list['EnvironmentListDataItem']): + data (list[EnvironmentListDataItem]): links (Links): meta (Meta): """ - data: list["EnvironmentListDataItem"] - links: "Links" - meta: "Meta" + data: list[EnvironmentListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/environment_list_data_item.py b/rootly_sdk/models/environment_list_data_item.py index b139edc2..59cbd582 100644 --- a/rootly_sdk/models/environment_list_data_item.py +++ b/rootly_sdk/models/environment_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class EnvironmentListDataItem: id: str type_: EnvironmentListDataItemType - attributes: "Environment" + attributes: Environment additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_entity_data_attributes_fields_item.py b/rootly_sdk/models/environment_properties_type_0_item.py similarity index 64% rename from rootly_sdk/models/update_catalog_entity_data_attributes_fields_item.py rename to rootly_sdk/models/environment_properties_type_0_item.py index 495b6024..1e6c007a 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes_fields_item.py +++ b/rootly_sdk/models/environment_properties_type_0_item.py @@ -1,26 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="UpdateCatalogEntityDataAttributesFieldsItem") +T = TypeVar("T", bound="EnvironmentPropertiesType0Item") @_attrs_define -class UpdateCatalogEntityDataAttributesFieldsItem: - """ +class EnvironmentPropertiesType0Item: + """Set a value for a catalog property + Attributes: - catalog_field_id (str): Unique ID of the catalog field - value (str): The value for this field + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -28,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -38,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - update_catalog_entity_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + environment_properties_type_0_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - update_catalog_entity_data_attributes_fields_item.additional_properties = d - return update_catalog_entity_data_attributes_fields_item + environment_properties_type_0_item.additional_properties = d + return environment_properties_type_0_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/environment_response.py b/rootly_sdk/models/environment_response.py index 776b83f6..7d978e8e 100644 --- a/rootly_sdk/models/environment_response.py +++ b/rootly_sdk/models/environment_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class EnvironmentResponse: data (EnvironmentResponseData): """ - data: "EnvironmentResponseData" + data: EnvironmentResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/environment_response_data.py b/rootly_sdk/models/environment_response_data.py index 96dfb328..5202818b 100644 --- a/rootly_sdk/models/environment_response_data.py +++ b/rootly_sdk/models/environment_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class EnvironmentResponseData: id: str type_: EnvironmentResponseDataType - attributes: "Environment" + attributes: Environment additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/environment_slack_aliases_type_0_item.py b/rootly_sdk/models/environment_slack_aliases_type_0_item.py index 01439b1b..35b6c464 100644 --- a/rootly_sdk/models/environment_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/environment_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/environment_slack_channels_type_0_item.py b/rootly_sdk/models/environment_slack_channels_type_0_item.py index 9d2d54a7..aab61759 100644 --- a/rootly_sdk/models/environment_slack_channels_type_0_item.py +++ b/rootly_sdk/models/environment_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/errors_list.py b/rootly_sdk/models/errors_list.py index af2abffb..eb0f6933 100644 --- a/rootly_sdk/models/errors_list.py +++ b/rootly_sdk/models/errors_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class ErrorsList: """ Attributes: - errors (Union[Unset, list['ErrorsListErrorsItem']]): + errors (list[ErrorsListErrorsItem] | Unset): """ - errors: Unset | list["ErrorsListErrorsItem"] = UNSET + errors: list[ErrorsListErrorsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - errors: Unset | list[dict[str, Any]] = UNSET + errors: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.errors, Unset): errors = [] for errors_item_data in self.errors: @@ -44,12 +46,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.errors_list_errors_item import ErrorsListErrorsItem d = dict(src_dict) - errors = [] _errors = d.pop("errors", UNSET) - for errors_item_data in _errors or []: - errors_item = ErrorsListErrorsItem.from_dict(errors_item_data) + errors: list[ErrorsListErrorsItem] | Unset = UNSET + if _errors is not UNSET: + errors = [] + for errors_item_data in _errors: + errors_item = ErrorsListErrorsItem.from_dict(errors_item_data) - errors.append(errors_item) + errors.append(errors_item) errors_list = cls( errors=errors, diff --git a/rootly_sdk/models/errors_list_errors_item.py b/rootly_sdk/models/errors_list_errors_item.py index d4a4f5c2..55c41afb 100644 --- a/rootly_sdk/models/errors_list_errors_item.py +++ b/rootly_sdk/models/errors_list_errors_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -15,14 +17,14 @@ class ErrorsListErrorsItem: Attributes: title (str): status (str): - code (Union[None, Unset, str]): - detail (Union[None, Unset, str]): + code (None | str | Unset): + detail (None | str | Unset): """ title: str status: str - code: None | Unset | str = UNSET - detail: None | Unset | str = UNSET + code: None | str | Unset = UNSET + detail: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -30,13 +32,13 @@ def to_dict(self) -> dict[str, Any]: status = self.status - code: None | Unset | str + code: None | str | Unset if isinstance(self.code, Unset): code = UNSET else: code = self.code - detail: None | Unset | str + detail: None | str | Unset if isinstance(self.detail, Unset): detail = UNSET else: @@ -64,21 +66,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = d.pop("status") - def _parse_code(data: object) -> None | Unset | str: + def _parse_code(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) code = _parse_code(d.pop("code", UNSET)) - def _parse_detail(data: object) -> None | Unset | str: + def _parse_detail(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) detail = _parse_detail(d.pop("detail", UNSET)) diff --git a/rootly_sdk/models/escalation_policy.py b/rootly_sdk/models/escalation_policy.py index 5e7daa37..222eaa40 100644 --- a/rootly_sdk/models/escalation_policy.py +++ b/rootly_sdk/models/escalation_policy.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,25 +22,25 @@ class EscalationPolicy: name (str): The name of the escalation policy repeat_count (int): The number of times this policy will be executed until someone acknowledges the alert created_by_user_id (int): User who created the escalation policy - description (Union[None, Unset, str]): The description of the escalation policy - last_updated_by_user_id (Union[Unset, int]): User who updated the escalation policy - group_ids (Union[Unset, list[str]]): Associated groups (alerting the group will trigger escalation policy) - service_ids (Union[Unset, list[str]]): Associated services (alerting the service will trigger escalation policy) - business_hours (Union['EscalationPolicyBusinessHoursType0', None, Unset]): - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + description (None | str | Unset): The description of the escalation policy + last_updated_by_user_id (int | Unset): User who updated the escalation policy + group_ids (list[str] | Unset): Associated groups (alerting the group will trigger escalation policy) + service_ids (list[str] | Unset): Associated services (alerting the service will trigger escalation policy) + business_hours (EscalationPolicyBusinessHoursType0 | None | Unset): + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ name: str repeat_count: int created_by_user_id: int - description: None | Unset | str = UNSET - last_updated_by_user_id: Unset | int = UNSET - group_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - business_hours: Union["EscalationPolicyBusinessHoursType0", None, Unset] = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + description: None | str | Unset = UNSET + last_updated_by_user_id: int | Unset = UNSET + group_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + business_hours: EscalationPolicyBusinessHoursType0 | None | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: created_by_user_id = self.created_by_user_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -58,15 +60,15 @@ def to_dict(self) -> dict[str, Any]: last_updated_by_user_id = self.last_updated_by_user_id - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - business_hours: None | Unset | dict[str, Any] + business_hours: dict[str, Any] | None | Unset if isinstance(self.business_hours, Unset): business_hours = UNSET elif isinstance(self.business_hours, EscalationPolicyBusinessHoursType0): @@ -115,12 +117,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_user_id = d.pop("created_by_user_id") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -130,7 +132,7 @@ def _parse_description(data: object) -> None | Unset | str: service_ids = cast(list[str], d.pop("service_ids", UNSET)) - def _parse_business_hours(data: object) -> Union["EscalationPolicyBusinessHoursType0", None, Unset]: + def _parse_business_hours(data: object) -> EscalationPolicyBusinessHoursType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -141,9 +143,9 @@ def _parse_business_hours(data: object) -> Union["EscalationPolicyBusinessHoursT business_hours_type_0 = EscalationPolicyBusinessHoursType0.from_dict(data) return business_hours_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["EscalationPolicyBusinessHoursType0", None, Unset], data) + return cast(EscalationPolicyBusinessHoursType0 | None | Unset, data) business_hours = _parse_business_hours(d.pop("business_hours", UNSET)) diff --git a/rootly_sdk/models/escalation_policy_business_hours_type_0.py b/rootly_sdk/models/escalation_policy_business_hours_type_0.py index e5081210..2312ee81 100644 --- a/rootly_sdk/models/escalation_policy_business_hours_type_0.py +++ b/rootly_sdk/models/escalation_policy_business_hours_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,24 +23,24 @@ class EscalationPolicyBusinessHoursType0: """ Attributes: - time_zone (Union[Unset, EscalationPolicyBusinessHoursType0TimeZone]): Time zone for business hours - days (Union[None, Unset, list[EscalationPolicyBusinessHoursType0DaysType0Item]]): Business days - start_time (Union[None, Unset, str]): Start time for business hours (HH:MM) - end_time (Union[None, Unset, str]): End time for business hours (HH:MM) + time_zone (EscalationPolicyBusinessHoursType0TimeZone | Unset): Time zone for business hours + days (list[EscalationPolicyBusinessHoursType0DaysType0Item] | None | Unset): Business days + start_time (None | str | Unset): Start time for business hours (HH:MM) + end_time (None | str | Unset): End time for business hours (HH:MM) """ - time_zone: Unset | EscalationPolicyBusinessHoursType0TimeZone = UNSET - days: None | Unset | list[EscalationPolicyBusinessHoursType0DaysType0Item] = UNSET - start_time: None | Unset | str = UNSET - end_time: None | Unset | str = UNSET + time_zone: EscalationPolicyBusinessHoursType0TimeZone | Unset = UNSET + days: list[EscalationPolicyBusinessHoursType0DaysType0Item] | None | Unset = UNSET + start_time: None | str | Unset = UNSET + end_time: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - time_zone: Unset | str = UNSET + time_zone: str | Unset = UNSET if not isinstance(self.time_zone, Unset): time_zone = self.time_zone - days: None | Unset | list[str] + days: list[str] | None | Unset if isinstance(self.days, Unset): days = UNSET elif isinstance(self.days, list): @@ -50,13 +52,13 @@ def to_dict(self) -> dict[str, Any]: else: days = self.days - start_time: None | Unset | str + start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET else: start_time = self.start_time - end_time: None | Unset | str + end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET else: @@ -80,13 +82,13 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _time_zone = d.pop("time_zone", UNSET) - time_zone: Unset | EscalationPolicyBusinessHoursType0TimeZone + time_zone: EscalationPolicyBusinessHoursType0TimeZone | Unset if isinstance(_time_zone, Unset): time_zone = UNSET else: time_zone = check_escalation_policy_business_hours_type_0_time_zone(_time_zone) - def _parse_days(data: object) -> None | Unset | list[EscalationPolicyBusinessHoursType0DaysType0Item]: + def _parse_days(data: object) -> list[EscalationPolicyBusinessHoursType0DaysType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -104,27 +106,27 @@ def _parse_days(data: object) -> None | Unset | list[EscalationPolicyBusinessHou days_type_0.append(days_type_0_item) return days_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[EscalationPolicyBusinessHoursType0DaysType0Item], data) + return cast(list[EscalationPolicyBusinessHoursType0DaysType0Item] | None | Unset, data) days = _parse_days(d.pop("days", UNSET)) - def _parse_start_time(data: object) -> None | Unset | str: + def _parse_start_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | Unset | str: + def _parse_end_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py b/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py index 19121dcc..8b499200 100644 --- a/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py +++ b/rootly_sdk/models/escalation_policy_business_hours_type_0_time_zone.py @@ -65,6 +65,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -146,6 +147,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -195,6 +197,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -245,6 +248,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", @@ -353,6 +357,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -434,6 +439,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -483,6 +489,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -533,6 +540,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", diff --git a/rootly_sdk/models/escalation_policy_level.py b/rootly_sdk/models/escalation_policy_level.py index ba85684e..71d1397a 100644 --- a/rootly_sdk/models/escalation_policy_level.py +++ b/rootly_sdk/models/escalation_policy_level.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,29 +32,29 @@ class EscalationPolicyLevel: escalation_policy_id (str): The ID of the escalation policy delay (int): Delay before notifying targets in the next Escalation Level. position (int): Position of the escalation policy level - notification_target_params (list[Union['EscalationPolicyLevelNotificationTargetParamsItemType0', None]]): - Escalation level's notification targets - escalation_policy_path_id (Union[None, Unset, str]): The ID of the dynamic escalation policy path the level will + notification_target_params (list[EscalationPolicyLevelNotificationTargetParamsItemType0 | None]): Escalation + level's notification targets + escalation_policy_path_id (None | str | Unset): The ID of the dynamic escalation policy path the level will belong to. If nothing is specified it will add the level to your default path. - paging_strategy_configuration_strategy (Union[Unset, EscalationPolicyLevelPagingStrategyConfigurationStrategy]): + paging_strategy_configuration_strategy (EscalationPolicyLevelPagingStrategyConfigurationStrategy | Unset): Default: 'default'. - paging_strategy_configuration_schedule_strategy (Union[Unset, - EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy]): Default: 'on_call_only'. - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + paging_strategy_configuration_schedule_strategy + (EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy | Unset): Default: 'on_call_only'. + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ escalation_policy_id: str delay: int position: int - notification_target_params: list[Union["EscalationPolicyLevelNotificationTargetParamsItemType0", None]] - escalation_policy_path_id: None | Unset | str = UNSET - paging_strategy_configuration_strategy: Unset | EscalationPolicyLevelPagingStrategyConfigurationStrategy = "default" + notification_target_params: list[EscalationPolicyLevelNotificationTargetParamsItemType0 | None] + escalation_policy_path_id: None | str | Unset = UNSET + paging_strategy_configuration_strategy: EscalationPolicyLevelPagingStrategyConfigurationStrategy | Unset = "default" paging_strategy_configuration_schedule_strategy: ( - Unset | EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy + EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy | Unset ) = "on_call_only" - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -68,24 +70,24 @@ def to_dict(self) -> dict[str, Any]: notification_target_params = [] for notification_target_params_item_data in self.notification_target_params: - notification_target_params_item: None | dict[str, Any] + notification_target_params_item: dict[str, Any] | None if isinstance(notification_target_params_item_data, EscalationPolicyLevelNotificationTargetParamsItemType0): notification_target_params_item = notification_target_params_item_data.to_dict() else: notification_target_params_item = notification_target_params_item_data notification_target_params.append(notification_target_params_item) - escalation_policy_path_id: None | Unset | str + escalation_policy_path_id: None | str | Unset if isinstance(self.escalation_policy_path_id, Unset): escalation_policy_path_id = UNSET else: escalation_policy_path_id = self.escalation_policy_path_id - paging_strategy_configuration_strategy: Unset | str = UNSET + paging_strategy_configuration_strategy: str | Unset = UNSET if not isinstance(self.paging_strategy_configuration_strategy, Unset): paging_strategy_configuration_strategy = self.paging_strategy_configuration_strategy - paging_strategy_configuration_schedule_strategy: Unset | str = UNSET + paging_strategy_configuration_schedule_strategy: str | Unset = UNSET if not isinstance(self.paging_strategy_configuration_schedule_strategy, Unset): paging_strategy_configuration_schedule_strategy = self.paging_strategy_configuration_schedule_strategy @@ -137,7 +139,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_notification_target_params_item( data: object, - ) -> Union["EscalationPolicyLevelNotificationTargetParamsItemType0", None]: + ) -> EscalationPolicyLevelNotificationTargetParamsItemType0 | None: if data is None: return data try: @@ -148,9 +150,9 @@ def _parse_notification_target_params_item( ) return notification_target_params_item_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["EscalationPolicyLevelNotificationTargetParamsItemType0", None], data) + return cast(EscalationPolicyLevelNotificationTargetParamsItemType0 | None, data) notification_target_params_item = _parse_notification_target_params_item( notification_target_params_item_data @@ -158,17 +160,17 @@ def _parse_notification_target_params_item( notification_target_params.append(notification_target_params_item) - def _parse_escalation_policy_path_id(data: object) -> None | Unset | str: + def _parse_escalation_policy_path_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) escalation_policy_path_id = _parse_escalation_policy_path_id(d.pop("escalation_policy_path_id", UNSET)) _paging_strategy_configuration_strategy = d.pop("paging_strategy_configuration_strategy", UNSET) - paging_strategy_configuration_strategy: Unset | EscalationPolicyLevelPagingStrategyConfigurationStrategy + paging_strategy_configuration_strategy: EscalationPolicyLevelPagingStrategyConfigurationStrategy | Unset if isinstance(_paging_strategy_configuration_strategy, Unset): paging_strategy_configuration_strategy = UNSET else: @@ -182,7 +184,7 @@ def _parse_escalation_policy_path_id(data: object) -> None | Unset | str: "paging_strategy_configuration_schedule_strategy", UNSET ) paging_strategy_configuration_schedule_strategy: ( - Unset | EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy + EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy | Unset ) if isinstance(_paging_strategy_configuration_schedule_strategy, Unset): paging_strategy_configuration_schedule_strategy = UNSET diff --git a/rootly_sdk/models/escalation_policy_level_list.py b/rootly_sdk/models/escalation_policy_level_list.py index 9d9778c1..c77dc432 100644 --- a/rootly_sdk/models/escalation_policy_level_list.py +++ b/rootly_sdk/models/escalation_policy_level_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class EscalationPolicyLevelList: """ Attributes: - data (list['EscalationPolicyLevelListDataItem']): + data (list[EscalationPolicyLevelListDataItem]): links (Links): meta (Meta): """ - data: list["EscalationPolicyLevelListDataItem"] - links: "Links" - meta: "Meta" + data: list[EscalationPolicyLevelListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_level_list_data_item.py b/rootly_sdk/models/escalation_policy_level_list_data_item.py index 478e845f..de6c1f8a 100644 --- a/rootly_sdk/models/escalation_policy_level_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_level_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -20,7 +22,7 @@ class EscalationPolicyLevelListDataItem: """ id: str - attributes: "EscalationPolicyLevel" + attributes: EscalationPolicyLevel additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0.py b/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0.py index 6fc369bc..da88f065 100644 --- a/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0.py +++ b/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -23,13 +25,13 @@ class EscalationPolicyLevelNotificationTargetParamsItemType0: Attributes: id (str): The ID of notification target type_ (EscalationPolicyLevelNotificationTargetParamsItemType0Type): The type of the notification target - team_members (Union[Unset, EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers]): For targets with + team_members (EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers | Unset): For targets with type=team, controls whether to notify admins, all team members, or escalate to team EP. """ id: str type_: EscalationPolicyLevelNotificationTargetParamsItemType0Type - team_members: Unset | EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers = UNSET + team_members: EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: type_: str = self.type_ - team_members: Unset | str = UNSET + team_members: str | Unset = UNSET if not isinstance(self.team_members, Unset): team_members = self.team_members @@ -62,7 +64,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: type_ = check_escalation_policy_level_notification_target_params_item_type_0_type(d.pop("type")) _team_members = d.pop("team_members", UNSET) - team_members: Unset | EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers + team_members: EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers | Unset if isinstance(_team_members, Unset): team_members = UNSET else: diff --git a/rootly_sdk/models/escalation_policy_level_response.py b/rootly_sdk/models/escalation_policy_level_response.py index a9880c19..80658cce 100644 --- a/rootly_sdk/models/escalation_policy_level_response.py +++ b/rootly_sdk/models/escalation_policy_level_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class EscalationPolicyLevelResponse: data (EscalationPolicyLevelResponseData): """ - data: "EscalationPolicyLevelResponseData" + data: EscalationPolicyLevelResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_level_response_data.py b/rootly_sdk/models/escalation_policy_level_response_data.py index 430b5a17..49803990 100644 --- a/rootly_sdk/models/escalation_policy_level_response_data.py +++ b/rootly_sdk/models/escalation_policy_level_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class EscalationPolicyLevelResponseData: Attributes: id (str): Unique ID of the escalation policy level attributes (EscalationPolicyLevel): - type_ (Union[Unset, EscalationPolicyLevelResponseDataType]): + type_ (EscalationPolicyLevelResponseDataType | Unset): """ id: str - attributes: "EscalationPolicyLevel" - type_: Unset | EscalationPolicyLevelResponseDataType = UNSET + attributes: EscalationPolicyLevel + type_: EscalationPolicyLevelResponseDataType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = EscalationPolicyLevel.from_dict(d.pop("attributes")) _type_ = d.pop("type", UNSET) - type_: Unset | EscalationPolicyLevelResponseDataType + type_: EscalationPolicyLevelResponseDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/escalation_policy_list.py b/rootly_sdk/models/escalation_policy_list.py index 1a160b26..d1639d18 100644 --- a/rootly_sdk/models/escalation_policy_list.py +++ b/rootly_sdk/models/escalation_policy_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class EscalationPolicyList: """ Attributes: - data (list['EscalationPolicyListDataItem']): + data (list[EscalationPolicyListDataItem]): links (Links): meta (Meta): """ - data: list["EscalationPolicyListDataItem"] - links: "Links" - meta: "Meta" + data: list[EscalationPolicyListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_list_data_item.py b/rootly_sdk/models/escalation_policy_list_data_item.py index e9ef02d6..3d4758cf 100644 --- a/rootly_sdk/models/escalation_policy_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class EscalationPolicyListDataItem: id: str type_: EscalationPolicyListDataItemType - attributes: "EscalationPolicy" + attributes: EscalationPolicy additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_path.py b/rootly_sdk/models/escalation_policy_path.py index 7e47a06b..3f5524ea 100644 --- a/rootly_sdk/models/escalation_policy_path.py +++ b/rootly_sdk/models/escalation_policy_path.py @@ -1,13 +1,23 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.escalation_policy_path_after_deferral_behavior import ( + EscalationPolicyPathAfterDeferralBehavior, + check_escalation_policy_path_after_deferral_behavior, +) from ..models.escalation_policy_path_match_mode import ( EscalationPolicyPathMatchMode, check_escalation_policy_path_match_mode, ) +from ..models.escalation_policy_path_path_type import ( + EscalationPolicyPathPathType, + check_escalation_policy_path_path_type, +) from ..models.escalation_policy_path_time_restriction_time_zone import ( EscalationPolicyPathTimeRestrictionTimeZone, check_escalation_policy_path_time_restriction_time_zone, @@ -19,14 +29,20 @@ from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 - from ..models.escalation_policy_path_rules_item_type_4_type_0 import EscalationPolicyPathRulesItemType4Type0 - from ..models.escalation_policy_path_rules_item_type_4_type_1 import EscalationPolicyPathRulesItemType4Type1 - from ..models.escalation_policy_path_rules_item_type_4_type_2 import EscalationPolicyPathRulesItemType4Type2 - from ..models.escalation_policy_path_rules_item_type_4_type_3 import EscalationPolicyPathRulesItemType4Type3 - from ..models.escalation_policy_path_rules_item_type_5_type_0 import EscalationPolicyPathRulesItemType5Type0 - from ..models.escalation_policy_path_rules_item_type_5_type_1 import EscalationPolicyPathRulesItemType5Type1 - from ..models.escalation_policy_path_rules_item_type_5_type_2 import EscalationPolicyPathRulesItemType5Type2 - from ..models.escalation_policy_path_rules_item_type_5_type_3 import EscalationPolicyPathRulesItemType5Type3 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 + from ..models.escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 + from ..models.escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 + from ..models.escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 + from ..models.escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 + from ..models.escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 + from ..models.escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 + from ..models.escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 + from ..models.escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 + from ..models.escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 + from ..models.escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 + from ..models.escalation_policy_path_rules_item_type_7_type_5 import EscalationPolicyPathRulesItemType7Type5 from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem @@ -41,58 +57,72 @@ class EscalationPolicyPath: default (bool): Whether this escalation path is the default path notification_type (str): Notification rule type escalation_policy_id (str): The ID of the escalation policy - repeat (Union[None, bool]): Whether this path should be repeated until someone acknowledges the alert - repeat_count (Union[None, int]): The number of times this path will be executed until someone acknowledges the - alert - match_mode (Union[Unset, EscalationPolicyPathMatchMode]): How path rules are matched. - position (Union[Unset, int]): The position of this path in the paths for this EP. - initial_delay (Union[Unset, int]): Initial delay for escalation path in minutes. Maximum 1 week (10080). - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update - rules (Union[Unset, list[Union['EscalationPolicyPathRulesItemType0', 'EscalationPolicyPathRulesItemType1', - 'EscalationPolicyPathRulesItemType2', 'EscalationPolicyPathRulesItemType3', - 'EscalationPolicyPathRulesItemType4Type0', 'EscalationPolicyPathRulesItemType4Type1', - 'EscalationPolicyPathRulesItemType4Type2', 'EscalationPolicyPathRulesItemType4Type3', - 'EscalationPolicyPathRulesItemType5Type0', 'EscalationPolicyPathRulesItemType5Type1', - 'EscalationPolicyPathRulesItemType5Type2', 'EscalationPolicyPathRulesItemType5Type3']]]): Escalation path rules - time_restriction_time_zone (Union[Unset, EscalationPolicyPathTimeRestrictionTimeZone]): Time zone used for time + repeat (bool | None): Whether this path should be repeated until someone acknowledges the alert + repeat_count (int | None): The number of times this path will be executed until someone acknowledges the alert + path_type (EscalationPolicyPathPathType | Unset): The type of escalation path + after_deferral_behavior (EscalationPolicyPathAfterDeferralBehavior | Unset): What happens after a deferral path + finishes + after_deferral_path_id (None | str | Unset): The escalation path to execute after this deferral path when + after_deferral_behavior is execute_path + match_mode (EscalationPolicyPathMatchMode | Unset): How path rules are matched. + position (int | Unset): The position of this path in the paths for this EP. + initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + rules (list[EscalationPolicyPathRulesItemType0 | EscalationPolicyPathRulesItemType1 | + EscalationPolicyPathRulesItemType2 | EscalationPolicyPathRulesItemType3 | EscalationPolicyPathRulesItemType4 | + EscalationPolicyPathRulesItemType5 | EscalationPolicyPathRulesItemType6Type0 | + EscalationPolicyPathRulesItemType6Type1 | EscalationPolicyPathRulesItemType6Type2 | + EscalationPolicyPathRulesItemType6Type3 | EscalationPolicyPathRulesItemType6Type4 | + EscalationPolicyPathRulesItemType6Type5 | EscalationPolicyPathRulesItemType7Type0 | + EscalationPolicyPathRulesItemType7Type1 | EscalationPolicyPathRulesItemType7Type2 | + EscalationPolicyPathRulesItemType7Type3 | EscalationPolicyPathRulesItemType7Type4 | + EscalationPolicyPathRulesItemType7Type5] | Unset): Escalation path rules + time_restriction_time_zone (EscalationPolicyPathTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. - time_restrictions (Union[Unset, list['EscalationPolicyPathTimeRestrictionsItem']]): If time restrictions are - set, alerts will follow this path when they arrive within the specified time ranges and meet the rules. + time_restrictions (list[EscalationPolicyPathTimeRestrictionsItem] | Unset): If time restrictions are set, alerts + will follow this path when they arrive within the specified time ranges and meet the rules. """ name: str default: bool notification_type: str escalation_policy_id: str - repeat: None | bool - repeat_count: None | int - match_mode: Unset | EscalationPolicyPathMatchMode = UNSET - position: Unset | int = UNSET - initial_delay: Unset | int = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + repeat: bool | None + repeat_count: int | None + path_type: EscalationPolicyPathPathType | Unset = UNSET + after_deferral_behavior: EscalationPolicyPathAfterDeferralBehavior | Unset = UNSET + after_deferral_path_id: None | str | Unset = UNSET + match_mode: EscalationPolicyPathMatchMode | Unset = UNSET + position: int | Unset = UNSET + initial_delay: int | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET rules: ( - Unset - | list[ - Union[ - "EscalationPolicyPathRulesItemType0", - "EscalationPolicyPathRulesItemType1", - "EscalationPolicyPathRulesItemType2", - "EscalationPolicyPathRulesItemType3", - "EscalationPolicyPathRulesItemType4Type0", - "EscalationPolicyPathRulesItemType4Type1", - "EscalationPolicyPathRulesItemType4Type2", - "EscalationPolicyPathRulesItemType4Type3", - "EscalationPolicyPathRulesItemType5Type0", - "EscalationPolicyPathRulesItemType5Type1", - "EscalationPolicyPathRulesItemType5Type2", - "EscalationPolicyPathRulesItemType5Type3", - ] + list[ + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6Type0 + | EscalationPolicyPathRulesItemType6Type1 + | EscalationPolicyPathRulesItemType6Type2 + | EscalationPolicyPathRulesItemType6Type3 + | EscalationPolicyPathRulesItemType6Type4 + | EscalationPolicyPathRulesItemType6Type5 + | EscalationPolicyPathRulesItemType7Type0 + | EscalationPolicyPathRulesItemType7Type1 + | EscalationPolicyPathRulesItemType7Type2 + | EscalationPolicyPathRulesItemType7Type3 + | EscalationPolicyPathRulesItemType7Type4 + | EscalationPolicyPathRulesItemType7Type5 ] + | Unset ) = UNSET - time_restriction_time_zone: Unset | EscalationPolicyPathTimeRestrictionTimeZone = UNSET - time_restrictions: Unset | list["EscalationPolicyPathTimeRestrictionsItem"] = UNSET + time_restriction_time_zone: EscalationPolicyPathTimeRestrictionTimeZone | Unset = UNSET + time_restrictions: list[EscalationPolicyPathTimeRestrictionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -100,13 +130,19 @@ def to_dict(self) -> dict[str, Any]: from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 - from ..models.escalation_policy_path_rules_item_type_4_type_0 import EscalationPolicyPathRulesItemType4Type0 - from ..models.escalation_policy_path_rules_item_type_4_type_1 import EscalationPolicyPathRulesItemType4Type1 - from ..models.escalation_policy_path_rules_item_type_4_type_2 import EscalationPolicyPathRulesItemType4Type2 - from ..models.escalation_policy_path_rules_item_type_4_type_3 import EscalationPolicyPathRulesItemType4Type3 - from ..models.escalation_policy_path_rules_item_type_5_type_0 import EscalationPolicyPathRulesItemType5Type0 - from ..models.escalation_policy_path_rules_item_type_5_type_1 import EscalationPolicyPathRulesItemType5Type1 - from ..models.escalation_policy_path_rules_item_type_5_type_2 import EscalationPolicyPathRulesItemType5Type2 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 + from ..models.escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 + from ..models.escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 + from ..models.escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 + from ..models.escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 + from ..models.escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 + from ..models.escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 + from ..models.escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 + from ..models.escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 + from ..models.escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 + from ..models.escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 name = self.name @@ -116,13 +152,27 @@ def to_dict(self) -> dict[str, Any]: escalation_policy_id = self.escalation_policy_id - repeat: None | bool + repeat: bool | None repeat = self.repeat - repeat_count: None | int + repeat_count: int | None repeat_count = self.repeat_count - match_mode: Unset | str = UNSET + path_type: str | Unset = UNSET + if not isinstance(self.path_type, Unset): + path_type = self.path_type + + after_deferral_behavior: str | Unset = UNSET + if not isinstance(self.after_deferral_behavior, Unset): + after_deferral_behavior = self.after_deferral_behavior + + after_deferral_path_id: None | str | Unset + if isinstance(self.after_deferral_path_id, Unset): + after_deferral_path_id = UNSET + else: + after_deferral_path_id = self.after_deferral_path_id + + match_mode: str | Unset = UNSET if not isinstance(self.match_mode, Unset): match_mode = self.match_mode @@ -134,7 +184,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -147,30 +197,42 @@ def to_dict(self) -> dict[str, Any]: rules_item = rules_item_data.to_dict() elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4Type0): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4Type1): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType5): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4Type2): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type0): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4Type3): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type1): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType5Type0): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType5Type1): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType5Type2): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type4): rules_item = rules_item_data.to_dict() else: rules_item = rules_item_data.to_dict() rules.append(rules_item) - time_restriction_time_zone: Unset | str = UNSET + time_restriction_time_zone: str | Unset = UNSET if not isinstance(self.time_restriction_time_zone, Unset): time_restriction_time_zone = self.time_restriction_time_zone - time_restrictions: Unset | list[dict[str, Any]] = UNSET + time_restrictions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.time_restrictions, Unset): time_restrictions = [] for time_restrictions_item_data in self.time_restrictions: @@ -189,6 +251,12 @@ def to_dict(self) -> dict[str, Any]: "repeat_count": repeat_count, } ) + if path_type is not UNSET: + field_dict["path_type"] = path_type + if after_deferral_behavior is not UNSET: + field_dict["after_deferral_behavior"] = after_deferral_behavior + if after_deferral_path_id is not UNSET: + field_dict["after_deferral_path_id"] = after_deferral_path_id if match_mode is not UNSET: field_dict["match_mode"] = match_mode if position is not UNSET: @@ -214,14 +282,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 - from ..models.escalation_policy_path_rules_item_type_4_type_0 import EscalationPolicyPathRulesItemType4Type0 - from ..models.escalation_policy_path_rules_item_type_4_type_1 import EscalationPolicyPathRulesItemType4Type1 - from ..models.escalation_policy_path_rules_item_type_4_type_2 import EscalationPolicyPathRulesItemType4Type2 - from ..models.escalation_policy_path_rules_item_type_4_type_3 import EscalationPolicyPathRulesItemType4Type3 - from ..models.escalation_policy_path_rules_item_type_5_type_0 import EscalationPolicyPathRulesItemType5Type0 - from ..models.escalation_policy_path_rules_item_type_5_type_1 import EscalationPolicyPathRulesItemType5Type1 - from ..models.escalation_policy_path_rules_item_type_5_type_2 import EscalationPolicyPathRulesItemType5Type2 - from ..models.escalation_policy_path_rules_item_type_5_type_3 import EscalationPolicyPathRulesItemType5Type3 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 + from ..models.escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 + from ..models.escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 + from ..models.escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 + from ..models.escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 + from ..models.escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 + from ..models.escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 + from ..models.escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 + from ..models.escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 + from ..models.escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 + from ..models.escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 + from ..models.escalation_policy_path_rules_item_type_7_type_5 import EscalationPolicyPathRulesItemType7Type5 from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem d = dict(src_dict) @@ -233,22 +307,45 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: escalation_policy_id = d.pop("escalation_policy_id") - def _parse_repeat(data: object) -> None | bool: + def _parse_repeat(data: object) -> bool | None: if data is None: return data - return cast(None | bool, data) + return cast(bool | None, data) repeat = _parse_repeat(d.pop("repeat")) - def _parse_repeat_count(data: object) -> None | int: + def _parse_repeat_count(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) repeat_count = _parse_repeat_count(d.pop("repeat_count")) + _path_type = d.pop("path_type", UNSET) + path_type: EscalationPolicyPathPathType | Unset + if isinstance(_path_type, Unset): + path_type = UNSET + else: + path_type = check_escalation_policy_path_path_type(_path_type) + + _after_deferral_behavior = d.pop("after_deferral_behavior", UNSET) + after_deferral_behavior: EscalationPolicyPathAfterDeferralBehavior | Unset + if isinstance(_after_deferral_behavior, Unset): + after_deferral_behavior = UNSET + else: + after_deferral_behavior = check_escalation_policy_path_after_deferral_behavior(_after_deferral_behavior) + + def _parse_after_deferral_path_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + after_deferral_path_id = _parse_after_deferral_path_id(d.pop("after_deferral_path_id", UNSET)) + _match_mode = d.pop("match_mode", UNSET) - match_mode: Unset | EscalationPolicyPathMatchMode + match_mode: EscalationPolicyPathMatchMode | Unset if isinstance(_match_mode, Unset): match_mode = UNSET else: @@ -262,126 +359,204 @@ def _parse_repeat_count(data: object) -> None | int: updated_at = d.pop("updated_at", UNSET) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - - def _parse_rules_item( - data: object, - ) -> Union[ - "EscalationPolicyPathRulesItemType0", - "EscalationPolicyPathRulesItemType1", - "EscalationPolicyPathRulesItemType2", - "EscalationPolicyPathRulesItemType3", - "EscalationPolicyPathRulesItemType4Type0", - "EscalationPolicyPathRulesItemType4Type1", - "EscalationPolicyPathRulesItemType4Type2", - "EscalationPolicyPathRulesItemType4Type3", - "EscalationPolicyPathRulesItemType5Type0", - "EscalationPolicyPathRulesItemType5Type1", - "EscalationPolicyPathRulesItemType5Type2", - "EscalationPolicyPathRulesItemType5Type3", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_0 = EscalationPolicyPathRulesItemType0.from_dict(data) - - return rules_item_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_1 = EscalationPolicyPathRulesItemType1.from_dict(data) - - return rules_item_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_2 = EscalationPolicyPathRulesItemType2.from_dict(data) - - return rules_item_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_3 = EscalationPolicyPathRulesItemType3.from_dict(data) - - return rules_item_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_4_type_0 = EscalationPolicyPathRulesItemType4Type0.from_dict(data) - - return rules_item_type_4_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_4_type_1 = EscalationPolicyPathRulesItemType4Type1.from_dict(data) - - return rules_item_type_4_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_4_type_2 = EscalationPolicyPathRulesItemType4Type2.from_dict(data) - - return rules_item_type_4_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_4_type_3 = EscalationPolicyPathRulesItemType4Type3.from_dict(data) - - return rules_item_type_4_type_3 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_5_type_0 = EscalationPolicyPathRulesItemType5Type0.from_dict(data) - - return rules_item_type_5_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_5_type_1 = EscalationPolicyPathRulesItemType5Type1.from_dict(data) - - return rules_item_type_5_type_1 - except: # noqa: E722 - pass - try: + rules: ( + list[ + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6Type0 + | EscalationPolicyPathRulesItemType6Type1 + | EscalationPolicyPathRulesItemType6Type2 + | EscalationPolicyPathRulesItemType6Type3 + | EscalationPolicyPathRulesItemType6Type4 + | EscalationPolicyPathRulesItemType6Type5 + | EscalationPolicyPathRulesItemType7Type0 + | EscalationPolicyPathRulesItemType7Type1 + | EscalationPolicyPathRulesItemType7Type2 + | EscalationPolicyPathRulesItemType7Type3 + | EscalationPolicyPathRulesItemType7Type4 + | EscalationPolicyPathRulesItemType7Type5 + ] + | Unset + ) = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + + def _parse_rules_item( + data: object, + ) -> ( + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6Type0 + | EscalationPolicyPathRulesItemType6Type1 + | EscalationPolicyPathRulesItemType6Type2 + | EscalationPolicyPathRulesItemType6Type3 + | EscalationPolicyPathRulesItemType6Type4 + | EscalationPolicyPathRulesItemType6Type5 + | EscalationPolicyPathRulesItemType7Type0 + | EscalationPolicyPathRulesItemType7Type1 + | EscalationPolicyPathRulesItemType7Type2 + | EscalationPolicyPathRulesItemType7Type3 + | EscalationPolicyPathRulesItemType7Type4 + | EscalationPolicyPathRulesItemType7Type5 + ): + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_0 = EscalationPolicyPathRulesItemType0.from_dict(data) + + return rules_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_1 = EscalationPolicyPathRulesItemType1.from_dict(data) + + return rules_item_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_2 = EscalationPolicyPathRulesItemType2.from_dict(data) + + return rules_item_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_3 = EscalationPolicyPathRulesItemType3.from_dict(data) + + return rules_item_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_4 = EscalationPolicyPathRulesItemType4.from_dict(data) + + return rules_item_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_5 = EscalationPolicyPathRulesItemType5.from_dict(data) + + return rules_item_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6_type_0 = EscalationPolicyPathRulesItemType6Type0.from_dict(data) + + return rules_item_type_6_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6_type_1 = EscalationPolicyPathRulesItemType6Type1.from_dict(data) + + return rules_item_type_6_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6_type_2 = EscalationPolicyPathRulesItemType6Type2.from_dict(data) + + return rules_item_type_6_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6_type_3 = EscalationPolicyPathRulesItemType6Type3.from_dict(data) + + return rules_item_type_6_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6_type_4 = EscalationPolicyPathRulesItemType6Type4.from_dict(data) + + return rules_item_type_6_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6_type_5 = EscalationPolicyPathRulesItemType6Type5.from_dict(data) + + return rules_item_type_6_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7_type_0 = EscalationPolicyPathRulesItemType7Type0.from_dict(data) + + return rules_item_type_7_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7_type_1 = EscalationPolicyPathRulesItemType7Type1.from_dict(data) + + return rules_item_type_7_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7_type_2 = EscalationPolicyPathRulesItemType7Type2.from_dict(data) + + return rules_item_type_7_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7_type_3 = EscalationPolicyPathRulesItemType7Type3.from_dict(data) + + return rules_item_type_7_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7_type_4 = EscalationPolicyPathRulesItemType7Type4.from_dict(data) + + return rules_item_type_7_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass if not isinstance(data, dict): raise TypeError() - rules_item_type_5_type_2 = EscalationPolicyPathRulesItemType5Type2.from_dict(data) - - return rules_item_type_5_type_2 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - rules_item_type_5_type_3 = EscalationPolicyPathRulesItemType5Type3.from_dict(data) + rules_item_type_7_type_5 = EscalationPolicyPathRulesItemType7Type5.from_dict(data) - return rules_item_type_5_type_3 + return rules_item_type_7_type_5 - rules_item = _parse_rules_item(rules_item_data) + rules_item = _parse_rules_item(rules_item_data) - rules.append(rules_item) + rules.append(rules_item) _time_restriction_time_zone = d.pop("time_restriction_time_zone", UNSET) - time_restriction_time_zone: Unset | EscalationPolicyPathTimeRestrictionTimeZone + time_restriction_time_zone: EscalationPolicyPathTimeRestrictionTimeZone | Unset if isinstance(_time_restriction_time_zone, Unset): time_restriction_time_zone = UNSET else: @@ -389,12 +564,14 @@ def _parse_rules_item( _time_restriction_time_zone ) - time_restrictions = [] _time_restrictions = d.pop("time_restrictions", UNSET) - for time_restrictions_item_data in _time_restrictions or []: - time_restrictions_item = EscalationPolicyPathTimeRestrictionsItem.from_dict(time_restrictions_item_data) + time_restrictions: list[EscalationPolicyPathTimeRestrictionsItem] | Unset = UNSET + if _time_restrictions is not UNSET: + time_restrictions = [] + for time_restrictions_item_data in _time_restrictions: + time_restrictions_item = EscalationPolicyPathTimeRestrictionsItem.from_dict(time_restrictions_item_data) - time_restrictions.append(time_restrictions_item) + time_restrictions.append(time_restrictions_item) escalation_policy_path = cls( name=name, @@ -403,6 +580,9 @@ def _parse_rules_item( escalation_policy_id=escalation_policy_id, repeat=repeat, repeat_count=repeat_count, + path_type=path_type, + after_deferral_behavior=after_deferral_behavior, + after_deferral_path_id=after_deferral_path_id, match_mode=match_mode, position=position, initial_delay=initial_delay, diff --git a/rootly_sdk/models/escalation_policy_path_after_deferral_behavior.py b/rootly_sdk/models/escalation_policy_path_after_deferral_behavior.py new file mode 100644 index 00000000..3e9fd9b7 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_after_deferral_behavior.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +EscalationPolicyPathAfterDeferralBehavior = Literal["execute_path", "re_evaluate"] + +ESCALATION_POLICY_PATH_AFTER_DEFERRAL_BEHAVIOR_VALUES: set[EscalationPolicyPathAfterDeferralBehavior] = { + "execute_path", + "re_evaluate", +} + + +def check_escalation_policy_path_after_deferral_behavior( + value: str | None, +) -> EscalationPolicyPathAfterDeferralBehavior | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_AFTER_DEFERRAL_BEHAVIOR_VALUES: + return cast(EscalationPolicyPathAfterDeferralBehavior, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_AFTER_DEFERRAL_BEHAVIOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_list.py b/rootly_sdk/models/escalation_policy_path_list.py index d1986992..8e9c2bd5 100644 --- a/rootly_sdk/models/escalation_policy_path_list.py +++ b/rootly_sdk/models/escalation_policy_path_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class EscalationPolicyPathList: """ Attributes: - data (list['EscalationPolicyPathListDataItem']): + data (list[EscalationPolicyPathListDataItem]): links (Links): meta (Meta): """ - data: list["EscalationPolicyPathListDataItem"] - links: "Links" - meta: "Meta" + data: list[EscalationPolicyPathListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_path_list_data_item.py b/rootly_sdk/models/escalation_policy_path_list_data_item.py index 5807ada6..7d50c763 100644 --- a/rootly_sdk/models/escalation_policy_path_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_path_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -20,7 +22,7 @@ class EscalationPolicyPathListDataItem: """ id: str - attributes: "EscalationPolicyPath" + attributes: EscalationPolicyPath additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_path_path_type.py b/rootly_sdk/models/escalation_policy_path_path_type.py new file mode 100644 index 00000000..3f2dd888 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_path_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +EscalationPolicyPathPathType = Literal["deferral", "escalation"] + +ESCALATION_POLICY_PATH_PATH_TYPE_VALUES: set[EscalationPolicyPathPathType] = { + "deferral", + "escalation", +} + + +def check_escalation_policy_path_path_type(value: str | None) -> EscalationPolicyPathPathType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_PATH_TYPE_VALUES: + return cast(EscalationPolicyPathPathType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_PATH_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_policy_path_response.py b/rootly_sdk/models/escalation_policy_path_response.py index 650a2c02..591386ad 100644 --- a/rootly_sdk/models/escalation_policy_path_response.py +++ b/rootly_sdk/models/escalation_policy_path_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class EscalationPolicyPathResponse: data (EscalationPolicyPathResponseData): """ - data: "EscalationPolicyPathResponseData" + data: EscalationPolicyPathResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_path_response_data.py b/rootly_sdk/models/escalation_policy_path_response_data.py index 18916f6d..a4d94aab 100644 --- a/rootly_sdk/models/escalation_policy_path_response_data.py +++ b/rootly_sdk/models/escalation_policy_path_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class EscalationPolicyPathResponseData: Attributes: id (str): Unique ID of the escalation policy path attributes (EscalationPolicyPath): - type_ (Union[Unset, EscalationPolicyPathResponseDataType]): + type_ (EscalationPolicyPathResponseDataType | Unset): """ id: str - attributes: "EscalationPolicyPath" - type_: Unset | EscalationPolicyPathResponseDataType = UNSET + attributes: EscalationPolicyPath + type_: EscalationPolicyPathResponseDataType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = EscalationPolicyPath.from_dict(d.pop("attributes")) _type_ = d.pop("type", UNSET) - type_: Unset | EscalationPolicyPathResponseDataType + type_: EscalationPolicyPathResponseDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py index 7ed1d883..f01cb69c 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py index a9321684..cebe2ca3 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py index b5dfd4ed..6c37de59 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,6 +14,7 @@ EscalationPolicyPathRulesItemType2RuleType, check_escalation_policy_path_rules_item_type_2_rule_type, ) +from ..types import UNSET, Unset T = TypeVar("T", bound="EscalationPolicyPathRulesItemType2") @@ -23,13 +26,15 @@ class EscalationPolicyPathRulesItemType2: rule_type (EscalationPolicyPathRulesItemType2RuleType): The type of the escalation path rule json_path (str): JSON path to extract value from payload operator (EscalationPolicyPathRulesItemType2Operator): How JSON path value should be matched - value (str): Value with which JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) """ rule_type: EscalationPolicyPathRulesItemType2RuleType json_path: str operator: EscalationPolicyPathRulesItemType2Operator - value: str + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,7 +44,15 @@ def to_dict(self) -> dict[str, Any]: operator: str = self.operator - value = self.value + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -48,9 +61,12 @@ def to_dict(self) -> dict[str, Any]: "rule_type": rule_type, "json_path": json_path, "operator": operator, - "value": value, } ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values return field_dict @@ -63,13 +79,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: operator = check_escalation_policy_path_rules_item_type_2_operator(d.pop("operator")) - value = d.pop("value") + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) escalation_policy_path_rules_item_type_2 = cls( rule_type=rule_type, json_path=json_path, operator=operator, value=value, + values=values, ) escalation_policy_path_rules_item_type_2.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py index e3ee71d2..83d19b7a 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py @@ -1,12 +1,16 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType2Operator = Literal["contains", "does_not_contain", "is", "is_not"] +EscalationPolicyPathRulesItemType2Operator = Literal[ + "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" +] ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType2Operator] = { "contains", "does_not_contain", "is", "is_not", + "is_not_one_of", + "is_one_of", } diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py index 3ed06c03..7696e1e7 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,14 +27,14 @@ class EscalationPolicyPathRulesItemType3: fieldable_type (str): The type of the fieldable (e.g., AlertField) fieldable_id (str): The ID of the alert field operator (EscalationPolicyPathRulesItemType3Operator): How the alert field value should be matched - values (Union[Unset, list[str]]): Values to match against + values (list[str] | Unset): Values to match against """ rule_type: EscalationPolicyPathRulesItemType3RuleType fieldable_type: str fieldable_id: str operator: EscalationPolicyPathRulesItemType3Operator - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: operator: str = self.operator - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py new file mode 100644 index 00000000..0b343c49 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_4_rule_type import ( + EscalationPolicyPathRulesItemType4RuleType, + check_escalation_policy_path_rules_item_type_4_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py new file mode 100644 index 00000000..fe252ee5 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType4RuleType] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0_rule_type.py deleted file mode 100644 index 18bdc188..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType4Type0RuleType = Literal["alert_urgency"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_0_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType4Type0RuleType -] = { - "alert_urgency", -} - - -def check_escalation_policy_path_rules_item_type_4_type_0_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType4Type0RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_0_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType4Type0RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_0_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1_rule_type.py deleted file mode 100644 index df7b3676..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType4Type1RuleType = Literal["working_hour"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_1_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType4Type1RuleType -] = { - "working_hour", -} - - -def check_escalation_policy_path_rules_item_type_4_type_1_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType4Type1RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_1_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType4Type1RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_1_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2.py deleted file mode 100644 index 14cbb1ea..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2.py +++ /dev/null @@ -1,92 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_4_type_2_operator import ( - EscalationPolicyPathRulesItemType4Type2Operator, - check_escalation_policy_path_rules_item_type_4_type_2_operator, -) -from ..models.escalation_policy_path_rules_item_type_4_type_2_rule_type import ( - EscalationPolicyPathRulesItemType4Type2RuleType, - check_escalation_policy_path_rules_item_type_4_type_2_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4Type2") - - -@_attrs_define -class EscalationPolicyPathRulesItemType4Type2: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType4Type2RuleType): The type of the escalation path rule - json_path (str): JSON path to extract value from payload - operator (EscalationPolicyPathRulesItemType4Type2Operator): How JSON path value should be matched - value (str): Value with which JSON path value should be matched - """ - - rule_type: EscalationPolicyPathRulesItemType4Type2RuleType - json_path: str - operator: EscalationPolicyPathRulesItemType4Type2Operator - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - json_path = self.json_path - - operator: str = self.operator - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "json_path": json_path, - "operator": operator, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_4_type_2_rule_type(d.pop("rule_type")) - - json_path = d.pop("json_path") - - operator = check_escalation_policy_path_rules_item_type_4_type_2_operator(d.pop("operator")) - - value = d.pop("value") - - escalation_policy_path_rules_item_type_4_type_2 = cls( - rule_type=rule_type, - json_path=json_path, - operator=operator, - value=value, - ) - - escalation_policy_path_rules_item_type_4_type_2.additional_properties = d - return escalation_policy_path_rules_item_type_4_type_2 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_operator.py deleted file mode 100644 index fbd9f29a..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_operator.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType4Type2Operator = Literal["contains", "does_not_contain", "is", "is_not"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_2_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType4Type2Operator -] = { - "contains", - "does_not_contain", - "is", - "is_not", -} - - -def check_escalation_policy_path_rules_item_type_4_type_2_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType4Type2Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_2_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType4Type2Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_2_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_rule_type.py deleted file mode 100644 index b9ce7793..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_2_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType4Type2RuleType = Literal["json_path"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_2_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType4Type2RuleType -] = { - "json_path", -} - - -def check_escalation_policy_path_rules_item_type_4_type_2_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType4Type2RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_2_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType4Type2RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_2_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_rule_type.py deleted file mode 100644 index eb0e4324..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType4Type3RuleType = Literal["field"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_3_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType4Type3RuleType -] = { - "field", -} - - -def check_escalation_policy_path_rules_item_type_4_type_3_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType4Type3RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_3_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType4Type3RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_3_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py new file mode 100644 index 00000000..73525b03 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_5_rule_type import ( + EscalationPolicyPathRulesItemType5RuleType, + check_escalation_policy_path_rules_item_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_5_time_zone import ( + EscalationPolicyPathRulesItemType5TimeZone, + check_escalation_policy_path_rules_item_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType5RuleType + time_zone: EscalationPolicyPathRulesItemType5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = EscalationPolicyPathRulesItemType5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py new file mode 100644 index 00000000..94cfaa55 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType5RuleType] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py new file mode 100644 index 00000000..be2042fa --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,251 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | None | Unset): + tuesday (bool | None | Unset): + wednesday (bool | None | Unset): + thursday (bool | None | Unset): + friday (bool | None | Unset): + saturday (bool | None | Unset): + sunday (bool | None | Unset): + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | None | Unset): + position (int | None | Unset): + """ + + monday: bool | None | Unset = UNSET + tuesday: bool | None | Unset = UNSET + wednesday: bool | None | Unset = UNSET + thursday: bool | None | Unset = UNSET + friday: bool | None | Unset = UNSET + saturday: bool | None | Unset = UNSET + sunday: bool | None | Unset = UNSET + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | None | Unset = UNSET + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday: bool | None | Unset + if isinstance(self.monday, Unset): + monday = UNSET + else: + monday = self.monday + + tuesday: bool | None | Unset + if isinstance(self.tuesday, Unset): + tuesday = UNSET + else: + tuesday = self.tuesday + + wednesday: bool | None | Unset + if isinstance(self.wednesday, Unset): + wednesday = UNSET + else: + wednesday = self.wednesday + + thursday: bool | None | Unset + if isinstance(self.thursday, Unset): + thursday = UNSET + else: + thursday = self.thursday + + friday: bool | None | Unset + if isinstance(self.friday, Unset): + friday = UNSET + else: + friday = self.friday + + saturday: bool | None | Unset + if isinstance(self.saturday, Unset): + saturday = UNSET + else: + saturday = self.saturday + + sunday: bool | None | Unset + if isinstance(self.sunday, Unset): + sunday = UNSET + else: + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day: bool | None | Unset + if isinstance(self.all_day, Unset): + all_day = UNSET + else: + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_monday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + monday = _parse_monday(d.pop("monday", UNSET)) + + def _parse_tuesday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + tuesday = _parse_tuesday(d.pop("tuesday", UNSET)) + + def _parse_wednesday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + wednesday = _parse_wednesday(d.pop("wednesday", UNSET)) + + def _parse_thursday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + thursday = _parse_thursday(d.pop("thursday", UNSET)) + + def _parse_friday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + friday = _parse_friday(d.pop("friday", UNSET)) + + def _parse_saturday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + saturday = _parse_saturday(d.pop("saturday", UNSET)) + + def _parse_sunday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sunday = _parse_sunday(d.pop("sunday", UNSET)) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + def _parse_all_day(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + all_day = _parse_all_day(d.pop("all_day", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + escalation_policy_path_rules_item_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + escalation_policy_path_rules_item_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py new file mode 100644 index 00000000..6cffd7b2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py @@ -0,0 +1,597 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Hobart", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Majuro", + "Pacific/Midway", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[EscalationPolicyPathRulesItemType5TimeZone] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Hobart", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Majuro", + "Pacific/Midway", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0_rule_type.py deleted file mode 100644 index a658c487..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType5Type0RuleType = Literal["alert_urgency"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_0_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType5Type0RuleType -] = { - "alert_urgency", -} - - -def check_escalation_policy_path_rules_item_type_5_type_0_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType5Type0RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_0_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType5Type0RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_0_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1_rule_type.py deleted file mode 100644 index 10ae2b79..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType5Type1RuleType = Literal["working_hour"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_1_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType5Type1RuleType -] = { - "working_hour", -} - - -def check_escalation_policy_path_rules_item_type_5_type_1_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType5Type1RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_1_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType5Type1RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_1_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2.py deleted file mode 100644 index 358e7cd0..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2.py +++ /dev/null @@ -1,92 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_5_type_2_operator import ( - EscalationPolicyPathRulesItemType5Type2Operator, - check_escalation_policy_path_rules_item_type_5_type_2_operator, -) -from ..models.escalation_policy_path_rules_item_type_5_type_2_rule_type import ( - EscalationPolicyPathRulesItemType5Type2RuleType, - check_escalation_policy_path_rules_item_type_5_type_2_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5Type2") - - -@_attrs_define -class EscalationPolicyPathRulesItemType5Type2: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType5Type2RuleType): The type of the escalation path rule - json_path (str): JSON path to extract value from payload - operator (EscalationPolicyPathRulesItemType5Type2Operator): How JSON path value should be matched - value (str): Value with which JSON path value should be matched - """ - - rule_type: EscalationPolicyPathRulesItemType5Type2RuleType - json_path: str - operator: EscalationPolicyPathRulesItemType5Type2Operator - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - json_path = self.json_path - - operator: str = self.operator - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "json_path": json_path, - "operator": operator, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_5_type_2_rule_type(d.pop("rule_type")) - - json_path = d.pop("json_path") - - operator = check_escalation_policy_path_rules_item_type_5_type_2_operator(d.pop("operator")) - - value = d.pop("value") - - escalation_policy_path_rules_item_type_5_type_2 = cls( - rule_type=rule_type, - json_path=json_path, - operator=operator, - value=value, - ) - - escalation_policy_path_rules_item_type_5_type_2.additional_properties = d - return escalation_policy_path_rules_item_type_5_type_2 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_operator.py deleted file mode 100644 index 7daba0fd..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_operator.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType5Type2Operator = Literal["contains", "does_not_contain", "is", "is_not"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_2_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType5Type2Operator -] = { - "contains", - "does_not_contain", - "is", - "is_not", -} - - -def check_escalation_policy_path_rules_item_type_5_type_2_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType5Type2Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_2_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType5Type2Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_2_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_rule_type.py deleted file mode 100644 index 31465e46..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_2_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType5Type2RuleType = Literal["json_path"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_2_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType5Type2RuleType -] = { - "json_path", -} - - -def check_escalation_policy_path_rules_item_type_5_type_2_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType5Type2RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_2_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType5Type2RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_2_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_rule_type.py deleted file mode 100644 index 9ae7d57e..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType5Type3RuleType = Literal["field"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_3_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType5Type3RuleType -] = { - "field", -} - - -def check_escalation_policy_path_rules_item_type_5_type_3_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType5Type3RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_3_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType5Type3RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_3_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py similarity index 71% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py index 119a48ac..bed9649e 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_0.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py @@ -1,26 +1,28 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_4_type_0_rule_type import ( - EscalationPolicyPathRulesItemType4Type0RuleType, - check_escalation_policy_path_rules_item_type_4_type_0_rule_type, +from ..models.escalation_policy_path_rules_item_type_6_type_0_rule_type import ( + EscalationPolicyPathRulesItemType6Type0RuleType, + check_escalation_policy_path_rules_item_type_6_type_0_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4Type0") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type0") @_attrs_define -class EscalationPolicyPathRulesItemType4Type0: +class EscalationPolicyPathRulesItemType6Type0: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType4Type0RuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType6Type0RuleType): The type of the escalation path rule urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used """ - rule_type: EscalationPolicyPathRulesItemType4Type0RuleType + rule_type: EscalationPolicyPathRulesItemType6Type0RuleType urgency_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -43,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_4_type_0_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_6_type_0_rule_type(d.pop("rule_type")) urgency_ids = cast(list[str], d.pop("urgency_ids")) - escalation_policy_path_rules_item_type_4_type_0 = cls( + escalation_policy_path_rules_item_type_6_type_0 = cls( rule_type=rule_type, urgency_ids=urgency_ids, ) - escalation_policy_path_rules_item_type_4_type_0.additional_properties = d - return escalation_policy_path_rules_item_type_4_type_0 + escalation_policy_path_rules_item_type_6_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_0 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py new file mode 100644 index 00000000..7bc7bd31 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_0_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type0RuleType +] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_6_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py similarity index 71% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py index 558eb602..aa77808e 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_1.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py @@ -1,26 +1,28 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_5_type_1_rule_type import ( - EscalationPolicyPathRulesItemType5Type1RuleType, - check_escalation_policy_path_rules_item_type_5_type_1_rule_type, +from ..models.escalation_policy_path_rules_item_type_6_type_1_rule_type import ( + EscalationPolicyPathRulesItemType6Type1RuleType, + check_escalation_policy_path_rules_item_type_6_type_1_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5Type1") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type1") @_attrs_define -class EscalationPolicyPathRulesItemType5Type1: +class EscalationPolicyPathRulesItemType6Type1: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType5Type1RuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType6Type1RuleType): The type of the escalation path rule within_working_hour (bool): Whether the escalation path should be used within working hours """ - rule_type: EscalationPolicyPathRulesItemType5Type1RuleType + rule_type: EscalationPolicyPathRulesItemType6Type1RuleType within_working_hour: bool additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -43,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_5_type_1_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_6_type_1_rule_type(d.pop("rule_type")) within_working_hour = d.pop("within_working_hour") - escalation_policy_path_rules_item_type_5_type_1 = cls( + escalation_policy_path_rules_item_type_6_type_1 = cls( rule_type=rule_type, within_working_hour=within_working_hour, ) - escalation_policy_path_rules_item_type_5_type_1.additional_properties = d - return escalation_policy_path_rules_item_type_5_type_1 + escalation_policy_path_rules_item_type_6_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_1 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py new file mode 100644 index 00000000..b81440c2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_1_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type1RuleType +] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_6_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py new file mode 100644 index 00000000..3220e923 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_6_type_2_operator import ( + EscalationPolicyPathRulesItemType6Type2Operator, + check_escalation_policy_path_rules_item_type_6_type_2_operator, +) +from ..models.escalation_policy_path_rules_item_type_6_type_2_rule_type import ( + EscalationPolicyPathRulesItemType6Type2RuleType, + check_escalation_policy_path_rules_item_type_6_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type2") + + +@_attrs_define +class EscalationPolicyPathRulesItemType6Type2: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType6Type2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (EscalationPolicyPathRulesItemType6Type2Operator): How JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: EscalationPolicyPathRulesItemType6Type2RuleType + json_path: str + operator: EscalationPolicyPathRulesItemType6Type2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_6_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_escalation_policy_path_rules_item_type_6_type_2_operator(d.pop("operator")) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_6_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + escalation_policy_path_rules_item_type_6_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py new file mode 100644 index 00000000..b7f5aa2b --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py @@ -0,0 +1,28 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type2Operator = Literal[ + "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType6Type2Operator +] = { + "contains", + "does_not_contain", + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_6_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py new file mode 100644 index 00000000..7c2cbae6 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type2RuleType +] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_6_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py similarity index 67% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py index 3ebc6279..2f4a2895 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py @@ -1,38 +1,40 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_4_type_3_operator import ( - EscalationPolicyPathRulesItemType4Type3Operator, - check_escalation_policy_path_rules_item_type_4_type_3_operator, +from ..models.escalation_policy_path_rules_item_type_6_type_3_operator import ( + EscalationPolicyPathRulesItemType6Type3Operator, + check_escalation_policy_path_rules_item_type_6_type_3_operator, ) -from ..models.escalation_policy_path_rules_item_type_4_type_3_rule_type import ( - EscalationPolicyPathRulesItemType4Type3RuleType, - check_escalation_policy_path_rules_item_type_4_type_3_rule_type, +from ..models.escalation_policy_path_rules_item_type_6_type_3_rule_type import ( + EscalationPolicyPathRulesItemType6Type3RuleType, + check_escalation_policy_path_rules_item_type_6_type_3_rule_type, ) from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4Type3") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type3") @_attrs_define -class EscalationPolicyPathRulesItemType4Type3: +class EscalationPolicyPathRulesItemType6Type3: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType4Type3RuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType6Type3RuleType): The type of the escalation path rule fieldable_type (str): The type of the fieldable (e.g., AlertField) fieldable_id (str): The ID of the alert field - operator (EscalationPolicyPathRulesItemType4Type3Operator): How the alert field value should be matched - values (Union[Unset, list[str]]): Values to match against + operator (EscalationPolicyPathRulesItemType6Type3Operator): How the alert field value should be matched + values (list[str] | Unset): Values to match against """ - rule_type: EscalationPolicyPathRulesItemType4Type3RuleType + rule_type: EscalationPolicyPathRulesItemType6Type3RuleType fieldable_type: str fieldable_id: str - operator: EscalationPolicyPathRulesItemType4Type3Operator - values: Unset | list[str] = UNSET + operator: EscalationPolicyPathRulesItemType6Type3Operator + values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: operator: str = self.operator - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values @@ -66,17 +68,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_4_type_3_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_6_type_3_rule_type(d.pop("rule_type")) fieldable_type = d.pop("fieldable_type") fieldable_id = d.pop("fieldable_id") - operator = check_escalation_policy_path_rules_item_type_4_type_3_operator(d.pop("operator")) + operator = check_escalation_policy_path_rules_item_type_6_type_3_operator(d.pop("operator")) values = cast(list[str], d.pop("values", UNSET)) - escalation_policy_path_rules_item_type_4_type_3 = cls( + escalation_policy_path_rules_item_type_6_type_3 = cls( rule_type=rule_type, fieldable_type=fieldable_type, fieldable_id=fieldable_id, @@ -84,8 +86,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: values=values, ) - escalation_policy_path_rules_item_type_4_type_3.additional_properties = d - return escalation_policy_path_rules_item_type_4_type_3 + escalation_policy_path_rules_item_type_6_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_3 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py similarity index 61% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_operator.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py index e0b8c2bf..a286b4dd 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_3_operator.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType4Type3Operator = Literal[ +EscalationPolicyPathRulesItemType6Type3Operator = Literal[ "contains", "contains_key", "does_not_contain", @@ -17,8 +17,8 @@ "starts_with", ] -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_3_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType4Type3Operator +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType6Type3Operator ] = { "contains", "contains_key", @@ -37,13 +37,13 @@ } -def check_escalation_policy_path_rules_item_type_4_type_3_operator( +def check_escalation_policy_path_rules_item_type_6_type_3_operator( value: str | None, -) -> EscalationPolicyPathRulesItemType4Type3Operator | None: +) -> EscalationPolicyPathRulesItemType6Type3Operator | None: if value is None: return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_3_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType4Type3Operator, value) + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type3Operator, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_TYPE_3_OPERATOR_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_OPERATOR_VALUES!r}" ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py new file mode 100644 index 00000000..6ee2aa36 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type3RuleType +] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_6_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py new file mode 100644 index 00000000..edf2dad6 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_6_type_4_rule_type import ( + EscalationPolicyPathRulesItemType6Type4RuleType, + check_escalation_policy_path_rules_item_type_6_type_4_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType6Type4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType6Type4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType6Type4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_6_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_6_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_6_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py new file mode 100644 index 00000000..1230959d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_4_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type4RuleType +] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_6_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py new file mode 100644 index 00000000..dd212567 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_6_type_5_rule_type import ( + EscalationPolicyPathRulesItemType6Type5RuleType, + check_escalation_policy_path_rules_item_type_6_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_6_type_5_time_zone import ( + EscalationPolicyPathRulesItemType6Type5TimeZone, + check_escalation_policy_path_rules_item_type_6_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_6_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType6Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType6Type5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType6Type5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType6Type5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType6Type5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType6Type5RuleType + time_zone: EscalationPolicyPathRulesItemType6Type5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType6Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_policy_path_rules_item_type_6_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType6Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_6_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_6_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = EscalationPolicyPathRulesItemType6Type5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_6_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_6_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py new file mode 100644 index 00000000..e5a1f2dc --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type5RuleType +] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_6_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py new file mode 100644 index 00000000..d1d3c485 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py @@ -0,0 +1,251 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType6Type5TimeBlocksItem: + """ + Attributes: + monday (bool | None | Unset): + tuesday (bool | None | Unset): + wednesday (bool | None | Unset): + thursday (bool | None | Unset): + friday (bool | None | Unset): + saturday (bool | None | Unset): + sunday (bool | None | Unset): + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | None | Unset): + position (int | None | Unset): + """ + + monday: bool | None | Unset = UNSET + tuesday: bool | None | Unset = UNSET + wednesday: bool | None | Unset = UNSET + thursday: bool | None | Unset = UNSET + friday: bool | None | Unset = UNSET + saturday: bool | None | Unset = UNSET + sunday: bool | None | Unset = UNSET + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | None | Unset = UNSET + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday: bool | None | Unset + if isinstance(self.monday, Unset): + monday = UNSET + else: + monday = self.monday + + tuesday: bool | None | Unset + if isinstance(self.tuesday, Unset): + tuesday = UNSET + else: + tuesday = self.tuesday + + wednesday: bool | None | Unset + if isinstance(self.wednesday, Unset): + wednesday = UNSET + else: + wednesday = self.wednesday + + thursday: bool | None | Unset + if isinstance(self.thursday, Unset): + thursday = UNSET + else: + thursday = self.thursday + + friday: bool | None | Unset + if isinstance(self.friday, Unset): + friday = UNSET + else: + friday = self.friday + + saturday: bool | None | Unset + if isinstance(self.saturday, Unset): + saturday = UNSET + else: + saturday = self.saturday + + sunday: bool | None | Unset + if isinstance(self.sunday, Unset): + sunday = UNSET + else: + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day: bool | None | Unset + if isinstance(self.all_day, Unset): + all_day = UNSET + else: + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_monday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + monday = _parse_monday(d.pop("monday", UNSET)) + + def _parse_tuesday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + tuesday = _parse_tuesday(d.pop("tuesday", UNSET)) + + def _parse_wednesday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + wednesday = _parse_wednesday(d.pop("wednesday", UNSET)) + + def _parse_thursday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + thursday = _parse_thursday(d.pop("thursday", UNSET)) + + def _parse_friday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + friday = _parse_friday(d.pop("friday", UNSET)) + + def _parse_saturday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + saturday = _parse_saturday(d.pop("saturday", UNSET)) + + def _parse_sunday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sunday = _parse_sunday(d.pop("sunday", UNSET)) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + def _parse_all_day(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + all_day = _parse_all_day(d.pop("all_day", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + escalation_policy_path_rules_item_type_6_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_6_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py new file mode 100644 index 00000000..a110b85b --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py @@ -0,0 +1,599 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Hobart", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Majuro", + "Pacific/Midway", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_TIME_ZONE_VALUES: set[ + EscalationPolicyPathRulesItemType6Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Hobart", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Majuro", + "Pacific/Midway", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_6_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Type5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType6Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py similarity index 71% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py index 2ddf8da2..a7e56df5 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_0.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py @@ -1,26 +1,28 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_5_type_0_rule_type import ( - EscalationPolicyPathRulesItemType5Type0RuleType, - check_escalation_policy_path_rules_item_type_5_type_0_rule_type, +from ..models.escalation_policy_path_rules_item_type_7_type_0_rule_type import ( + EscalationPolicyPathRulesItemType7Type0RuleType, + check_escalation_policy_path_rules_item_type_7_type_0_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5Type0") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type0") @_attrs_define -class EscalationPolicyPathRulesItemType5Type0: +class EscalationPolicyPathRulesItemType7Type0: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType5Type0RuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType7Type0RuleType): The type of the escalation path rule urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used """ - rule_type: EscalationPolicyPathRulesItemType5Type0RuleType + rule_type: EscalationPolicyPathRulesItemType7Type0RuleType urgency_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -43,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_5_type_0_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_7_type_0_rule_type(d.pop("rule_type")) urgency_ids = cast(list[str], d.pop("urgency_ids")) - escalation_policy_path_rules_item_type_5_type_0 = cls( + escalation_policy_path_rules_item_type_7_type_0 = cls( rule_type=rule_type, urgency_ids=urgency_ids, ) - escalation_policy_path_rules_item_type_5_type_0.additional_properties = d - return escalation_policy_path_rules_item_type_5_type_0 + escalation_policy_path_rules_item_type_7_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_0 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py new file mode 100644 index 00000000..7aa80837 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_0_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type0RuleType +] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_7_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py similarity index 71% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py index 9f61b9c3..5205ca98 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_type_1.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py @@ -1,26 +1,28 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_4_type_1_rule_type import ( - EscalationPolicyPathRulesItemType4Type1RuleType, - check_escalation_policy_path_rules_item_type_4_type_1_rule_type, +from ..models.escalation_policy_path_rules_item_type_7_type_1_rule_type import ( + EscalationPolicyPathRulesItemType7Type1RuleType, + check_escalation_policy_path_rules_item_type_7_type_1_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4Type1") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type1") @_attrs_define -class EscalationPolicyPathRulesItemType4Type1: +class EscalationPolicyPathRulesItemType7Type1: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType4Type1RuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType7Type1RuleType): The type of the escalation path rule within_working_hour (bool): Whether the escalation path should be used within working hours """ - rule_type: EscalationPolicyPathRulesItemType4Type1RuleType + rule_type: EscalationPolicyPathRulesItemType7Type1RuleType within_working_hour: bool additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -43,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_4_type_1_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_7_type_1_rule_type(d.pop("rule_type")) within_working_hour = d.pop("within_working_hour") - escalation_policy_path_rules_item_type_4_type_1 = cls( + escalation_policy_path_rules_item_type_7_type_1 = cls( rule_type=rule_type, within_working_hour=within_working_hour, ) - escalation_policy_path_rules_item_type_4_type_1.additional_properties = d - return escalation_policy_path_rules_item_type_4_type_1 + escalation_policy_path_rules_item_type_7_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_1 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py new file mode 100644 index 00000000..2b30fed9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_1_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type1RuleType +] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_7_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py new file mode 100644 index 00000000..338aa074 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_7_type_2_operator import ( + EscalationPolicyPathRulesItemType7Type2Operator, + check_escalation_policy_path_rules_item_type_7_type_2_operator, +) +from ..models.escalation_policy_path_rules_item_type_7_type_2_rule_type import ( + EscalationPolicyPathRulesItemType7Type2RuleType, + check_escalation_policy_path_rules_item_type_7_type_2_rule_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type2") + + +@_attrs_define +class EscalationPolicyPathRulesItemType7Type2: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType7Type2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (EscalationPolicyPathRulesItemType7Type2Operator): How JSON path value should be matched + value (None | str | Unset): Value with which JSON path value should be matched + values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) + """ + + rule_type: EscalationPolicyPathRulesItemType7Type2RuleType + json_path: str + operator: EscalationPolicyPathRulesItemType7Type2Operator + value: None | str | Unset = UNSET + values: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + json_path = self.json_path + + operator: str = self.operator + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "json_path": json_path, + "operator": operator, + } + ) + if value is not UNSET: + field_dict["value"] = value + if values is not UNSET: + field_dict["values"] = values + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_7_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_escalation_policy_path_rules_item_type_7_type_2_operator(d.pop("operator")) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_7_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + escalation_policy_path_rules_item_type_7_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_2 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py new file mode 100644 index 00000000..ed7d85c6 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py @@ -0,0 +1,28 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type2Operator = Literal[ + "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType7Type2Operator +] = { + "contains", + "does_not_contain", + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_7_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py new file mode 100644 index 00000000..edc8bc7d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type2RuleType +] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_7_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py similarity index 67% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py index 94b6fb55..95131539 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py @@ -1,38 +1,40 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_5_type_3_operator import ( - EscalationPolicyPathRulesItemType5Type3Operator, - check_escalation_policy_path_rules_item_type_5_type_3_operator, +from ..models.escalation_policy_path_rules_item_type_7_type_3_operator import ( + EscalationPolicyPathRulesItemType7Type3Operator, + check_escalation_policy_path_rules_item_type_7_type_3_operator, ) -from ..models.escalation_policy_path_rules_item_type_5_type_3_rule_type import ( - EscalationPolicyPathRulesItemType5Type3RuleType, - check_escalation_policy_path_rules_item_type_5_type_3_rule_type, +from ..models.escalation_policy_path_rules_item_type_7_type_3_rule_type import ( + EscalationPolicyPathRulesItemType7Type3RuleType, + check_escalation_policy_path_rules_item_type_7_type_3_rule_type, ) from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5Type3") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type3") @_attrs_define -class EscalationPolicyPathRulesItemType5Type3: +class EscalationPolicyPathRulesItemType7Type3: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType5Type3RuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType7Type3RuleType): The type of the escalation path rule fieldable_type (str): The type of the fieldable (e.g., AlertField) fieldable_id (str): The ID of the alert field - operator (EscalationPolicyPathRulesItemType5Type3Operator): How the alert field value should be matched - values (Union[Unset, list[str]]): Values to match against + operator (EscalationPolicyPathRulesItemType7Type3Operator): How the alert field value should be matched + values (list[str] | Unset): Values to match against """ - rule_type: EscalationPolicyPathRulesItemType5Type3RuleType + rule_type: EscalationPolicyPathRulesItemType7Type3RuleType fieldable_type: str fieldable_id: str - operator: EscalationPolicyPathRulesItemType5Type3Operator - values: Unset | list[str] = UNSET + operator: EscalationPolicyPathRulesItemType7Type3Operator + values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: operator: str = self.operator - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values @@ -66,17 +68,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_5_type_3_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_7_type_3_rule_type(d.pop("rule_type")) fieldable_type = d.pop("fieldable_type") fieldable_id = d.pop("fieldable_id") - operator = check_escalation_policy_path_rules_item_type_5_type_3_operator(d.pop("operator")) + operator = check_escalation_policy_path_rules_item_type_7_type_3_operator(d.pop("operator")) values = cast(list[str], d.pop("values", UNSET)) - escalation_policy_path_rules_item_type_5_type_3 = cls( + escalation_policy_path_rules_item_type_7_type_3 = cls( rule_type=rule_type, fieldable_type=fieldable_type, fieldable_id=fieldable_id, @@ -84,8 +86,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: values=values, ) - escalation_policy_path_rules_item_type_5_type_3.additional_properties = d - return escalation_policy_path_rules_item_type_5_type_3 + escalation_policy_path_rules_item_type_7_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_3 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py similarity index 61% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_operator.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py index c808688b..3d82e24b 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_type_3_operator.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType5Type3Operator = Literal[ +EscalationPolicyPathRulesItemType7Type3Operator = Literal[ "contains", "contains_key", "does_not_contain", @@ -17,8 +17,8 @@ "starts_with", ] -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_3_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType5Type3Operator +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType7Type3Operator ] = { "contains", "contains_key", @@ -37,13 +37,13 @@ } -def check_escalation_policy_path_rules_item_type_5_type_3_operator( +def check_escalation_policy_path_rules_item_type_7_type_3_operator( value: str | None, -) -> EscalationPolicyPathRulesItemType5Type3Operator | None: +) -> EscalationPolicyPathRulesItemType7Type3Operator | None: if value is None: return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_3_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType5Type3Operator, value) + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type3Operator, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TYPE_3_OPERATOR_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_OPERATOR_VALUES!r}" ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py new file mode 100644 index 00000000..83918749 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type3RuleType +] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_7_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py new file mode 100644 index 00000000..992a6697 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_7_type_4_rule_type import ( + EscalationPolicyPathRulesItemType7Type4RuleType, + check_escalation_policy_path_rules_item_type_7_type_4_rule_type, +) + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType7Type4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType7Type4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType7Type4RuleType + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_7_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_7_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_7_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_4 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py new file mode 100644 index 00000000..8fb068d1 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_4_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type4RuleType +] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_7_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py new file mode 100644 index 00000000..833cb7f1 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.escalation_policy_path_rules_item_type_7_type_5_rule_type import ( + EscalationPolicyPathRulesItemType7Type5RuleType, + check_escalation_policy_path_rules_item_type_7_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_7_type_5_time_zone import ( + EscalationPolicyPathRulesItemType7Type5TimeZone, + check_escalation_policy_path_rules_item_type_7_type_5_time_zone, +) + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_7_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType7Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType7Type5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType7Type5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType7Type5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType7Type5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType7Type5RuleType + time_zone: EscalationPolicyPathRulesItemType7Type5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType7Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + time_zone: str = self.time_zone + + time_blocks = [] + for time_blocks_item_data in self.time_blocks: + time_blocks_item = time_blocks_item_data.to_dict() + time_blocks.append(time_blocks_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "time_zone": time_zone, + "time_blocks": time_blocks, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_policy_path_rules_item_type_7_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType7Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_7_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_7_type_5_time_zone(d.pop("time_zone")) + + time_blocks = [] + _time_blocks = d.pop("time_blocks") + for time_blocks_item_data in _time_blocks: + time_blocks_item = EscalationPolicyPathRulesItemType7Type5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_7_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_7_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_5 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py new file mode 100644 index 00000000..290e4ee8 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type5RuleType +] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_7_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py new file mode 100644 index 00000000..96d6f418 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py @@ -0,0 +1,251 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType7Type5TimeBlocksItem: + """ + Attributes: + monday (bool | None | Unset): + tuesday (bool | None | Unset): + wednesday (bool | None | Unset): + thursday (bool | None | Unset): + friday (bool | None | Unset): + saturday (bool | None | Unset): + sunday (bool | None | Unset): + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | None | Unset): + position (int | None | Unset): + """ + + monday: bool | None | Unset = UNSET + tuesday: bool | None | Unset = UNSET + wednesday: bool | None | Unset = UNSET + thursday: bool | None | Unset = UNSET + friday: bool | None | Unset = UNSET + saturday: bool | None | Unset = UNSET + sunday: bool | None | Unset = UNSET + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | None | Unset = UNSET + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday: bool | None | Unset + if isinstance(self.monday, Unset): + monday = UNSET + else: + monday = self.monday + + tuesday: bool | None | Unset + if isinstance(self.tuesday, Unset): + tuesday = UNSET + else: + tuesday = self.tuesday + + wednesday: bool | None | Unset + if isinstance(self.wednesday, Unset): + wednesday = UNSET + else: + wednesday = self.wednesday + + thursday: bool | None | Unset + if isinstance(self.thursday, Unset): + thursday = UNSET + else: + thursday = self.thursday + + friday: bool | None | Unset + if isinstance(self.friday, Unset): + friday = UNSET + else: + friday = self.friday + + saturday: bool | None | Unset + if isinstance(self.saturday, Unset): + saturday = UNSET + else: + saturday = self.saturday + + sunday: bool | None | Unset + if isinstance(self.sunday, Unset): + sunday = UNSET + else: + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + all_day: bool | None | Unset + if isinstance(self.all_day, Unset): + all_day = UNSET + else: + all_day = self.all_day + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if monday is not UNSET: + field_dict["monday"] = monday + if tuesday is not UNSET: + field_dict["tuesday"] = tuesday + if wednesday is not UNSET: + field_dict["wednesday"] = wednesday + if thursday is not UNSET: + field_dict["thursday"] = thursday + if friday is not UNSET: + field_dict["friday"] = friday + if saturday is not UNSET: + field_dict["saturday"] = saturday + if sunday is not UNSET: + field_dict["sunday"] = sunday + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_time is not UNSET: + field_dict["end_time"] = end_time + if all_day is not UNSET: + field_dict["all_day"] = all_day + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_monday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + monday = _parse_monday(d.pop("monday", UNSET)) + + def _parse_tuesday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + tuesday = _parse_tuesday(d.pop("tuesday", UNSET)) + + def _parse_wednesday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + wednesday = _parse_wednesday(d.pop("wednesday", UNSET)) + + def _parse_thursday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + thursday = _parse_thursday(d.pop("thursday", UNSET)) + + def _parse_friday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + friday = _parse_friday(d.pop("friday", UNSET)) + + def _parse_saturday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + saturday = _parse_saturday(d.pop("saturday", UNSET)) + + def _parse_sunday(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sunday = _parse_sunday(d.pop("sunday", UNSET)) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + def _parse_all_day(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + all_day = _parse_all_day(d.pop("all_day", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + escalation_policy_path_rules_item_type_7_type_5_time_blocks_item = cls( + monday=monday, + tuesday=tuesday, + wednesday=wednesday, + thursday=thursday, + friday=friday, + saturday=saturday, + sunday=sunday, + start_time=start_time, + end_time=end_time, + all_day=all_day, + position=position, + ) + + escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_7_type_5_time_blocks_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py new file mode 100644 index 00000000..3db89d45 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py @@ -0,0 +1,599 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Hobart", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Majuro", + "Pacific/Midway", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_TIME_ZONE_VALUES: set[ + EscalationPolicyPathRulesItemType7Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Bogota", + "America/Caracas", + "America/Chicago", + "America/Chihuahua", + "America/Denver", + "America/Guatemala", + "America/Guyana", + "America/Halifax", + "America/Indiana/Indianapolis", + "America/Juneau", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Mazatlan", + "America/Mexico_City", + "America/Monterrey", + "America/Montevideo", + "America/New_York", + "America/Nuuk", + "America/Phoenix", + "America/Puerto_Rico", + "America/Regina", + "America/Santiago", + "America/Sao_Paulo", + "America/St_Johns", + "America/Tijuana", + "American Samoa", + "Amsterdam", + "Arizona", + "Asia/Almaty", + "Asia/Baghdad", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Chongqing", + "Asia/Colombo", + "Asia/Dhaka", + "Asia/Hong_Kong", + "Asia/Irkutsk", + "Asia/Jakarta", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kathmandu", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuwait", + "Asia/Magadan", + "Asia/Muscat", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tokyo", + "Asia/Ulaanbaatar", + "Asia/Urumqi", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Astana", + "Asuncion", + "Athens", + "Atlantic Time (Canada)", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Atlantic/South_Georgia", + "Auckland", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Canberra", + "Australia/Darwin", + "Australia/Hobart", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chongqing", + "Copenhagen", + "Darwin", + "Dhaka", + "Dublin", + "Eastern Time (US & Canada)", + "Edinburgh", + "Ekaterinburg", + "Etc/GMT+12", + "Etc/UTC", + "Europe/Amsterdam", + "Europe/Athens", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Helsinki", + "Europe/Istanbul", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Madrid", + "Europe/Minsk", + "Europe/Moscow", + "Europe/Paris", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zurich", + "Fiji", + "Georgetown", + "Greenland", + "Guadalajara", + "Guam", + "Hanoi", + "Harare", + "Hawaii", + "Helsinki", + "Hobart", + "Hong Kong", + "Indiana (East)", + "International Date Line West", + "Irkutsk", + "Islamabad", + "Istanbul", + "Jakarta", + "Jerusalem", + "Kabul", + "Kaliningrad", + "Kamchatka", + "Karachi", + "Kathmandu", + "Kolkata", + "Krasnoyarsk", + "Kuala Lumpur", + "Kuwait", + "Kyiv", + "La Paz", + "Lima", + "Lisbon", + "Ljubljana", + "London", + "Madrid", + "Magadan", + "Marshall Is.", + "Mazatlan", + "Melbourne", + "Mexico City", + "Mid-Atlantic", + "Midway Island", + "Minsk", + "Monrovia", + "Monterrey", + "Montevideo", + "Moscow", + "Mountain Time (US & Canada)", + "Mumbai", + "Muscat", + "Nairobi", + "New Caledonia", + "New Delhi", + "Newfoundland", + "Novosibirsk", + "Nuku'alofa", + "Osaka", + "Pacific Time (US & Canada)", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Chatham", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Majuro", + "Pacific/Midway", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Port_Moresby", + "Pacific/Tongatapu", + "Paris", + "Perth", + "Port Moresby", + "Prague", + "Pretoria", + "Puerto Rico", + "Quito", + "Rangoon", + "Riga", + "Riyadh", + "Rome", + "Samara", + "Samoa", + "Santiago", + "Sapporo", + "Sarajevo", + "Saskatchewan", + "Seoul", + "Singapore", + "Skopje", + "Sofia", + "Solomon Is.", + "Srednekolymsk", + "Sri Jayawardenepura", + "St. Petersburg", + "Stockholm", + "Sydney", + "Taipei", + "Tallinn", + "Tashkent", + "Tbilisi", + "Tehran", + "Tijuana", + "Tokelau Is.", + "Tokyo", + "Ulaanbaatar", + "Urumqi", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_7_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Type5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType7Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py b/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py index d3dc1b8f..c79145d8 100644 --- a/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py +++ b/rootly_sdk/models/escalation_policy_path_time_restriction_time_zone.py @@ -65,6 +65,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -146,6 +147,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -195,6 +197,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -245,6 +248,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", @@ -353,6 +357,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -434,6 +439,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -483,6 +489,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -533,6 +540,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", diff --git a/rootly_sdk/models/escalation_policy_path_time_restrictions_item.py b/rootly_sdk/models/escalation_policy_path_time_restrictions_item.py index 789ccb5f..b5f130f6 100644 --- a/rootly_sdk/models/escalation_policy_path_time_restrictions_item.py +++ b/rootly_sdk/models/escalation_policy_path_time_restrictions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,26 +23,26 @@ class EscalationPolicyPathTimeRestrictionsItem: """ Attributes: - start_day (Union[Unset, EscalationPolicyPathTimeRestrictionsItemStartDay]): - start_time (Union[Unset, str]): Formatted as HH:MM - end_day (Union[Unset, EscalationPolicyPathTimeRestrictionsItemEndDay]): - end_time (Union[Unset, str]): Formatted as HH:MM + start_day (EscalationPolicyPathTimeRestrictionsItemStartDay | Unset): + start_time (str | Unset): Formatted as HH:MM + end_day (EscalationPolicyPathTimeRestrictionsItemEndDay | Unset): + end_time (str | Unset): Formatted as HH:MM """ - start_day: Unset | EscalationPolicyPathTimeRestrictionsItemStartDay = UNSET - start_time: Unset | str = UNSET - end_day: Unset | EscalationPolicyPathTimeRestrictionsItemEndDay = UNSET - end_time: Unset | str = UNSET + start_day: EscalationPolicyPathTimeRestrictionsItemStartDay | Unset = UNSET + start_time: str | Unset = UNSET + end_day: EscalationPolicyPathTimeRestrictionsItemEndDay | Unset = UNSET + end_time: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - start_day: Unset | str = UNSET + start_day: str | Unset = UNSET if not isinstance(self.start_day, Unset): start_day = self.start_day start_time = self.start_time - end_day: Unset | str = UNSET + end_day: str | Unset = UNSET if not isinstance(self.end_day, Unset): end_day = self.end_day @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _start_day = d.pop("start_day", UNSET) - start_day: Unset | EscalationPolicyPathTimeRestrictionsItemStartDay + start_day: EscalationPolicyPathTimeRestrictionsItemStartDay | Unset if isinstance(_start_day, Unset): start_day = UNSET else: @@ -73,7 +75,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: start_time = d.pop("start_time", UNSET) _end_day = d.pop("end_day", UNSET) - end_day: Unset | EscalationPolicyPathTimeRestrictionsItemEndDay + end_day: EscalationPolicyPathTimeRestrictionsItemEndDay | Unset if isinstance(_end_day, Unset): end_day = UNSET else: diff --git a/rootly_sdk/models/escalation_policy_response.py b/rootly_sdk/models/escalation_policy_response.py index f6c5091b..ff548478 100644 --- a/rootly_sdk/models/escalation_policy_response.py +++ b/rootly_sdk/models/escalation_policy_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class EscalationPolicyResponse: data (EscalationPolicyResponseData): """ - data: "EscalationPolicyResponseData" + data: EscalationPolicyResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/escalation_policy_response_data.py b/rootly_sdk/models/escalation_policy_response_data.py index 1155c119..24e804a5 100644 --- a/rootly_sdk/models/escalation_policy_response_data.py +++ b/rootly_sdk/models/escalation_policy_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class EscalationPolicyResponseData: id: str type_: EscalationPolicyResponseDataType - attributes: "EscalationPolicy" + attributes: EscalationPolicy additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field.py b/rootly_sdk/models/form_field.py index 86a2e6b6..37eb897e 100644 --- a/rootly_sdk/models/form_field.py +++ b/rootly_sdk/models/form_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,12 +27,13 @@ class FormField: default_values (list[str]): created_at (str): Date of creation updated_at (str): Date of last update - value_kind_catalog_id (Union[None, Unset, str]): The ID of the catalog used when value_kind is `catalog_entity` - slug (Union[Unset, str]): The slug of the form field - description (Union[None, Unset, str]): The description of the form field - show_on_incident_details (Union[Unset, bool]): Whether the form field is shown on the incident details panel - enabled (Union[Unset, bool]): Whether the form field is enabled - auto_set_by_catalog_field_id (Union[None, Unset, str]): Catalog field ID to auto-set this form field. + value_kind_catalog_id (None | str | Unset): The ID of the catalog used when value_kind is `catalog_entity` + slug (str | Unset): The slug of the form field + description (None | str | Unset): The description of the form field + show_on_incident_details (bool | Unset): Whether the form field is shown on the incident details panel + enabled (bool | Unset): Whether the form field is enabled + auto_set_by_catalog_property_id (None | str | Unset): Catalog property ID to auto-set this form field. Only + reference-kind catalog properties are supported. """ kind: FormFieldKind @@ -42,12 +45,12 @@ class FormField: default_values: list[str] created_at: str updated_at: str - value_kind_catalog_id: None | Unset | str = UNSET - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - show_on_incident_details: Unset | bool = UNSET - enabled: Unset | bool = UNSET - auto_set_by_catalog_field_id: None | Unset | str = UNSET + value_kind_catalog_id: None | str | Unset = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + show_on_incident_details: bool | Unset = UNSET + enabled: bool | Unset = UNSET + auto_set_by_catalog_property_id: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -69,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - value_kind_catalog_id: None | Unset | str + value_kind_catalog_id: None | str | Unset if isinstance(self.value_kind_catalog_id, Unset): value_kind_catalog_id = UNSET else: @@ -77,7 +80,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -87,11 +90,11 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - auto_set_by_catalog_field_id: None | Unset | str - if isinstance(self.auto_set_by_catalog_field_id, Unset): - auto_set_by_catalog_field_id = UNSET + auto_set_by_catalog_property_id: None | str | Unset + if isinstance(self.auto_set_by_catalog_property_id, Unset): + auto_set_by_catalog_property_id = UNSET else: - auto_set_by_catalog_field_id = self.auto_set_by_catalog_field_id + auto_set_by_catalog_property_id = self.auto_set_by_catalog_property_id field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -118,8 +121,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["show_on_incident_details"] = show_on_incident_details if enabled is not UNSET: field_dict["enabled"] = enabled - if auto_set_by_catalog_field_id is not UNSET: - field_dict["auto_set_by_catalog_field_id"] = auto_set_by_catalog_field_id + if auto_set_by_catalog_property_id is not UNSET: + field_dict["auto_set_by_catalog_property_id"] = auto_set_by_catalog_property_id return field_dict @@ -144,23 +147,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_value_kind_catalog_id(data: object) -> None | Unset | str: + def _parse_value_kind_catalog_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value_kind_catalog_id = _parse_value_kind_catalog_id(d.pop("value_kind_catalog_id", UNSET)) slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -168,14 +171,16 @@ def _parse_description(data: object) -> None | Unset | str: enabled = d.pop("enabled", UNSET) - def _parse_auto_set_by_catalog_field_id(data: object) -> None | Unset | str: + def _parse_auto_set_by_catalog_property_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) - auto_set_by_catalog_field_id = _parse_auto_set_by_catalog_field_id(d.pop("auto_set_by_catalog_field_id", UNSET)) + auto_set_by_catalog_property_id = _parse_auto_set_by_catalog_property_id( + d.pop("auto_set_by_catalog_property_id", UNSET) + ) form_field = cls( kind=kind, @@ -192,7 +197,7 @@ def _parse_auto_set_by_catalog_field_id(data: object) -> None | Unset | str: description=description, show_on_incident_details=show_on_incident_details, enabled=enabled, - auto_set_by_catalog_field_id=auto_set_by_catalog_field_id, + auto_set_by_catalog_property_id=auto_set_by_catalog_property_id, ) form_field.additional_properties = d diff --git a/rootly_sdk/models/form_field_list.py b/rootly_sdk/models/form_field_list.py index c10a3e79..a48ea04d 100644 --- a/rootly_sdk/models/form_field_list.py +++ b/rootly_sdk/models/form_field_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormFieldList: """ Attributes: - data (list['FormFieldListDataItem']): + data (list[FormFieldListDataItem]): links (Links): meta (Meta): """ - data: list["FormFieldListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormFieldListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_list_data_item.py b/rootly_sdk/models/form_field_list_data_item.py index f29da629..190312ed 100644 --- a/rootly_sdk/models/form_field_list_data_item.py +++ b/rootly_sdk/models/form_field_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class FormFieldListDataItem: id: str type_: FormFieldListDataItemType - attributes: "FormField" + attributes: FormField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_option.py b/rootly_sdk/models/form_field_option.py index c5a5b667..c26efcd3 100644 --- a/rootly_sdk/models/form_field_option.py +++ b/rootly_sdk/models/form_field_option.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,9 +20,9 @@ class FormFieldOption: position (int): The position of the form field option created_at (str): Date of creation updated_at (str): Date of last update - id (Union[Unset, str]): Unique ID of the form field option - form_field_id (Union[Unset, str]): The ID of the parent custom field - default (Union[Unset, bool]): + id (str | Unset): Unique ID of the form field option + form_field_id (str | Unset): The ID of the parent custom field + default (bool | Unset): """ value: str @@ -28,9 +30,9 @@ class FormFieldOption: position: int created_at: str updated_at: str - id: Unset | str = UNSET - form_field_id: Unset | str = UNSET - default: Unset | bool = UNSET + id: str | Unset = UNSET + form_field_id: str | Unset = UNSET + default: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_option_list.py b/rootly_sdk/models/form_field_option_list.py index 9323ba31..b4c5a091 100644 --- a/rootly_sdk/models/form_field_option_list.py +++ b/rootly_sdk/models/form_field_option_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormFieldOptionList: """ Attributes: - data (list['FormFieldOptionListDataItem']): + data (list[FormFieldOptionListDataItem]): links (Links): meta (Meta): """ - data: list["FormFieldOptionListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormFieldOptionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_option_list_data_item.py b/rootly_sdk/models/form_field_option_list_data_item.py index 581c2720..b37a530e 100644 --- a/rootly_sdk/models/form_field_option_list_data_item.py +++ b/rootly_sdk/models/form_field_option_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldOptionListDataItem: id: str type_: FormFieldOptionListDataItemType - attributes: "FormFieldOption" + attributes: FormFieldOption additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_option_response.py b/rootly_sdk/models/form_field_option_response.py index 835605e9..2045abdd 100644 --- a/rootly_sdk/models/form_field_option_response.py +++ b/rootly_sdk/models/form_field_option_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormFieldOptionResponse: data (FormFieldOptionResponseData): """ - data: "FormFieldOptionResponseData" + data: FormFieldOptionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_option_response_data.py b/rootly_sdk/models/form_field_option_response_data.py index 0711113b..ab893054 100644 --- a/rootly_sdk/models/form_field_option_response_data.py +++ b/rootly_sdk/models/form_field_option_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldOptionResponseData: id: str type_: FormFieldOptionResponseDataType - attributes: "FormFieldOption" + attributes: FormFieldOption additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement.py b/rootly_sdk/models/form_field_placement.py index 81505863..e9a20d4d 100644 --- a/rootly_sdk/models/form_field_placement.py +++ b/rootly_sdk/models/form_field_placement.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -26,11 +28,11 @@ class FormFieldPlacement: form (str): The form this field is placed on. position (int): The position of the field placement. required (bool): Whether the field is unconditionally required on this form. - required_operator (Union[Unset, FormFieldPlacementRequiredOperator]): Logical operator when evaluating multiple + required_operator (FormFieldPlacementRequiredOperator | Unset): Logical operator when evaluating multiple form_field_placement_conditions with conditioned=required - placement_operator (Union[Unset, FormFieldPlacementPlacementOperator]): Logical operator when evaluating - multiple form_field_placement_conditions with conditioned=placement - non_editable (Union[Unset, bool]): Whether the field is read-only and cannot be edited by users. + placement_operator (FormFieldPlacementPlacementOperator | Unset): Logical operator when evaluating multiple + form_field_placement_conditions with conditioned=placement + non_editable (bool | Unset): Whether the field is read-only and cannot be edited by users. """ form_field_id: str @@ -38,9 +40,9 @@ class FormFieldPlacement: form: str position: int required: bool - required_operator: Unset | FormFieldPlacementRequiredOperator = UNSET - placement_operator: Unset | FormFieldPlacementPlacementOperator = UNSET - non_editable: Unset | bool = UNSET + required_operator: FormFieldPlacementRequiredOperator | Unset = UNSET + placement_operator: FormFieldPlacementPlacementOperator | Unset = UNSET + non_editable: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,11 +56,11 @@ def to_dict(self) -> dict[str, Any]: required = self.required - required_operator: Unset | str = UNSET + required_operator: str | Unset = UNSET if not isinstance(self.required_operator, Unset): required_operator = self.required_operator - placement_operator: Unset | str = UNSET + placement_operator: str | Unset = UNSET if not isinstance(self.placement_operator, Unset): placement_operator = self.placement_operator @@ -98,14 +100,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: required = d.pop("required") _required_operator = d.pop("required_operator", UNSET) - required_operator: Unset | FormFieldPlacementRequiredOperator + required_operator: FormFieldPlacementRequiredOperator | Unset if isinstance(_required_operator, Unset): required_operator = UNSET else: required_operator = check_form_field_placement_required_operator(_required_operator) _placement_operator = d.pop("placement_operator", UNSET) - placement_operator: Unset | FormFieldPlacementPlacementOperator + placement_operator: FormFieldPlacementPlacementOperator | Unset if isinstance(_placement_operator, Unset): placement_operator = UNSET else: diff --git a/rootly_sdk/models/form_field_placement_condition.py b/rootly_sdk/models/form_field_placement_condition.py index 304d4790..727f0372 100644 --- a/rootly_sdk/models/form_field_placement_condition.py +++ b/rootly_sdk/models/form_field_placement_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/form_field_placement_condition_list.py b/rootly_sdk/models/form_field_placement_condition_list.py index f03bf14c..ca528d32 100644 --- a/rootly_sdk/models/form_field_placement_condition_list.py +++ b/rootly_sdk/models/form_field_placement_condition_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormFieldPlacementConditionList: """ Attributes: - data (list['FormFieldPlacementConditionListDataItem']): + data (list[FormFieldPlacementConditionListDataItem]): links (Links): meta (Meta): """ - data: list["FormFieldPlacementConditionListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormFieldPlacementConditionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_condition_list_data_item.py b/rootly_sdk/models/form_field_placement_condition_list_data_item.py index ce1f7db9..f86cdeb6 100644 --- a/rootly_sdk/models/form_field_placement_condition_list_data_item.py +++ b/rootly_sdk/models/form_field_placement_condition_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldPlacementConditionListDataItem: id: str type_: FormFieldPlacementConditionListDataItemType - attributes: "FormFieldPlacementCondition" + attributes: FormFieldPlacementCondition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_condition_response.py b/rootly_sdk/models/form_field_placement_condition_response.py index 4dd61cc9..6ecfaf5e 100644 --- a/rootly_sdk/models/form_field_placement_condition_response.py +++ b/rootly_sdk/models/form_field_placement_condition_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormFieldPlacementConditionResponse: data (FormFieldPlacementConditionResponseData): """ - data: "FormFieldPlacementConditionResponseData" + data: FormFieldPlacementConditionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_condition_response_data.py b/rootly_sdk/models/form_field_placement_condition_response_data.py index 1ffe68e9..72b5df8e 100644 --- a/rootly_sdk/models/form_field_placement_condition_response_data.py +++ b/rootly_sdk/models/form_field_placement_condition_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldPlacementConditionResponseData: id: str type_: FormFieldPlacementConditionResponseDataType - attributes: "FormFieldPlacementCondition" + attributes: FormFieldPlacementCondition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_list.py b/rootly_sdk/models/form_field_placement_list.py index 3c288b14..64308e8d 100644 --- a/rootly_sdk/models/form_field_placement_list.py +++ b/rootly_sdk/models/form_field_placement_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormFieldPlacementList: """ Attributes: - data (list['FormFieldPlacementListDataItem']): + data (list[FormFieldPlacementListDataItem]): links (Links): meta (Meta): """ - data: list["FormFieldPlacementListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormFieldPlacementListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_list_data_item.py b/rootly_sdk/models/form_field_placement_list_data_item.py index d9bb45af..ffb31c2b 100644 --- a/rootly_sdk/models/form_field_placement_list_data_item.py +++ b/rootly_sdk/models/form_field_placement_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldPlacementListDataItem: id: str type_: FormFieldPlacementListDataItemType - attributes: "FormFieldPlacement" + attributes: FormFieldPlacement additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_response.py b/rootly_sdk/models/form_field_placement_response.py index 75a2fc4d..8074305f 100644 --- a/rootly_sdk/models/form_field_placement_response.py +++ b/rootly_sdk/models/form_field_placement_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormFieldPlacementResponse: data (FormFieldPlacementResponseData): """ - data: "FormFieldPlacementResponseData" + data: FormFieldPlacementResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_placement_response_data.py b/rootly_sdk/models/form_field_placement_response_data.py index 8e7330b2..20c0d20f 100644 --- a/rootly_sdk/models/form_field_placement_response_data.py +++ b/rootly_sdk/models/form_field_placement_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldPlacementResponseData: id: str type_: FormFieldPlacementResponseDataType - attributes: "FormFieldPlacement" + attributes: FormFieldPlacement additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_position.py b/rootly_sdk/models/form_field_position.py index 4531afd2..88003c9f 100644 --- a/rootly_sdk/models/form_field_position.py +++ b/rootly_sdk/models/form_field_position.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/form_field_position_list.py b/rootly_sdk/models/form_field_position_list.py index 631ad2fd..7d0f35f3 100644 --- a/rootly_sdk/models/form_field_position_list.py +++ b/rootly_sdk/models/form_field_position_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormFieldPositionList: """ Attributes: - data (list['FormFieldPositionListDataItem']): + data (list[FormFieldPositionListDataItem]): links (Links): meta (Meta): """ - data: list["FormFieldPositionListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormFieldPositionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_position_list_data_item.py b/rootly_sdk/models/form_field_position_list_data_item.py index 9678c8c9..c68a3ba1 100644 --- a/rootly_sdk/models/form_field_position_list_data_item.py +++ b/rootly_sdk/models/form_field_position_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldPositionListDataItem: id: str type_: FormFieldPositionListDataItemType - attributes: "FormFieldPosition" + attributes: FormFieldPosition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_position_response.py b/rootly_sdk/models/form_field_position_response.py index bb9f7473..2a751e3c 100644 --- a/rootly_sdk/models/form_field_position_response.py +++ b/rootly_sdk/models/form_field_position_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormFieldPositionResponse: data (FormFieldPositionResponseData): """ - data: "FormFieldPositionResponseData" + data: FormFieldPositionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_position_response_data.py b/rootly_sdk/models/form_field_position_response_data.py index 6bb51c2d..35e52e1a 100644 --- a/rootly_sdk/models/form_field_position_response_data.py +++ b/rootly_sdk/models/form_field_position_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormFieldPositionResponseData: id: str type_: FormFieldPositionResponseDataType - attributes: "FormFieldPosition" + attributes: FormFieldPosition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_response.py b/rootly_sdk/models/form_field_response.py index 9b6618c4..af8cf6a7 100644 --- a/rootly_sdk/models/form_field_response.py +++ b/rootly_sdk/models/form_field_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormFieldResponse: data (FormFieldResponseData): """ - data: "FormFieldResponseData" + data: FormFieldResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_field_response_data.py b/rootly_sdk/models/form_field_response_data.py index 78ddd119..10089c15 100644 --- a/rootly_sdk/models/form_field_response_data.py +++ b/rootly_sdk/models/form_field_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class FormFieldResponseData: id: str type_: FormFieldResponseDataType - attributes: "FormField" + attributes: FormField additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set.py b/rootly_sdk/models/form_set.py index 318469b8..02ffd729 100644 --- a/rootly_sdk/models/form_set.py +++ b/rootly_sdk/models/form_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -24,7 +26,7 @@ class FormSet: `slack_update_scheduled_incident_form` created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the form set + slug (str | Unset): The slug of the form set """ name: str @@ -32,7 +34,7 @@ class FormSet: forms: list[str] created_at: str updated_at: str - slug: Unset | str = UNSET + slug: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_condition.py b/rootly_sdk/models/form_set_condition.py index e7bc4fd2..571f0ed8 100644 --- a/rootly_sdk/models/form_set_condition.py +++ b/rootly_sdk/models/form_set_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/form_set_condition_list.py b/rootly_sdk/models/form_set_condition_list.py index ccf3abbb..7e0ed3e8 100644 --- a/rootly_sdk/models/form_set_condition_list.py +++ b/rootly_sdk/models/form_set_condition_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormSetConditionList: """ Attributes: - data (list['FormSetConditionListDataItem']): + data (list[FormSetConditionListDataItem]): links (Links): meta (Meta): """ - data: list["FormSetConditionListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormSetConditionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_condition_list_data_item.py b/rootly_sdk/models/form_set_condition_list_data_item.py index 01a1392e..0525b725 100644 --- a/rootly_sdk/models/form_set_condition_list_data_item.py +++ b/rootly_sdk/models/form_set_condition_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormSetConditionListDataItem: id: str type_: FormSetConditionListDataItemType - attributes: "FormSetCondition" + attributes: FormSetCondition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_condition_response.py b/rootly_sdk/models/form_set_condition_response.py index 56867724..7f0509b7 100644 --- a/rootly_sdk/models/form_set_condition_response.py +++ b/rootly_sdk/models/form_set_condition_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormSetConditionResponse: data (FormSetConditionResponseData): """ - data: "FormSetConditionResponseData" + data: FormSetConditionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_condition_response_data.py b/rootly_sdk/models/form_set_condition_response_data.py index 6e721c80..6e6a3a67 100644 --- a/rootly_sdk/models/form_set_condition_response_data.py +++ b/rootly_sdk/models/form_set_condition_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FormSetConditionResponseData: id: str type_: FormSetConditionResponseDataType - attributes: "FormSetCondition" + attributes: FormSetCondition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_list.py b/rootly_sdk/models/form_set_list.py index abb03713..f6526e07 100644 --- a/rootly_sdk/models/form_set_list.py +++ b/rootly_sdk/models/form_set_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FormSetList: """ Attributes: - data (list['FormSetListDataItem']): + data (list[FormSetListDataItem]): links (Links): meta (Meta): """ - data: list["FormSetListDataItem"] - links: "Links" - meta: "Meta" + data: list[FormSetListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_list_data_item.py b/rootly_sdk/models/form_set_list_data_item.py index 783ebe8c..24f0718c 100644 --- a/rootly_sdk/models/form_set_list_data_item.py +++ b/rootly_sdk/models/form_set_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class FormSetListDataItem: id: str type_: FormSetListDataItemType - attributes: "FormSet" + attributes: FormSet additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_response.py b/rootly_sdk/models/form_set_response.py index 9860497c..99022037 100644 --- a/rootly_sdk/models/form_set_response.py +++ b/rootly_sdk/models/form_set_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FormSetResponse: data (FormSetResponseData): """ - data: "FormSetResponseData" + data: FormSetResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/form_set_response_data.py b/rootly_sdk/models/form_set_response_data.py index 3e6f4e46..96ccef28 100644 --- a/rootly_sdk/models/form_set_response_data.py +++ b/rootly_sdk/models/form_set_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class FormSetResponseData: id: str type_: FormSetResponseDataType - attributes: "FormSet" + attributes: FormSet additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/functionality.py b/rootly_sdk/models/functionality.py index ff575f95..42664292 100644 --- a/rootly_sdk/models/functionality.py +++ b/rootly_sdk/models/functionality.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -7,7 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.functionality_fields_type_0_item import FunctionalityFieldsType0Item + from ..models.functionality_properties_type_0_item import FunctionalityPropertiesType0Item from ..models.functionality_slack_aliases_type_0_item import FunctionalitySlackAliasesType0Item from ..models.functionality_slack_channels_type_0_item import FunctionalitySlackChannelsType0Item @@ -22,54 +24,55 @@ class Functionality: name (str): The name of the functionality created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the functionality - description (Union[None, Unset, str]): The description of the functionality - public_description (Union[None, Unset, str]): The public description of the functionality - notify_emails (Union[None, Unset, list[str]]): Emails attached to the functionality - color (Union[None, Unset, str]): The hex color of the functionality - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this functionality. eg: + slug (str | Unset): The slug of the functionality + description (None | str | Unset): The description of the functionality + public_description (None | str | Unset): The public description of the functionality + notify_emails (list[str] | None | Unset): Emails attached to the functionality + color (None | str | Unset): The hex color of the functionality + backstage_id (None | str | Unset): The Backstage entity id associated to this functionality. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this functionality - pagerduty_id (Union[None, Unset, str]): The PagerDuty service id associated to this functionality - opsgenie_id (Union[None, Unset, str]): The Opsgenie service id associated to this functionality - opsgenie_team_id (Union[None, Unset, str]): The Opsgenie team id associated to this functionality - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this functionality - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this functionality - position (Union[None, Unset, int]): Position of the functionality - environment_ids (Union[None, Unset, list[str]]): Environments associated with this functionality - service_ids (Union[None, Unset, list[str]]): Services associated with this functionality - owner_group_ids (Union[None, Unset, list[str]]): Owner Teams associated with this functionality - owner_user_ids (Union[None, Unset, list[int]]): Owner Users associated with this functionality - slack_channels (Union[None, Unset, list['FunctionalitySlackChannelsType0Item']]): Slack Channels associated with - this functionality - slack_aliases (Union[None, Unset, list['FunctionalitySlackAliasesType0Item']]): Slack Aliases associated with - this functionality - fields (Union[None, Unset, list['FunctionalityFieldsType0Item']]): Array of field values for this functionality. + external_id (None | str | Unset): The external id associated to this functionality + pagerduty_id (None | str | Unset): The PagerDuty service id associated to this functionality + opsgenie_id (None | str | Unset): The Opsgenie service id associated to this functionality + opsgenie_team_id (None | str | Unset): The Opsgenie team id associated to this functionality + cortex_id (None | str | Unset): The Cortex group id associated to this functionality + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this functionality + position (int | None | Unset): Position of the functionality + environment_ids (list[str] | None | Unset): Environments associated with this functionality + service_ids (list[str] | None | Unset): Services associated with this functionality + owner_group_ids (list[str] | None | Unset): Owner Teams associated with this functionality + owner_user_ids (list[int] | None | Unset): Owner Users associated with this functionality + slack_channels (list[FunctionalitySlackChannelsType0Item] | None | Unset): Slack Channels associated with this + functionality + slack_aliases (list[FunctionalitySlackAliasesType0Item] | None | Unset): Slack Aliases associated with this + functionality + properties (list[FunctionalityPropertiesType0Item] | None | Unset): Array of property values for this + functionality. """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - opsgenie_team_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - position: None | Unset | int = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - owner_group_ids: None | Unset | list[str] = UNSET - owner_user_ids: None | Unset | list[int] = UNSET - slack_channels: None | Unset | list["FunctionalitySlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["FunctionalitySlackAliasesType0Item"] = UNSET - fields: None | Unset | list["FunctionalityFieldsType0Item"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + position: int | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + owner_group_ids: list[str] | None | Unset = UNSET + owner_user_ids: list[int] | None | Unset = UNSET + slack_channels: list[FunctionalitySlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[FunctionalitySlackAliasesType0Item] | None | Unset = UNSET + properties: list[FunctionalityPropertiesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -81,19 +84,19 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -102,61 +105,61 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - opsgenie_team_id: None | Unset | str + opsgenie_team_id: None | str | Unset if isinstance(self.opsgenie_team_id, Unset): opsgenie_team_id = UNSET else: opsgenie_team_id = self.opsgenie_team_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -165,7 +168,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -174,7 +177,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - owner_group_ids: None | Unset | list[str] + owner_group_ids: list[str] | None | Unset if isinstance(self.owner_group_ids, Unset): owner_group_ids = UNSET elif isinstance(self.owner_group_ids, list): @@ -183,7 +186,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_group_ids = self.owner_group_ids - owner_user_ids: None | Unset | list[int] + owner_user_ids: list[int] | None | Unset if isinstance(self.owner_user_ids, Unset): owner_user_ids = UNSET elif isinstance(self.owner_user_ids, list): @@ -192,7 +195,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -204,7 +207,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -216,17 +219,17 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: None | Unset | list[dict[str, Any]] - if isinstance(self.fields, Unset): - fields = UNSET - elif isinstance(self.fields, list): - fields = [] - for fields_type_0_item_data in self.fields: - fields_type_0_item = fields_type_0_item_data.to_dict() - fields.append(fields_type_0_item) + properties: list[dict[str, Any]] | None | Unset + if isinstance(self.properties, Unset): + properties = UNSET + elif isinstance(self.properties, list): + properties = [] + for properties_type_0_item_data in self.properties: + properties_type_0_item = properties_type_0_item_data.to_dict() + properties.append(properties_type_0_item) else: - fields = self.fields + properties = self.properties field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -275,14 +278,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.functionality_fields_type_0_item import FunctionalityFieldsType0Item + from ..models.functionality_properties_type_0_item import FunctionalityPropertiesType0Item from ..models.functionality_slack_aliases_type_0_item import FunctionalitySlackAliasesType0Item from ..models.functionality_slack_channels_type_0_item import FunctionalitySlackChannelsType0Item @@ -295,25 +298,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -324,94 +327,94 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_opsgenie_team_id(data: object) -> None | Unset | str: + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -422,13 +425,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -439,13 +442,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: + def _parse_owner_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -456,13 +459,13 @@ def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: owner_group_ids_type_0 = cast(list[str], data) return owner_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) owner_group_ids = _parse_owner_group_ids(d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: + def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -473,13 +476,13 @@ def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: owner_user_ids_type_0 = cast(list[int], data) return owner_user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) - def _parse_slack_channels(data: object) -> None | Unset | list["FunctionalitySlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[FunctionalitySlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -497,13 +500,13 @@ def _parse_slack_channels(data: object) -> None | Unset | list["FunctionalitySla slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["FunctionalitySlackChannelsType0Item"], data) + return cast(list[FunctionalitySlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases(data: object) -> None | Unset | list["FunctionalitySlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[FunctionalitySlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -521,13 +524,13 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["FunctionalitySlac slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["FunctionalitySlackAliasesType0Item"], data) + return cast(list[FunctionalitySlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_fields(data: object) -> None | Unset | list["FunctionalityFieldsType0Item"]: + def _parse_properties(data: object) -> list[FunctionalityPropertiesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -535,19 +538,19 @@ def _parse_fields(data: object) -> None | Unset | list["FunctionalityFieldsType0 try: if not isinstance(data, list): raise TypeError() - fields_type_0 = [] - _fields_type_0 = data - for fields_type_0_item_data in _fields_type_0: - fields_type_0_item = FunctionalityFieldsType0Item.from_dict(fields_type_0_item_data) + properties_type_0 = [] + _properties_type_0 = data + for properties_type_0_item_data in _properties_type_0: + properties_type_0_item = FunctionalityPropertiesType0Item.from_dict(properties_type_0_item_data) - fields_type_0.append(fields_type_0_item) + properties_type_0.append(properties_type_0_item) - return fields_type_0 - except: # noqa: E722 + return properties_type_0 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["FunctionalityFieldsType0Item"], data) + return cast(list[FunctionalityPropertiesType0Item] | None | Unset, data) - fields = _parse_fields(d.pop("fields", UNSET)) + properties = _parse_properties(d.pop("properties", UNSET)) functionality = cls( name=name, @@ -572,7 +575,7 @@ def _parse_fields(data: object) -> None | Unset | list["FunctionalityFieldsType0 owner_user_ids=owner_user_ids, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) functionality.additional_properties = d diff --git a/rootly_sdk/models/functionality_list.py b/rootly_sdk/models/functionality_list.py index b91319de..1aad7cf8 100644 --- a/rootly_sdk/models/functionality_list.py +++ b/rootly_sdk/models/functionality_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class FunctionalityList: """ Attributes: - data (list['FunctionalityListDataItem']): + data (list[FunctionalityListDataItem]): links (Links): meta (Meta): """ - data: list["FunctionalityListDataItem"] - links: "Links" - meta: "Meta" + data: list[FunctionalityListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/functionality_list_data_item.py b/rootly_sdk/models/functionality_list_data_item.py index 891c5842..62e6eee4 100644 --- a/rootly_sdk/models/functionality_list_data_item.py +++ b/rootly_sdk/models/functionality_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FunctionalityListDataItem: id: str type_: FunctionalityListDataItemType - attributes: "Functionality" + attributes: Functionality additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_team_data_attributes_fields_item.py b/rootly_sdk/models/functionality_properties_type_0_item.py similarity index 64% rename from rootly_sdk/models/new_team_data_attributes_fields_item.py rename to rootly_sdk/models/functionality_properties_type_0_item.py index 958ed906..6bcb6048 100644 --- a/rootly_sdk/models/new_team_data_attributes_fields_item.py +++ b/rootly_sdk/models/functionality_properties_type_0_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="NewTeamDataAttributesFieldsItem") +T = TypeVar("T", bound="FunctionalityPropertiesType0Item") @_attrs_define -class NewTeamDataAttributesFieldsItem: - """Set a value for a catalog field +class FunctionalityPropertiesType0Item: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - new_team_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + functionality_properties_type_0_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - new_team_data_attributes_fields_item.additional_properties = d - return new_team_data_attributes_fields_item + functionality_properties_type_0_item.additional_properties = d + return functionality_properties_type_0_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/functionality_response.py b/rootly_sdk/models/functionality_response.py index 0457a1c9..eb5b8f25 100644 --- a/rootly_sdk/models/functionality_response.py +++ b/rootly_sdk/models/functionality_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class FunctionalityResponse: data (FunctionalityResponseData): """ - data: "FunctionalityResponseData" + data: FunctionalityResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/functionality_response_data.py b/rootly_sdk/models/functionality_response_data.py index 1248604a..21af7809 100644 --- a/rootly_sdk/models/functionality_response_data.py +++ b/rootly_sdk/models/functionality_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class FunctionalityResponseData: id: str type_: FunctionalityResponseDataType - attributes: "Functionality" + attributes: Functionality additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/functionality_slack_aliases_type_0_item.py b/rootly_sdk/models/functionality_slack_aliases_type_0_item.py index 63a4d598..d9afc31f 100644 --- a/rootly_sdk/models/functionality_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/functionality_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/functionality_slack_channels_type_0_item.py b/rootly_sdk/models/functionality_slack_channels_type_0_item.py index 50b4ae69..f2ee6b04 100644 --- a/rootly_sdk/models/functionality_slack_channels_type_0_item.py +++ b/rootly_sdk/models/functionality_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py b/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py index dab1d9c1..121a7c18 100644 --- a/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py +++ b/rootly_sdk/models/generate_phone_number_live_call_router_country_code.py @@ -1,6 +1,6 @@ from typing import Literal, cast -GeneratePhoneNumberLiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "US"] +GeneratePhoneNumberLiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] GENERATE_PHONE_NUMBER_LIVE_CALL_ROUTER_COUNTRY_CODE_VALUES: set[GeneratePhoneNumberLiveCallRouterCountryCode] = { "AU", @@ -9,6 +9,7 @@ "GB", "NL", "NZ", + "SE", "US", } diff --git a/rootly_sdk/models/get_alerts_task_params.py b/rootly_sdk/models/get_alerts_task_params.py index 22f9f5da..aa334970 100644 --- a/rootly_sdk/models/get_alerts_task_params.py +++ b/rootly_sdk/models/get_alerts_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,52 +26,52 @@ class GetAlertsTaskParams: Attributes: past_duration (str): How far back to fetch commits (in format '1 minute', '30 days', '3 months', etc.) Example: 1 hour. - task_type (Union[Unset, GetAlertsTaskParamsTaskType]): - service_ids (Union[Unset, list[str]]): - environment_ids (Union[Unset, list[str]]): - labels (Union[Unset, list[str]]): - sources (Union[Unset, list[str]]): - services_impacted_by_incident (Union[Unset, bool]): - environments_impacted_by_incident (Union[Unset, bool]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['GetAlertsTaskParamsPostToSlackChannelsItem']]): - parent_message_thread_task (Union[Unset, GetAlertsTaskParamsParentMessageThreadTask]): A hash where [id] is the - task id of the parent task that sent a message, and [name] is the name of the parent task + task_type (GetAlertsTaskParamsTaskType | Unset): + service_ids (list[str] | Unset): + environment_ids (list[str] | Unset): + labels (list[str] | Unset): + sources (list[str] | Unset): + services_impacted_by_incident (bool | Unset): + environments_impacted_by_incident (bool | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[GetAlertsTaskParamsPostToSlackChannelsItem] | Unset): + parent_message_thread_task (GetAlertsTaskParamsParentMessageThreadTask | Unset): A hash where [id] is the task + id of the parent task that sent a message, and [name] is the name of the parent task """ past_duration: str - task_type: Unset | GetAlertsTaskParamsTaskType = UNSET - service_ids: Unset | list[str] = UNSET - environment_ids: Unset | list[str] = UNSET - labels: Unset | list[str] = UNSET - sources: Unset | list[str] = UNSET - services_impacted_by_incident: Unset | bool = UNSET - environments_impacted_by_incident: Unset | bool = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["GetAlertsTaskParamsPostToSlackChannelsItem"] = UNSET - parent_message_thread_task: Union[Unset, "GetAlertsTaskParamsParentMessageThreadTask"] = UNSET + task_type: GetAlertsTaskParamsTaskType | Unset = UNSET + service_ids: list[str] | Unset = UNSET + environment_ids: list[str] | Unset = UNSET + labels: list[str] | Unset = UNSET + sources: list[str] | Unset = UNSET + services_impacted_by_incident: bool | Unset = UNSET + environments_impacted_by_incident: bool | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[GetAlertsTaskParamsPostToSlackChannelsItem] | Unset = UNSET + parent_message_thread_task: GetAlertsTaskParamsParentMessageThreadTask | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: past_duration = self.past_duration - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - environment_ids: Unset | list[str] = UNSET + environment_ids: list[str] | Unset = UNSET if not isinstance(self.environment_ids, Unset): environment_ids = self.environment_ids - labels: Unset | list[str] = UNSET + labels: list[str] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels - sources: Unset | list[str] = UNSET + sources: list[str] | Unset = UNSET if not isinstance(self.sources, Unset): sources = self.sources @@ -79,14 +81,14 @@ def to_dict(self) -> dict[str, Any]: post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: post_to_slack_channels_item = post_to_slack_channels_item_data.to_dict() post_to_slack_channels.append(post_to_slack_channels_item) - parent_message_thread_task: Unset | dict[str, Any] = UNSET + parent_message_thread_task: dict[str, Any] | Unset = UNSET if not isinstance(self.parent_message_thread_task, Unset): parent_message_thread_task = self.parent_message_thread_task.to_dict() @@ -133,7 +135,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: past_duration = d.pop("past_duration") _task_type = d.pop("task_type", UNSET) - task_type: Unset | GetAlertsTaskParamsTaskType + task_type: GetAlertsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -153,17 +155,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = GetAlertsTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[GetAlertsTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = GetAlertsTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) _parent_message_thread_task = d.pop("parent_message_thread_task", UNSET) - parent_message_thread_task: Unset | GetAlertsTaskParamsParentMessageThreadTask + parent_message_thread_task: GetAlertsTaskParamsParentMessageThreadTask | Unset if isinstance(_parent_message_thread_task, Unset): parent_message_thread_task = UNSET else: diff --git a/rootly_sdk/models/get_alerts_task_params_parent_message_thread_task.py b/rootly_sdk/models/get_alerts_task_params_parent_message_thread_task.py index 9b7c21dc..1f009e1e 100644 --- a/rootly_sdk/models/get_alerts_task_params_parent_message_thread_task.py +++ b/rootly_sdk/models/get_alerts_task_params_parent_message_thread_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class GetAlertsTaskParamsParentMessageThreadTask: """A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/get_alerts_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/get_alerts_task_params_post_to_slack_channels_item.py index cf579af1..e4d3b93b 100644 --- a/rootly_sdk/models/get_alerts_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/get_alerts_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class GetAlertsTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/get_catalog_field_include.py b/rootly_sdk/models/get_catalog_field_include.py deleted file mode 100644 index 8bd8016e..00000000 --- a/rootly_sdk/models/get_catalog_field_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -GetCatalogFieldInclude = Literal["catalog"] - -GET_CATALOG_FIELD_INCLUDE_VALUES: set[GetCatalogFieldInclude] = { - "catalog", -} - - -def check_get_catalog_field_include(value: str | None) -> GetCatalogFieldInclude | None: - if value is None: - return None - if value in GET_CATALOG_FIELD_INCLUDE_VALUES: - return cast(GetCatalogFieldInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {GET_CATALOG_FIELD_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/get_pulses_task_params.py b/rootly_sdk/models/get_pulses_task_params.py index 7db72bae..47ac664c 100644 --- a/rootly_sdk/models/get_pulses_task_params.py +++ b/rootly_sdk/models/get_pulses_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,58 +26,58 @@ class GetPulsesTaskParams: Attributes: past_duration (str): How far back to fetch commits (in format '1 minute', '30 days', '3 months', etc.) Example: 1 hour. - task_type (Union[Unset, GetPulsesTaskParamsTaskType]): - service_ids (Union[Unset, list[str]]): - environment_ids (Union[Unset, list[str]]): - labels (Union[Unset, list[str]]): - refs (Union[Unset, list[str]]): - sources (Union[Unset, list[str]]): - services_impacted_by_incident (Union[Unset, bool]): - environments_impacted_by_incident (Union[Unset, bool]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['GetPulsesTaskParamsPostToSlackChannelsItem']]): - parent_message_thread_task (Union[Unset, GetPulsesTaskParamsParentMessageThreadTask]): A hash where [id] is the - task id of the parent task that sent a message, and [name] is the name of the parent task + task_type (GetPulsesTaskParamsTaskType | Unset): + service_ids (list[str] | Unset): + environment_ids (list[str] | Unset): + labels (list[str] | Unset): + refs (list[str] | Unset): + sources (list[str] | Unset): + services_impacted_by_incident (bool | Unset): + environments_impacted_by_incident (bool | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[GetPulsesTaskParamsPostToSlackChannelsItem] | Unset): + parent_message_thread_task (GetPulsesTaskParamsParentMessageThreadTask | Unset): A hash where [id] is the task + id of the parent task that sent a message, and [name] is the name of the parent task """ past_duration: str - task_type: Unset | GetPulsesTaskParamsTaskType = UNSET - service_ids: Unset | list[str] = UNSET - environment_ids: Unset | list[str] = UNSET - labels: Unset | list[str] = UNSET - refs: Unset | list[str] = UNSET - sources: Unset | list[str] = UNSET - services_impacted_by_incident: Unset | bool = UNSET - environments_impacted_by_incident: Unset | bool = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["GetPulsesTaskParamsPostToSlackChannelsItem"] = UNSET - parent_message_thread_task: Union[Unset, "GetPulsesTaskParamsParentMessageThreadTask"] = UNSET + task_type: GetPulsesTaskParamsTaskType | Unset = UNSET + service_ids: list[str] | Unset = UNSET + environment_ids: list[str] | Unset = UNSET + labels: list[str] | Unset = UNSET + refs: list[str] | Unset = UNSET + sources: list[str] | Unset = UNSET + services_impacted_by_incident: bool | Unset = UNSET + environments_impacted_by_incident: bool | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[GetPulsesTaskParamsPostToSlackChannelsItem] | Unset = UNSET + parent_message_thread_task: GetPulsesTaskParamsParentMessageThreadTask | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: past_duration = self.past_duration - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - environment_ids: Unset | list[str] = UNSET + environment_ids: list[str] | Unset = UNSET if not isinstance(self.environment_ids, Unset): environment_ids = self.environment_ids - labels: Unset | list[str] = UNSET + labels: list[str] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels - refs: Unset | list[str] = UNSET + refs: list[str] | Unset = UNSET if not isinstance(self.refs, Unset): refs = self.refs - sources: Unset | list[str] = UNSET + sources: list[str] | Unset = UNSET if not isinstance(self.sources, Unset): sources = self.sources @@ -85,14 +87,14 @@ def to_dict(self) -> dict[str, Any]: post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: post_to_slack_channels_item = post_to_slack_channels_item_data.to_dict() post_to_slack_channels.append(post_to_slack_channels_item) - parent_message_thread_task: Unset | dict[str, Any] = UNSET + parent_message_thread_task: dict[str, Any] | Unset = UNSET if not isinstance(self.parent_message_thread_task, Unset): parent_message_thread_task = self.parent_message_thread_task.to_dict() @@ -141,7 +143,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: past_duration = d.pop("past_duration") _task_type = d.pop("task_type", UNSET) - task_type: Unset | GetPulsesTaskParamsTaskType + task_type: GetPulsesTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -163,17 +165,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = GetPulsesTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[GetPulsesTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = GetPulsesTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) _parent_message_thread_task = d.pop("parent_message_thread_task", UNSET) - parent_message_thread_task: Unset | GetPulsesTaskParamsParentMessageThreadTask + parent_message_thread_task: GetPulsesTaskParamsParentMessageThreadTask | Unset if isinstance(_parent_message_thread_task, Unset): parent_message_thread_task = UNSET else: diff --git a/rootly_sdk/models/get_pulses_task_params_parent_message_thread_task.py b/rootly_sdk/models/get_pulses_task_params_parent_message_thread_task.py index 09881017..217e26b1 100644 --- a/rootly_sdk/models/get_pulses_task_params_parent_message_thread_task.py +++ b/rootly_sdk/models/get_pulses_task_params_parent_message_thread_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class GetPulsesTaskParamsParentMessageThreadTask: """A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/get_pulses_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/get_pulses_task_params_post_to_slack_channels_item.py index 17ab4fa8..022888dc 100644 --- a/rootly_sdk/models/get_pulses_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/get_pulses_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class GetPulsesTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/heartbeat.py b/rootly_sdk/models/heartbeat.py index 9a27d545..221bff46 100644 --- a/rootly_sdk/models/heartbeat.py +++ b/rootly_sdk/models/heartbeat.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -24,19 +26,20 @@ class Heartbeat: interval (int): interval_unit (HeartbeatIntervalUnit): notification_target_id (str): - notification_target_type (HeartbeatNotificationTargetType): + notification_target_type (HeartbeatNotificationTargetType): The type of the notification target. Please contact + support if you encounter issues using `Functionality` as a target type. enabled (bool): Whether to trigger alerts when heartbeat is expired. status (HeartbeatStatus): email_address (str): Email address to receive heartbeat pings. created_at (str): Date of creation updated_at (str): Date of last update - description (Union[None, Unset, str]): The description of the heartbeat - alert_description (Union[None, Unset, str]): Description of alerts triggered when heartbeat expires. - alert_urgency_id (Union[None, Unset, str]): Urgency of alerts triggered when heartbeat expires. - ping_url (Union[None, Unset, str]): URL to receive heartbeat pings. - secret (Union[None, Unset, str]): Secret used as bearer token when pinging heartbeat. - last_pinged_at (Union[None, Unset, str]): When the heartbeat was last pinged. - expires_at (Union[None, Unset, str]): When heartbeat expires + description (None | str | Unset): The description of the heartbeat + alert_description (None | str | Unset): Description of alerts triggered when heartbeat expires. + alert_urgency_id (None | str | Unset): Urgency of alerts triggered when heartbeat expires. + ping_url (None | str | Unset): URL to receive heartbeat pings. + secret (None | str | Unset): Secret used as bearer token when pinging heartbeat. + last_pinged_at (None | str | Unset): When the heartbeat was last pinged. + expires_at (None | str | Unset): When heartbeat expires """ name: str @@ -50,13 +53,13 @@ class Heartbeat: email_address: str created_at: str updated_at: str - description: None | Unset | str = UNSET - alert_description: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - ping_url: None | Unset | str = UNSET - secret: None | Unset | str = UNSET - last_pinged_at: None | Unset | str = UNSET - expires_at: None | Unset | str = UNSET + description: None | str | Unset = UNSET + alert_description: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + ping_url: None | str | Unset = UNSET + secret: None | str | Unset = UNSET + last_pinged_at: None | str | Unset = UNSET + expires_at: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -82,43 +85,43 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - alert_description: None | Unset | str + alert_description: None | str | Unset if isinstance(self.alert_description, Unset): alert_description = UNSET else: alert_description = self.alert_description - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - ping_url: None | Unset | str + ping_url: None | str | Unset if isinstance(self.ping_url, Unset): ping_url = UNSET else: ping_url = self.ping_url - secret: None | Unset | str + secret: None | str | Unset if isinstance(self.secret, Unset): secret = UNSET else: secret = self.secret - last_pinged_at: None | Unset | str + last_pinged_at: None | str | Unset if isinstance(self.last_pinged_at, Unset): last_pinged_at = UNSET else: last_pinged_at = self.last_pinged_at - expires_at: None | Unset | str + expires_at: None | str | Unset if isinstance(self.expires_at, Unset): expires_at = UNSET else: @@ -183,66 +186,66 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_alert_description(data: object) -> None | Unset | str: + def _parse_alert_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_description = _parse_alert_description(d.pop("alert_description", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_ping_url(data: object) -> None | Unset | str: + def _parse_ping_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) ping_url = _parse_ping_url(d.pop("ping_url", UNSET)) - def _parse_secret(data: object) -> None | Unset | str: + def _parse_secret(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) secret = _parse_secret(d.pop("secret", UNSET)) - def _parse_last_pinged_at(data: object) -> None | Unset | str: + def _parse_last_pinged_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) last_pinged_at = _parse_last_pinged_at(d.pop("last_pinged_at", UNSET)) - def _parse_expires_at(data: object) -> None | Unset | str: + def _parse_expires_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) expires_at = _parse_expires_at(d.pop("expires_at", UNSET)) diff --git a/rootly_sdk/models/heartbeat_list.py b/rootly_sdk/models/heartbeat_list.py index 8c214a78..433bf7e8 100644 --- a/rootly_sdk/models/heartbeat_list.py +++ b/rootly_sdk/models/heartbeat_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class HeartbeatList: """ Attributes: - data (list['HeartbeatListDataItem']): + data (list[HeartbeatListDataItem]): links (Links): meta (Meta): """ - data: list["HeartbeatListDataItem"] - links: "Links" - meta: "Meta" + data: list[HeartbeatListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/heartbeat_list_data_item.py b/rootly_sdk/models/heartbeat_list_data_item.py index dbcb529f..7de52115 100644 --- a/rootly_sdk/models/heartbeat_list_data_item.py +++ b/rootly_sdk/models/heartbeat_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class HeartbeatListDataItem: id: str type_: HeartbeatListDataItemType - attributes: "Heartbeat" + attributes: Heartbeat additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/heartbeat_notification_target_type.py b/rootly_sdk/models/heartbeat_notification_target_type.py index 982bfdfe..75ee0bca 100644 --- a/rootly_sdk/models/heartbeat_notification_target_type.py +++ b/rootly_sdk/models/heartbeat_notification_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -HeartbeatNotificationTargetType = Literal["EscalationPolicy", "Group", "Service", "User"] +HeartbeatNotificationTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service", "User"] HEARTBEAT_NOTIFICATION_TARGET_TYPE_VALUES: set[HeartbeatNotificationTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", "User", diff --git a/rootly_sdk/models/heartbeat_response.py b/rootly_sdk/models/heartbeat_response.py index 2f88dc6b..13d55c26 100644 --- a/rootly_sdk/models/heartbeat_response.py +++ b/rootly_sdk/models/heartbeat_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class HeartbeatResponse: data (HeartbeatResponseData): """ - data: "HeartbeatResponseData" + data: HeartbeatResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/heartbeat_response_data.py b/rootly_sdk/models/heartbeat_response_data.py index a8cdd593..d680b42f 100644 --- a/rootly_sdk/models/heartbeat_response_data.py +++ b/rootly_sdk/models/heartbeat_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class HeartbeatResponseData: id: str type_: HeartbeatResponseDataType - attributes: "Heartbeat" + attributes: Heartbeat additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/http_client_task_params.py b/rootly_sdk/models/http_client_task_params.py index 3925f00b..aeffe9ed 100644 --- a/rootly_sdk/models/http_client_task_params.py +++ b/rootly_sdk/models/http_client_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,28 +27,28 @@ class HttpClientTaskParams: url (str): URL endpoint Example: https://example.com/foo.json. succeed_on_status (str): HTTP status code expected. Can be a regular expression. Eg: 200, 200|203, 20[0-3] Example: 200. - task_type (Union[Unset, HttpClientTaskParamsTaskType]): - headers (Union[Unset, str]): JSON map of HTTP headers - params (Union[Unset, str]): JSON map of HTTP query parameters - body (Union[Unset, str]): HTTP body - event_url (Union[Unset, str]): - event_message (Union[Unset, str]): - method (Union[Unset, HttpClientTaskParamsMethod]): HTTP method Default: 'GET'. - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['HttpClientTaskParamsPostToSlackChannelsItem']]): + task_type (HttpClientTaskParamsTaskType | Unset): + headers (str | Unset): JSON map of HTTP headers + params (str | Unset): JSON map of HTTP query parameters + body (str | Unset): HTTP body + event_url (str | Unset): + event_message (str | Unset): + method (HttpClientTaskParamsMethod | Unset): HTTP method Default: 'GET'. + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset): """ url: str succeed_on_status: str - task_type: Unset | HttpClientTaskParamsTaskType = UNSET - headers: Unset | str = UNSET - params: Unset | str = UNSET - body: Unset | str = UNSET - event_url: Unset | str = UNSET - event_message: Unset | str = UNSET - method: Unset | HttpClientTaskParamsMethod = "GET" - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["HttpClientTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: HttpClientTaskParamsTaskType | Unset = UNSET + headers: str | Unset = UNSET + params: str | Unset = UNSET + body: str | Unset = UNSET + event_url: str | Unset = UNSET + event_message: str | Unset = UNSET + method: HttpClientTaskParamsMethod | Unset = "GET" + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: succeed_on_status = self.succeed_on_status - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -68,13 +70,13 @@ def to_dict(self) -> dict[str, Any]: event_message = self.event_message - method: Unset | str = UNSET + method: str | Unset = UNSET if not isinstance(self.method, Unset): method = self.method post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -122,7 +124,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: succeed_on_status = d.pop("succeed_on_status") _task_type = d.pop("task_type", UNSET) - task_type: Unset | HttpClientTaskParamsTaskType + task_type: HttpClientTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -139,7 +141,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: event_message = d.pop("event_message", UNSET) _method = d.pop("method", UNSET) - method: Unset | HttpClientTaskParamsMethod + method: HttpClientTaskParamsMethod | Unset if isinstance(_method, Unset): method = UNSET else: @@ -147,14 +149,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = HttpClientTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = HttpClientTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) http_client_task_params = cls( url=url, diff --git a/rootly_sdk/models/http_client_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/http_client_task_params_post_to_slack_channels_item.py index 619d65ed..642bc030 100644 --- a/rootly_sdk/models/http_client_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/http_client_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class HttpClientTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/in_triage_incident.py b/rootly_sdk/models/in_triage_incident.py index e6689084..e8b5f987 100644 --- a/rootly_sdk/models/in_triage_incident.py +++ b/rootly_sdk/models/in_triage_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class InTriageIncident: data (InTriageIncidentData): """ - data: "InTriageIncidentData" + data: InTriageIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/in_triage_incident_data.py b/rootly_sdk/models/in_triage_incident_data.py index 3ff763ca..7b9e4f40 100644 --- a/rootly_sdk/models/in_triage_incident_data.py +++ b/rootly_sdk/models/in_triage_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/incident.py b/rootly_sdk/models/incident.py index 769f5e4c..651e0067 100644 --- a/rootly_sdk/models/incident.py +++ b/rootly_sdk/models/incident.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,6 +24,9 @@ from ..models.incident_started_by_type_0 import IncidentStartedByType0 from ..models.incident_type_response import IncidentTypeResponse from ..models.incident_user_type_0 import IncidentUserType0 + from ..models.incident_zoom_meeting_global_dial_in_numbers_type_0_item import ( + IncidentZoomMeetingGlobalDialInNumbersType0Item, + ) from ..models.service_response import ServiceResponse from ..models.severity_response import SeverityResponse from ..models.team_response import TeamResponse @@ -37,244 +42,245 @@ class Incident: title (str): The title of the incident created_at (str): Date of creation updated_at (str): Date of last update - id (Union[Unset, str]): Unique ID of the incident - sequential_id (Union[Unset, int]): Sequential ID of the incident - kind (Union[Unset, str]): The kind of the incident - slug (Union[Unset, str]): The slug of the incident - parent_incident_id (Union[None, Unset, str]): ID of parent incident - duplicate_incident_id (Union[None, Unset, str]): ID of duplicated incident - summary (Union[None, Unset, str]): The summary of the incident - private (Union[Unset, bool]): The visibility of the incident Default: False. - source (Union[None, Unset, str]): The source of the incident - status (Union[None, Unset, str]): The status of the incident - url (Union[None, Unset, str]): The url to the incident - short_url (Union[None, Unset, str]): The short url to the incident - public_title (Union[None, Unset, str]): The public title of the incident - user (Union['IncidentUserType0', None, Unset]): The user who created the incident - severity (Union[Unset, SeverityResponse]): - environments (Union[None, Unset, list['EnvironmentResponse']]): The Environments of the incident - incident_types (Union[None, Unset, list['IncidentTypeResponse']]): The Incident Types of the incident - services (Union[None, Unset, list['ServiceResponse']]): The Services of the incident - functionalities (Union[None, Unset, list['FunctionalityResponse']]): The Functionalities of the incident - groups (Union[None, Unset, list['TeamResponse']]): The Teams of to the incident - labels (Union['IncidentLabelsType0', None, Unset]): Labels to attach to the incidents. eg: {"platform":"osx", + id (str | Unset): Unique ID of the incident + sequential_id (int | Unset): Sequential ID of the incident + kind (str | Unset): The kind of the incident + slug (str | Unset): The slug of the incident + parent_incident_id (None | str | Unset): ID of parent incident + duplicate_incident_id (None | str | Unset): ID of duplicated incident + summary (None | str | Unset): The summary of the incident + private (bool | Unset): The visibility of the incident Default: False. + source (None | str | Unset): The source of the incident + status (None | str | Unset): The status of the incident + url (None | str | Unset): The url to the incident + short_url (None | str | Unset): The short url to the incident + public_title (None | str | Unset): The public title of the incident + user (IncidentUserType0 | None | Unset): The user who created the incident + severity (SeverityResponse | Unset): + environments (list[EnvironmentResponse] | None | Unset): The Environments of the incident + incident_types (list[IncidentTypeResponse] | None | Unset): The Incident Types of the incident + services (list[ServiceResponse] | None | Unset): The Services of the incident + functionalities (list[FunctionalityResponse] | None | Unset): The Functionalities of the incident + groups (list[TeamResponse] | None | Unset): The Teams of to the incident + labels (IncidentLabelsType0 | None | Unset): Labels to attach to the incidents. eg: {"platform":"osx", "version": "1.29"} - slack_channel_id (Union[None, Unset, str]): Slack channel id - slack_channel_name (Union[None, Unset, str]): Slack channel name - slack_channel_url (Union[None, Unset, str]): Slack channel url - slack_channel_short_url (Union[None, Unset, str]): Slack channel short url - slack_channel_deep_link (Union[None, Unset, str]): Slack channel deep link - slack_channel_archived (Union[None, Unset, bool]): Whether the Slack channel is archived - slack_last_message_ts (Union[None, Unset, str]): Timestamp of last Slack message - zoom_meeting_id (Union[None, Unset, str]): Zoom meeting ID - zoom_meeting_start_url (Union[None, Unset, str]): Zoom meeting start URL - zoom_meeting_join_url (Union[None, Unset, str]): Zoom meeting join URL - zoom_meeting_password (Union[None, Unset, str]): Zoom meeting password - zoom_meeting_pstn_password (Union[None, Unset, str]): Zoom meeting PSTN password - zoom_meeting_h323_password (Union[None, Unset, str]): Zoom meeting H323 password - zoom_meeting_global_dial_in_numbers (Union[None, Unset, list[str]]): Zoom meeting global dial-in numbers - google_drive_id (Union[None, Unset, str]): Google Drive document ID - google_drive_parent_id (Union[None, Unset, str]): Google Drive parent folder ID - google_drive_url (Union[None, Unset, str]): Google Drive URL - google_meeting_id (Union[None, Unset, str]): Google meeting ID - google_meeting_url (Union[None, Unset, str]): Google meeting URL - jira_issue_key (Union[None, Unset, str]): Jira issue key - jira_issue_id (Union[None, Unset, str]): Jira issue ID - jira_issue_url (Union[None, Unset, str]): Jira issue URL - github_issue_id (Union[None, Unset, str]): GitHub issue ID - github_issue_url (Union[None, Unset, str]): GitHub issue URL - gitlab_issue_id (Union[None, Unset, str]): GitLab issue ID - gitlab_issue_url (Union[None, Unset, str]): GitLab issue URL - asana_task_id (Union[None, Unset, str]): Asana task ID - asana_task_url (Union[None, Unset, str]): Asana task URL - linear_issue_id (Union[None, Unset, str]): Linear issue ID - linear_issue_url (Union[None, Unset, str]): Linear issue URL - trello_card_id (Union[None, Unset, str]): Trello card ID - trello_card_url (Union[None, Unset, str]): Trello card URL - zendesk_ticket_id (Union[None, Unset, str]): Zendesk ticket ID - zendesk_ticket_url (Union[None, Unset, str]): Zendesk ticket URL - pagerduty_incident_id (Union[None, Unset, str]): PagerDuty incident ID - pagerduty_incident_number (Union[None, Unset, str]): PagerDuty incident number - pagerduty_incident_url (Union[None, Unset, str]): PagerDuty incident URL - opsgenie_incident_id (Union[None, Unset, str]): Opsgenie incident ID - opsgenie_incident_url (Union[None, Unset, str]): Opsgenie incident URL - opsgenie_alert_id (Union[None, Unset, str]): Opsgenie alert ID - opsgenie_alert_url (Union[None, Unset, str]): Opsgenie alert URL - service_now_incident_id (Union[None, Unset, str]): ServiceNow incident ID - service_now_incident_key (Union[None, Unset, str]): ServiceNow incident key - service_now_incident_url (Union[None, Unset, str]): ServiceNow incident URL - mattermost_channel_id (Union[None, Unset, str]): Mattermost channel ID - mattermost_channel_name (Union[None, Unset, str]): Mattermost channel name - mattermost_channel_url (Union[None, Unset, str]): Mattermost channel URL - confluence_page_id (Union[None, Unset, str]): Confluence page ID - confluence_page_url (Union[None, Unset, str]): Confluence page URL - datadog_notebook_id (Union[None, Unset, str]): Datadog notebook ID - datadog_notebook_url (Union[None, Unset, str]): Datadog notebook URL - shortcut_story_id (Union[None, Unset, str]): Shortcut story ID - shortcut_story_url (Union[None, Unset, str]): Shortcut story URL - shortcut_task_id (Union[None, Unset, str]): Shortcut task ID - shortcut_task_url (Union[None, Unset, str]): Shortcut task URL - motion_task_id (Union[None, Unset, str]): Motion task ID - motion_task_url (Union[None, Unset, str]): Motion task URL - clickup_task_id (Union[None, Unset, str]): ClickUp task ID - clickup_task_url (Union[None, Unset, str]): ClickUp task URL - victor_ops_incident_id (Union[None, Unset, str]): VictorOps incident ID - victor_ops_incident_url (Union[None, Unset, str]): VictorOps incident URL - quip_page_id (Union[None, Unset, str]): Quip page ID - quip_page_url (Union[None, Unset, str]): Quip page URL - sharepoint_page_id (Union[None, Unset, str]): SharePoint page ID - sharepoint_page_url (Union[None, Unset, str]): SharePoint page URL - airtable_base_key (Union[None, Unset, str]): Airtable base key - airtable_table_name (Union[None, Unset, str]): Airtable table name - airtable_record_id (Union[None, Unset, str]): Airtable record ID - airtable_record_url (Union[None, Unset, str]): Airtable record URL - freshservice_ticket_id (Union[None, Unset, str]): Freshservice ticket ID - freshservice_ticket_url (Union[None, Unset, str]): Freshservice ticket URL - freshservice_task_id (Union[None, Unset, str]): Freshservice task ID - freshservice_task_url (Union[None, Unset, str]): Freshservice task URL - mitigation_message (Union[None, Unset, str]): How was the incident mitigated? - resolution_message (Union[None, Unset, str]): How was the incident resolved? - cancellation_message (Union[None, Unset, str]): Why was the incident cancelled? - scheduled_for (Union[None, Unset, str]): Date of when the maintenance begins - scheduled_until (Union[None, Unset, str]): Date of when the maintenance ends - muted_service_ids (Union[None, Unset, list[str]]): The Service IDs to mute alerts for during maintenance. Alerts - for these services will still be triggered and attached to the incident, but won't page responders. - retrospective_progress_status (Union[Unset, IncidentRetrospectiveProgressStatus]): The status of the - retrospective progress - in_triage_by (Union['IncidentInTriageByType0', None, Unset]): The user who triaged the incident - started_by (Union['IncidentStartedByType0', None, Unset]): The user who started the incident - mitigated_by (Union['IncidentMitigatedByType0', None, Unset]): The user who mitigated the incident - resolved_by (Union['IncidentResolvedByType0', None, Unset]): The user who resolved the incident - closed_by (Union['IncidentClosedByType0', None, Unset]): The user who closed the incident - cancelled_by (Union['IncidentCancelledByType0', None, Unset]): The user who cancelled the incident - in_triage_at (Union[None, Unset, str]): Date of triage - started_at (Union[None, Unset, str]): Date of start - detected_at (Union[None, Unset, str]): Date of detection - acknowledged_at (Union[None, Unset, str]): Date of acknowledgment - mitigated_at (Union[None, Unset, str]): Date of mitigation - resolved_at (Union[None, Unset, str]): Date of resolution - closed_at (Union[None, Unset, str]): Date of closure - cancelled_at (Union[None, Unset, str]): Date of cancellation + slack_channel_id (None | str | Unset): Slack channel id + slack_channel_name (None | str | Unset): Slack channel name + slack_channel_url (None | str | Unset): Slack channel url + slack_channel_short_url (None | str | Unset): Slack channel short url + slack_channel_deep_link (None | str | Unset): Slack channel deep link + slack_channel_archived (bool | None | Unset): Whether the Slack channel is archived + slack_last_message_ts (None | str | Unset): Timestamp of last Slack message + zoom_meeting_id (None | str | Unset): Zoom meeting ID + zoom_meeting_start_url (None | str | Unset): Zoom meeting start URL + zoom_meeting_join_url (None | str | Unset): Zoom meeting join URL + zoom_meeting_password (None | str | Unset): Zoom meeting password + zoom_meeting_pstn_password (None | str | Unset): Zoom meeting PSTN password + zoom_meeting_h323_password (None | str | Unset): Zoom meeting H323 password + zoom_meeting_global_dial_in_numbers (list[IncidentZoomMeetingGlobalDialInNumbersType0Item] | None | Unset): Zoom + meeting global dial-in numbers + google_drive_id (None | str | Unset): Google Drive document ID + google_drive_parent_id (None | str | Unset): Google Drive parent folder ID + google_drive_url (None | str | Unset): Google Drive URL + google_meeting_id (None | str | Unset): Google meeting ID + google_meeting_url (None | str | Unset): Google meeting URL + jira_issue_key (None | str | Unset): Jira issue key + jira_issue_id (None | str | Unset): Jira issue ID + jira_issue_url (None | str | Unset): Jira issue URL + github_issue_id (None | str | Unset): GitHub issue ID + github_issue_url (None | str | Unset): GitHub issue URL + gitlab_issue_id (None | str | Unset): GitLab issue ID + gitlab_issue_url (None | str | Unset): GitLab issue URL + asana_task_id (None | str | Unset): Asana task ID + asana_task_url (None | str | Unset): Asana task URL + linear_issue_id (None | str | Unset): Linear issue ID + linear_issue_url (None | str | Unset): Linear issue URL + trello_card_id (None | str | Unset): Trello card ID + trello_card_url (None | str | Unset): Trello card URL + zendesk_ticket_id (None | str | Unset): Zendesk ticket ID + zendesk_ticket_url (None | str | Unset): Zendesk ticket URL + pagerduty_incident_id (None | str | Unset): PagerDuty incident ID + pagerduty_incident_number (None | str | Unset): PagerDuty incident number + pagerduty_incident_url (None | str | Unset): PagerDuty incident URL + opsgenie_incident_id (None | str | Unset): Opsgenie incident ID + opsgenie_incident_url (None | str | Unset): Opsgenie incident URL + opsgenie_alert_id (None | str | Unset): Opsgenie alert ID + opsgenie_alert_url (None | str | Unset): Opsgenie alert URL + service_now_incident_id (None | str | Unset): ServiceNow incident ID + service_now_incident_key (None | str | Unset): ServiceNow incident key + service_now_incident_url (None | str | Unset): ServiceNow incident URL + mattermost_channel_id (None | str | Unset): Mattermost channel ID + mattermost_channel_name (None | str | Unset): Mattermost channel name + mattermost_channel_url (None | str | Unset): Mattermost channel URL + confluence_page_id (None | str | Unset): Confluence page ID + confluence_page_url (None | str | Unset): Confluence page URL + datadog_notebook_id (None | str | Unset): Datadog notebook ID + datadog_notebook_url (None | str | Unset): Datadog notebook URL + shortcut_story_id (None | str | Unset): Shortcut story ID + shortcut_story_url (None | str | Unset): Shortcut story URL + shortcut_task_id (None | str | Unset): Shortcut task ID + shortcut_task_url (None | str | Unset): Shortcut task URL + motion_task_id (None | str | Unset): Motion task ID + motion_task_url (None | str | Unset): Motion task URL + clickup_task_id (None | str | Unset): ClickUp task ID + clickup_task_url (None | str | Unset): ClickUp task URL + victor_ops_incident_id (None | str | Unset): VictorOps incident ID + victor_ops_incident_url (None | str | Unset): VictorOps incident URL + quip_page_id (None | str | Unset): Quip page ID + quip_page_url (None | str | Unset): Quip page URL + sharepoint_page_id (None | str | Unset): SharePoint page ID + sharepoint_page_url (None | str | Unset): SharePoint page URL + airtable_base_key (None | str | Unset): Airtable base key + airtable_table_name (None | str | Unset): Airtable table name + airtable_record_id (None | str | Unset): Airtable record ID + airtable_record_url (None | str | Unset): Airtable record URL + freshservice_ticket_id (None | str | Unset): Freshservice ticket ID + freshservice_ticket_url (None | str | Unset): Freshservice ticket URL + freshservice_task_id (None | str | Unset): Freshservice task ID + freshservice_task_url (None | str | Unset): Freshservice task URL + mitigation_message (None | str | Unset): How was the incident mitigated? + resolution_message (None | str | Unset): How was the incident resolved? + cancellation_message (None | str | Unset): Why was the incident cancelled? + scheduled_for (None | str | Unset): Date of when the maintenance begins + scheduled_until (None | str | Unset): Date of when the maintenance ends + muted_service_ids (list[str] | None | Unset): The Service IDs to mute alerts for during maintenance. Alerts for + these services will still be triggered and attached to the incident, but won't page responders. + retrospective_progress_status (IncidentRetrospectiveProgressStatus | Unset): The status of the retrospective + progress + in_triage_by (IncidentInTriageByType0 | None | Unset): The user who triaged the incident + started_by (IncidentStartedByType0 | None | Unset): The user who started the incident + mitigated_by (IncidentMitigatedByType0 | None | Unset): The user who mitigated the incident + resolved_by (IncidentResolvedByType0 | None | Unset): The user who resolved the incident + closed_by (IncidentClosedByType0 | None | Unset): The user who closed the incident + cancelled_by (IncidentCancelledByType0 | None | Unset): The user who cancelled the incident + in_triage_at (None | str | Unset): Date of triage + started_at (None | str | Unset): Date of start + detected_at (None | str | Unset): Date of detection + acknowledged_at (None | str | Unset): Date of acknowledgment + mitigated_at (None | str | Unset): Date of mitigation + resolved_at (None | str | Unset): Date of resolution + closed_at (None | str | Unset): Date of closure + cancelled_at (None | str | Unset): Date of cancellation """ title: str created_at: str updated_at: str - id: Unset | str = UNSET - sequential_id: Unset | int = UNSET - kind: Unset | str = UNSET - slug: Unset | str = UNSET - parent_incident_id: None | Unset | str = UNSET - duplicate_incident_id: None | Unset | str = UNSET - summary: None | Unset | str = UNSET - private: Unset | bool = False - source: None | Unset | str = UNSET - status: None | Unset | str = UNSET - url: None | Unset | str = UNSET - short_url: None | Unset | str = UNSET - public_title: None | Unset | str = UNSET - user: Union["IncidentUserType0", None, Unset] = UNSET - severity: Union[Unset, "SeverityResponse"] = UNSET - environments: None | Unset | list["EnvironmentResponse"] = UNSET - incident_types: None | Unset | list["IncidentTypeResponse"] = UNSET - services: None | Unset | list["ServiceResponse"] = UNSET - functionalities: None | Unset | list["FunctionalityResponse"] = UNSET - groups: None | Unset | list["TeamResponse"] = UNSET - labels: Union["IncidentLabelsType0", None, Unset] = UNSET - slack_channel_id: None | Unset | str = UNSET - slack_channel_name: None | Unset | str = UNSET - slack_channel_url: None | Unset | str = UNSET - slack_channel_short_url: None | Unset | str = UNSET - slack_channel_deep_link: None | Unset | str = UNSET - slack_channel_archived: None | Unset | bool = UNSET - slack_last_message_ts: None | Unset | str = UNSET - zoom_meeting_id: None | Unset | str = UNSET - zoom_meeting_start_url: None | Unset | str = UNSET - zoom_meeting_join_url: None | Unset | str = UNSET - zoom_meeting_password: None | Unset | str = UNSET - zoom_meeting_pstn_password: None | Unset | str = UNSET - zoom_meeting_h323_password: None | Unset | str = UNSET - zoom_meeting_global_dial_in_numbers: None | Unset | list[str] = UNSET - google_drive_id: None | Unset | str = UNSET - google_drive_parent_id: None | Unset | str = UNSET - google_drive_url: None | Unset | str = UNSET - google_meeting_id: None | Unset | str = UNSET - google_meeting_url: None | Unset | str = UNSET - jira_issue_key: None | Unset | str = UNSET - jira_issue_id: None | Unset | str = UNSET - jira_issue_url: None | Unset | str = UNSET - github_issue_id: None | Unset | str = UNSET - github_issue_url: None | Unset | str = UNSET - gitlab_issue_id: None | Unset | str = UNSET - gitlab_issue_url: None | Unset | str = UNSET - asana_task_id: None | Unset | str = UNSET - asana_task_url: None | Unset | str = UNSET - linear_issue_id: None | Unset | str = UNSET - linear_issue_url: None | Unset | str = UNSET - trello_card_id: None | Unset | str = UNSET - trello_card_url: None | Unset | str = UNSET - zendesk_ticket_id: None | Unset | str = UNSET - zendesk_ticket_url: None | Unset | str = UNSET - pagerduty_incident_id: None | Unset | str = UNSET - pagerduty_incident_number: None | Unset | str = UNSET - pagerduty_incident_url: None | Unset | str = UNSET - opsgenie_incident_id: None | Unset | str = UNSET - opsgenie_incident_url: None | Unset | str = UNSET - opsgenie_alert_id: None | Unset | str = UNSET - opsgenie_alert_url: None | Unset | str = UNSET - service_now_incident_id: None | Unset | str = UNSET - service_now_incident_key: None | Unset | str = UNSET - service_now_incident_url: None | Unset | str = UNSET - mattermost_channel_id: None | Unset | str = UNSET - mattermost_channel_name: None | Unset | str = UNSET - mattermost_channel_url: None | Unset | str = UNSET - confluence_page_id: None | Unset | str = UNSET - confluence_page_url: None | Unset | str = UNSET - datadog_notebook_id: None | Unset | str = UNSET - datadog_notebook_url: None | Unset | str = UNSET - shortcut_story_id: None | Unset | str = UNSET - shortcut_story_url: None | Unset | str = UNSET - shortcut_task_id: None | Unset | str = UNSET - shortcut_task_url: None | Unset | str = UNSET - motion_task_id: None | Unset | str = UNSET - motion_task_url: None | Unset | str = UNSET - clickup_task_id: None | Unset | str = UNSET - clickup_task_url: None | Unset | str = UNSET - victor_ops_incident_id: None | Unset | str = UNSET - victor_ops_incident_url: None | Unset | str = UNSET - quip_page_id: None | Unset | str = UNSET - quip_page_url: None | Unset | str = UNSET - sharepoint_page_id: None | Unset | str = UNSET - sharepoint_page_url: None | Unset | str = UNSET - airtable_base_key: None | Unset | str = UNSET - airtable_table_name: None | Unset | str = UNSET - airtable_record_id: None | Unset | str = UNSET - airtable_record_url: None | Unset | str = UNSET - freshservice_ticket_id: None | Unset | str = UNSET - freshservice_ticket_url: None | Unset | str = UNSET - freshservice_task_id: None | Unset | str = UNSET - freshservice_task_url: None | Unset | str = UNSET - mitigation_message: None | Unset | str = UNSET - resolution_message: None | Unset | str = UNSET - cancellation_message: None | Unset | str = UNSET - scheduled_for: None | Unset | str = UNSET - scheduled_until: None | Unset | str = UNSET - muted_service_ids: None | Unset | list[str] = UNSET - retrospective_progress_status: Unset | IncidentRetrospectiveProgressStatus = UNSET - in_triage_by: Union["IncidentInTriageByType0", None, Unset] = UNSET - started_by: Union["IncidentStartedByType0", None, Unset] = UNSET - mitigated_by: Union["IncidentMitigatedByType0", None, Unset] = UNSET - resolved_by: Union["IncidentResolvedByType0", None, Unset] = UNSET - closed_by: Union["IncidentClosedByType0", None, Unset] = UNSET - cancelled_by: Union["IncidentCancelledByType0", None, Unset] = UNSET - in_triage_at: None | Unset | str = UNSET - started_at: None | Unset | str = UNSET - detected_at: None | Unset | str = UNSET - acknowledged_at: None | Unset | str = UNSET - mitigated_at: None | Unset | str = UNSET - resolved_at: None | Unset | str = UNSET - closed_at: None | Unset | str = UNSET - cancelled_at: None | Unset | str = UNSET + id: str | Unset = UNSET + sequential_id: int | Unset = UNSET + kind: str | Unset = UNSET + slug: str | Unset = UNSET + parent_incident_id: None | str | Unset = UNSET + duplicate_incident_id: None | str | Unset = UNSET + summary: None | str | Unset = UNSET + private: bool | Unset = False + source: None | str | Unset = UNSET + status: None | str | Unset = UNSET + url: None | str | Unset = UNSET + short_url: None | str | Unset = UNSET + public_title: None | str | Unset = UNSET + user: IncidentUserType0 | None | Unset = UNSET + severity: SeverityResponse | Unset = UNSET + environments: list[EnvironmentResponse] | None | Unset = UNSET + incident_types: list[IncidentTypeResponse] | None | Unset = UNSET + services: list[ServiceResponse] | None | Unset = UNSET + functionalities: list[FunctionalityResponse] | None | Unset = UNSET + groups: list[TeamResponse] | None | Unset = UNSET + labels: IncidentLabelsType0 | None | Unset = UNSET + slack_channel_id: None | str | Unset = UNSET + slack_channel_name: None | str | Unset = UNSET + slack_channel_url: None | str | Unset = UNSET + slack_channel_short_url: None | str | Unset = UNSET + slack_channel_deep_link: None | str | Unset = UNSET + slack_channel_archived: bool | None | Unset = UNSET + slack_last_message_ts: None | str | Unset = UNSET + zoom_meeting_id: None | str | Unset = UNSET + zoom_meeting_start_url: None | str | Unset = UNSET + zoom_meeting_join_url: None | str | Unset = UNSET + zoom_meeting_password: None | str | Unset = UNSET + zoom_meeting_pstn_password: None | str | Unset = UNSET + zoom_meeting_h323_password: None | str | Unset = UNSET + zoom_meeting_global_dial_in_numbers: list[IncidentZoomMeetingGlobalDialInNumbersType0Item] | None | Unset = UNSET + google_drive_id: None | str | Unset = UNSET + google_drive_parent_id: None | str | Unset = UNSET + google_drive_url: None | str | Unset = UNSET + google_meeting_id: None | str | Unset = UNSET + google_meeting_url: None | str | Unset = UNSET + jira_issue_key: None | str | Unset = UNSET + jira_issue_id: None | str | Unset = UNSET + jira_issue_url: None | str | Unset = UNSET + github_issue_id: None | str | Unset = UNSET + github_issue_url: None | str | Unset = UNSET + gitlab_issue_id: None | str | Unset = UNSET + gitlab_issue_url: None | str | Unset = UNSET + asana_task_id: None | str | Unset = UNSET + asana_task_url: None | str | Unset = UNSET + linear_issue_id: None | str | Unset = UNSET + linear_issue_url: None | str | Unset = UNSET + trello_card_id: None | str | Unset = UNSET + trello_card_url: None | str | Unset = UNSET + zendesk_ticket_id: None | str | Unset = UNSET + zendesk_ticket_url: None | str | Unset = UNSET + pagerduty_incident_id: None | str | Unset = UNSET + pagerduty_incident_number: None | str | Unset = UNSET + pagerduty_incident_url: None | str | Unset = UNSET + opsgenie_incident_id: None | str | Unset = UNSET + opsgenie_incident_url: None | str | Unset = UNSET + opsgenie_alert_id: None | str | Unset = UNSET + opsgenie_alert_url: None | str | Unset = UNSET + service_now_incident_id: None | str | Unset = UNSET + service_now_incident_key: None | str | Unset = UNSET + service_now_incident_url: None | str | Unset = UNSET + mattermost_channel_id: None | str | Unset = UNSET + mattermost_channel_name: None | str | Unset = UNSET + mattermost_channel_url: None | str | Unset = UNSET + confluence_page_id: None | str | Unset = UNSET + confluence_page_url: None | str | Unset = UNSET + datadog_notebook_id: None | str | Unset = UNSET + datadog_notebook_url: None | str | Unset = UNSET + shortcut_story_id: None | str | Unset = UNSET + shortcut_story_url: None | str | Unset = UNSET + shortcut_task_id: None | str | Unset = UNSET + shortcut_task_url: None | str | Unset = UNSET + motion_task_id: None | str | Unset = UNSET + motion_task_url: None | str | Unset = UNSET + clickup_task_id: None | str | Unset = UNSET + clickup_task_url: None | str | Unset = UNSET + victor_ops_incident_id: None | str | Unset = UNSET + victor_ops_incident_url: None | str | Unset = UNSET + quip_page_id: None | str | Unset = UNSET + quip_page_url: None | str | Unset = UNSET + sharepoint_page_id: None | str | Unset = UNSET + sharepoint_page_url: None | str | Unset = UNSET + airtable_base_key: None | str | Unset = UNSET + airtable_table_name: None | str | Unset = UNSET + airtable_record_id: None | str | Unset = UNSET + airtable_record_url: None | str | Unset = UNSET + freshservice_ticket_id: None | str | Unset = UNSET + freshservice_ticket_url: None | str | Unset = UNSET + freshservice_task_id: None | str | Unset = UNSET + freshservice_task_url: None | str | Unset = UNSET + mitigation_message: None | str | Unset = UNSET + resolution_message: None | str | Unset = UNSET + cancellation_message: None | str | Unset = UNSET + scheduled_for: None | str | Unset = UNSET + scheduled_until: None | str | Unset = UNSET + muted_service_ids: list[str] | None | Unset = UNSET + retrospective_progress_status: IncidentRetrospectiveProgressStatus | Unset = UNSET + in_triage_by: IncidentInTriageByType0 | None | Unset = UNSET + started_by: IncidentStartedByType0 | None | Unset = UNSET + mitigated_by: IncidentMitigatedByType0 | None | Unset = UNSET + resolved_by: IncidentResolvedByType0 | None | Unset = UNSET + closed_by: IncidentClosedByType0 | None | Unset = UNSET + cancelled_by: IncidentCancelledByType0 | None | Unset = UNSET + in_triage_at: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + detected_at: None | str | Unset = UNSET + acknowledged_at: None | str | Unset = UNSET + mitigated_at: None | str | Unset = UNSET + resolved_at: None | str | Unset = UNSET + closed_at: None | str | Unset = UNSET + cancelled_at: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -301,19 +307,19 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - parent_incident_id: None | Unset | str + parent_incident_id: None | str | Unset if isinstance(self.parent_incident_id, Unset): parent_incident_id = UNSET else: parent_incident_id = self.parent_incident_id - duplicate_incident_id: None | Unset | str + duplicate_incident_id: None | str | Unset if isinstance(self.duplicate_incident_id, Unset): duplicate_incident_id = UNSET else: duplicate_incident_id = self.duplicate_incident_id - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: @@ -321,37 +327,37 @@ def to_dict(self) -> dict[str, Any]: private = self.private - source: None | Unset | str + source: None | str | Unset if isinstance(self.source, Unset): source = UNSET else: source = self.source - status: None | Unset | str + status: None | str | Unset if isinstance(self.status, Unset): status = UNSET else: status = self.status - url: None | Unset | str + url: None | str | Unset if isinstance(self.url, Unset): url = UNSET else: url = self.url - short_url: None | Unset | str + short_url: None | str | Unset if isinstance(self.short_url, Unset): short_url = UNSET else: short_url = self.short_url - public_title: None | Unset | str + public_title: None | str | Unset if isinstance(self.public_title, Unset): public_title = UNSET else: public_title = self.public_title - user: None | Unset | dict[str, Any] + user: dict[str, Any] | None | Unset if isinstance(self.user, Unset): user = UNSET elif isinstance(self.user, IncidentUserType0): @@ -359,11 +365,11 @@ def to_dict(self) -> dict[str, Any]: else: user = self.user - severity: Unset | dict[str, Any] = UNSET + severity: dict[str, Any] | Unset = UNSET if not isinstance(self.severity, Unset): severity = self.severity.to_dict() - environments: None | Unset | list[dict[str, Any]] + environments: list[dict[str, Any]] | None | Unset if isinstance(self.environments, Unset): environments = UNSET elif isinstance(self.environments, list): @@ -375,7 +381,7 @@ def to_dict(self) -> dict[str, Any]: else: environments = self.environments - incident_types: None | Unset | list[dict[str, Any]] + incident_types: list[dict[str, Any]] | None | Unset if isinstance(self.incident_types, Unset): incident_types = UNSET elif isinstance(self.incident_types, list): @@ -387,7 +393,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_types = self.incident_types - services: None | Unset | list[dict[str, Any]] + services: list[dict[str, Any]] | None | Unset if isinstance(self.services, Unset): services = UNSET elif isinstance(self.services, list): @@ -399,7 +405,7 @@ def to_dict(self) -> dict[str, Any]: else: services = self.services - functionalities: None | Unset | list[dict[str, Any]] + functionalities: list[dict[str, Any]] | None | Unset if isinstance(self.functionalities, Unset): functionalities = UNSET elif isinstance(self.functionalities, list): @@ -411,7 +417,7 @@ def to_dict(self) -> dict[str, Any]: else: functionalities = self.functionalities - groups: None | Unset | list[dict[str, Any]] + groups: list[dict[str, Any]] | None | Unset if isinstance(self.groups, Unset): groups = UNSET elif isinstance(self.groups, list): @@ -423,7 +429,7 @@ def to_dict(self) -> dict[str, Any]: else: groups = self.groups - labels: None | Unset | dict[str, Any] + labels: dict[str, Any] | None | Unset if isinstance(self.labels, Unset): labels = UNSET elif isinstance(self.labels, IncidentLabelsType0): @@ -431,478 +437,483 @@ def to_dict(self) -> dict[str, Any]: else: labels = self.labels - slack_channel_id: None | Unset | str + slack_channel_id: None | str | Unset if isinstance(self.slack_channel_id, Unset): slack_channel_id = UNSET else: slack_channel_id = self.slack_channel_id - slack_channel_name: None | Unset | str + slack_channel_name: None | str | Unset if isinstance(self.slack_channel_name, Unset): slack_channel_name = UNSET else: slack_channel_name = self.slack_channel_name - slack_channel_url: None | Unset | str + slack_channel_url: None | str | Unset if isinstance(self.slack_channel_url, Unset): slack_channel_url = UNSET else: slack_channel_url = self.slack_channel_url - slack_channel_short_url: None | Unset | str + slack_channel_short_url: None | str | Unset if isinstance(self.slack_channel_short_url, Unset): slack_channel_short_url = UNSET else: slack_channel_short_url = self.slack_channel_short_url - slack_channel_deep_link: None | Unset | str + slack_channel_deep_link: None | str | Unset if isinstance(self.slack_channel_deep_link, Unset): slack_channel_deep_link = UNSET else: slack_channel_deep_link = self.slack_channel_deep_link - slack_channel_archived: None | Unset | bool + slack_channel_archived: bool | None | Unset if isinstance(self.slack_channel_archived, Unset): slack_channel_archived = UNSET else: slack_channel_archived = self.slack_channel_archived - slack_last_message_ts: None | Unset | str + slack_last_message_ts: None | str | Unset if isinstance(self.slack_last_message_ts, Unset): slack_last_message_ts = UNSET else: slack_last_message_ts = self.slack_last_message_ts - zoom_meeting_id: None | Unset | str + zoom_meeting_id: None | str | Unset if isinstance(self.zoom_meeting_id, Unset): zoom_meeting_id = UNSET else: zoom_meeting_id = self.zoom_meeting_id - zoom_meeting_start_url: None | Unset | str + zoom_meeting_start_url: None | str | Unset if isinstance(self.zoom_meeting_start_url, Unset): zoom_meeting_start_url = UNSET else: zoom_meeting_start_url = self.zoom_meeting_start_url - zoom_meeting_join_url: None | Unset | str + zoom_meeting_join_url: None | str | Unset if isinstance(self.zoom_meeting_join_url, Unset): zoom_meeting_join_url = UNSET else: zoom_meeting_join_url = self.zoom_meeting_join_url - zoom_meeting_password: None | Unset | str + zoom_meeting_password: None | str | Unset if isinstance(self.zoom_meeting_password, Unset): zoom_meeting_password = UNSET else: zoom_meeting_password = self.zoom_meeting_password - zoom_meeting_pstn_password: None | Unset | str + zoom_meeting_pstn_password: None | str | Unset if isinstance(self.zoom_meeting_pstn_password, Unset): zoom_meeting_pstn_password = UNSET else: zoom_meeting_pstn_password = self.zoom_meeting_pstn_password - zoom_meeting_h323_password: None | Unset | str + zoom_meeting_h323_password: None | str | Unset if isinstance(self.zoom_meeting_h323_password, Unset): zoom_meeting_h323_password = UNSET else: zoom_meeting_h323_password = self.zoom_meeting_h323_password - zoom_meeting_global_dial_in_numbers: None | Unset | list[str] + zoom_meeting_global_dial_in_numbers: list[dict[str, Any]] | None | Unset if isinstance(self.zoom_meeting_global_dial_in_numbers, Unset): zoom_meeting_global_dial_in_numbers = UNSET elif isinstance(self.zoom_meeting_global_dial_in_numbers, list): - zoom_meeting_global_dial_in_numbers = self.zoom_meeting_global_dial_in_numbers + zoom_meeting_global_dial_in_numbers = [] + for zoom_meeting_global_dial_in_numbers_type_0_item_data in self.zoom_meeting_global_dial_in_numbers: + zoom_meeting_global_dial_in_numbers_type_0_item = ( + zoom_meeting_global_dial_in_numbers_type_0_item_data.to_dict() + ) + zoom_meeting_global_dial_in_numbers.append(zoom_meeting_global_dial_in_numbers_type_0_item) else: zoom_meeting_global_dial_in_numbers = self.zoom_meeting_global_dial_in_numbers - google_drive_id: None | Unset | str + google_drive_id: None | str | Unset if isinstance(self.google_drive_id, Unset): google_drive_id = UNSET else: google_drive_id = self.google_drive_id - google_drive_parent_id: None | Unset | str + google_drive_parent_id: None | str | Unset if isinstance(self.google_drive_parent_id, Unset): google_drive_parent_id = UNSET else: google_drive_parent_id = self.google_drive_parent_id - google_drive_url: None | Unset | str + google_drive_url: None | str | Unset if isinstance(self.google_drive_url, Unset): google_drive_url = UNSET else: google_drive_url = self.google_drive_url - google_meeting_id: None | Unset | str + google_meeting_id: None | str | Unset if isinstance(self.google_meeting_id, Unset): google_meeting_id = UNSET else: google_meeting_id = self.google_meeting_id - google_meeting_url: None | Unset | str + google_meeting_url: None | str | Unset if isinstance(self.google_meeting_url, Unset): google_meeting_url = UNSET else: google_meeting_url = self.google_meeting_url - jira_issue_key: None | Unset | str + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET else: jira_issue_key = self.jira_issue_key - jira_issue_id: None | Unset | str + jira_issue_id: None | str | Unset if isinstance(self.jira_issue_id, Unset): jira_issue_id = UNSET else: jira_issue_id = self.jira_issue_id - jira_issue_url: None | Unset | str + jira_issue_url: None | str | Unset if isinstance(self.jira_issue_url, Unset): jira_issue_url = UNSET else: jira_issue_url = self.jira_issue_url - github_issue_id: None | Unset | str + github_issue_id: None | str | Unset if isinstance(self.github_issue_id, Unset): github_issue_id = UNSET else: github_issue_id = self.github_issue_id - github_issue_url: None | Unset | str + github_issue_url: None | str | Unset if isinstance(self.github_issue_url, Unset): github_issue_url = UNSET else: github_issue_url = self.github_issue_url - gitlab_issue_id: None | Unset | str + gitlab_issue_id: None | str | Unset if isinstance(self.gitlab_issue_id, Unset): gitlab_issue_id = UNSET else: gitlab_issue_id = self.gitlab_issue_id - gitlab_issue_url: None | Unset | str + gitlab_issue_url: None | str | Unset if isinstance(self.gitlab_issue_url, Unset): gitlab_issue_url = UNSET else: gitlab_issue_url = self.gitlab_issue_url - asana_task_id: None | Unset | str + asana_task_id: None | str | Unset if isinstance(self.asana_task_id, Unset): asana_task_id = UNSET else: asana_task_id = self.asana_task_id - asana_task_url: None | Unset | str + asana_task_url: None | str | Unset if isinstance(self.asana_task_url, Unset): asana_task_url = UNSET else: asana_task_url = self.asana_task_url - linear_issue_id: None | Unset | str + linear_issue_id: None | str | Unset if isinstance(self.linear_issue_id, Unset): linear_issue_id = UNSET else: linear_issue_id = self.linear_issue_id - linear_issue_url: None | Unset | str + linear_issue_url: None | str | Unset if isinstance(self.linear_issue_url, Unset): linear_issue_url = UNSET else: linear_issue_url = self.linear_issue_url - trello_card_id: None | Unset | str + trello_card_id: None | str | Unset if isinstance(self.trello_card_id, Unset): trello_card_id = UNSET else: trello_card_id = self.trello_card_id - trello_card_url: None | Unset | str + trello_card_url: None | str | Unset if isinstance(self.trello_card_url, Unset): trello_card_url = UNSET else: trello_card_url = self.trello_card_url - zendesk_ticket_id: None | Unset | str + zendesk_ticket_id: None | str | Unset if isinstance(self.zendesk_ticket_id, Unset): zendesk_ticket_id = UNSET else: zendesk_ticket_id = self.zendesk_ticket_id - zendesk_ticket_url: None | Unset | str + zendesk_ticket_url: None | str | Unset if isinstance(self.zendesk_ticket_url, Unset): zendesk_ticket_url = UNSET else: zendesk_ticket_url = self.zendesk_ticket_url - pagerduty_incident_id: None | Unset | str + pagerduty_incident_id: None | str | Unset if isinstance(self.pagerduty_incident_id, Unset): pagerduty_incident_id = UNSET else: pagerduty_incident_id = self.pagerduty_incident_id - pagerduty_incident_number: None | Unset | str + pagerduty_incident_number: None | str | Unset if isinstance(self.pagerduty_incident_number, Unset): pagerduty_incident_number = UNSET else: pagerduty_incident_number = self.pagerduty_incident_number - pagerduty_incident_url: None | Unset | str + pagerduty_incident_url: None | str | Unset if isinstance(self.pagerduty_incident_url, Unset): pagerduty_incident_url = UNSET else: pagerduty_incident_url = self.pagerduty_incident_url - opsgenie_incident_id: None | Unset | str + opsgenie_incident_id: None | str | Unset if isinstance(self.opsgenie_incident_id, Unset): opsgenie_incident_id = UNSET else: opsgenie_incident_id = self.opsgenie_incident_id - opsgenie_incident_url: None | Unset | str + opsgenie_incident_url: None | str | Unset if isinstance(self.opsgenie_incident_url, Unset): opsgenie_incident_url = UNSET else: opsgenie_incident_url = self.opsgenie_incident_url - opsgenie_alert_id: None | Unset | str + opsgenie_alert_id: None | str | Unset if isinstance(self.opsgenie_alert_id, Unset): opsgenie_alert_id = UNSET else: opsgenie_alert_id = self.opsgenie_alert_id - opsgenie_alert_url: None | Unset | str + opsgenie_alert_url: None | str | Unset if isinstance(self.opsgenie_alert_url, Unset): opsgenie_alert_url = UNSET else: opsgenie_alert_url = self.opsgenie_alert_url - service_now_incident_id: None | Unset | str + service_now_incident_id: None | str | Unset if isinstance(self.service_now_incident_id, Unset): service_now_incident_id = UNSET else: service_now_incident_id = self.service_now_incident_id - service_now_incident_key: None | Unset | str + service_now_incident_key: None | str | Unset if isinstance(self.service_now_incident_key, Unset): service_now_incident_key = UNSET else: service_now_incident_key = self.service_now_incident_key - service_now_incident_url: None | Unset | str + service_now_incident_url: None | str | Unset if isinstance(self.service_now_incident_url, Unset): service_now_incident_url = UNSET else: service_now_incident_url = self.service_now_incident_url - mattermost_channel_id: None | Unset | str + mattermost_channel_id: None | str | Unset if isinstance(self.mattermost_channel_id, Unset): mattermost_channel_id = UNSET else: mattermost_channel_id = self.mattermost_channel_id - mattermost_channel_name: None | Unset | str + mattermost_channel_name: None | str | Unset if isinstance(self.mattermost_channel_name, Unset): mattermost_channel_name = UNSET else: mattermost_channel_name = self.mattermost_channel_name - mattermost_channel_url: None | Unset | str + mattermost_channel_url: None | str | Unset if isinstance(self.mattermost_channel_url, Unset): mattermost_channel_url = UNSET else: mattermost_channel_url = self.mattermost_channel_url - confluence_page_id: None | Unset | str + confluence_page_id: None | str | Unset if isinstance(self.confluence_page_id, Unset): confluence_page_id = UNSET else: confluence_page_id = self.confluence_page_id - confluence_page_url: None | Unset | str + confluence_page_url: None | str | Unset if isinstance(self.confluence_page_url, Unset): confluence_page_url = UNSET else: confluence_page_url = self.confluence_page_url - datadog_notebook_id: None | Unset | str + datadog_notebook_id: None | str | Unset if isinstance(self.datadog_notebook_id, Unset): datadog_notebook_id = UNSET else: datadog_notebook_id = self.datadog_notebook_id - datadog_notebook_url: None | Unset | str + datadog_notebook_url: None | str | Unset if isinstance(self.datadog_notebook_url, Unset): datadog_notebook_url = UNSET else: datadog_notebook_url = self.datadog_notebook_url - shortcut_story_id: None | Unset | str + shortcut_story_id: None | str | Unset if isinstance(self.shortcut_story_id, Unset): shortcut_story_id = UNSET else: shortcut_story_id = self.shortcut_story_id - shortcut_story_url: None | Unset | str + shortcut_story_url: None | str | Unset if isinstance(self.shortcut_story_url, Unset): shortcut_story_url = UNSET else: shortcut_story_url = self.shortcut_story_url - shortcut_task_id: None | Unset | str + shortcut_task_id: None | str | Unset if isinstance(self.shortcut_task_id, Unset): shortcut_task_id = UNSET else: shortcut_task_id = self.shortcut_task_id - shortcut_task_url: None | Unset | str + shortcut_task_url: None | str | Unset if isinstance(self.shortcut_task_url, Unset): shortcut_task_url = UNSET else: shortcut_task_url = self.shortcut_task_url - motion_task_id: None | Unset | str + motion_task_id: None | str | Unset if isinstance(self.motion_task_id, Unset): motion_task_id = UNSET else: motion_task_id = self.motion_task_id - motion_task_url: None | Unset | str + motion_task_url: None | str | Unset if isinstance(self.motion_task_url, Unset): motion_task_url = UNSET else: motion_task_url = self.motion_task_url - clickup_task_id: None | Unset | str + clickup_task_id: None | str | Unset if isinstance(self.clickup_task_id, Unset): clickup_task_id = UNSET else: clickup_task_id = self.clickup_task_id - clickup_task_url: None | Unset | str + clickup_task_url: None | str | Unset if isinstance(self.clickup_task_url, Unset): clickup_task_url = UNSET else: clickup_task_url = self.clickup_task_url - victor_ops_incident_id: None | Unset | str + victor_ops_incident_id: None | str | Unset if isinstance(self.victor_ops_incident_id, Unset): victor_ops_incident_id = UNSET else: victor_ops_incident_id = self.victor_ops_incident_id - victor_ops_incident_url: None | Unset | str + victor_ops_incident_url: None | str | Unset if isinstance(self.victor_ops_incident_url, Unset): victor_ops_incident_url = UNSET else: victor_ops_incident_url = self.victor_ops_incident_url - quip_page_id: None | Unset | str + quip_page_id: None | str | Unset if isinstance(self.quip_page_id, Unset): quip_page_id = UNSET else: quip_page_id = self.quip_page_id - quip_page_url: None | Unset | str + quip_page_url: None | str | Unset if isinstance(self.quip_page_url, Unset): quip_page_url = UNSET else: quip_page_url = self.quip_page_url - sharepoint_page_id: None | Unset | str + sharepoint_page_id: None | str | Unset if isinstance(self.sharepoint_page_id, Unset): sharepoint_page_id = UNSET else: sharepoint_page_id = self.sharepoint_page_id - sharepoint_page_url: None | Unset | str + sharepoint_page_url: None | str | Unset if isinstance(self.sharepoint_page_url, Unset): sharepoint_page_url = UNSET else: sharepoint_page_url = self.sharepoint_page_url - airtable_base_key: None | Unset | str + airtable_base_key: None | str | Unset if isinstance(self.airtable_base_key, Unset): airtable_base_key = UNSET else: airtable_base_key = self.airtable_base_key - airtable_table_name: None | Unset | str + airtable_table_name: None | str | Unset if isinstance(self.airtable_table_name, Unset): airtable_table_name = UNSET else: airtable_table_name = self.airtable_table_name - airtable_record_id: None | Unset | str + airtable_record_id: None | str | Unset if isinstance(self.airtable_record_id, Unset): airtable_record_id = UNSET else: airtable_record_id = self.airtable_record_id - airtable_record_url: None | Unset | str + airtable_record_url: None | str | Unset if isinstance(self.airtable_record_url, Unset): airtable_record_url = UNSET else: airtable_record_url = self.airtable_record_url - freshservice_ticket_id: None | Unset | str + freshservice_ticket_id: None | str | Unset if isinstance(self.freshservice_ticket_id, Unset): freshservice_ticket_id = UNSET else: freshservice_ticket_id = self.freshservice_ticket_id - freshservice_ticket_url: None | Unset | str + freshservice_ticket_url: None | str | Unset if isinstance(self.freshservice_ticket_url, Unset): freshservice_ticket_url = UNSET else: freshservice_ticket_url = self.freshservice_ticket_url - freshservice_task_id: None | Unset | str + freshservice_task_id: None | str | Unset if isinstance(self.freshservice_task_id, Unset): freshservice_task_id = UNSET else: freshservice_task_id = self.freshservice_task_id - freshservice_task_url: None | Unset | str + freshservice_task_url: None | str | Unset if isinstance(self.freshservice_task_url, Unset): freshservice_task_url = UNSET else: freshservice_task_url = self.freshservice_task_url - mitigation_message: None | Unset | str + mitigation_message: None | str | Unset if isinstance(self.mitigation_message, Unset): mitigation_message = UNSET else: mitigation_message = self.mitigation_message - resolution_message: None | Unset | str + resolution_message: None | str | Unset if isinstance(self.resolution_message, Unset): resolution_message = UNSET else: resolution_message = self.resolution_message - cancellation_message: None | Unset | str + cancellation_message: None | str | Unset if isinstance(self.cancellation_message, Unset): cancellation_message = UNSET else: cancellation_message = self.cancellation_message - scheduled_for: None | Unset | str + scheduled_for: None | str | Unset if isinstance(self.scheduled_for, Unset): scheduled_for = UNSET else: scheduled_for = self.scheduled_for - scheduled_until: None | Unset | str + scheduled_until: None | str | Unset if isinstance(self.scheduled_until, Unset): scheduled_until = UNSET else: scheduled_until = self.scheduled_until - muted_service_ids: None | Unset | list[str] + muted_service_ids: list[str] | None | Unset if isinstance(self.muted_service_ids, Unset): muted_service_ids = UNSET elif isinstance(self.muted_service_ids, list): @@ -911,11 +922,11 @@ def to_dict(self) -> dict[str, Any]: else: muted_service_ids = self.muted_service_ids - retrospective_progress_status: Unset | str = UNSET + retrospective_progress_status: str | Unset = UNSET if not isinstance(self.retrospective_progress_status, Unset): retrospective_progress_status = self.retrospective_progress_status - in_triage_by: None | Unset | dict[str, Any] + in_triage_by: dict[str, Any] | None | Unset if isinstance(self.in_triage_by, Unset): in_triage_by = UNSET elif isinstance(self.in_triage_by, IncidentInTriageByType0): @@ -923,7 +934,7 @@ def to_dict(self) -> dict[str, Any]: else: in_triage_by = self.in_triage_by - started_by: None | Unset | dict[str, Any] + started_by: dict[str, Any] | None | Unset if isinstance(self.started_by, Unset): started_by = UNSET elif isinstance(self.started_by, IncidentStartedByType0): @@ -931,7 +942,7 @@ def to_dict(self) -> dict[str, Any]: else: started_by = self.started_by - mitigated_by: None | Unset | dict[str, Any] + mitigated_by: dict[str, Any] | None | Unset if isinstance(self.mitigated_by, Unset): mitigated_by = UNSET elif isinstance(self.mitigated_by, IncidentMitigatedByType0): @@ -939,7 +950,7 @@ def to_dict(self) -> dict[str, Any]: else: mitigated_by = self.mitigated_by - resolved_by: None | Unset | dict[str, Any] + resolved_by: dict[str, Any] | None | Unset if isinstance(self.resolved_by, Unset): resolved_by = UNSET elif isinstance(self.resolved_by, IncidentResolvedByType0): @@ -947,7 +958,7 @@ def to_dict(self) -> dict[str, Any]: else: resolved_by = self.resolved_by - closed_by: None | Unset | dict[str, Any] + closed_by: dict[str, Any] | None | Unset if isinstance(self.closed_by, Unset): closed_by = UNSET elif isinstance(self.closed_by, IncidentClosedByType0): @@ -955,7 +966,7 @@ def to_dict(self) -> dict[str, Any]: else: closed_by = self.closed_by - cancelled_by: None | Unset | dict[str, Any] + cancelled_by: dict[str, Any] | None | Unset if isinstance(self.cancelled_by, Unset): cancelled_by = UNSET elif isinstance(self.cancelled_by, IncidentCancelledByType0): @@ -963,49 +974,49 @@ def to_dict(self) -> dict[str, Any]: else: cancelled_by = self.cancelled_by - in_triage_at: None | Unset | str + in_triage_at: None | str | Unset if isinstance(self.in_triage_at, Unset): in_triage_at = UNSET else: in_triage_at = self.in_triage_at - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - detected_at: None | Unset | str + detected_at: None | str | Unset if isinstance(self.detected_at, Unset): detected_at = UNSET else: detected_at = self.detected_at - acknowledged_at: None | Unset | str + acknowledged_at: None | str | Unset if isinstance(self.acknowledged_at, Unset): acknowledged_at = UNSET else: acknowledged_at = self.acknowledged_at - mitigated_at: None | Unset | str + mitigated_at: None | str | Unset if isinstance(self.mitigated_at, Unset): mitigated_at = UNSET else: mitigated_at = self.mitigated_at - resolved_at: None | Unset | str + resolved_at: None | str | Unset if isinstance(self.resolved_at, Unset): resolved_at = UNSET else: resolved_at = self.resolved_at - closed_at: None | Unset | str + closed_at: None | str | Unset if isinstance(self.closed_at, Unset): closed_at = UNSET else: closed_at = self.closed_at - cancelled_at: None | Unset | str + cancelled_at: None | str | Unset if isinstance(self.cancelled_at, Unset): cancelled_at = UNSET else: @@ -1266,6 +1277,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_started_by_type_0 import IncidentStartedByType0 from ..models.incident_type_response import IncidentTypeResponse from ..models.incident_user_type_0 import IncidentUserType0 + from ..models.incident_zoom_meeting_global_dial_in_numbers_type_0_item import ( + IncidentZoomMeetingGlobalDialInNumbersType0Item, + ) from ..models.service_response import ServiceResponse from ..models.severity_response import SeverityResponse from ..models.team_response import TeamResponse @@ -1285,81 +1299,81 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_parent_incident_id(data: object) -> None | Unset | str: + def _parse_parent_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) parent_incident_id = _parse_parent_incident_id(d.pop("parent_incident_id", UNSET)) - def _parse_duplicate_incident_id(data: object) -> None | Unset | str: + def _parse_duplicate_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) duplicate_incident_id = _parse_duplicate_incident_id(d.pop("duplicate_incident_id", UNSET)) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) private = d.pop("private", UNSET) - def _parse_source(data: object) -> None | Unset | str: + def _parse_source(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) source = _parse_source(d.pop("source", UNSET)) - def _parse_status(data: object) -> None | Unset | str: + def _parse_status(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) status = _parse_status(d.pop("status", UNSET)) - def _parse_url(data: object) -> None | Unset | str: + def _parse_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) url = _parse_url(d.pop("url", UNSET)) - def _parse_short_url(data: object) -> None | Unset | str: + def _parse_short_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) short_url = _parse_short_url(d.pop("short_url", UNSET)) - def _parse_public_title(data: object) -> None | Unset | str: + def _parse_public_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_title = _parse_public_title(d.pop("public_title", UNSET)) - def _parse_user(data: object) -> Union["IncidentUserType0", None, Unset]: + def _parse_user(data: object) -> IncidentUserType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1370,20 +1384,20 @@ def _parse_user(data: object) -> Union["IncidentUserType0", None, Unset]: user_type_0 = IncidentUserType0.from_dict(data) return user_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentUserType0", None, Unset], data) + return cast(IncidentUserType0 | None | Unset, data) user = _parse_user(d.pop("user", UNSET)) _severity = d.pop("severity", UNSET) - severity: Unset | SeverityResponse + severity: SeverityResponse | Unset if isinstance(_severity, Unset): severity = UNSET else: severity = SeverityResponse.from_dict(_severity) - def _parse_environments(data: object) -> None | Unset | list["EnvironmentResponse"]: + def _parse_environments(data: object) -> list[EnvironmentResponse] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1399,13 +1413,13 @@ def _parse_environments(data: object) -> None | Unset | list["EnvironmentRespons environments_type_0.append(environments_type_0_item) return environments_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["EnvironmentResponse"], data) + return cast(list[EnvironmentResponse] | None | Unset, data) environments = _parse_environments(d.pop("environments", UNSET)) - def _parse_incident_types(data: object) -> None | Unset | list["IncidentTypeResponse"]: + def _parse_incident_types(data: object) -> list[IncidentTypeResponse] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1421,13 +1435,13 @@ def _parse_incident_types(data: object) -> None | Unset | list["IncidentTypeResp incident_types_type_0.append(incident_types_type_0_item) return incident_types_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["IncidentTypeResponse"], data) + return cast(list[IncidentTypeResponse] | None | Unset, data) incident_types = _parse_incident_types(d.pop("incident_types", UNSET)) - def _parse_services(data: object) -> None | Unset | list["ServiceResponse"]: + def _parse_services(data: object) -> list[ServiceResponse] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1443,13 +1457,13 @@ def _parse_services(data: object) -> None | Unset | list["ServiceResponse"]: services_type_0.append(services_type_0_item) return services_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["ServiceResponse"], data) + return cast(list[ServiceResponse] | None | Unset, data) services = _parse_services(d.pop("services", UNSET)) - def _parse_functionalities(data: object) -> None | Unset | list["FunctionalityResponse"]: + def _parse_functionalities(data: object) -> list[FunctionalityResponse] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1465,13 +1479,13 @@ def _parse_functionalities(data: object) -> None | Unset | list["FunctionalityRe functionalities_type_0.append(functionalities_type_0_item) return functionalities_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["FunctionalityResponse"], data) + return cast(list[FunctionalityResponse] | None | Unset, data) functionalities = _parse_functionalities(d.pop("functionalities", UNSET)) - def _parse_groups(data: object) -> None | Unset | list["TeamResponse"]: + def _parse_groups(data: object) -> list[TeamResponse] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1487,13 +1501,13 @@ def _parse_groups(data: object) -> None | Unset | list["TeamResponse"]: groups_type_0.append(groups_type_0_item) return groups_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["TeamResponse"], data) + return cast(list[TeamResponse] | None | Unset, data) groups = _parse_groups(d.pop("groups", UNSET)) - def _parse_labels(data: object) -> Union["IncidentLabelsType0", None, Unset]: + def _parse_labels(data: object) -> IncidentLabelsType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1504,130 +1518,132 @@ def _parse_labels(data: object) -> Union["IncidentLabelsType0", None, Unset]: labels_type_0 = IncidentLabelsType0.from_dict(data) return labels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentLabelsType0", None, Unset], data) + return cast(IncidentLabelsType0 | None | Unset, data) labels = _parse_labels(d.pop("labels", UNSET)) - def _parse_slack_channel_id(data: object) -> None | Unset | str: + def _parse_slack_channel_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_id = _parse_slack_channel_id(d.pop("slack_channel_id", UNSET)) - def _parse_slack_channel_name(data: object) -> None | Unset | str: + def _parse_slack_channel_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_name = _parse_slack_channel_name(d.pop("slack_channel_name", UNSET)) - def _parse_slack_channel_url(data: object) -> None | Unset | str: + def _parse_slack_channel_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_url = _parse_slack_channel_url(d.pop("slack_channel_url", UNSET)) - def _parse_slack_channel_short_url(data: object) -> None | Unset | str: + def _parse_slack_channel_short_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_short_url = _parse_slack_channel_short_url(d.pop("slack_channel_short_url", UNSET)) - def _parse_slack_channel_deep_link(data: object) -> None | Unset | str: + def _parse_slack_channel_deep_link(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_deep_link = _parse_slack_channel_deep_link(d.pop("slack_channel_deep_link", UNSET)) - def _parse_slack_channel_archived(data: object) -> None | Unset | bool: + def _parse_slack_channel_archived(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) slack_channel_archived = _parse_slack_channel_archived(d.pop("slack_channel_archived", UNSET)) - def _parse_slack_last_message_ts(data: object) -> None | Unset | str: + def _parse_slack_last_message_ts(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_last_message_ts = _parse_slack_last_message_ts(d.pop("slack_last_message_ts", UNSET)) - def _parse_zoom_meeting_id(data: object) -> None | Unset | str: + def _parse_zoom_meeting_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zoom_meeting_id = _parse_zoom_meeting_id(d.pop("zoom_meeting_id", UNSET)) - def _parse_zoom_meeting_start_url(data: object) -> None | Unset | str: + def _parse_zoom_meeting_start_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zoom_meeting_start_url = _parse_zoom_meeting_start_url(d.pop("zoom_meeting_start_url", UNSET)) - def _parse_zoom_meeting_join_url(data: object) -> None | Unset | str: + def _parse_zoom_meeting_join_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zoom_meeting_join_url = _parse_zoom_meeting_join_url(d.pop("zoom_meeting_join_url", UNSET)) - def _parse_zoom_meeting_password(data: object) -> None | Unset | str: + def _parse_zoom_meeting_password(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zoom_meeting_password = _parse_zoom_meeting_password(d.pop("zoom_meeting_password", UNSET)) - def _parse_zoom_meeting_pstn_password(data: object) -> None | Unset | str: + def _parse_zoom_meeting_pstn_password(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zoom_meeting_pstn_password = _parse_zoom_meeting_pstn_password(d.pop("zoom_meeting_pstn_password", UNSET)) - def _parse_zoom_meeting_h323_password(data: object) -> None | Unset | str: + def _parse_zoom_meeting_h323_password(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zoom_meeting_h323_password = _parse_zoom_meeting_h323_password(d.pop("zoom_meeting_h323_password", UNSET)) - def _parse_zoom_meeting_global_dial_in_numbers(data: object) -> None | Unset | list[str]: + def _parse_zoom_meeting_global_dial_in_numbers( + data: object, + ) -> list[IncidentZoomMeetingGlobalDialInNumbersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -1635,594 +1651,603 @@ def _parse_zoom_meeting_global_dial_in_numbers(data: object) -> None | Unset | l try: if not isinstance(data, list): raise TypeError() - zoom_meeting_global_dial_in_numbers_type_0 = cast(list[str], data) + zoom_meeting_global_dial_in_numbers_type_0 = [] + _zoom_meeting_global_dial_in_numbers_type_0 = data + for zoom_meeting_global_dial_in_numbers_type_0_item_data in _zoom_meeting_global_dial_in_numbers_type_0: + zoom_meeting_global_dial_in_numbers_type_0_item = ( + IncidentZoomMeetingGlobalDialInNumbersType0Item.from_dict( + zoom_meeting_global_dial_in_numbers_type_0_item_data + ) + ) + + zoom_meeting_global_dial_in_numbers_type_0.append(zoom_meeting_global_dial_in_numbers_type_0_item) return zoom_meeting_global_dial_in_numbers_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[IncidentZoomMeetingGlobalDialInNumbersType0Item] | None | Unset, data) zoom_meeting_global_dial_in_numbers = _parse_zoom_meeting_global_dial_in_numbers( d.pop("zoom_meeting_global_dial_in_numbers", UNSET) ) - def _parse_google_drive_id(data: object) -> None | Unset | str: + def _parse_google_drive_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_id = _parse_google_drive_id(d.pop("google_drive_id", UNSET)) - def _parse_google_drive_parent_id(data: object) -> None | Unset | str: + def _parse_google_drive_parent_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_parent_id = _parse_google_drive_parent_id(d.pop("google_drive_parent_id", UNSET)) - def _parse_google_drive_url(data: object) -> None | Unset | str: + def _parse_google_drive_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_url = _parse_google_drive_url(d.pop("google_drive_url", UNSET)) - def _parse_google_meeting_id(data: object) -> None | Unset | str: + def _parse_google_meeting_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_meeting_id = _parse_google_meeting_id(d.pop("google_meeting_id", UNSET)) - def _parse_google_meeting_url(data: object) -> None | Unset | str: + def _parse_google_meeting_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_meeting_url = _parse_google_meeting_url(d.pop("google_meeting_url", UNSET)) - def _parse_jira_issue_key(data: object) -> None | Unset | str: + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_key = _parse_jira_issue_key(d.pop("jira_issue_key", UNSET)) - def _parse_jira_issue_id(data: object) -> None | Unset | str: + def _parse_jira_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_id = _parse_jira_issue_id(d.pop("jira_issue_id", UNSET)) - def _parse_jira_issue_url(data: object) -> None | Unset | str: + def _parse_jira_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) - def _parse_github_issue_id(data: object) -> None | Unset | str: + def _parse_github_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_issue_id = _parse_github_issue_id(d.pop("github_issue_id", UNSET)) - def _parse_github_issue_url(data: object) -> None | Unset | str: + def _parse_github_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_issue_url = _parse_github_issue_url(d.pop("github_issue_url", UNSET)) - def _parse_gitlab_issue_id(data: object) -> None | Unset | str: + def _parse_gitlab_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_issue_id = _parse_gitlab_issue_id(d.pop("gitlab_issue_id", UNSET)) - def _parse_gitlab_issue_url(data: object) -> None | Unset | str: + def _parse_gitlab_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_issue_url = _parse_gitlab_issue_url(d.pop("gitlab_issue_url", UNSET)) - def _parse_asana_task_id(data: object) -> None | Unset | str: + def _parse_asana_task_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) asana_task_id = _parse_asana_task_id(d.pop("asana_task_id", UNSET)) - def _parse_asana_task_url(data: object) -> None | Unset | str: + def _parse_asana_task_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) asana_task_url = _parse_asana_task_url(d.pop("asana_task_url", UNSET)) - def _parse_linear_issue_id(data: object) -> None | Unset | str: + def _parse_linear_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) linear_issue_id = _parse_linear_issue_id(d.pop("linear_issue_id", UNSET)) - def _parse_linear_issue_url(data: object) -> None | Unset | str: + def _parse_linear_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) linear_issue_url = _parse_linear_issue_url(d.pop("linear_issue_url", UNSET)) - def _parse_trello_card_id(data: object) -> None | Unset | str: + def _parse_trello_card_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) trello_card_id = _parse_trello_card_id(d.pop("trello_card_id", UNSET)) - def _parse_trello_card_url(data: object) -> None | Unset | str: + def _parse_trello_card_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) trello_card_url = _parse_trello_card_url(d.pop("trello_card_url", UNSET)) - def _parse_zendesk_ticket_id(data: object) -> None | Unset | str: + def _parse_zendesk_ticket_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zendesk_ticket_id = _parse_zendesk_ticket_id(d.pop("zendesk_ticket_id", UNSET)) - def _parse_zendesk_ticket_url(data: object) -> None | Unset | str: + def _parse_zendesk_ticket_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) zendesk_ticket_url = _parse_zendesk_ticket_url(d.pop("zendesk_ticket_url", UNSET)) - def _parse_pagerduty_incident_id(data: object) -> None | Unset | str: + def _parse_pagerduty_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_incident_id = _parse_pagerduty_incident_id(d.pop("pagerduty_incident_id", UNSET)) - def _parse_pagerduty_incident_number(data: object) -> None | Unset | str: + def _parse_pagerduty_incident_number(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_incident_number = _parse_pagerduty_incident_number(d.pop("pagerduty_incident_number", UNSET)) - def _parse_pagerduty_incident_url(data: object) -> None | Unset | str: + def _parse_pagerduty_incident_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_incident_url = _parse_pagerduty_incident_url(d.pop("pagerduty_incident_url", UNSET)) - def _parse_opsgenie_incident_id(data: object) -> None | Unset | str: + def _parse_opsgenie_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_incident_id = _parse_opsgenie_incident_id(d.pop("opsgenie_incident_id", UNSET)) - def _parse_opsgenie_incident_url(data: object) -> None | Unset | str: + def _parse_opsgenie_incident_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_incident_url = _parse_opsgenie_incident_url(d.pop("opsgenie_incident_url", UNSET)) - def _parse_opsgenie_alert_id(data: object) -> None | Unset | str: + def _parse_opsgenie_alert_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_alert_id = _parse_opsgenie_alert_id(d.pop("opsgenie_alert_id", UNSET)) - def _parse_opsgenie_alert_url(data: object) -> None | Unset | str: + def _parse_opsgenie_alert_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_alert_url = _parse_opsgenie_alert_url(d.pop("opsgenie_alert_url", UNSET)) - def _parse_service_now_incident_id(data: object) -> None | Unset | str: + def _parse_service_now_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_incident_id = _parse_service_now_incident_id(d.pop("service_now_incident_id", UNSET)) - def _parse_service_now_incident_key(data: object) -> None | Unset | str: + def _parse_service_now_incident_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_incident_key = _parse_service_now_incident_key(d.pop("service_now_incident_key", UNSET)) - def _parse_service_now_incident_url(data: object) -> None | Unset | str: + def _parse_service_now_incident_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_incident_url = _parse_service_now_incident_url(d.pop("service_now_incident_url", UNSET)) - def _parse_mattermost_channel_id(data: object) -> None | Unset | str: + def _parse_mattermost_channel_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mattermost_channel_id = _parse_mattermost_channel_id(d.pop("mattermost_channel_id", UNSET)) - def _parse_mattermost_channel_name(data: object) -> None | Unset | str: + def _parse_mattermost_channel_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mattermost_channel_name = _parse_mattermost_channel_name(d.pop("mattermost_channel_name", UNSET)) - def _parse_mattermost_channel_url(data: object) -> None | Unset | str: + def _parse_mattermost_channel_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mattermost_channel_url = _parse_mattermost_channel_url(d.pop("mattermost_channel_url", UNSET)) - def _parse_confluence_page_id(data: object) -> None | Unset | str: + def _parse_confluence_page_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) confluence_page_id = _parse_confluence_page_id(d.pop("confluence_page_id", UNSET)) - def _parse_confluence_page_url(data: object) -> None | Unset | str: + def _parse_confluence_page_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) confluence_page_url = _parse_confluence_page_url(d.pop("confluence_page_url", UNSET)) - def _parse_datadog_notebook_id(data: object) -> None | Unset | str: + def _parse_datadog_notebook_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) datadog_notebook_id = _parse_datadog_notebook_id(d.pop("datadog_notebook_id", UNSET)) - def _parse_datadog_notebook_url(data: object) -> None | Unset | str: + def _parse_datadog_notebook_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) datadog_notebook_url = _parse_datadog_notebook_url(d.pop("datadog_notebook_url", UNSET)) - def _parse_shortcut_story_id(data: object) -> None | Unset | str: + def _parse_shortcut_story_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) shortcut_story_id = _parse_shortcut_story_id(d.pop("shortcut_story_id", UNSET)) - def _parse_shortcut_story_url(data: object) -> None | Unset | str: + def _parse_shortcut_story_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) shortcut_story_url = _parse_shortcut_story_url(d.pop("shortcut_story_url", UNSET)) - def _parse_shortcut_task_id(data: object) -> None | Unset | str: + def _parse_shortcut_task_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) shortcut_task_id = _parse_shortcut_task_id(d.pop("shortcut_task_id", UNSET)) - def _parse_shortcut_task_url(data: object) -> None | Unset | str: + def _parse_shortcut_task_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) shortcut_task_url = _parse_shortcut_task_url(d.pop("shortcut_task_url", UNSET)) - def _parse_motion_task_id(data: object) -> None | Unset | str: + def _parse_motion_task_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) motion_task_id = _parse_motion_task_id(d.pop("motion_task_id", UNSET)) - def _parse_motion_task_url(data: object) -> None | Unset | str: + def _parse_motion_task_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) motion_task_url = _parse_motion_task_url(d.pop("motion_task_url", UNSET)) - def _parse_clickup_task_id(data: object) -> None | Unset | str: + def _parse_clickup_task_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) clickup_task_id = _parse_clickup_task_id(d.pop("clickup_task_id", UNSET)) - def _parse_clickup_task_url(data: object) -> None | Unset | str: + def _parse_clickup_task_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) clickup_task_url = _parse_clickup_task_url(d.pop("clickup_task_url", UNSET)) - def _parse_victor_ops_incident_id(data: object) -> None | Unset | str: + def _parse_victor_ops_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) victor_ops_incident_id = _parse_victor_ops_incident_id(d.pop("victor_ops_incident_id", UNSET)) - def _parse_victor_ops_incident_url(data: object) -> None | Unset | str: + def _parse_victor_ops_incident_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) victor_ops_incident_url = _parse_victor_ops_incident_url(d.pop("victor_ops_incident_url", UNSET)) - def _parse_quip_page_id(data: object) -> None | Unset | str: + def _parse_quip_page_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) quip_page_id = _parse_quip_page_id(d.pop("quip_page_id", UNSET)) - def _parse_quip_page_url(data: object) -> None | Unset | str: + def _parse_quip_page_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) quip_page_url = _parse_quip_page_url(d.pop("quip_page_url", UNSET)) - def _parse_sharepoint_page_id(data: object) -> None | Unset | str: + def _parse_sharepoint_page_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) sharepoint_page_id = _parse_sharepoint_page_id(d.pop("sharepoint_page_id", UNSET)) - def _parse_sharepoint_page_url(data: object) -> None | Unset | str: + def _parse_sharepoint_page_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) sharepoint_page_url = _parse_sharepoint_page_url(d.pop("sharepoint_page_url", UNSET)) - def _parse_airtable_base_key(data: object) -> None | Unset | str: + def _parse_airtable_base_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) airtable_base_key = _parse_airtable_base_key(d.pop("airtable_base_key", UNSET)) - def _parse_airtable_table_name(data: object) -> None | Unset | str: + def _parse_airtable_table_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) airtable_table_name = _parse_airtable_table_name(d.pop("airtable_table_name", UNSET)) - def _parse_airtable_record_id(data: object) -> None | Unset | str: + def _parse_airtable_record_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) airtable_record_id = _parse_airtable_record_id(d.pop("airtable_record_id", UNSET)) - def _parse_airtable_record_url(data: object) -> None | Unset | str: + def _parse_airtable_record_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) airtable_record_url = _parse_airtable_record_url(d.pop("airtable_record_url", UNSET)) - def _parse_freshservice_ticket_id(data: object) -> None | Unset | str: + def _parse_freshservice_ticket_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) freshservice_ticket_id = _parse_freshservice_ticket_id(d.pop("freshservice_ticket_id", UNSET)) - def _parse_freshservice_ticket_url(data: object) -> None | Unset | str: + def _parse_freshservice_ticket_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) freshservice_ticket_url = _parse_freshservice_ticket_url(d.pop("freshservice_ticket_url", UNSET)) - def _parse_freshservice_task_id(data: object) -> None | Unset | str: + def _parse_freshservice_task_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) freshservice_task_id = _parse_freshservice_task_id(d.pop("freshservice_task_id", UNSET)) - def _parse_freshservice_task_url(data: object) -> None | Unset | str: + def _parse_freshservice_task_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) freshservice_task_url = _parse_freshservice_task_url(d.pop("freshservice_task_url", UNSET)) - def _parse_mitigation_message(data: object) -> None | Unset | str: + def _parse_mitigation_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigation_message = _parse_mitigation_message(d.pop("mitigation_message", UNSET)) - def _parse_resolution_message(data: object) -> None | Unset | str: + def _parse_resolution_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolution_message = _parse_resolution_message(d.pop("resolution_message", UNSET)) - def _parse_cancellation_message(data: object) -> None | Unset | str: + def _parse_cancellation_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cancellation_message = _parse_cancellation_message(d.pop("cancellation_message", UNSET)) - def _parse_scheduled_for(data: object) -> None | Unset | str: + def _parse_scheduled_for(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) scheduled_for = _parse_scheduled_for(d.pop("scheduled_for", UNSET)) - def _parse_scheduled_until(data: object) -> None | Unset | str: + def _parse_scheduled_until(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) scheduled_until = _parse_scheduled_until(d.pop("scheduled_until", UNSET)) - def _parse_muted_service_ids(data: object) -> None | Unset | list[str]: + def _parse_muted_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2233,20 +2258,20 @@ def _parse_muted_service_ids(data: object) -> None | Unset | list[str]: muted_service_ids_type_0 = cast(list[str], data) return muted_service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) muted_service_ids = _parse_muted_service_ids(d.pop("muted_service_ids", UNSET)) _retrospective_progress_status = d.pop("retrospective_progress_status", UNSET) - retrospective_progress_status: Unset | IncidentRetrospectiveProgressStatus + retrospective_progress_status: IncidentRetrospectiveProgressStatus | Unset if isinstance(_retrospective_progress_status, Unset): retrospective_progress_status = UNSET else: retrospective_progress_status = check_incident_retrospective_progress_status(_retrospective_progress_status) - def _parse_in_triage_by(data: object) -> Union["IncidentInTriageByType0", None, Unset]: + def _parse_in_triage_by(data: object) -> IncidentInTriageByType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2257,13 +2282,13 @@ def _parse_in_triage_by(data: object) -> Union["IncidentInTriageByType0", None, in_triage_by_type_0 = IncidentInTriageByType0.from_dict(data) return in_triage_by_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentInTriageByType0", None, Unset], data) + return cast(IncidentInTriageByType0 | None | Unset, data) in_triage_by = _parse_in_triage_by(d.pop("in_triage_by", UNSET)) - def _parse_started_by(data: object) -> Union["IncidentStartedByType0", None, Unset]: + def _parse_started_by(data: object) -> IncidentStartedByType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2274,13 +2299,13 @@ def _parse_started_by(data: object) -> Union["IncidentStartedByType0", None, Uns started_by_type_0 = IncidentStartedByType0.from_dict(data) return started_by_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentStartedByType0", None, Unset], data) + return cast(IncidentStartedByType0 | None | Unset, data) started_by = _parse_started_by(d.pop("started_by", UNSET)) - def _parse_mitigated_by(data: object) -> Union["IncidentMitigatedByType0", None, Unset]: + def _parse_mitigated_by(data: object) -> IncidentMitigatedByType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2291,13 +2316,13 @@ def _parse_mitigated_by(data: object) -> Union["IncidentMitigatedByType0", None, mitigated_by_type_0 = IncidentMitigatedByType0.from_dict(data) return mitigated_by_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentMitigatedByType0", None, Unset], data) + return cast(IncidentMitigatedByType0 | None | Unset, data) mitigated_by = _parse_mitigated_by(d.pop("mitigated_by", UNSET)) - def _parse_resolved_by(data: object) -> Union["IncidentResolvedByType0", None, Unset]: + def _parse_resolved_by(data: object) -> IncidentResolvedByType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2308,13 +2333,13 @@ def _parse_resolved_by(data: object) -> Union["IncidentResolvedByType0", None, U resolved_by_type_0 = IncidentResolvedByType0.from_dict(data) return resolved_by_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentResolvedByType0", None, Unset], data) + return cast(IncidentResolvedByType0 | None | Unset, data) resolved_by = _parse_resolved_by(d.pop("resolved_by", UNSET)) - def _parse_closed_by(data: object) -> Union["IncidentClosedByType0", None, Unset]: + def _parse_closed_by(data: object) -> IncidentClosedByType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2325,13 +2350,13 @@ def _parse_closed_by(data: object) -> Union["IncidentClosedByType0", None, Unset closed_by_type_0 = IncidentClosedByType0.from_dict(data) return closed_by_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentClosedByType0", None, Unset], data) + return cast(IncidentClosedByType0 | None | Unset, data) closed_by = _parse_closed_by(d.pop("closed_by", UNSET)) - def _parse_cancelled_by(data: object) -> Union["IncidentCancelledByType0", None, Unset]: + def _parse_cancelled_by(data: object) -> IncidentCancelledByType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -2342,81 +2367,81 @@ def _parse_cancelled_by(data: object) -> Union["IncidentCancelledByType0", None, cancelled_by_type_0 = IncidentCancelledByType0.from_dict(data) return cancelled_by_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["IncidentCancelledByType0", None, Unset], data) + return cast(IncidentCancelledByType0 | None | Unset, data) cancelled_by = _parse_cancelled_by(d.pop("cancelled_by", UNSET)) - def _parse_in_triage_at(data: object) -> None | Unset | str: + def _parse_in_triage_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) in_triage_at = _parse_in_triage_at(d.pop("in_triage_at", UNSET)) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_detected_at(data: object) -> None | Unset | str: + def _parse_detected_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) detected_at = _parse_detected_at(d.pop("detected_at", UNSET)) - def _parse_acknowledged_at(data: object) -> None | Unset | str: + def _parse_acknowledged_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) acknowledged_at = _parse_acknowledged_at(d.pop("acknowledged_at", UNSET)) - def _parse_mitigated_at(data: object) -> None | Unset | str: + def _parse_mitigated_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigated_at = _parse_mitigated_at(d.pop("mitigated_at", UNSET)) - def _parse_resolved_at(data: object) -> None | Unset | str: + def _parse_resolved_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) - def _parse_closed_at(data: object) -> None | Unset | str: + def _parse_closed_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) closed_at = _parse_closed_at(d.pop("closed_at", UNSET)) - def _parse_cancelled_at(data: object) -> None | Unset | str: + def _parse_cancelled_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cancelled_at = _parse_cancelled_at(d.pop("cancelled_at", UNSET)) diff --git a/rootly_sdk/models/incident_action_item.py b/rootly_sdk/models/incident_action_item.py index 21c55901..1b8ee2ff 100644 --- a/rootly_sdk/models/incident_action_item.py +++ b/rootly_sdk/models/incident_action_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,31 +25,31 @@ class IncidentActionItem: summary (str): The summary of the action item created_at (str): Date of creation updated_at (str): Date of last update - description (Union[None, Unset, str]): The description of incident action item - kind (Union[Unset, IncidentActionItemKind]): The kind of the action item - assigned_to (Union[Unset, UserFlatResponse]): Flat user object as returned by serializer - assigned_to_group_ids (Union[None, Unset, list[str]]): IDs of groups you wish to assign this action item - priority (Union[Unset, IncidentActionItemPriority]): The priority of the action item - status (Union[Unset, IncidentActionItemStatus]): The status of the action item - due_date (Union[None, Unset, str]): The due date of the action item - jira_issue_id (Union[None, Unset, str]): The Jira issue ID. - jira_issue_key (Union[None, Unset, str]): The Jira issue key. - jira_issue_url (Union[None, Unset, str]): The Jira issue URL. + description (None | str | Unset): The description of incident action item + kind (IncidentActionItemKind | Unset): The kind of the action item + assigned_to (UserFlatResponse | Unset): Flat user object as returned by serializer + assigned_to_group_ids (list[str] | None | Unset): IDs of groups you wish to assign this action item + priority (IncidentActionItemPriority | Unset): The priority of the action item + status (IncidentActionItemStatus | Unset): The status of the action item + due_date (None | str | Unset): The due date of the action item + jira_issue_id (None | str | Unset): The Jira issue ID. + jira_issue_key (None | str | Unset): The Jira issue key. + jira_issue_url (None | str | Unset): The Jira issue URL. """ summary: str created_at: str updated_at: str - description: None | Unset | str = UNSET - kind: Unset | IncidentActionItemKind = UNSET - assigned_to: Union[Unset, "UserFlatResponse"] = UNSET - assigned_to_group_ids: None | Unset | list[str] = UNSET - priority: Unset | IncidentActionItemPriority = UNSET - status: Unset | IncidentActionItemStatus = UNSET - due_date: None | Unset | str = UNSET - jira_issue_id: None | Unset | str = UNSET - jira_issue_key: None | Unset | str = UNSET - jira_issue_url: None | Unset | str = UNSET + description: None | str | Unset = UNSET + kind: IncidentActionItemKind | Unset = UNSET + assigned_to: UserFlatResponse | Unset = UNSET + assigned_to_group_ids: list[str] | None | Unset = UNSET + priority: IncidentActionItemPriority | Unset = UNSET + status: IncidentActionItemStatus | Unset = UNSET + due_date: None | str | Unset = UNSET + jira_issue_id: None | str | Unset = UNSET + jira_issue_key: None | str | Unset = UNSET + jira_issue_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -57,21 +59,21 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - assigned_to: Unset | dict[str, Any] = UNSET + assigned_to: dict[str, Any] | Unset = UNSET if not isinstance(self.assigned_to, Unset): assigned_to = self.assigned_to.to_dict() - assigned_to_group_ids: None | Unset | list[str] + assigned_to_group_ids: list[str] | None | Unset if isinstance(self.assigned_to_group_ids, Unset): assigned_to_group_ids = UNSET elif isinstance(self.assigned_to_group_ids, list): @@ -80,33 +82,33 @@ def to_dict(self) -> dict[str, Any]: else: assigned_to_group_ids = self.assigned_to_group_ids - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - due_date: None | Unset | str + due_date: None | str | Unset if isinstance(self.due_date, Unset): due_date = UNSET else: due_date = self.due_date - jira_issue_id: None | Unset | str + jira_issue_id: None | str | Unset if isinstance(self.jira_issue_id, Unset): jira_issue_id = UNSET else: jira_issue_id = self.jira_issue_id - jira_issue_key: None | Unset | str + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET else: jira_issue_key = self.jira_issue_key - jira_issue_url: None | Unset | str + jira_issue_url: None | str | Unset if isinstance(self.jira_issue_url, Unset): jira_issue_url = UNSET else: @@ -155,30 +157,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | IncidentActionItemKind + kind: IncidentActionItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_incident_action_item_kind(_kind) _assigned_to = d.pop("assigned_to", UNSET) - assigned_to: Unset | UserFlatResponse + assigned_to: UserFlatResponse | Unset if isinstance(_assigned_to, Unset): assigned_to = UNSET else: assigned_to = UserFlatResponse.from_dict(_assigned_to) - def _parse_assigned_to_group_ids(data: object) -> None | Unset | list[str]: + def _parse_assigned_to_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -189,59 +191,59 @@ def _parse_assigned_to_group_ids(data: object) -> None | Unset | list[str]: assigned_to_group_ids_type_0 = cast(list[str], data) return assigned_to_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) assigned_to_group_ids = _parse_assigned_to_group_ids(d.pop("assigned_to_group_ids", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | IncidentActionItemPriority + priority: IncidentActionItemPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = check_incident_action_item_priority(_priority) _status = d.pop("status", UNSET) - status: Unset | IncidentActionItemStatus + status: IncidentActionItemStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_incident_action_item_status(_status) - def _parse_due_date(data: object) -> None | Unset | str: + def _parse_due_date(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) due_date = _parse_due_date(d.pop("due_date", UNSET)) - def _parse_jira_issue_id(data: object) -> None | Unset | str: + def _parse_jira_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_id = _parse_jira_issue_id(d.pop("jira_issue_id", UNSET)) - def _parse_jira_issue_key(data: object) -> None | Unset | str: + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_key = _parse_jira_issue_key(d.pop("jira_issue_key", UNSET)) - def _parse_jira_issue_url(data: object) -> None | Unset | str: + def _parse_jira_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) diff --git a/rootly_sdk/models/incident_action_item_list.py b/rootly_sdk/models/incident_action_item_list.py index d4ca0b70..75eb9d7e 100644 --- a/rootly_sdk/models/incident_action_item_list.py +++ b/rootly_sdk/models/incident_action_item_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentActionItemList: """ Attributes: - data (list['IncidentActionItemListDataItem']): + data (list[IncidentActionItemListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentActionItemListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentActionItemListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_action_item_list_data_item.py b/rootly_sdk/models/incident_action_item_list_data_item.py index 99e97c67..46910964 100644 --- a/rootly_sdk/models/incident_action_item_list_data_item.py +++ b/rootly_sdk/models/incident_action_item_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentActionItemListDataItem: id: str type_: IncidentActionItemListDataItemType - attributes: "IncidentActionItem" + attributes: IncidentActionItem additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_action_item_response.py b/rootly_sdk/models/incident_action_item_response.py index 8ac8fb06..facdf5c1 100644 --- a/rootly_sdk/models/incident_action_item_response.py +++ b/rootly_sdk/models/incident_action_item_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentActionItemResponse: data (IncidentActionItemResponseData): """ - data: "IncidentActionItemResponseData" + data: IncidentActionItemResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_action_item_response_data.py b/rootly_sdk/models/incident_action_item_response_data.py index c21de0b4..162efaa1 100644 --- a/rootly_sdk/models/incident_action_item_response_data.py +++ b/rootly_sdk/models/incident_action_item_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentActionItemResponseData: id: str type_: IncidentActionItemResponseDataType - attributes: "IncidentActionItem" + attributes: IncidentActionItem additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_cancelled_by_type_0.py b/rootly_sdk/models/incident_cancelled_by_type_0.py index 12d1b454..0e7a89aa 100644 --- a/rootly_sdk/models/incident_cancelled_by_type_0.py +++ b/rootly_sdk/models/incident_cancelled_by_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentCancelledByType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_closed_by_type_0.py b/rootly_sdk/models/incident_closed_by_type_0.py index 71d3c34a..27fb3bfc 100644 --- a/rootly_sdk/models/incident_closed_by_type_0.py +++ b/rootly_sdk/models/incident_closed_by_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentClosedByType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_custom_field_selection.py b/rootly_sdk/models/incident_custom_field_selection.py index d1a07a29..8fb65665 100644 --- a/rootly_sdk/models/incident_custom_field_selection.py +++ b/rootly_sdk/models/incident_custom_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,16 +15,16 @@ class IncidentCustomFieldSelection: """ Attributes: - value (Union[None, str]): The value of the incident_custom_field_selection + value (None | str): The value of the incident_custom_field_selection selected_option_ids (list[int]): - incident_id (Union[Unset, str]): - custom_field_id (Union[Unset, int]): + incident_id (str | Unset): + custom_field_id (int | Unset): """ value: None | str selected_option_ids: list[int] - incident_id: Unset | str = UNSET - custom_field_id: Unset | int = UNSET + incident_id: str | Unset = UNSET + custom_field_id: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_custom_field_selection_list.py b/rootly_sdk/models/incident_custom_field_selection_list.py index 58596da5..8727b826 100644 --- a/rootly_sdk/models/incident_custom_field_selection_list.py +++ b/rootly_sdk/models/incident_custom_field_selection_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentCustomFieldSelectionList: """ Attributes: - data (list['IncidentCustomFieldSelectionListDataItem']): + data (list[IncidentCustomFieldSelectionListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentCustomFieldSelectionListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentCustomFieldSelectionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_custom_field_selection_list_data_item.py b/rootly_sdk/models/incident_custom_field_selection_list_data_item.py index 33a38024..8cc9c216 100644 --- a/rootly_sdk/models/incident_custom_field_selection_list_data_item.py +++ b/rootly_sdk/models/incident_custom_field_selection_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentCustomFieldSelectionListDataItem: id: str type_: IncidentCustomFieldSelectionListDataItemType - attributes: "IncidentCustomFieldSelection" + attributes: IncidentCustomFieldSelection additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_custom_field_selection_response.py b/rootly_sdk/models/incident_custom_field_selection_response.py index e1484fc3..99631504 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response.py +++ b/rootly_sdk/models/incident_custom_field_selection_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentCustomFieldSelectionResponse: data (IncidentCustomFieldSelectionResponseData): """ - data: "IncidentCustomFieldSelectionResponseData" + data: IncidentCustomFieldSelectionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_custom_field_selection_response_data.py b/rootly_sdk/models/incident_custom_field_selection_response_data.py index 9ef29384..40bee22e 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response_data.py +++ b/rootly_sdk/models/incident_custom_field_selection_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentCustomFieldSelectionResponseData: id: str type_: IncidentCustomFieldSelectionResponseDataType - attributes: "IncidentCustomFieldSelection" + attributes: IncidentCustomFieldSelection additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event.py b/rootly_sdk/models/incident_event.py index 0b4a0f1a..0f1d3de6 100644 --- a/rootly_sdk/models/incident_event.py +++ b/rootly_sdk/models/incident_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,14 +20,14 @@ class IncidentEvent: occurred_at (str): Date of occurence created_at (str): Date of creation updated_at (str): Date of last update - visibility (Union[Unset, IncidentEventVisibility]): The visibility of the incident action item + visibility (IncidentEventVisibility | Unset): The visibility of the incident action item """ event: str occurred_at: str created_at: str updated_at: str - visibility: Unset | IncidentEventVisibility = UNSET + visibility: IncidentEventVisibility | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - visibility: Unset | str = UNSET + visibility: str | Unset = UNSET if not isinstance(self.visibility, Unset): visibility = self.visibility @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") _visibility = d.pop("visibility", UNSET) - visibility: Unset | IncidentEventVisibility + visibility: IncidentEventVisibility | Unset if isinstance(_visibility, Unset): visibility = UNSET else: diff --git a/rootly_sdk/models/incident_event_functionality.py b/rootly_sdk/models/incident_event_functionality.py index 9bbee28a..2283fbd7 100644 --- a/rootly_sdk/models/incident_event_functionality.py +++ b/rootly_sdk/models/incident_event_functionality.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/incident_event_functionality_list.py b/rootly_sdk/models/incident_event_functionality_list.py index 7903d42b..98fa45b7 100644 --- a/rootly_sdk/models/incident_event_functionality_list.py +++ b/rootly_sdk/models/incident_event_functionality_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentEventFunctionalityList: """ Attributes: - data (list['IncidentEventFunctionalityListDataItem']): + data (list[IncidentEventFunctionalityListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentEventFunctionalityListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentEventFunctionalityListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_functionality_list_data_item.py b/rootly_sdk/models/incident_event_functionality_list_data_item.py index aaa8b50f..187d9f5d 100644 --- a/rootly_sdk/models/incident_event_functionality_list_data_item.py +++ b/rootly_sdk/models/incident_event_functionality_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentEventFunctionalityListDataItem: id: str type_: IncidentEventFunctionalityListDataItemType - attributes: "IncidentEventFunctionality" + attributes: IncidentEventFunctionality additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_functionality_response.py b/rootly_sdk/models/incident_event_functionality_response.py index 955727af..40c22ff4 100644 --- a/rootly_sdk/models/incident_event_functionality_response.py +++ b/rootly_sdk/models/incident_event_functionality_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentEventFunctionalityResponse: data (IncidentEventFunctionalityResponseData): """ - data: "IncidentEventFunctionalityResponseData" + data: IncidentEventFunctionalityResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_functionality_response_data.py b/rootly_sdk/models/incident_event_functionality_response_data.py index 41215a06..a7efe600 100644 --- a/rootly_sdk/models/incident_event_functionality_response_data.py +++ b/rootly_sdk/models/incident_event_functionality_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentEventFunctionalityResponseData: id: str type_: IncidentEventFunctionalityResponseDataType - attributes: "IncidentEventFunctionality" + attributes: IncidentEventFunctionality additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_list.py b/rootly_sdk/models/incident_event_list.py index c60883fb..23e8187c 100644 --- a/rootly_sdk/models/incident_event_list.py +++ b/rootly_sdk/models/incident_event_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentEventList: """ Attributes: - data (list['IncidentEventListDataItem']): + data (list[IncidentEventListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentEventListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentEventListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_list_data_item.py b/rootly_sdk/models/incident_event_list_data_item.py index c895c45b..ec5e4556 100644 --- a/rootly_sdk/models/incident_event_list_data_item.py +++ b/rootly_sdk/models/incident_event_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentEventListDataItem: id: str type_: IncidentEventListDataItemType - attributes: "IncidentEvent" + attributes: IncidentEvent additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_response.py b/rootly_sdk/models/incident_event_response.py index c541aeb3..671201d9 100644 --- a/rootly_sdk/models/incident_event_response.py +++ b/rootly_sdk/models/incident_event_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentEventResponse: data (IncidentEventResponseData): """ - data: "IncidentEventResponseData" + data: IncidentEventResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_response_data.py b/rootly_sdk/models/incident_event_response_data.py index 0f415f3f..420a0bb2 100644 --- a/rootly_sdk/models/incident_event_response_data.py +++ b/rootly_sdk/models/incident_event_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentEventResponseData: id: str type_: IncidentEventResponseDataType - attributes: "IncidentEvent" + attributes: IncidentEvent additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_service.py b/rootly_sdk/models/incident_event_service.py index 163037e9..1353bf73 100644 --- a/rootly_sdk/models/incident_event_service.py +++ b/rootly_sdk/models/incident_event_service.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/incident_event_service_list.py b/rootly_sdk/models/incident_event_service_list.py index cab1bec5..e1ef7ee1 100644 --- a/rootly_sdk/models/incident_event_service_list.py +++ b/rootly_sdk/models/incident_event_service_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentEventServiceList: """ Attributes: - data (list['IncidentEventServiceListDataItem']): + data (list[IncidentEventServiceListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentEventServiceListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentEventServiceListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_service_list_data_item.py b/rootly_sdk/models/incident_event_service_list_data_item.py index 64783455..092f03d4 100644 --- a/rootly_sdk/models/incident_event_service_list_data_item.py +++ b/rootly_sdk/models/incident_event_service_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentEventServiceListDataItem: id: str type_: IncidentEventServiceListDataItemType - attributes: "IncidentEventService" + attributes: IncidentEventService additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_service_response.py b/rootly_sdk/models/incident_event_service_response.py index 367cf4d0..60539a21 100644 --- a/rootly_sdk/models/incident_event_service_response.py +++ b/rootly_sdk/models/incident_event_service_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentEventServiceResponse: data (IncidentEventServiceResponseData): """ - data: "IncidentEventServiceResponseData" + data: IncidentEventServiceResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_event_service_response_data.py b/rootly_sdk/models/incident_event_service_response_data.py index c684683c..01413cba 100644 --- a/rootly_sdk/models/incident_event_service_response_data.py +++ b/rootly_sdk/models/incident_event_service_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentEventServiceResponseData: id: str type_: IncidentEventServiceResponseDataType - attributes: "IncidentEventService" + attributes: IncidentEventService additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_feedback.py b/rootly_sdk/models/incident_feedback.py index f047ab5e..4ea237d8 100644 --- a/rootly_sdk/models/incident_feedback.py +++ b/rootly_sdk/models/incident_feedback.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/incident_feedback_list.py b/rootly_sdk/models/incident_feedback_list.py index 84262e37..3553531b 100644 --- a/rootly_sdk/models/incident_feedback_list.py +++ b/rootly_sdk/models/incident_feedback_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentFeedbackList: """ Attributes: - data (list['IncidentFeedbackListDataItem']): + data (list[IncidentFeedbackListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentFeedbackListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentFeedbackListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_feedback_list_data_item.py b/rootly_sdk/models/incident_feedback_list_data_item.py index f1be8b2d..a71bc453 100644 --- a/rootly_sdk/models/incident_feedback_list_data_item.py +++ b/rootly_sdk/models/incident_feedback_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentFeedbackListDataItem: id: str type_: IncidentFeedbackListDataItemType - attributes: "IncidentFeedback" + attributes: IncidentFeedback additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_feedback_response.py b/rootly_sdk/models/incident_feedback_response.py index ac429ce1..7ef28981 100644 --- a/rootly_sdk/models/incident_feedback_response.py +++ b/rootly_sdk/models/incident_feedback_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentFeedbackResponse: data (IncidentFeedbackResponseData): """ - data: "IncidentFeedbackResponseData" + data: IncidentFeedbackResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_feedback_response_data.py b/rootly_sdk/models/incident_feedback_response_data.py index 59b31f61..e87ec38d 100644 --- a/rootly_sdk/models/incident_feedback_response_data.py +++ b/rootly_sdk/models/incident_feedback_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentFeedbackResponseData: id: str type_: IncidentFeedbackResponseDataType - attributes: "IncidentFeedback" + attributes: IncidentFeedback additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_form_field_selection.py b/rootly_sdk/models/incident_form_field_selection.py index 97ee3216..546b0afb 100644 --- a/rootly_sdk/models/incident_form_field_selection.py +++ b/rootly_sdk/models/incident_form_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -15,30 +17,30 @@ class IncidentFormFieldSelection: Attributes: incident_id (str): form_field_id (str): The custom field for this selection - value (Union[None, Unset, str]): The selected value for text kind custom fields - selected_catalog_entity_ids (Union[Unset, list[str]]): - selected_group_ids (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[str]]): - selected_service_ids (Union[Unset, list[str]]): - selected_functionality_ids (Union[Unset, list[str]]): - selected_user_ids (Union[Unset, list[int]]): - selected_environment_ids (Union[Unset, list[str]]): - selected_cause_ids (Union[Unset, list[str]]): - selected_incident_type_ids (Union[Unset, list[str]]): + value (None | str | Unset): The selected value for text kind custom fields + selected_catalog_entity_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_environment_ids (list[str] | Unset): + selected_cause_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): """ incident_id: str form_field_id: str - value: None | Unset | str = UNSET - selected_catalog_entity_ids: Unset | list[str] = UNSET - selected_group_ids: Unset | list[str] = UNSET - selected_option_ids: Unset | list[str] = UNSET - selected_service_ids: Unset | list[str] = UNSET - selected_functionality_ids: Unset | list[str] = UNSET - selected_user_ids: Unset | list[int] = UNSET - selected_environment_ids: Unset | list[str] = UNSET - selected_cause_ids: Unset | list[str] = UNSET - selected_incident_type_ids: Unset | list[str] = UNSET + value: None | str | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,45 +48,45 @@ def to_dict(self) -> dict[str, Any]: form_field_id = self.form_field_id - value: None | Unset | str + value: None | str | Unset if isinstance(self.value, Unset): value = UNSET else: value = self.value - selected_catalog_entity_ids: Unset | list[str] = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET if not isinstance(self.selected_catalog_entity_ids, Unset): selected_catalog_entity_ids = self.selected_catalog_entity_ids - selected_group_ids: Unset | list[str] = UNSET + selected_group_ids: list[str] | Unset = UNSET if not isinstance(self.selected_group_ids, Unset): selected_group_ids = self.selected_group_ids - selected_option_ids: Unset | list[str] = UNSET + selected_option_ids: list[str] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids - selected_service_ids: Unset | list[str] = UNSET + selected_service_ids: list[str] | Unset = UNSET if not isinstance(self.selected_service_ids, Unset): selected_service_ids = self.selected_service_ids - selected_functionality_ids: Unset | list[str] = UNSET + selected_functionality_ids: list[str] | Unset = UNSET if not isinstance(self.selected_functionality_ids, Unset): selected_functionality_ids = self.selected_functionality_ids - selected_user_ids: Unset | list[int] = UNSET + selected_user_ids: list[int] | Unset = UNSET if not isinstance(self.selected_user_ids, Unset): selected_user_ids = self.selected_user_ids - selected_environment_ids: Unset | list[str] = UNSET + selected_environment_ids: list[str] | Unset = UNSET if not isinstance(self.selected_environment_ids, Unset): selected_environment_ids = self.selected_environment_ids - selected_cause_ids: Unset | list[str] = UNSET + selected_cause_ids: list[str] | Unset = UNSET if not isinstance(self.selected_cause_ids, Unset): selected_cause_ids = self.selected_cause_ids - selected_incident_type_ids: Unset | list[str] = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.selected_incident_type_ids, Unset): selected_incident_type_ids = self.selected_incident_type_ids @@ -126,12 +128,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: form_field_id = d.pop("form_field_id") - def _parse_value(data: object) -> None | Unset | str: + def _parse_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value = _parse_value(d.pop("value", UNSET)) diff --git a/rootly_sdk/models/incident_form_field_selection_list.py b/rootly_sdk/models/incident_form_field_selection_list.py index 844f234b..18e8816d 100644 --- a/rootly_sdk/models/incident_form_field_selection_list.py +++ b/rootly_sdk/models/incident_form_field_selection_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentFormFieldSelectionList: """ Attributes: - data (list['IncidentFormFieldSelectionListDataItem']): + data (list[IncidentFormFieldSelectionListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentFormFieldSelectionListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentFormFieldSelectionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_form_field_selection_list_data_item.py b/rootly_sdk/models/incident_form_field_selection_list_data_item.py index 2de7ef35..4b57072f 100644 --- a/rootly_sdk/models/incident_form_field_selection_list_data_item.py +++ b/rootly_sdk/models/incident_form_field_selection_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentFormFieldSelectionListDataItem: id: str type_: IncidentFormFieldSelectionListDataItemType - attributes: "IncidentFormFieldSelection" + attributes: IncidentFormFieldSelection additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_form_field_selection_response.py b/rootly_sdk/models/incident_form_field_selection_response.py index 2baa56b0..61746484 100644 --- a/rootly_sdk/models/incident_form_field_selection_response.py +++ b/rootly_sdk/models/incident_form_field_selection_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentFormFieldSelectionResponse: data (IncidentFormFieldSelectionResponseData): """ - data: "IncidentFormFieldSelectionResponseData" + data: IncidentFormFieldSelectionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_form_field_selection_response_data.py b/rootly_sdk/models/incident_form_field_selection_response_data.py index b10a39c7..8143f17b 100644 --- a/rootly_sdk/models/incident_form_field_selection_response_data.py +++ b/rootly_sdk/models/incident_form_field_selection_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentFormFieldSelectionResponseData: id: str type_: IncidentFormFieldSelectionResponseDataType - attributes: "IncidentFormFieldSelection" + attributes: IncidentFormFieldSelection additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_in_triage_by_type_0.py b/rootly_sdk/models/incident_in_triage_by_type_0.py index 5882e668..d9e70a76 100644 --- a/rootly_sdk/models/incident_in_triage_by_type_0.py +++ b/rootly_sdk/models/incident_in_triage_by_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentInTriageByType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_labels_type_0.py b/rootly_sdk/models/incident_labels_type_0.py index 8d2f88e9..44337a9d 100644 --- a/rootly_sdk/models/incident_labels_type_0.py +++ b/rootly_sdk/models/incident_labels_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentLabelsType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_list.py b/rootly_sdk/models/incident_list.py index 49218c12..ebc240f5 100644 --- a/rootly_sdk/models/incident_list.py +++ b/rootly_sdk/models/incident_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentList: """ Attributes: - data (list['IncidentListDataItem']): + data (list[IncidentListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_list_data_item.py b/rootly_sdk/models/incident_list_data_item.py index babda31a..0087518b 100644 --- a/rootly_sdk/models/incident_list_data_item.py +++ b/rootly_sdk/models/incident_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class IncidentListDataItem: id: str type_: IncidentListDataItemType - attributes: "Incident" + attributes: Incident additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_mitigated_by_type_0.py b/rootly_sdk/models/incident_mitigated_by_type_0.py index 78045edb..cb9cdf55 100644 --- a/rootly_sdk/models/incident_mitigated_by_type_0.py +++ b/rootly_sdk/models/incident_mitigated_by_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentMitigatedByType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_permission_set.py b/rootly_sdk/models/incident_permission_set.py index ca9eaaf7..ea4d766a 100644 --- a/rootly_sdk/models/incident_permission_set.py +++ b/rootly_sdk/models/incident_permission_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -24,19 +26,19 @@ class IncidentPermissionSet: name (str): The incident permission set name. created_at (str): updated_at (str): - slug (Union[Unset, str]): The incident permission set slug. - description (Union[None, Unset, str]): The incident permission set description. - private_incident_permissions (Union[Unset, list[IncidentPermissionSetPrivateIncidentPermissionsItem]]): - public_incident_permissions (Union[Unset, list[IncidentPermissionSetPublicIncidentPermissionsItem]]): + slug (str | Unset): The incident permission set slug. + description (None | str | Unset): The incident permission set description. + private_incident_permissions (list[IncidentPermissionSetPrivateIncidentPermissionsItem] | Unset): + public_incident_permissions (list[IncidentPermissionSetPublicIncidentPermissionsItem] | Unset): """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - private_incident_permissions: Unset | list[IncidentPermissionSetPrivateIncidentPermissionsItem] = UNSET - public_incident_permissions: Unset | list[IncidentPermissionSetPublicIncidentPermissionsItem] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + private_incident_permissions: list[IncidentPermissionSetPrivateIncidentPermissionsItem] | Unset = UNSET + public_incident_permissions: list[IncidentPermissionSetPublicIncidentPermissionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,20 +50,20 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - private_incident_permissions: Unset | list[str] = UNSET + private_incident_permissions: list[str] | Unset = UNSET if not isinstance(self.private_incident_permissions, Unset): private_incident_permissions = [] for private_incident_permissions_item_data in self.private_incident_permissions: private_incident_permissions_item: str = private_incident_permissions_item_data private_incident_permissions.append(private_incident_permissions_item) - public_incident_permissions: Unset | list[str] = UNSET + public_incident_permissions: list[str] | Unset = UNSET if not isinstance(self.public_incident_permissions, Unset): public_incident_permissions = [] for public_incident_permissions_item_data in self.public_incident_permissions: @@ -99,32 +101,36 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - private_incident_permissions = [] _private_incident_permissions = d.pop("private_incident_permissions", UNSET) - for private_incident_permissions_item_data in _private_incident_permissions or []: - private_incident_permissions_item = check_incident_permission_set_private_incident_permissions_item( - private_incident_permissions_item_data - ) + private_incident_permissions: list[IncidentPermissionSetPrivateIncidentPermissionsItem] | Unset = UNSET + if _private_incident_permissions is not UNSET: + private_incident_permissions = [] + for private_incident_permissions_item_data in _private_incident_permissions: + private_incident_permissions_item = check_incident_permission_set_private_incident_permissions_item( + private_incident_permissions_item_data + ) - private_incident_permissions.append(private_incident_permissions_item) + private_incident_permissions.append(private_incident_permissions_item) - public_incident_permissions = [] _public_incident_permissions = d.pop("public_incident_permissions", UNSET) - for public_incident_permissions_item_data in _public_incident_permissions or []: - public_incident_permissions_item = check_incident_permission_set_public_incident_permissions_item( - public_incident_permissions_item_data - ) + public_incident_permissions: list[IncidentPermissionSetPublicIncidentPermissionsItem] | Unset = UNSET + if _public_incident_permissions is not UNSET: + public_incident_permissions = [] + for public_incident_permissions_item_data in _public_incident_permissions: + public_incident_permissions_item = check_incident_permission_set_public_incident_permissions_item( + public_incident_permissions_item_data + ) - public_incident_permissions.append(public_incident_permissions_item) + public_incident_permissions.append(public_incident_permissions_item) incident_permission_set = cls( name=name, diff --git a/rootly_sdk/models/incident_permission_set_boolean.py b/rootly_sdk/models/incident_permission_set_boolean.py index a61795ab..681230c8 100644 --- a/rootly_sdk/models/incident_permission_set_boolean.py +++ b/rootly_sdk/models/incident_permission_set_boolean.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -20,17 +22,17 @@ class IncidentPermissionSetBoolean: kind (IncidentPermissionSetBooleanKind): created_at (str): updated_at (str): - incident_permission_set_id (Union[Unset, str]): - private (Union[Unset, bool]): - enabled (Union[Unset, bool]): + incident_permission_set_id (str | Unset): + private (bool | Unset): + enabled (bool | Unset): """ kind: IncidentPermissionSetBooleanKind created_at: str updated_at: str - incident_permission_set_id: Unset | str = UNSET - private: Unset | bool = UNSET - enabled: Unset | bool = UNSET + incident_permission_set_id: str | Unset = UNSET + private: bool | Unset = UNSET + enabled: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_boolean_list.py b/rootly_sdk/models/incident_permission_set_boolean_list.py index e8362ee9..1494db51 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_list.py +++ b/rootly_sdk/models/incident_permission_set_boolean_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentPermissionSetBooleanList: """ Attributes: - data (list['IncidentPermissionSetBooleanListDataItem']): + data (list[IncidentPermissionSetBooleanListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentPermissionSetBooleanListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentPermissionSetBooleanListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py b/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py index 89085db4..e356914c 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_boolean_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPermissionSetBooleanListDataItem: id: str type_: IncidentPermissionSetBooleanListDataItemType - attributes: "IncidentPermissionSetBoolean" + attributes: IncidentPermissionSetBoolean additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_boolean_response.py b/rootly_sdk/models/incident_permission_set_boolean_response.py index 7429fcaf..97d43997 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentPermissionSetBooleanResponse: data (IncidentPermissionSetBooleanResponseData): """ - data: "IncidentPermissionSetBooleanResponseData" + data: IncidentPermissionSetBooleanResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_boolean_response_data.py b/rootly_sdk/models/incident_permission_set_boolean_response_data.py index a1e629fc..5c85b779 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response_data.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPermissionSetBooleanResponseData: id: str type_: IncidentPermissionSetBooleanResponseDataType - attributes: "IncidentPermissionSetBoolean" + attributes: IncidentPermissionSetBoolean additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_list.py b/rootly_sdk/models/incident_permission_set_list.py index 88b9764d..c4613dc6 100644 --- a/rootly_sdk/models/incident_permission_set_list.py +++ b/rootly_sdk/models/incident_permission_set_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentPermissionSetList: """ Attributes: - data (list['IncidentPermissionSetListDataItem']): + data (list[IncidentPermissionSetListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentPermissionSetListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentPermissionSetListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_list_data_item.py b/rootly_sdk/models/incident_permission_set_list_data_item.py index f6498f4d..119ee59f 100644 --- a/rootly_sdk/models/incident_permission_set_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPermissionSetListDataItem: id: str type_: IncidentPermissionSetListDataItemType - attributes: "IncidentPermissionSet" + attributes: IncidentPermissionSet additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_resource.py b/rootly_sdk/models/incident_permission_set_resource.py index 9a6e6ccd..301cd270 100644 --- a/rootly_sdk/models/incident_permission_set_resource.py +++ b/rootly_sdk/models/incident_permission_set_resource.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,18 +23,18 @@ class IncidentPermissionSetResource: kind (IncidentPermissionSetResourceKind): created_at (str): updated_at (str): - private (Union[Unset, bool]): - resource_id (Union[Unset, str]): - resource_type (Union[Unset, str]): + private (bool | Unset): + resource_id (str | Unset): + resource_type (str | Unset): """ incident_permission_set_id: str kind: IncidentPermissionSetResourceKind created_at: str updated_at: str - private: Unset | bool = UNSET - resource_id: Unset | str = UNSET - resource_type: Unset | str = UNSET + private: bool | Unset = UNSET + resource_id: str | Unset = UNSET + resource_type: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_resource_list.py b/rootly_sdk/models/incident_permission_set_resource_list.py index 65f948b7..aa8b5084 100644 --- a/rootly_sdk/models/incident_permission_set_resource_list.py +++ b/rootly_sdk/models/incident_permission_set_resource_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentPermissionSetResourceList: """ Attributes: - data (list['IncidentPermissionSetResourceListDataItem']): + data (list[IncidentPermissionSetResourceListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentPermissionSetResourceListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentPermissionSetResourceListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_resource_list_data_item.py b/rootly_sdk/models/incident_permission_set_resource_list_data_item.py index 118d6aa1..7d14eee6 100644 --- a/rootly_sdk/models/incident_permission_set_resource_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_resource_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPermissionSetResourceListDataItem: id: str type_: IncidentPermissionSetResourceListDataItemType - attributes: "IncidentPermissionSetResource" + attributes: IncidentPermissionSetResource additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_resource_response.py b/rootly_sdk/models/incident_permission_set_resource_response.py index 4321b003..aa08a65a 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response.py +++ b/rootly_sdk/models/incident_permission_set_resource_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentPermissionSetResourceResponse: data (IncidentPermissionSetResourceResponseData): """ - data: "IncidentPermissionSetResourceResponseData" + data: IncidentPermissionSetResourceResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_resource_response_data.py b/rootly_sdk/models/incident_permission_set_resource_response_data.py index 4120859c..7d77c245 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response_data.py +++ b/rootly_sdk/models/incident_permission_set_resource_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPermissionSetResourceResponseData: id: str type_: IncidentPermissionSetResourceResponseDataType - attributes: "IncidentPermissionSetResource" + attributes: IncidentPermissionSetResource additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_response.py b/rootly_sdk/models/incident_permission_set_response.py index 9f330c48..625c9871 100644 --- a/rootly_sdk/models/incident_permission_set_response.py +++ b/rootly_sdk/models/incident_permission_set_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentPermissionSetResponse: data (IncidentPermissionSetResponseData): """ - data: "IncidentPermissionSetResponseData" + data: IncidentPermissionSetResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_permission_set_response_data.py b/rootly_sdk/models/incident_permission_set_response_data.py index 239d598f..086da0db 100644 --- a/rootly_sdk/models/incident_permission_set_response_data.py +++ b/rootly_sdk/models/incident_permission_set_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPermissionSetResponseData: id: str type_: IncidentPermissionSetResponseDataType - attributes: "IncidentPermissionSet" + attributes: IncidentPermissionSet additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_post_mortem.py b/rootly_sdk/models/incident_post_mortem.py index 73b656dc..b3798e39 100644 --- a/rootly_sdk/models/incident_post_mortem.py +++ b/rootly_sdk/models/incident_post_mortem.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,44 +23,44 @@ class IncidentPostMortem: title (str): The title of the incident retrospective created_at (str): Date of creation updated_at (str): Date of last update - content (Union[None, Unset, str]): The content of the incident retrospective (Only if internal) - status (Union[Unset, IncidentPostMortemStatus]): The status of the incident retrospective - started_at (Union[None, Unset, str]): Date of started at - mitigated_at (Union[None, Unset, str]): Date of mitigation - resolved_at (Union[None, Unset, str]): Date of resolution - show_timeline (Union[Unset, bool]): Show events timeline of the incident retrospective - show_timeline_trail (Union[Unset, bool]): Show trail events in the timeline of the incident retrospective - show_timeline_genius (Union[Unset, bool]): Show workflow events in the timeline of the incident retrospective - show_timeline_tasks (Union[Unset, bool]): Show tasks in the timeline of the incident retrospective - show_timeline_action_items (Union[Unset, bool]): Show action items in the timeline of the incident retrospective - show_timeline_order (Union[Unset, IncidentPostMortemShowTimelineOrder]): The order of the incident retrospective + content (None | str | Unset): The content of the incident retrospective (Only if internal) + status (IncidentPostMortemStatus | Unset): The status of the incident retrospective + started_at (None | str | Unset): Date of started at + mitigated_at (None | str | Unset): Date of mitigation + resolved_at (None | str | Unset): Date of resolution + show_timeline (bool | Unset): Show events timeline of the incident retrospective + show_timeline_trail (bool | Unset): Show trail events in the timeline of the incident retrospective + show_timeline_genius (bool | Unset): Show workflow events in the timeline of the incident retrospective + show_timeline_tasks (bool | Unset): Show tasks in the timeline of the incident retrospective + show_timeline_action_items (bool | Unset): Show action items in the timeline of the incident retrospective + show_timeline_order (IncidentPostMortemShowTimelineOrder | Unset): The order of the incident retrospective timeline Default: 'desc'. - show_services_impacted (Union[Unset, bool]): Show functionalities impacted of the incident retrospective - show_functionalities_impacted (Union[Unset, bool]): Show services impacted of the incident retrospective - show_groups_impacted (Union[Unset, bool]): Show groups impacted of the incident retrospective - show_alerts_attached (Union[Unset, bool]): Show alerts attached to the incident - url (Union[Unset, str]): The url to the incident retrospective + show_services_impacted (bool | Unset): Show functionalities impacted of the incident retrospective + show_functionalities_impacted (bool | Unset): Show services impacted of the incident retrospective + show_groups_impacted (bool | Unset): Show groups impacted of the incident retrospective + show_alerts_attached (bool | Unset): Show alerts attached to the incident + url (str | Unset): The url to the incident retrospective """ title: str created_at: str updated_at: str - content: None | Unset | str = UNSET - status: Unset | IncidentPostMortemStatus = UNSET - started_at: None | Unset | str = UNSET - mitigated_at: None | Unset | str = UNSET - resolved_at: None | Unset | str = UNSET - show_timeline: Unset | bool = UNSET - show_timeline_trail: Unset | bool = UNSET - show_timeline_genius: Unset | bool = UNSET - show_timeline_tasks: Unset | bool = UNSET - show_timeline_action_items: Unset | bool = UNSET - show_timeline_order: Unset | IncidentPostMortemShowTimelineOrder = "desc" - show_services_impacted: Unset | bool = UNSET - show_functionalities_impacted: Unset | bool = UNSET - show_groups_impacted: Unset | bool = UNSET - show_alerts_attached: Unset | bool = UNSET - url: Unset | str = UNSET + content: None | str | Unset = UNSET + status: IncidentPostMortemStatus | Unset = UNSET + started_at: None | str | Unset = UNSET + mitigated_at: None | str | Unset = UNSET + resolved_at: None | str | Unset = UNSET + show_timeline: bool | Unset = UNSET + show_timeline_trail: bool | Unset = UNSET + show_timeline_genius: bool | Unset = UNSET + show_timeline_tasks: bool | Unset = UNSET + show_timeline_action_items: bool | Unset = UNSET + show_timeline_order: IncidentPostMortemShowTimelineOrder | Unset = "desc" + show_services_impacted: bool | Unset = UNSET + show_functionalities_impacted: bool | Unset = UNSET + show_groups_impacted: bool | Unset = UNSET + show_alerts_attached: bool | Unset = UNSET + url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -68,29 +70,29 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - content: None | Unset | str + content: None | str | Unset if isinstance(self.content, Unset): content = UNSET else: content = self.content - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - mitigated_at: None | Unset | str + mitigated_at: None | str | Unset if isinstance(self.mitigated_at, Unset): mitigated_at = UNSET else: mitigated_at = self.mitigated_at - resolved_at: None | Unset | str + resolved_at: None | str | Unset if isinstance(self.resolved_at, Unset): resolved_at = UNSET else: @@ -106,7 +108,7 @@ def to_dict(self) -> dict[str, Any]: show_timeline_action_items = self.show_timeline_action_items - show_timeline_order: Unset | str = UNSET + show_timeline_order: str | Unset = UNSET if not isinstance(self.show_timeline_order, Unset): show_timeline_order = self.show_timeline_order @@ -173,46 +175,46 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_content(data: object) -> None | Unset | str: + def _parse_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) content = _parse_content(d.pop("content", UNSET)) _status = d.pop("status", UNSET) - status: Unset | IncidentPostMortemStatus + status: IncidentPostMortemStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_incident_post_mortem_status(_status) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_mitigated_at(data: object) -> None | Unset | str: + def _parse_mitigated_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigated_at = _parse_mitigated_at(d.pop("mitigated_at", UNSET)) - def _parse_resolved_at(data: object) -> None | Unset | str: + def _parse_resolved_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) @@ -227,7 +229,7 @@ def _parse_resolved_at(data: object) -> None | Unset | str: show_timeline_action_items = d.pop("show_timeline_action_items", UNSET) _show_timeline_order = d.pop("show_timeline_order", UNSET) - show_timeline_order: Unset | IncidentPostMortemShowTimelineOrder + show_timeline_order: IncidentPostMortemShowTimelineOrder | Unset if isinstance(_show_timeline_order, Unset): show_timeline_order = UNSET else: diff --git a/rootly_sdk/models/incident_post_mortem_list.py b/rootly_sdk/models/incident_post_mortem_list.py index 75361719..dc7e0e30 100644 --- a/rootly_sdk/models/incident_post_mortem_list.py +++ b/rootly_sdk/models/incident_post_mortem_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentPostMortemList: """ Attributes: - data (list['IncidentPostMortemListDataItem']): + data (list[IncidentPostMortemListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentPostMortemListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentPostMortemListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_post_mortem_list_data_item.py b/rootly_sdk/models/incident_post_mortem_list_data_item.py index 83ac4c56..956c4ed2 100644 --- a/rootly_sdk/models/incident_post_mortem_list_data_item.py +++ b/rootly_sdk/models/incident_post_mortem_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPostMortemListDataItem: id: str type_: IncidentPostMortemListDataItemType - attributes: "IncidentPostMortem" + attributes: IncidentPostMortem additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_post_mortem_response.py b/rootly_sdk/models/incident_post_mortem_response.py index 363201c7..bbc06c20 100644 --- a/rootly_sdk/models/incident_post_mortem_response.py +++ b/rootly_sdk/models/incident_post_mortem_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentPostMortemResponse: data (IncidentPostMortemResponseData): """ - data: "IncidentPostMortemResponseData" + data: IncidentPostMortemResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_post_mortem_response_data.py b/rootly_sdk/models/incident_post_mortem_response_data.py index c32b822e..c5f49a4e 100644 --- a/rootly_sdk/models/incident_post_mortem_response_data.py +++ b/rootly_sdk/models/incident_post_mortem_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentPostMortemResponseData: id: str type_: IncidentPostMortemResponseDataType - attributes: "IncidentPostMortem" + attributes: IncidentPostMortem additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_resolved_by_type_0.py b/rootly_sdk/models/incident_resolved_by_type_0.py index 6b8abbc3..053c1026 100644 --- a/rootly_sdk/models/incident_resolved_by_type_0.py +++ b/rootly_sdk/models/incident_resolved_by_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentResolvedByType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_response.py b/rootly_sdk/models/incident_response.py index 53032d4d..956f0f07 100644 --- a/rootly_sdk/models/incident_response.py +++ b/rootly_sdk/models/incident_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentResponse: data (IncidentResponseData): """ - data: "IncidentResponseData" + data: IncidentResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_response_data.py b/rootly_sdk/models/incident_response_data.py index e36fbd3f..0bbe83f7 100644 --- a/rootly_sdk/models/incident_response_data.py +++ b/rootly_sdk/models/incident_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class IncidentResponseData: id: str type_: IncidentResponseDataType - attributes: "Incident" + attributes: Incident additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_retrospective_step.py b/rootly_sdk/models/incident_retrospective_step.py index bdd48caa..96dca873 100644 --- a/rootly_sdk/models/incident_retrospective_step.py +++ b/rootly_sdk/models/incident_retrospective_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -22,12 +24,12 @@ class IncidentRetrospectiveStep: title (str): The name of the step created_at (str): Date of creation updated_at (str): Date of last update - description (Union[None, Unset, str]): The description of the step - status (Union[Unset, IncidentRetrospectiveStepStatus]): Status of the incident retrospective step - kind (Union[None, Unset, str]): Due date - due_date (Union[None, Unset, str]): Due date - position (Union[Unset, int]): Position of the step - skippable (Union[Unset, bool]): Is the step skippable? + description (None | str | Unset): The description of the step + status (IncidentRetrospectiveStepStatus | Unset): Status of the incident retrospective step + kind (None | str | Unset): Due date + due_date (None | str | Unset): Due date + position (int | Unset): Position of the step + skippable (bool | Unset): Is the step skippable? """ retrospective_step_id: str @@ -35,12 +37,12 @@ class IncidentRetrospectiveStep: title: str created_at: str updated_at: str - description: None | Unset | str = UNSET - status: Unset | IncidentRetrospectiveStepStatus = UNSET - kind: None | Unset | str = UNSET - due_date: None | Unset | str = UNSET - position: Unset | int = UNSET - skippable: Unset | bool = UNSET + description: None | str | Unset = UNSET + status: IncidentRetrospectiveStepStatus | Unset = UNSET + kind: None | str | Unset = UNSET + due_date: None | str | Unset = UNSET + position: int | Unset = UNSET + skippable: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,23 +56,23 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - kind: None | Unset | str + kind: None | str | Unset if isinstance(self.kind, Unset): kind = UNSET else: kind = self.kind - due_date: None | Unset | str + due_date: None | str | Unset if isinstance(self.due_date, Unset): due_date = UNSET else: @@ -119,37 +121,37 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _status = d.pop("status", UNSET) - status: Unset | IncidentRetrospectiveStepStatus + status: IncidentRetrospectiveStepStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_incident_retrospective_step_status(_status) - def _parse_kind(data: object) -> None | Unset | str: + def _parse_kind(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kind = _parse_kind(d.pop("kind", UNSET)) - def _parse_due_date(data: object) -> None | Unset | str: + def _parse_due_date(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) due_date = _parse_due_date(d.pop("due_date", UNSET)) diff --git a/rootly_sdk/models/incident_retrospective_step_response.py b/rootly_sdk/models/incident_retrospective_step_response.py index 2fc1bf33..ad7fe343 100644 --- a/rootly_sdk/models/incident_retrospective_step_response.py +++ b/rootly_sdk/models/incident_retrospective_step_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentRetrospectiveStepResponse: data (IncidentRetrospectiveStepResponseData): """ - data: "IncidentRetrospectiveStepResponseData" + data: IncidentRetrospectiveStepResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_retrospective_step_response_data.py b/rootly_sdk/models/incident_retrospective_step_response_data.py index c231054b..d5e1b578 100644 --- a/rootly_sdk/models/incident_retrospective_step_response_data.py +++ b/rootly_sdk/models/incident_retrospective_step_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentRetrospectiveStepResponseData: id: str type_: IncidentRetrospectiveStepResponseDataType - attributes: "IncidentRetrospectiveStep" + attributes: IncidentRetrospectiveStep additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role.py b/rootly_sdk/models/incident_role.py index c5216257..9aa66312 100644 --- a/rootly_sdk/models/incident_role.py +++ b/rootly_sdk/models/incident_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,25 +18,25 @@ class IncidentRole: name (str): The name of the incident role created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the incident role - summary (Union[None, Unset, str]): The summary of the incident role - description (Union[None, Unset, str]): The description of the incident role - position (Union[None, Unset, int]): Position of the incident role - optional (Union[Unset, bool]): - enabled (Union[Unset, bool]): - allow_multi_user_assignment (Union[Unset, bool]): + slug (str | Unset): The slug of the incident role + summary (None | str | Unset): The summary of the incident role + description (None | str | Unset): The description of the incident role + position (int | None | Unset): Position of the incident role + optional (bool | Unset): + enabled (bool | Unset): + allow_multi_user_assignment (bool | Unset): """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - summary: None | Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - optional: Unset | bool = UNSET - enabled: Unset | bool = UNSET - allow_multi_user_assignment: Unset | bool = UNSET + slug: str | Unset = UNSET + summary: None | str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + optional: bool | Unset = UNSET + enabled: bool | Unset = UNSET + allow_multi_user_assignment: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,19 +48,19 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -107,30 +109,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/incident_role_list.py b/rootly_sdk/models/incident_role_list.py index 0e9b4d24..753a82f2 100644 --- a/rootly_sdk/models/incident_role_list.py +++ b/rootly_sdk/models/incident_role_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentRoleList: """ Attributes: - data (list['IncidentRoleListDataItem']): + data (list[IncidentRoleListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentRoleListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentRoleListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_list_data_item.py b/rootly_sdk/models/incident_role_list_data_item.py index c736b804..3a519dc9 100644 --- a/rootly_sdk/models/incident_role_list_data_item.py +++ b/rootly_sdk/models/incident_role_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentRoleListDataItem: id: str type_: IncidentRoleListDataItemType - attributes: "IncidentRole" + attributes: IncidentRole additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_response.py b/rootly_sdk/models/incident_role_response.py index 17d66583..7f00bd6d 100644 --- a/rootly_sdk/models/incident_role_response.py +++ b/rootly_sdk/models/incident_role_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentRoleResponse: data (IncidentRoleResponseData): """ - data: "IncidentRoleResponseData" + data: IncidentRoleResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_response_data.py b/rootly_sdk/models/incident_role_response_data.py index 9b1a5e16..b6a7a41d 100644 --- a/rootly_sdk/models/incident_role_response_data.py +++ b/rootly_sdk/models/incident_role_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentRoleResponseData: id: str type_: IncidentRoleResponseDataType - attributes: "IncidentRole" + attributes: IncidentRole additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_task.py b/rootly_sdk/models/incident_role_task.py index 16646549..5d7c3c97 100644 --- a/rootly_sdk/models/incident_role_task.py +++ b/rootly_sdk/models/incident_role_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,17 +19,17 @@ class IncidentRoleTask: task (str): The task of the incident task created_at (str): Date of creation updated_at (str): Date of last update - incident_role_id (Union[Unset, str]): - description (Union[None, Unset, str]): The description of incident task - priority (Union[Unset, IncidentRoleTaskPriority]): The priority of the incident task + incident_role_id (str | Unset): + description (None | str | Unset): The description of incident task + priority (IncidentRoleTaskPriority | Unset): The priority of the incident task """ task: str created_at: str updated_at: str - incident_role_id: Unset | str = UNSET - description: None | Unset | str = UNSET - priority: Unset | IncidentRoleTaskPriority = UNSET + incident_role_id: str | Unset = UNSET + description: None | str | Unset = UNSET + priority: IncidentRoleTaskPriority | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,13 +41,13 @@ def to_dict(self) -> dict[str, Any]: incident_role_id = self.incident_role_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority @@ -78,17 +80,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_role_id = d.pop("incident_role_id", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | IncidentRoleTaskPriority + priority: IncidentRoleTaskPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/incident_role_task_list.py b/rootly_sdk/models/incident_role_task_list.py index 4f045d45..3911239e 100644 --- a/rootly_sdk/models/incident_role_task_list.py +++ b/rootly_sdk/models/incident_role_task_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentRoleTaskList: """ Attributes: - data (list['IncidentRoleTaskListDataItem']): + data (list[IncidentRoleTaskListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentRoleTaskListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentRoleTaskListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_task_list_data_item.py b/rootly_sdk/models/incident_role_task_list_data_item.py index 708c5a06..f9a55f68 100644 --- a/rootly_sdk/models/incident_role_task_list_data_item.py +++ b/rootly_sdk/models/incident_role_task_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentRoleTaskListDataItem: id: str type_: IncidentRoleTaskListDataItemType - attributes: "IncidentRoleTask" + attributes: IncidentRoleTask additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_task_response.py b/rootly_sdk/models/incident_role_task_response.py index 69a20ea2..06830b79 100644 --- a/rootly_sdk/models/incident_role_task_response.py +++ b/rootly_sdk/models/incident_role_task_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentRoleTaskResponse: data (IncidentRoleTaskResponseData): """ - data: "IncidentRoleTaskResponseData" + data: IncidentRoleTaskResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_role_task_response_data.py b/rootly_sdk/models/incident_role_task_response_data.py index 7fd228aa..04f49ff4 100644 --- a/rootly_sdk/models/incident_role_task_response_data.py +++ b/rootly_sdk/models/incident_role_task_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentRoleTaskResponseData: id: str type_: IncidentRoleTaskResponseDataType - attributes: "IncidentRoleTask" + attributes: IncidentRoleTask additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_started_by_type_0.py b/rootly_sdk/models/incident_started_by_type_0.py index 5189979b..241e922c 100644 --- a/rootly_sdk/models/incident_started_by_type_0.py +++ b/rootly_sdk/models/incident_started_by_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentStartedByType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_status_page_event.py b/rootly_sdk/models/incident_status_page_event.py index e260ebb5..77bff120 100644 --- a/rootly_sdk/models/incident_status_page_event.py +++ b/rootly_sdk/models/incident_status_page_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,20 +23,20 @@ class IncidentStatusPageEvent: started_at (str): Date of start created_at (str): Date of creation updated_at (str): Date of last update - status_page_id (Union[Unset, str]): Unique ID of the status page you wish to post the event to - status (Union[Unset, IncidentStatusPageEventStatus]): The status of the incident event - notify_subscribers (Union[Unset, bool]): Notify all status pages subscribers - should_tweet (Union[Unset, bool]): For Statuspage.io integrated pages auto publishes a tweet for your update + status_page_id (str | Unset): Unique ID of the status page you wish to post the event to + status (IncidentStatusPageEventStatus | Unset): The status of the incident event + notify_subscribers (bool | Unset): Notify all status pages subscribers + should_tweet (bool | Unset): For Statuspage.io integrated pages auto publishes a tweet for your update """ event: str started_at: str created_at: str updated_at: str - status_page_id: Unset | str = UNSET - status: Unset | IncidentStatusPageEventStatus = UNSET - notify_subscribers: Unset | bool = UNSET - should_tweet: Unset | bool = UNSET + status_page_id: str | Unset = UNSET + status: IncidentStatusPageEventStatus | Unset = UNSET + notify_subscribers: bool | Unset = UNSET + should_tweet: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: status_page_id = self.status_page_id - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status @@ -91,7 +93,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_page_id = d.pop("status_page_id", UNSET) _status = d.pop("status", UNSET) - status: Unset | IncidentStatusPageEventStatus + status: IncidentStatusPageEventStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/rootly_sdk/models/incident_status_page_event_list.py b/rootly_sdk/models/incident_status_page_event_list.py index 18a1a755..81f6df05 100644 --- a/rootly_sdk/models/incident_status_page_event_list.py +++ b/rootly_sdk/models/incident_status_page_event_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentStatusPageEventList: """ Attributes: - data (list['IncidentStatusPageEventListDataItem']): + data (list[IncidentStatusPageEventListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentStatusPageEventListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentStatusPageEventListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_status_page_event_list_data_item.py b/rootly_sdk/models/incident_status_page_event_list_data_item.py index 6187375a..18ef50a2 100644 --- a/rootly_sdk/models/incident_status_page_event_list_data_item.py +++ b/rootly_sdk/models/incident_status_page_event_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentStatusPageEventListDataItem: id: str type_: IncidentStatusPageEventListDataItemType - attributes: "IncidentStatusPageEvent" + attributes: IncidentStatusPageEvent additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_status_page_event_response.py b/rootly_sdk/models/incident_status_page_event_response.py index d8a9cfa8..271b772d 100644 --- a/rootly_sdk/models/incident_status_page_event_response.py +++ b/rootly_sdk/models/incident_status_page_event_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentStatusPageEventResponse: data (IncidentStatusPageEventResponseData): """ - data: "IncidentStatusPageEventResponseData" + data: IncidentStatusPageEventResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_status_page_event_response_data.py b/rootly_sdk/models/incident_status_page_event_response_data.py index 2a860a98..7310f9cb 100644 --- a/rootly_sdk/models/incident_status_page_event_response_data.py +++ b/rootly_sdk/models/incident_status_page_event_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentStatusPageEventResponseData: id: str type_: IncidentStatusPageEventResponseDataType - attributes: "IncidentStatusPageEvent" + attributes: IncidentStatusPageEvent additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_sub_status.py b/rootly_sdk/models/incident_sub_status.py index 62537e7e..5fa71a29 100644 --- a/rootly_sdk/models/incident_sub_status.py +++ b/rootly_sdk/models/incident_sub_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,13 +20,13 @@ class IncidentSubStatus: sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's sub-status was assigned. assigned_at (str): - assigned_by_user_id (Union[None, Unset, int]): + assigned_by_user_id (int | None | Unset): """ incident_id: str sub_status_id: str assigned_at: str - assigned_by_user_id: None | Unset | int = UNSET + assigned_by_user_id: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: assigned_at = self.assigned_at - assigned_by_user_id: None | Unset | int + assigned_by_user_id: int | None | Unset if isinstance(self.assigned_by_user_id, Unset): assigned_by_user_id = UNSET else: @@ -63,12 +65,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assigned_at = d.pop("assigned_at") - def _parse_assigned_by_user_id(data: object) -> None | Unset | int: + def _parse_assigned_by_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) assigned_by_user_id = _parse_assigned_by_user_id(d.pop("assigned_by_user_id", UNSET)) diff --git a/rootly_sdk/models/incident_sub_status_list.py b/rootly_sdk/models/incident_sub_status_list.py index 029a1838..0bb5d1a5 100644 --- a/rootly_sdk/models/incident_sub_status_list.py +++ b/rootly_sdk/models/incident_sub_status_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentSubStatusList: """ Attributes: - data (list['IncidentSubStatusListDataItem']): + data (list[IncidentSubStatusListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentSubStatusListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentSubStatusListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_sub_status_list_data_item.py b/rootly_sdk/models/incident_sub_status_list_data_item.py index bfb54b09..d008330e 100644 --- a/rootly_sdk/models/incident_sub_status_list_data_item.py +++ b/rootly_sdk/models/incident_sub_status_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentSubStatusListDataItem: id: str type_: IncidentSubStatusListDataItemType - attributes: "IncidentSubStatus" + attributes: IncidentSubStatus additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_sub_status_response.py b/rootly_sdk/models/incident_sub_status_response.py index d91193e8..6856f8e2 100644 --- a/rootly_sdk/models/incident_sub_status_response.py +++ b/rootly_sdk/models/incident_sub_status_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentSubStatusResponse: data (IncidentSubStatusResponseData): """ - data: "IncidentSubStatusResponseData" + data: IncidentSubStatusResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_sub_status_response_data.py b/rootly_sdk/models/incident_sub_status_response_data.py index c6afd0ca..2ed85e51 100644 --- a/rootly_sdk/models/incident_sub_status_response_data.py +++ b/rootly_sdk/models/incident_sub_status_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentSubStatusResponseData: id: str type_: IncidentSubStatusResponseDataType - attributes: "IncidentSubStatus" + attributes: IncidentSubStatus additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_trigger_params.py b/rootly_sdk/models/incident_trigger_params.py index 6aa841fb..003abd73 100644 --- a/rootly_sdk/models/incident_trigger_params.py +++ b/rootly_sdk/models/incident_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -110,60 +112,56 @@ class IncidentTriggerParams: """ Attributes: trigger_type (IncidentTriggerParamsTriggerType): - triggers (Union[Unset, list[str]]): - incident_visibilities (Union[Unset, list[bool]]): - incident_kinds (Union[Unset, list[IncidentTriggerParamsIncidentKindsItem]]): - incident_statuses (Union[Unset, list[IncidentTriggerParamsIncidentStatusesItem]]): - incident_inactivity_duration (Union[None, Unset, str]): - incident_condition (Union[Unset, IncidentTriggerParamsIncidentCondition]): Default: 'ALL'. - incident_condition_visibility (Union[Unset, IncidentTriggerParamsIncidentConditionVisibility]): Default: 'ANY'. - incident_condition_kind (Union[Unset, IncidentTriggerParamsIncidentConditionKind]): Default: 'IS'. - incident_condition_status (Union[Unset, IncidentTriggerParamsIncidentConditionStatus]): Default: 'ANY'. - incident_condition_sub_status (Union[Unset, IncidentTriggerParamsIncidentConditionSubStatus]): Default: 'ANY'. - incident_condition_environment (Union[Unset, IncidentTriggerParamsIncidentConditionEnvironment]): Default: - 'ANY'. - incident_condition_severity (Union[Unset, IncidentTriggerParamsIncidentConditionSeverity]): Default: 'ANY'. - incident_condition_incident_type (Union[Unset, IncidentTriggerParamsIncidentConditionIncidentType]): Default: - 'ANY'. - incident_condition_incident_roles (Union[Unset, IncidentTriggerParamsIncidentConditionIncidentRoles]): Default: + triggers (list[str] | Unset): + incident_visibilities (list[bool] | Unset): + incident_kinds (list[IncidentTriggerParamsIncidentKindsItem] | Unset): + incident_statuses (list[IncidentTriggerParamsIncidentStatusesItem] | Unset): + incident_inactivity_duration (None | str | Unset): + incident_condition (IncidentTriggerParamsIncidentCondition | Unset): Default: 'ALL'. + incident_condition_visibility (IncidentTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. + incident_condition_kind (IncidentTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. + incident_condition_status (IncidentTriggerParamsIncidentConditionStatus | Unset): Default: 'ANY'. + incident_condition_sub_status (IncidentTriggerParamsIncidentConditionSubStatus | Unset): Default: 'ANY'. + incident_condition_environment (IncidentTriggerParamsIncidentConditionEnvironment | Unset): Default: 'ANY'. + incident_condition_severity (IncidentTriggerParamsIncidentConditionSeverity | Unset): Default: 'ANY'. + incident_condition_incident_type (IncidentTriggerParamsIncidentConditionIncidentType | Unset): Default: 'ANY'. + incident_condition_incident_roles (IncidentTriggerParamsIncidentConditionIncidentRoles | Unset): Default: 'ANY'. - incident_condition_service (Union[Unset, IncidentTriggerParamsIncidentConditionService]): Default: 'ANY'. - incident_condition_functionality (Union[Unset, IncidentTriggerParamsIncidentConditionFunctionality]): Default: - 'ANY'. - incident_condition_group (Union[Unset, IncidentTriggerParamsIncidentConditionGroup]): Default: 'ANY'. - incident_condition_cause (Union[Unset, IncidentTriggerParamsIncidentConditionCause]): Default: 'ANY'. - incident_post_mortem_condition_cause (Union[Unset, IncidentTriggerParamsIncidentPostMortemConditionCause]): + incident_condition_service (IncidentTriggerParamsIncidentConditionService | Unset): Default: 'ANY'. + incident_condition_functionality (IncidentTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. + incident_condition_group (IncidentTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. + incident_condition_cause (IncidentTriggerParamsIncidentConditionCause | Unset): Default: 'ANY'. + incident_post_mortem_condition_cause (IncidentTriggerParamsIncidentPostMortemConditionCause | Unset): [DEPRECATED] Use incident_condition_cause instead Default: 'ANY'. - incident_condition_summary (Union[IncidentTriggerParamsIncidentConditionSummaryType1, None, Unset]): - incident_condition_started_at (Union[IncidentTriggerParamsIncidentConditionStartedAtType1, None, Unset]): - incident_condition_detected_at (Union[IncidentTriggerParamsIncidentConditionDetectedAtType1, None, Unset]): - incident_condition_acknowledged_at (Union[IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, None, - Unset]): - incident_condition_mitigated_at (Union[IncidentTriggerParamsIncidentConditionMitigatedAtType1, None, Unset]): - incident_condition_resolved_at (Union[IncidentTriggerParamsIncidentConditionResolvedAtType1, None, Unset]): - incident_conditional_inactivity (Union[IncidentTriggerParamsIncidentConditionalInactivityType1, None, Unset]): + incident_condition_summary (IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset): + incident_condition_started_at (IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset): + incident_condition_detected_at (IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset): + incident_condition_acknowledged_at (IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset): + incident_condition_mitigated_at (IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset): + incident_condition_resolved_at (IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset): + incident_conditional_inactivity (IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset): """ trigger_type: IncidentTriggerParamsTriggerType - triggers: Unset | list[str] = UNSET - incident_visibilities: Unset | list[bool] = UNSET - incident_kinds: Unset | list[IncidentTriggerParamsIncidentKindsItem] = UNSET - incident_statuses: Unset | list[IncidentTriggerParamsIncidentStatusesItem] = UNSET - incident_inactivity_duration: None | Unset | str = UNSET - incident_condition: Unset | IncidentTriggerParamsIncidentCondition = "ALL" - incident_condition_visibility: Unset | IncidentTriggerParamsIncidentConditionVisibility = "ANY" - incident_condition_kind: Unset | IncidentTriggerParamsIncidentConditionKind = "IS" - incident_condition_status: Unset | IncidentTriggerParamsIncidentConditionStatus = "ANY" - incident_condition_sub_status: Unset | IncidentTriggerParamsIncidentConditionSubStatus = "ANY" - incident_condition_environment: Unset | IncidentTriggerParamsIncidentConditionEnvironment = "ANY" - incident_condition_severity: Unset | IncidentTriggerParamsIncidentConditionSeverity = "ANY" - incident_condition_incident_type: Unset | IncidentTriggerParamsIncidentConditionIncidentType = "ANY" - incident_condition_incident_roles: Unset | IncidentTriggerParamsIncidentConditionIncidentRoles = "ANY" - incident_condition_service: Unset | IncidentTriggerParamsIncidentConditionService = "ANY" - incident_condition_functionality: Unset | IncidentTriggerParamsIncidentConditionFunctionality = "ANY" - incident_condition_group: Unset | IncidentTriggerParamsIncidentConditionGroup = "ANY" - incident_condition_cause: Unset | IncidentTriggerParamsIncidentConditionCause = "ANY" - incident_post_mortem_condition_cause: Unset | IncidentTriggerParamsIncidentPostMortemConditionCause = "ANY" + triggers: list[str] | Unset = UNSET + incident_visibilities: list[bool] | Unset = UNSET + incident_kinds: list[IncidentTriggerParamsIncidentKindsItem] | Unset = UNSET + incident_statuses: list[IncidentTriggerParamsIncidentStatusesItem] | Unset = UNSET + incident_inactivity_duration: None | str | Unset = UNSET + incident_condition: IncidentTriggerParamsIncidentCondition | Unset = "ALL" + incident_condition_visibility: IncidentTriggerParamsIncidentConditionVisibility | Unset = "ANY" + incident_condition_kind: IncidentTriggerParamsIncidentConditionKind | Unset = "IS" + incident_condition_status: IncidentTriggerParamsIncidentConditionStatus | Unset = "ANY" + incident_condition_sub_status: IncidentTriggerParamsIncidentConditionSubStatus | Unset = "ANY" + incident_condition_environment: IncidentTriggerParamsIncidentConditionEnvironment | Unset = "ANY" + incident_condition_severity: IncidentTriggerParamsIncidentConditionSeverity | Unset = "ANY" + incident_condition_incident_type: IncidentTriggerParamsIncidentConditionIncidentType | Unset = "ANY" + incident_condition_incident_roles: IncidentTriggerParamsIncidentConditionIncidentRoles | Unset = "ANY" + incident_condition_service: IncidentTriggerParamsIncidentConditionService | Unset = "ANY" + incident_condition_functionality: IncidentTriggerParamsIncidentConditionFunctionality | Unset = "ANY" + incident_condition_group: IncidentTriggerParamsIncidentConditionGroup | Unset = "ANY" + incident_condition_cause: IncidentTriggerParamsIncidentConditionCause | Unset = "ANY" + incident_post_mortem_condition_cause: IncidentTriggerParamsIncidentPostMortemConditionCause | Unset = "ANY" incident_condition_summary: IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset = UNSET incident_condition_started_at: IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset = UNSET incident_condition_detected_at: IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset = UNSET @@ -176,91 +174,91 @@ class IncidentTriggerParams: def to_dict(self) -> dict[str, Any]: trigger_type: str = self.trigger_type - triggers: Unset | list[str] = UNSET + triggers: list[str] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = self.triggers - incident_visibilities: Unset | list[bool] = UNSET + incident_visibilities: list[bool] | Unset = UNSET if not isinstance(self.incident_visibilities, Unset): incident_visibilities = self.incident_visibilities - incident_kinds: Unset | list[str] = UNSET + incident_kinds: list[str] | Unset = UNSET if not isinstance(self.incident_kinds, Unset): incident_kinds = [] for incident_kinds_item_data in self.incident_kinds: incident_kinds_item: str = incident_kinds_item_data incident_kinds.append(incident_kinds_item) - incident_statuses: Unset | list[str] = UNSET + incident_statuses: list[str] | Unset = UNSET if not isinstance(self.incident_statuses, Unset): incident_statuses = [] for incident_statuses_item_data in self.incident_statuses: incident_statuses_item: str = incident_statuses_item_data incident_statuses.append(incident_statuses_item) - incident_inactivity_duration: None | Unset | str + incident_inactivity_duration: None | str | Unset if isinstance(self.incident_inactivity_duration, Unset): incident_inactivity_duration = UNSET else: incident_inactivity_duration = self.incident_inactivity_duration - incident_condition: Unset | str = UNSET + incident_condition: str | Unset = UNSET if not isinstance(self.incident_condition, Unset): incident_condition = self.incident_condition - incident_condition_visibility: Unset | str = UNSET + incident_condition_visibility: str | Unset = UNSET if not isinstance(self.incident_condition_visibility, Unset): incident_condition_visibility = self.incident_condition_visibility - incident_condition_kind: Unset | str = UNSET + incident_condition_kind: str | Unset = UNSET if not isinstance(self.incident_condition_kind, Unset): incident_condition_kind = self.incident_condition_kind - incident_condition_status: Unset | str = UNSET + incident_condition_status: str | Unset = UNSET if not isinstance(self.incident_condition_status, Unset): incident_condition_status = self.incident_condition_status - incident_condition_sub_status: Unset | str = UNSET + incident_condition_sub_status: str | Unset = UNSET if not isinstance(self.incident_condition_sub_status, Unset): incident_condition_sub_status = self.incident_condition_sub_status - incident_condition_environment: Unset | str = UNSET + incident_condition_environment: str | Unset = UNSET if not isinstance(self.incident_condition_environment, Unset): incident_condition_environment = self.incident_condition_environment - incident_condition_severity: Unset | str = UNSET + incident_condition_severity: str | Unset = UNSET if not isinstance(self.incident_condition_severity, Unset): incident_condition_severity = self.incident_condition_severity - incident_condition_incident_type: Unset | str = UNSET + incident_condition_incident_type: str | Unset = UNSET if not isinstance(self.incident_condition_incident_type, Unset): incident_condition_incident_type = self.incident_condition_incident_type - incident_condition_incident_roles: Unset | str = UNSET + incident_condition_incident_roles: str | Unset = UNSET if not isinstance(self.incident_condition_incident_roles, Unset): incident_condition_incident_roles = self.incident_condition_incident_roles - incident_condition_service: Unset | str = UNSET + incident_condition_service: str | Unset = UNSET if not isinstance(self.incident_condition_service, Unset): incident_condition_service = self.incident_condition_service - incident_condition_functionality: Unset | str = UNSET + incident_condition_functionality: str | Unset = UNSET if not isinstance(self.incident_condition_functionality, Unset): incident_condition_functionality = self.incident_condition_functionality - incident_condition_group: Unset | str = UNSET + incident_condition_group: str | Unset = UNSET if not isinstance(self.incident_condition_group, Unset): incident_condition_group = self.incident_condition_group - incident_condition_cause: Unset | str = UNSET + incident_condition_cause: str | Unset = UNSET if not isinstance(self.incident_condition_cause, Unset): incident_condition_cause = self.incident_condition_cause - incident_post_mortem_condition_cause: Unset | str = UNSET + incident_post_mortem_condition_cause: str | Unset = UNSET if not isinstance(self.incident_post_mortem_condition_cause, Unset): incident_post_mortem_condition_cause = self.incident_post_mortem_condition_cause - incident_condition_summary: None | Unset | str + incident_condition_summary: None | str | Unset if isinstance(self.incident_condition_summary, Unset): incident_condition_summary = UNSET elif isinstance(self.incident_condition_summary, str): @@ -268,7 +266,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_summary = self.incident_condition_summary - incident_condition_started_at: None | Unset | str + incident_condition_started_at: None | str | Unset if isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = UNSET elif isinstance(self.incident_condition_started_at, str): @@ -276,7 +274,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_started_at = self.incident_condition_started_at - incident_condition_detected_at: None | Unset | str + incident_condition_detected_at: None | str | Unset if isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = UNSET elif isinstance(self.incident_condition_detected_at, str): @@ -284,7 +282,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_detected_at = self.incident_condition_detected_at - incident_condition_acknowledged_at: None | Unset | str + incident_condition_acknowledged_at: None | str | Unset if isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = UNSET elif isinstance(self.incident_condition_acknowledged_at, str): @@ -292,7 +290,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - incident_condition_mitigated_at: None | Unset | str + incident_condition_mitigated_at: None | str | Unset if isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = UNSET elif isinstance(self.incident_condition_mitigated_at, str): @@ -300,7 +298,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_mitigated_at = self.incident_condition_mitigated_at - incident_condition_resolved_at: None | Unset | str + incident_condition_resolved_at: None | str | Unset if isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = UNSET elif isinstance(self.incident_condition_resolved_at, str): @@ -308,7 +306,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | Unset | str + incident_conditional_inactivity: None | str | Unset if isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = UNSET elif isinstance(self.incident_conditional_inactivity, str): @@ -387,38 +385,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_visibilities = cast(list[bool], d.pop("incident_visibilities", UNSET)) - incident_kinds = [] _incident_kinds = d.pop("incident_kinds", UNSET) - for incident_kinds_item_data in _incident_kinds or []: - incident_kinds_item = check_incident_trigger_params_incident_kinds_item(incident_kinds_item_data) + incident_kinds: list[IncidentTriggerParamsIncidentKindsItem] | Unset = UNSET + if _incident_kinds is not UNSET: + incident_kinds = [] + for incident_kinds_item_data in _incident_kinds: + incident_kinds_item = check_incident_trigger_params_incident_kinds_item(incident_kinds_item_data) - incident_kinds.append(incident_kinds_item) + incident_kinds.append(incident_kinds_item) - incident_statuses = [] _incident_statuses = d.pop("incident_statuses", UNSET) - for incident_statuses_item_data in _incident_statuses or []: - incident_statuses_item = check_incident_trigger_params_incident_statuses_item(incident_statuses_item_data) + incident_statuses: list[IncidentTriggerParamsIncidentStatusesItem] | Unset = UNSET + if _incident_statuses is not UNSET: + incident_statuses = [] + for incident_statuses_item_data in _incident_statuses: + incident_statuses_item = check_incident_trigger_params_incident_statuses_item( + incident_statuses_item_data + ) - incident_statuses.append(incident_statuses_item) + incident_statuses.append(incident_statuses_item) - def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: + def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_inactivity_duration = _parse_incident_inactivity_duration(d.pop("incident_inactivity_duration", UNSET)) _incident_condition = d.pop("incident_condition", UNSET) - incident_condition: Unset | IncidentTriggerParamsIncidentCondition + incident_condition: IncidentTriggerParamsIncidentCondition | Unset if isinstance(_incident_condition, Unset): incident_condition = UNSET else: incident_condition = check_incident_trigger_params_incident_condition(_incident_condition) _incident_condition_visibility = d.pop("incident_condition_visibility", UNSET) - incident_condition_visibility: Unset | IncidentTriggerParamsIncidentConditionVisibility + incident_condition_visibility: IncidentTriggerParamsIncidentConditionVisibility | Unset if isinstance(_incident_condition_visibility, Unset): incident_condition_visibility = UNSET else: @@ -427,14 +431,14 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_kind = d.pop("incident_condition_kind", UNSET) - incident_condition_kind: Unset | IncidentTriggerParamsIncidentConditionKind + incident_condition_kind: IncidentTriggerParamsIncidentConditionKind | Unset if isinstance(_incident_condition_kind, Unset): incident_condition_kind = UNSET else: incident_condition_kind = check_incident_trigger_params_incident_condition_kind(_incident_condition_kind) _incident_condition_status = d.pop("incident_condition_status", UNSET) - incident_condition_status: Unset | IncidentTriggerParamsIncidentConditionStatus + incident_condition_status: IncidentTriggerParamsIncidentConditionStatus | Unset if isinstance(_incident_condition_status, Unset): incident_condition_status = UNSET else: @@ -443,7 +447,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_sub_status = d.pop("incident_condition_sub_status", UNSET) - incident_condition_sub_status: Unset | IncidentTriggerParamsIncidentConditionSubStatus + incident_condition_sub_status: IncidentTriggerParamsIncidentConditionSubStatus | Unset if isinstance(_incident_condition_sub_status, Unset): incident_condition_sub_status = UNSET else: @@ -452,7 +456,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_environment = d.pop("incident_condition_environment", UNSET) - incident_condition_environment: Unset | IncidentTriggerParamsIncidentConditionEnvironment + incident_condition_environment: IncidentTriggerParamsIncidentConditionEnvironment | Unset if isinstance(_incident_condition_environment, Unset): incident_condition_environment = UNSET else: @@ -461,7 +465,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_severity = d.pop("incident_condition_severity", UNSET) - incident_condition_severity: Unset | IncidentTriggerParamsIncidentConditionSeverity + incident_condition_severity: IncidentTriggerParamsIncidentConditionSeverity | Unset if isinstance(_incident_condition_severity, Unset): incident_condition_severity = UNSET else: @@ -470,7 +474,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_incident_type = d.pop("incident_condition_incident_type", UNSET) - incident_condition_incident_type: Unset | IncidentTriggerParamsIncidentConditionIncidentType + incident_condition_incident_type: IncidentTriggerParamsIncidentConditionIncidentType | Unset if isinstance(_incident_condition_incident_type, Unset): incident_condition_incident_type = UNSET else: @@ -479,7 +483,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_incident_roles = d.pop("incident_condition_incident_roles", UNSET) - incident_condition_incident_roles: Unset | IncidentTriggerParamsIncidentConditionIncidentRoles + incident_condition_incident_roles: IncidentTriggerParamsIncidentConditionIncidentRoles | Unset if isinstance(_incident_condition_incident_roles, Unset): incident_condition_incident_roles = UNSET else: @@ -488,7 +492,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_service = d.pop("incident_condition_service", UNSET) - incident_condition_service: Unset | IncidentTriggerParamsIncidentConditionService + incident_condition_service: IncidentTriggerParamsIncidentConditionService | Unset if isinstance(_incident_condition_service, Unset): incident_condition_service = UNSET else: @@ -497,7 +501,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_functionality = d.pop("incident_condition_functionality", UNSET) - incident_condition_functionality: Unset | IncidentTriggerParamsIncidentConditionFunctionality + incident_condition_functionality: IncidentTriggerParamsIncidentConditionFunctionality | Unset if isinstance(_incident_condition_functionality, Unset): incident_condition_functionality = UNSET else: @@ -506,21 +510,21 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_group = d.pop("incident_condition_group", UNSET) - incident_condition_group: Unset | IncidentTriggerParamsIncidentConditionGroup + incident_condition_group: IncidentTriggerParamsIncidentConditionGroup | Unset if isinstance(_incident_condition_group, Unset): incident_condition_group = UNSET else: incident_condition_group = check_incident_trigger_params_incident_condition_group(_incident_condition_group) _incident_condition_cause = d.pop("incident_condition_cause", UNSET) - incident_condition_cause: Unset | IncidentTriggerParamsIncidentConditionCause + incident_condition_cause: IncidentTriggerParamsIncidentConditionCause | Unset if isinstance(_incident_condition_cause, Unset): incident_condition_cause = UNSET else: incident_condition_cause = check_incident_trigger_params_incident_condition_cause(_incident_condition_cause) _incident_post_mortem_condition_cause = d.pop("incident_post_mortem_condition_cause", UNSET) - incident_post_mortem_condition_cause: Unset | IncidentTriggerParamsIncidentPostMortemConditionCause + incident_post_mortem_condition_cause: IncidentTriggerParamsIncidentPostMortemConditionCause | Unset if isinstance(_incident_post_mortem_condition_cause, Unset): incident_post_mortem_condition_cause = UNSET else: @@ -543,7 +547,7 @@ def _parse_incident_condition_summary( ) return incident_condition_summary_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset, data) @@ -564,7 +568,7 @@ def _parse_incident_condition_started_at( ) return incident_condition_started_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset, data) @@ -587,7 +591,7 @@ def _parse_incident_condition_detected_at( ) return incident_condition_detected_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset, data) @@ -610,7 +614,7 @@ def _parse_incident_condition_acknowledged_at( ) return incident_condition_acknowledged_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset, data) @@ -633,7 +637,7 @@ def _parse_incident_condition_mitigated_at( ) return incident_condition_mitigated_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset, data) @@ -656,7 +660,7 @@ def _parse_incident_condition_resolved_at( ) return incident_condition_resolved_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset, data) @@ -679,7 +683,7 @@ def _parse_incident_conditional_inactivity( ) return incident_conditional_inactivity_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset, data) diff --git a/rootly_sdk/models/incident_type.py b/rootly_sdk/models/incident_type.py index 7e0f7664..a467d2f2 100644 --- a/rootly_sdk/models/incident_type.py +++ b/rootly_sdk/models/incident_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -7,7 +9,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.incident_type_fields_item import IncidentTypeFieldsItem + from ..models.incident_type_properties_item import IncidentTypePropertiesItem from ..models.incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item from ..models.incident_type_slack_channels_type_0_item import IncidentTypeSlackChannelsType0Item @@ -22,29 +24,29 @@ class IncidentType: name (str): The name of the incident type created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the incident type - description (Union[None, Unset, str]): The description of the incident type - color (Union[None, Unset, str]): The hex color of the incident type - position (Union[None, Unset, int]): Position of the incident type - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the incident type - slack_channels (Union[None, Unset, list['IncidentTypeSlackChannelsType0Item']]): Slack Channels associated with - this incident type - slack_aliases (Union[None, Unset, list['IncidentTypeSlackAliasesType0Item']]): Slack Aliases associated with - this incident type - fields (Union[Unset, list['IncidentTypeFieldsItem']]): Array of field values for this incident type. + slug (str | Unset): The slug of the incident type + description (None | str | Unset): The description of the incident type + color (None | str | Unset): The hex color of the incident type + position (int | None | Unset): Position of the incident type + notify_emails (list[str] | None | Unset): Emails to attach to the incident type + slack_channels (list[IncidentTypeSlackChannelsType0Item] | None | Unset): Slack Channels associated with this + incident type + slack_aliases (list[IncidentTypeSlackAliasesType0Item] | None | Unset): Slack Aliases associated with this + incident type + properties (list[IncidentTypePropertiesItem] | Unset): Array of property values for this incident type. """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["IncidentTypeSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["IncidentTypeSlackAliasesType0Item"] = UNSET - fields: Unset | list["IncidentTypeFieldsItem"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[IncidentTypeSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[IncidentTypeSlackAliasesType0Item] | None | Unset = UNSET + properties: list[IncidentTypePropertiesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,25 +58,25 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -83,7 +85,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -95,7 +97,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -107,12 +109,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -137,14 +139,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.incident_type_fields_item import IncidentTypeFieldsItem + from ..models.incident_type_properties_item import IncidentTypePropertiesItem from ..models.incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item from ..models.incident_type_slack_channels_type_0_item import IncidentTypeSlackChannelsType0Item @@ -157,34 +159,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -195,13 +197,13 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_slack_channels(data: object) -> None | Unset | list["IncidentTypeSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[IncidentTypeSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -219,13 +221,13 @@ def _parse_slack_channels(data: object) -> None | Unset | list["IncidentTypeSlac slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["IncidentTypeSlackChannelsType0Item"], data) + return cast(list[IncidentTypeSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases(data: object) -> None | Unset | list["IncidentTypeSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[IncidentTypeSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -243,18 +245,20 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["IncidentTypeSlack slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["IncidentTypeSlackAliasesType0Item"], data) + return cast(list[IncidentTypeSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = IncidentTypeFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[IncidentTypePropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = IncidentTypePropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) incident_type = cls( name=name, @@ -267,7 +271,7 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["IncidentTypeSlack notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) incident_type.additional_properties = d diff --git a/rootly_sdk/models/incident_type_list.py b/rootly_sdk/models/incident_type_list.py index d7f84455..9e9c5c8c 100644 --- a/rootly_sdk/models/incident_type_list.py +++ b/rootly_sdk/models/incident_type_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class IncidentTypeList: """ Attributes: - data (list['IncidentTypeListDataItem']): + data (list[IncidentTypeListDataItem]): links (Links): meta (Meta): """ - data: list["IncidentTypeListDataItem"] - links: "Links" - meta: "Meta" + data: list[IncidentTypeListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_type_list_data_item.py b/rootly_sdk/models/incident_type_list_data_item.py index ed31943b..3f11a9a3 100644 --- a/rootly_sdk/models/incident_type_list_data_item.py +++ b/rootly_sdk/models/incident_type_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentTypeListDataItem: id: str type_: IncidentTypeListDataItemType - attributes: "IncidentType" + attributes: IncidentType additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_environment_data_attributes_fields_item.py b/rootly_sdk/models/incident_type_properties_item.py similarity index 65% rename from rootly_sdk/models/new_environment_data_attributes_fields_item.py rename to rootly_sdk/models/incident_type_properties_item.py index f8704df3..5bcab317 100644 --- a/rootly_sdk/models/new_environment_data_attributes_fields_item.py +++ b/rootly_sdk/models/incident_type_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="NewEnvironmentDataAttributesFieldsItem") +T = TypeVar("T", bound="IncidentTypePropertiesItem") @_attrs_define -class NewEnvironmentDataAttributesFieldsItem: - """Set a value for a catalog field +class IncidentTypePropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - new_environment_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + incident_type_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - new_environment_data_attributes_fields_item.additional_properties = d - return new_environment_data_attributes_fields_item + incident_type_properties_item.additional_properties = d + return incident_type_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/incident_type_response.py b/rootly_sdk/models/incident_type_response.py index 4a982196..4ce5945a 100644 --- a/rootly_sdk/models/incident_type_response.py +++ b/rootly_sdk/models/incident_type_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IncidentTypeResponse: data (IncidentTypeResponseData): """ - data: "IncidentTypeResponseData" + data: IncidentTypeResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_type_response_data.py b/rootly_sdk/models/incident_type_response_data.py index 7b9f0ecb..022302b0 100644 --- a/rootly_sdk/models/incident_type_response_data.py +++ b/rootly_sdk/models/incident_type_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class IncidentTypeResponseData: id: str type_: IncidentTypeResponseDataType - attributes: "IncidentType" + attributes: IncidentType additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_type_slack_aliases_type_0_item.py b/rootly_sdk/models/incident_type_slack_aliases_type_0_item.py index 5aadf52e..e60d5ce2 100644 --- a/rootly_sdk/models/incident_type_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/incident_type_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/incident_type_slack_channels_type_0_item.py b/rootly_sdk/models/incident_type_slack_channels_type_0_item.py index 4db8b7e4..b579c633 100644 --- a/rootly_sdk/models/incident_type_slack_channels_type_0_item.py +++ b/rootly_sdk/models/incident_type_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/incident_user_type_0.py b/rootly_sdk/models/incident_user_type_0.py index efbc92a9..dce50314 100644 --- a/rootly_sdk/models/incident_user_type_0.py +++ b/rootly_sdk/models/incident_user_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentUserType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/incident_zoom_meeting_global_dial_in_numbers_type_0_item.py b/rootly_sdk/models/incident_zoom_meeting_global_dial_in_numbers_type_0_item.py new file mode 100644 index 00000000..3bfaac57 --- /dev/null +++ b/rootly_sdk/models/incident_zoom_meeting_global_dial_in_numbers_type_0_item.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IncidentZoomMeetingGlobalDialInNumbersType0Item") + + +@_attrs_define +class IncidentZoomMeetingGlobalDialInNumbersType0Item: + """ + Attributes: + country (str | Unset): + country_name (str | Unset): + city (str | Unset): + number (str | Unset): + type_ (str | Unset): + """ + + country: str | Unset = UNSET + country_name: str | Unset = UNSET + city: str | Unset = UNSET + number: str | Unset = UNSET + type_: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + country = self.country + + country_name = self.country_name + + city = self.city + + number = self.number + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if country is not UNSET: + field_dict["country"] = country + if country_name is not UNSET: + field_dict["country_name"] = country_name + if city is not UNSET: + field_dict["city"] = city + if number is not UNSET: + field_dict["number"] = number + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + country = d.pop("country", UNSET) + + country_name = d.pop("country_name", UNSET) + + city = d.pop("city", UNSET) + + number = d.pop("number", UNSET) + + type_ = d.pop("type", UNSET) + + incident_zoom_meeting_global_dial_in_numbers_type_0_item = cls( + country=country, + country_name=country_name, + city=city, + number=number, + type_=type_, + ) + + incident_zoom_meeting_global_dial_in_numbers_type_0_item.additional_properties = d + return incident_zoom_meeting_global_dial_in_numbers_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/incidents_chart_response.py b/rootly_sdk/models/incidents_chart_response.py index e30f07a2..df356900 100644 --- a/rootly_sdk/models/incidents_chart_response.py +++ b/rootly_sdk/models/incidents_chart_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class IncidentsChartResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py index 00939f9c..c9e9c3fa 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,14 +28,14 @@ class InviteToMicrosoftTeamsChannelTaskParams: Attributes: channel (InviteToMicrosoftTeamsChannelTaskParamsChannel): emails (str): Comma separated list of emails to invite - task_type (Union[Unset, InviteToMicrosoftTeamsChannelTaskParamsTaskType]): - team (Union[Unset, InviteToMicrosoftTeamsChannelTaskParamsTeam]): + task_type (InviteToMicrosoftTeamsChannelTaskParamsTaskType | Unset): + team (InviteToMicrosoftTeamsChannelTaskParamsTeam | Unset): """ - channel: "InviteToMicrosoftTeamsChannelTaskParamsChannel" + channel: InviteToMicrosoftTeamsChannelTaskParamsChannel emails: str - task_type: Unset | InviteToMicrosoftTeamsChannelTaskParamsTaskType = UNSET - team: Union[Unset, "InviteToMicrosoftTeamsChannelTaskParamsTeam"] = UNSET + task_type: InviteToMicrosoftTeamsChannelTaskParamsTaskType | Unset = UNSET + team: InviteToMicrosoftTeamsChannelTaskParamsTeam | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -41,11 +43,11 @@ def to_dict(self) -> dict[str, Any]: emails = self.emails - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - team: Unset | dict[str, Any] = UNSET + team: dict[str, Any] | Unset = UNSET if not isinstance(self.team, Unset): team = self.team.to_dict() @@ -79,14 +81,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: emails = d.pop("emails") _task_type = d.pop("task_type", UNSET) - task_type: Unset | InviteToMicrosoftTeamsChannelTaskParamsTaskType + task_type: InviteToMicrosoftTeamsChannelTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_invite_to_microsoft_teams_channel_task_params_task_type(_task_type) _team = d.pop("team", UNSET) - team: Unset | InviteToMicrosoftTeamsChannelTaskParamsTeam + team: InviteToMicrosoftTeamsChannelTaskParamsTeam | Unset if isinstance(_team, Unset): team = UNSET else: diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_channel.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_channel.py index 5c59110f..08fe1c78 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_channel.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_channel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToMicrosoftTeamsChannelTaskParamsChannel: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_team.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_team.py index 00f2cd5d..8e6139f7 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_team.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToMicrosoftTeamsChannelTaskParamsTeam: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py index b26c113a..7e1b9b24 100644 --- a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py +++ b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -26,14 +28,14 @@ class InviteToSlackChannelOpsgenieTaskParams: """ Attributes: - channels (list['InviteToSlackChannelOpsgenieTaskParamsChannelsItem']): + channels (list[InviteToSlackChannelOpsgenieTaskParamsChannelsItem]): schedule (InviteToSlackChannelOpsgenieTaskParamsSchedule): - task_type (Union[Unset, InviteToSlackChannelOpsgenieTaskParamsTaskType]): + task_type (InviteToSlackChannelOpsgenieTaskParamsTaskType | Unset): """ - channels: list["InviteToSlackChannelOpsgenieTaskParamsChannelsItem"] - schedule: "InviteToSlackChannelOpsgenieTaskParamsSchedule" - task_type: Unset | InviteToSlackChannelOpsgenieTaskParamsTaskType = UNSET + channels: list[InviteToSlackChannelOpsgenieTaskParamsChannelsItem] + schedule: InviteToSlackChannelOpsgenieTaskParamsSchedule + task_type: InviteToSlackChannelOpsgenieTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: schedule = self.schedule.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -81,7 +83,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule = InviteToSlackChannelOpsgenieTaskParamsSchedule.from_dict(d.pop("schedule")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | InviteToSlackChannelOpsgenieTaskParamsTaskType + task_type: InviteToSlackChannelOpsgenieTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_channels_item.py b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_channels_item.py index 45a6009d..203b4beb 100644 --- a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_channels_item.py +++ b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelOpsgenieTaskParamsChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_schedule.py b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_schedule.py index 496748be..395e06bf 100644 --- a/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_schedule.py +++ b/rootly_sdk/models/invite_to_slack_channel_opsgenie_task_params_schedule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelOpsgenieTaskParamsSchedule: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py index 070af339..591cb3c9 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -38,22 +40,22 @@ class InviteToSlackChannelRootlyTaskParams: """ Attributes: - channels (list['InviteToSlackChannelRootlyTaskParamsChannelsItem']): - task_type (Union[Unset, InviteToSlackChannelRootlyTaskParamsTaskType]): - escalation_policy_target (Union[Unset, InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget]): - service_target (Union[Unset, InviteToSlackChannelRootlyTaskParamsServiceTarget]): - user_target (Union[Unset, InviteToSlackChannelRootlyTaskParamsUserTarget]): - group_target (Union[Unset, InviteToSlackChannelRootlyTaskParamsGroupTarget]): - schedule_target (Union[Unset, InviteToSlackChannelRootlyTaskParamsScheduleTarget]): + channels (list[InviteToSlackChannelRootlyTaskParamsChannelsItem]): + task_type (InviteToSlackChannelRootlyTaskParamsTaskType | Unset): + escalation_policy_target (InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget | Unset): + service_target (InviteToSlackChannelRootlyTaskParamsServiceTarget | Unset): + user_target (InviteToSlackChannelRootlyTaskParamsUserTarget | Unset): + group_target (InviteToSlackChannelRootlyTaskParamsGroupTarget | Unset): + schedule_target (InviteToSlackChannelRootlyTaskParamsScheduleTarget | Unset): """ - channels: list["InviteToSlackChannelRootlyTaskParamsChannelsItem"] - task_type: Unset | InviteToSlackChannelRootlyTaskParamsTaskType = UNSET - escalation_policy_target: Union[Unset, "InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget"] = UNSET - service_target: Union[Unset, "InviteToSlackChannelRootlyTaskParamsServiceTarget"] = UNSET - user_target: Union[Unset, "InviteToSlackChannelRootlyTaskParamsUserTarget"] = UNSET - group_target: Union[Unset, "InviteToSlackChannelRootlyTaskParamsGroupTarget"] = UNSET - schedule_target: Union[Unset, "InviteToSlackChannelRootlyTaskParamsScheduleTarget"] = UNSET + channels: list[InviteToSlackChannelRootlyTaskParamsChannelsItem] + task_type: InviteToSlackChannelRootlyTaskParamsTaskType | Unset = UNSET + escalation_policy_target: InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget | Unset = UNSET + service_target: InviteToSlackChannelRootlyTaskParamsServiceTarget | Unset = UNSET + user_target: InviteToSlackChannelRootlyTaskParamsUserTarget | Unset = UNSET + group_target: InviteToSlackChannelRootlyTaskParamsGroupTarget | Unset = UNSET + schedule_target: InviteToSlackChannelRootlyTaskParamsScheduleTarget | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -62,27 +64,27 @@ def to_dict(self) -> dict[str, Any]: channels_item = channels_item_data.to_dict() channels.append(channels_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - escalation_policy_target: Unset | dict[str, Any] = UNSET + escalation_policy_target: dict[str, Any] | Unset = UNSET if not isinstance(self.escalation_policy_target, Unset): escalation_policy_target = self.escalation_policy_target.to_dict() - service_target: Unset | dict[str, Any] = UNSET + service_target: dict[str, Any] | Unset = UNSET if not isinstance(self.service_target, Unset): service_target = self.service_target.to_dict() - user_target: Unset | dict[str, Any] = UNSET + user_target: dict[str, Any] | Unset = UNSET if not isinstance(self.user_target, Unset): user_target = self.user_target.to_dict() - group_target: Unset | dict[str, Any] = UNSET + group_target: dict[str, Any] | Unset = UNSET if not isinstance(self.group_target, Unset): group_target = self.group_target.to_dict() - schedule_target: Unset | dict[str, Any] = UNSET + schedule_target: dict[str, Any] | Unset = UNSET if not isinstance(self.schedule_target, Unset): schedule_target = self.schedule_target.to_dict() @@ -138,14 +140,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: channels.append(channels_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | InviteToSlackChannelRootlyTaskParamsTaskType + task_type: InviteToSlackChannelRootlyTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_invite_to_slack_channel_rootly_task_params_task_type(_task_type) _escalation_policy_target = d.pop("escalation_policy_target", UNSET) - escalation_policy_target: Unset | InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget + escalation_policy_target: InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget | Unset if isinstance(_escalation_policy_target, Unset): escalation_policy_target = UNSET else: @@ -154,28 +156,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _service_target = d.pop("service_target", UNSET) - service_target: Unset | InviteToSlackChannelRootlyTaskParamsServiceTarget + service_target: InviteToSlackChannelRootlyTaskParamsServiceTarget | Unset if isinstance(_service_target, Unset): service_target = UNSET else: service_target = InviteToSlackChannelRootlyTaskParamsServiceTarget.from_dict(_service_target) _user_target = d.pop("user_target", UNSET) - user_target: Unset | InviteToSlackChannelRootlyTaskParamsUserTarget + user_target: InviteToSlackChannelRootlyTaskParamsUserTarget | Unset if isinstance(_user_target, Unset): user_target = UNSET else: user_target = InviteToSlackChannelRootlyTaskParamsUserTarget.from_dict(_user_target) _group_target = d.pop("group_target", UNSET) - group_target: Unset | InviteToSlackChannelRootlyTaskParamsGroupTarget + group_target: InviteToSlackChannelRootlyTaskParamsGroupTarget | Unset if isinstance(_group_target, Unset): group_target = UNSET else: group_target = InviteToSlackChannelRootlyTaskParamsGroupTarget.from_dict(_group_target) _schedule_target = d.pop("schedule_target", UNSET) - schedule_target: Unset | InviteToSlackChannelRootlyTaskParamsScheduleTarget + schedule_target: InviteToSlackChannelRootlyTaskParamsScheduleTarget | Unset if isinstance(_schedule_target, Unset): schedule_target = UNSET else: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_channels_item.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_channels_item.py index 40e8480b..dc0a4aeb 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_channels_item.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelRootlyTaskParamsChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_escalation_policy_target.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_escalation_policy_target.py index b7f8aae0..c1ec962e 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_escalation_policy_target.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_escalation_policy_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_group_target.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_group_target.py index e22e4a4c..ddd9bad8 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_group_target.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_group_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelRootlyTaskParamsGroupTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_schedule_target.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_schedule_target.py index 68ad559b..66307c41 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_schedule_target.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_schedule_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelRootlyTaskParamsScheduleTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_service_target.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_service_target.py index b9f9bd54..93a0ddb1 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_service_target.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_service_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelRootlyTaskParamsServiceTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_user_target.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_user_target.py index ac6987fd..6ba36eae 100644 --- a/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_user_target.py +++ b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params_user_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelRootlyTaskParamsUserTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py index fe9170b0..53822b1d 100644 --- a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py +++ b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,14 +26,14 @@ class InviteToSlackChannelVictorOpsTaskParams: """ Attributes: - channels (list['InviteToSlackChannelVictorOpsTaskParamsChannelsItem']): + channels (list[InviteToSlackChannelVictorOpsTaskParamsChannelsItem]): team (InviteToSlackChannelVictorOpsTaskParamsTeam): - task_type (Union[Unset, InviteToSlackChannelVictorOpsTaskParamsTaskType]): + task_type (InviteToSlackChannelVictorOpsTaskParamsTaskType | Unset): """ - channels: list["InviteToSlackChannelVictorOpsTaskParamsChannelsItem"] - team: "InviteToSlackChannelVictorOpsTaskParamsTeam" - task_type: Unset | InviteToSlackChannelVictorOpsTaskParamsTaskType = UNSET + channels: list[InviteToSlackChannelVictorOpsTaskParamsChannelsItem] + team: InviteToSlackChannelVictorOpsTaskParamsTeam + task_type: InviteToSlackChannelVictorOpsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: team = self.team.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -79,7 +81,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: team = InviteToSlackChannelVictorOpsTaskParamsTeam.from_dict(d.pop("team")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | InviteToSlackChannelVictorOpsTaskParamsTaskType + task_type: InviteToSlackChannelVictorOpsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_channels_item.py b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_channels_item.py index 65599a9a..bb0cad1b 100644 --- a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_channels_item.py +++ b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelVictorOpsTaskParamsChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_team.py b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_team.py index fda1a9f0..b00e5aa4 100644 --- a/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_team.py +++ b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class InviteToSlackChannelVictorOpsTaskParamsTeam: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/ip_ranges.py b/rootly_sdk/models/ip_ranges.py index 64c416d1..f959ae26 100644 --- a/rootly_sdk/models/ip_ranges.py +++ b/rootly_sdk/models/ip_ranges.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/ip_ranges_response.py b/rootly_sdk/models/ip_ranges_response.py index 23b3ad46..b38ca535 100644 --- a/rootly_sdk/models/ip_ranges_response.py +++ b/rootly_sdk/models/ip_ranges_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class IpRangesResponse: data (IpRangesResponseData): """ - data: "IpRangesResponseData" + data: IpRangesResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/ip_ranges_response_data.py b/rootly_sdk/models/ip_ranges_response_data.py index 815ecd72..3c0ea6ff 100644 --- a/rootly_sdk/models/ip_ranges_response_data.py +++ b/rootly_sdk/models/ip_ranges_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class IpRangesResponseData: id: str type_: IpRangesResponseDataType - attributes: "IpRanges" + attributes: IpRanges additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/links.py b/rootly_sdk/models/links.py index 2fb410ae..4dcd3acf 100644 --- a/rootly_sdk/models/links.py +++ b/rootly_sdk/models/links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,8 +15,8 @@ class Links: Attributes: self_ (str): first (str): - prev (Union[None, str]): - next_ (Union[None, str]): + prev (None | str): + next_ (None | str): last (str): """ diff --git a/rootly_sdk/models/list_catalog_checklist_templates_include.py b/rootly_sdk/models/list_catalog_checklist_templates_include.py new file mode 100644 index 00000000..a43f01a6 --- /dev/null +++ b/rootly_sdk/models/list_catalog_checklist_templates_include.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +ListCatalogChecklistTemplatesInclude = Literal["template_fields", "template_owners"] + +LIST_CATALOG_CHECKLIST_TEMPLATES_INCLUDE_VALUES: set[ListCatalogChecklistTemplatesInclude] = { + "template_fields", + "template_owners", +} + + +def check_list_catalog_checklist_templates_include(value: str | None) -> ListCatalogChecklistTemplatesInclude | None: + if value is None: + return None + if value in LIST_CATALOG_CHECKLIST_TEMPLATES_INCLUDE_VALUES: + return cast(ListCatalogChecklistTemplatesInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CATALOG_CHECKLIST_TEMPLATES_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_catalog_checklist_templates_sort.py b/rootly_sdk/models/list_catalog_checklist_templates_sort.py new file mode 100644 index 00000000..e8eb966a --- /dev/null +++ b/rootly_sdk/models/list_catalog_checklist_templates_sort.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +ListCatalogChecklistTemplatesSort = Literal["-created_at", "-name", "-updated_at", "created_at", "name", "updated_at"] + +LIST_CATALOG_CHECKLIST_TEMPLATES_SORT_VALUES: set[ListCatalogChecklistTemplatesSort] = { + "-created_at", + "-name", + "-updated_at", + "created_at", + "name", + "updated_at", +} + + +def check_list_catalog_checklist_templates_sort(value: str | None) -> ListCatalogChecklistTemplatesSort | None: + if value is None: + return None + if value in LIST_CATALOG_CHECKLIST_TEMPLATES_SORT_VALUES: + return cast(ListCatalogChecklistTemplatesSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CATALOG_CHECKLIST_TEMPLATES_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_catalog_fields_include.py b/rootly_sdk/models/list_catalog_fields_include.py deleted file mode 100644 index 6f671501..00000000 --- a/rootly_sdk/models/list_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListCatalogFieldsInclude = Literal["catalog"] - -LIST_CATALOG_FIELDS_INCLUDE_VALUES: set[ListCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_catalog_fields_include(value: str | None) -> ListCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_catalog_fields_sort.py b/rootly_sdk/models/list_catalog_fields_sort.py deleted file mode 100644 index 42fe34d9..00000000 --- a/rootly_sdk/models/list_catalog_fields_sort.py +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Literal, cast - -ListCatalogFieldsSort = Literal["-created_at", "-position", "-updated_at", "created_at", "position", "updated_at"] - -LIST_CATALOG_FIELDS_SORT_VALUES: set[ListCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_catalog_fields_sort(value: str | None) -> ListCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_CATALOG_FIELDS_SORT_VALUES: - return cast(ListCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_cause_catalog_fields_include.py b/rootly_sdk/models/list_cause_catalog_fields_include.py deleted file mode 100644 index bb8a8d1c..00000000 --- a/rootly_sdk/models/list_cause_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListCauseCatalogFieldsInclude = Literal["catalog"] - -LIST_CAUSE_CATALOG_FIELDS_INCLUDE_VALUES: set[ListCauseCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_cause_catalog_fields_include(value: str | None) -> ListCauseCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_CAUSE_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListCauseCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CAUSE_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_cause_catalog_fields_sort.py b/rootly_sdk/models/list_cause_catalog_fields_sort.py deleted file mode 100644 index 1c45a85a..00000000 --- a/rootly_sdk/models/list_cause_catalog_fields_sort.py +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Literal, cast - -ListCauseCatalogFieldsSort = Literal["-created_at", "-position", "-updated_at", "created_at", "position", "updated_at"] - -LIST_CAUSE_CATALOG_FIELDS_SORT_VALUES: set[ListCauseCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_cause_catalog_fields_sort(value: str | None) -> ListCauseCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_CAUSE_CATALOG_FIELDS_SORT_VALUES: - return cast(ListCauseCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CAUSE_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_cause_catalog_properties_include.py b/rootly_sdk/models/list_cause_catalog_properties_include.py new file mode 100644 index 00000000..5565b8dd --- /dev/null +++ b/rootly_sdk/models/list_cause_catalog_properties_include.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ListCauseCatalogPropertiesInclude = Literal["catalog"] + +LIST_CAUSE_CATALOG_PROPERTIES_INCLUDE_VALUES: set[ListCauseCatalogPropertiesInclude] = { + "catalog", +} + + +def check_list_cause_catalog_properties_include(value: str | None) -> ListCauseCatalogPropertiesInclude | None: + if value is None: + return None + if value in LIST_CAUSE_CATALOG_PROPERTIES_INCLUDE_VALUES: + return cast(ListCauseCatalogPropertiesInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CAUSE_CATALOG_PROPERTIES_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_cause_catalog_properties_sort.py b/rootly_sdk/models/list_cause_catalog_properties_sort.py new file mode 100644 index 00000000..89fc6156 --- /dev/null +++ b/rootly_sdk/models/list_cause_catalog_properties_sort.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ListCauseCatalogPropertiesSort = Literal[ + "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" +] + +LIST_CAUSE_CATALOG_PROPERTIES_SORT_VALUES: set[ListCauseCatalogPropertiesSort] = { + "-created_at", + "-position", + "-updated_at", + "created_at", + "position", + "updated_at", +} + + +def check_list_cause_catalog_properties_sort(value: str | None) -> ListCauseCatalogPropertiesSort | None: + if value is None: + return None + if value in LIST_CAUSE_CATALOG_PROPERTIES_SORT_VALUES: + return cast(ListCauseCatalogPropertiesSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_CAUSE_CATALOG_PROPERTIES_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_environment_catalog_fields_include.py b/rootly_sdk/models/list_environment_catalog_fields_include.py deleted file mode 100644 index 062b0ff4..00000000 --- a/rootly_sdk/models/list_environment_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListEnvironmentCatalogFieldsInclude = Literal["catalog"] - -LIST_ENVIRONMENT_CATALOG_FIELDS_INCLUDE_VALUES: set[ListEnvironmentCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_environment_catalog_fields_include(value: str | None) -> ListEnvironmentCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_ENVIRONMENT_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListEnvironmentCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ENVIRONMENT_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_environment_catalog_fields_sort.py b/rootly_sdk/models/list_environment_catalog_fields_sort.py deleted file mode 100644 index 1c707aa3..00000000 --- a/rootly_sdk/models/list_environment_catalog_fields_sort.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ListEnvironmentCatalogFieldsSort = Literal[ - "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" -] - -LIST_ENVIRONMENT_CATALOG_FIELDS_SORT_VALUES: set[ListEnvironmentCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_environment_catalog_fields_sort(value: str | None) -> ListEnvironmentCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_ENVIRONMENT_CATALOG_FIELDS_SORT_VALUES: - return cast(ListEnvironmentCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ENVIRONMENT_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_environment_catalog_properties_include.py b/rootly_sdk/models/list_environment_catalog_properties_include.py new file mode 100644 index 00000000..02b002b0 --- /dev/null +++ b/rootly_sdk/models/list_environment_catalog_properties_include.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ListEnvironmentCatalogPropertiesInclude = Literal["catalog"] + +LIST_ENVIRONMENT_CATALOG_PROPERTIES_INCLUDE_VALUES: set[ListEnvironmentCatalogPropertiesInclude] = { + "catalog", +} + + +def check_list_environment_catalog_properties_include( + value: str | None, +) -> ListEnvironmentCatalogPropertiesInclude | None: + if value is None: + return None + if value in LIST_ENVIRONMENT_CATALOG_PROPERTIES_INCLUDE_VALUES: + return cast(ListEnvironmentCatalogPropertiesInclude, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {LIST_ENVIRONMENT_CATALOG_PROPERTIES_INCLUDE_VALUES!r}" + ) diff --git a/rootly_sdk/models/list_environment_catalog_properties_sort.py b/rootly_sdk/models/list_environment_catalog_properties_sort.py new file mode 100644 index 00000000..52360d89 --- /dev/null +++ b/rootly_sdk/models/list_environment_catalog_properties_sort.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ListEnvironmentCatalogPropertiesSort = Literal[ + "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" +] + +LIST_ENVIRONMENT_CATALOG_PROPERTIES_SORT_VALUES: set[ListEnvironmentCatalogPropertiesSort] = { + "-created_at", + "-position", + "-updated_at", + "created_at", + "position", + "updated_at", +} + + +def check_list_environment_catalog_properties_sort(value: str | None) -> ListEnvironmentCatalogPropertiesSort | None: + if value is None: + return None + if value in LIST_ENVIRONMENT_CATALOG_PROPERTIES_SORT_VALUES: + return cast(ListEnvironmentCatalogPropertiesSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ENVIRONMENT_CATALOG_PROPERTIES_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_functionality_catalog_fields_include.py b/rootly_sdk/models/list_functionality_catalog_fields_include.py deleted file mode 100644 index 7df8dc92..00000000 --- a/rootly_sdk/models/list_functionality_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListFunctionalityCatalogFieldsInclude = Literal["catalog"] - -LIST_FUNCTIONALITY_CATALOG_FIELDS_INCLUDE_VALUES: set[ListFunctionalityCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_functionality_catalog_fields_include(value: str | None) -> ListFunctionalityCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_FUNCTIONALITY_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListFunctionalityCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_FUNCTIONALITY_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_functionality_catalog_fields_sort.py b/rootly_sdk/models/list_functionality_catalog_fields_sort.py deleted file mode 100644 index 15f87ec0..00000000 --- a/rootly_sdk/models/list_functionality_catalog_fields_sort.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ListFunctionalityCatalogFieldsSort = Literal[ - "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" -] - -LIST_FUNCTIONALITY_CATALOG_FIELDS_SORT_VALUES: set[ListFunctionalityCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_functionality_catalog_fields_sort(value: str | None) -> ListFunctionalityCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_FUNCTIONALITY_CATALOG_FIELDS_SORT_VALUES: - return cast(ListFunctionalityCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_FUNCTIONALITY_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_functionality_catalog_properties_include.py b/rootly_sdk/models/list_functionality_catalog_properties_include.py new file mode 100644 index 00000000..5503a2c1 --- /dev/null +++ b/rootly_sdk/models/list_functionality_catalog_properties_include.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ListFunctionalityCatalogPropertiesInclude = Literal["catalog"] + +LIST_FUNCTIONALITY_CATALOG_PROPERTIES_INCLUDE_VALUES: set[ListFunctionalityCatalogPropertiesInclude] = { + "catalog", +} + + +def check_list_functionality_catalog_properties_include( + value: str | None, +) -> ListFunctionalityCatalogPropertiesInclude | None: + if value is None: + return None + if value in LIST_FUNCTIONALITY_CATALOG_PROPERTIES_INCLUDE_VALUES: + return cast(ListFunctionalityCatalogPropertiesInclude, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {LIST_FUNCTIONALITY_CATALOG_PROPERTIES_INCLUDE_VALUES!r}" + ) diff --git a/rootly_sdk/models/list_functionality_catalog_properties_sort.py b/rootly_sdk/models/list_functionality_catalog_properties_sort.py new file mode 100644 index 00000000..a29e521d --- /dev/null +++ b/rootly_sdk/models/list_functionality_catalog_properties_sort.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +ListFunctionalityCatalogPropertiesSort = Literal[ + "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" +] + +LIST_FUNCTIONALITY_CATALOG_PROPERTIES_SORT_VALUES: set[ListFunctionalityCatalogPropertiesSort] = { + "-created_at", + "-position", + "-updated_at", + "created_at", + "position", + "updated_at", +} + + +def check_list_functionality_catalog_properties_sort( + value: str | None, +) -> ListFunctionalityCatalogPropertiesSort | None: + if value is None: + return None + if value in LIST_FUNCTIONALITY_CATALOG_PROPERTIES_SORT_VALUES: + return cast(ListFunctionalityCatalogPropertiesSort, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {LIST_FUNCTIONALITY_CATALOG_PROPERTIES_SORT_VALUES!r}" + ) diff --git a/rootly_sdk/models/list_group_catalog_fields_include.py b/rootly_sdk/models/list_group_catalog_fields_include.py deleted file mode 100644 index 9e3575fd..00000000 --- a/rootly_sdk/models/list_group_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListGroupCatalogFieldsInclude = Literal["catalog"] - -LIST_GROUP_CATALOG_FIELDS_INCLUDE_VALUES: set[ListGroupCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_group_catalog_fields_include(value: str | None) -> ListGroupCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_GROUP_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListGroupCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_GROUP_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_group_catalog_fields_sort.py b/rootly_sdk/models/list_group_catalog_fields_sort.py deleted file mode 100644 index dbd36627..00000000 --- a/rootly_sdk/models/list_group_catalog_fields_sort.py +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Literal, cast - -ListGroupCatalogFieldsSort = Literal["-created_at", "-position", "-updated_at", "created_at", "position", "updated_at"] - -LIST_GROUP_CATALOG_FIELDS_SORT_VALUES: set[ListGroupCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_group_catalog_fields_sort(value: str | None) -> ListGroupCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_GROUP_CATALOG_FIELDS_SORT_VALUES: - return cast(ListGroupCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_GROUP_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_group_catalog_properties_include.py b/rootly_sdk/models/list_group_catalog_properties_include.py new file mode 100644 index 00000000..0cb0a85f --- /dev/null +++ b/rootly_sdk/models/list_group_catalog_properties_include.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ListGroupCatalogPropertiesInclude = Literal["catalog"] + +LIST_GROUP_CATALOG_PROPERTIES_INCLUDE_VALUES: set[ListGroupCatalogPropertiesInclude] = { + "catalog", +} + + +def check_list_group_catalog_properties_include(value: str | None) -> ListGroupCatalogPropertiesInclude | None: + if value is None: + return None + if value in LIST_GROUP_CATALOG_PROPERTIES_INCLUDE_VALUES: + return cast(ListGroupCatalogPropertiesInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_GROUP_CATALOG_PROPERTIES_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_group_catalog_properties_sort.py b/rootly_sdk/models/list_group_catalog_properties_sort.py new file mode 100644 index 00000000..78eec151 --- /dev/null +++ b/rootly_sdk/models/list_group_catalog_properties_sort.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ListGroupCatalogPropertiesSort = Literal[ + "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" +] + +LIST_GROUP_CATALOG_PROPERTIES_SORT_VALUES: set[ListGroupCatalogPropertiesSort] = { + "-created_at", + "-position", + "-updated_at", + "created_at", + "position", + "updated_at", +} + + +def check_list_group_catalog_properties_sort(value: str | None) -> ListGroupCatalogPropertiesSort | None: + if value is None: + return None + if value in LIST_GROUP_CATALOG_PROPERTIES_SORT_VALUES: + return cast(ListGroupCatalogPropertiesSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_GROUP_CATALOG_PROPERTIES_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_incident_type_catalog_fields_include.py b/rootly_sdk/models/list_incident_type_catalog_fields_include.py deleted file mode 100644 index 2a5e1bd7..00000000 --- a/rootly_sdk/models/list_incident_type_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListIncidentTypeCatalogFieldsInclude = Literal["catalog"] - -LIST_INCIDENT_TYPE_CATALOG_FIELDS_INCLUDE_VALUES: set[ListIncidentTypeCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_incident_type_catalog_fields_include(value: str | None) -> ListIncidentTypeCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_INCIDENT_TYPE_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListIncidentTypeCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_INCIDENT_TYPE_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_incident_type_catalog_fields_sort.py b/rootly_sdk/models/list_incident_type_catalog_fields_sort.py deleted file mode 100644 index cec28834..00000000 --- a/rootly_sdk/models/list_incident_type_catalog_fields_sort.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ListIncidentTypeCatalogFieldsSort = Literal[ - "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" -] - -LIST_INCIDENT_TYPE_CATALOG_FIELDS_SORT_VALUES: set[ListIncidentTypeCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_incident_type_catalog_fields_sort(value: str | None) -> ListIncidentTypeCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_INCIDENT_TYPE_CATALOG_FIELDS_SORT_VALUES: - return cast(ListIncidentTypeCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_INCIDENT_TYPE_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_incident_type_catalog_properties_include.py b/rootly_sdk/models/list_incident_type_catalog_properties_include.py new file mode 100644 index 00000000..7595b487 --- /dev/null +++ b/rootly_sdk/models/list_incident_type_catalog_properties_include.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ListIncidentTypeCatalogPropertiesInclude = Literal["catalog"] + +LIST_INCIDENT_TYPE_CATALOG_PROPERTIES_INCLUDE_VALUES: set[ListIncidentTypeCatalogPropertiesInclude] = { + "catalog", +} + + +def check_list_incident_type_catalog_properties_include( + value: str | None, +) -> ListIncidentTypeCatalogPropertiesInclude | None: + if value is None: + return None + if value in LIST_INCIDENT_TYPE_CATALOG_PROPERTIES_INCLUDE_VALUES: + return cast(ListIncidentTypeCatalogPropertiesInclude, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {LIST_INCIDENT_TYPE_CATALOG_PROPERTIES_INCLUDE_VALUES!r}" + ) diff --git a/rootly_sdk/models/list_incident_type_catalog_properties_sort.py b/rootly_sdk/models/list_incident_type_catalog_properties_sort.py new file mode 100644 index 00000000..d1edf47a --- /dev/null +++ b/rootly_sdk/models/list_incident_type_catalog_properties_sort.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +ListIncidentTypeCatalogPropertiesSort = Literal[ + "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" +] + +LIST_INCIDENT_TYPE_CATALOG_PROPERTIES_SORT_VALUES: set[ListIncidentTypeCatalogPropertiesSort] = { + "-created_at", + "-position", + "-updated_at", + "created_at", + "position", + "updated_at", +} + + +def check_list_incident_type_catalog_properties_sort(value: str | None) -> ListIncidentTypeCatalogPropertiesSort | None: + if value is None: + return None + if value in LIST_INCIDENT_TYPE_CATALOG_PROPERTIES_SORT_VALUES: + return cast(ListIncidentTypeCatalogPropertiesSort, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {LIST_INCIDENT_TYPE_CATALOG_PROPERTIES_SORT_VALUES!r}" + ) diff --git a/rootly_sdk/models/list_incidents_sort.py b/rootly_sdk/models/list_incidents_sort.py index b905fb51..c2eb5a73 100644 --- a/rootly_sdk/models/list_incidents_sort.py +++ b/rootly_sdk/models/list_incidents_sort.py @@ -1,11 +1,32 @@ from typing import Literal, cast -ListIncidentsSort = Literal["-created_at", "-updated_at", "created_at", "updated_at"] +ListIncidentsSort = Literal[ + "-created_at", + "-in_triage_at", + "-mitigated_at", + "-resolved_at", + "-started_at", + "-updated_at", + "created_at", + "in_triage_at", + "mitigated_at", + "resolved_at", + "started_at", + "updated_at", +] LIST_INCIDENTS_SORT_VALUES: set[ListIncidentsSort] = { "-created_at", + "-in_triage_at", + "-mitigated_at", + "-resolved_at", + "-started_at", "-updated_at", "created_at", + "in_triage_at", + "mitigated_at", + "resolved_at", + "started_at", "updated_at", } diff --git a/rootly_sdk/models/list_oncalls_include.py b/rootly_sdk/models/list_oncalls_include.py new file mode 100644 index 00000000..b3a77042 --- /dev/null +++ b/rootly_sdk/models/list_oncalls_include.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +ListOncallsInclude = Literal["escalation_policy", "schedule", "user"] + +LIST_ONCALLS_INCLUDE_VALUES: set[ListOncallsInclude] = { + "escalation_policy", + "schedule", + "user", +} + + +def check_list_oncalls_include(value: str | None) -> ListOncallsInclude | None: + if value is None: + return None + if value in LIST_ONCALLS_INCLUDE_VALUES: + return cast(ListOncallsInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ONCALLS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_service_catalog_fields_include.py b/rootly_sdk/models/list_service_catalog_fields_include.py deleted file mode 100644 index 8196cb8f..00000000 --- a/rootly_sdk/models/list_service_catalog_fields_include.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Literal, cast - -ListServiceCatalogFieldsInclude = Literal["catalog"] - -LIST_SERVICE_CATALOG_FIELDS_INCLUDE_VALUES: set[ListServiceCatalogFieldsInclude] = { - "catalog", -} - - -def check_list_service_catalog_fields_include(value: str | None) -> ListServiceCatalogFieldsInclude | None: - if value is None: - return None - if value in LIST_SERVICE_CATALOG_FIELDS_INCLUDE_VALUES: - return cast(ListServiceCatalogFieldsInclude, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_SERVICE_CATALOG_FIELDS_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_service_catalog_fields_sort.py b/rootly_sdk/models/list_service_catalog_fields_sort.py deleted file mode 100644 index 5c73400b..00000000 --- a/rootly_sdk/models/list_service_catalog_fields_sort.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ListServiceCatalogFieldsSort = Literal[ - "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" -] - -LIST_SERVICE_CATALOG_FIELDS_SORT_VALUES: set[ListServiceCatalogFieldsSort] = { - "-created_at", - "-position", - "-updated_at", - "created_at", - "position", - "updated_at", -} - - -def check_list_service_catalog_fields_sort(value: str | None) -> ListServiceCatalogFieldsSort | None: - if value is None: - return None - if value in LIST_SERVICE_CATALOG_FIELDS_SORT_VALUES: - return cast(ListServiceCatalogFieldsSort, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_SERVICE_CATALOG_FIELDS_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_service_catalog_properties_include.py b/rootly_sdk/models/list_service_catalog_properties_include.py new file mode 100644 index 00000000..76347599 --- /dev/null +++ b/rootly_sdk/models/list_service_catalog_properties_include.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ListServiceCatalogPropertiesInclude = Literal["catalog"] + +LIST_SERVICE_CATALOG_PROPERTIES_INCLUDE_VALUES: set[ListServiceCatalogPropertiesInclude] = { + "catalog", +} + + +def check_list_service_catalog_properties_include(value: str | None) -> ListServiceCatalogPropertiesInclude | None: + if value is None: + return None + if value in LIST_SERVICE_CATALOG_PROPERTIES_INCLUDE_VALUES: + return cast(ListServiceCatalogPropertiesInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_SERVICE_CATALOG_PROPERTIES_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/list_service_catalog_properties_sort.py b/rootly_sdk/models/list_service_catalog_properties_sort.py new file mode 100644 index 00000000..95dbf20f --- /dev/null +++ b/rootly_sdk/models/list_service_catalog_properties_sort.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ListServiceCatalogPropertiesSort = Literal[ + "-created_at", "-position", "-updated_at", "created_at", "position", "updated_at" +] + +LIST_SERVICE_CATALOG_PROPERTIES_SORT_VALUES: set[ListServiceCatalogPropertiesSort] = { + "-created_at", + "-position", + "-updated_at", + "created_at", + "position", + "updated_at", +} + + +def check_list_service_catalog_properties_sort(value: str | None) -> ListServiceCatalogPropertiesSort | None: + if value is None: + return None + if value in LIST_SERVICE_CATALOG_PROPERTIES_SORT_VALUES: + return cast(ListServiceCatalogPropertiesSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_SERVICE_CATALOG_PROPERTIES_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_shifts_include.py b/rootly_sdk/models/list_shifts_include.py index f7a9702d..32f63223 100644 --- a/rootly_sdk/models/list_shifts_include.py +++ b/rootly_sdk/models/list_shifts_include.py @@ -1,10 +1,11 @@ from typing import Literal, cast -ListShiftsInclude = Literal["assignee", "shift_override", "user"] +ListShiftsInclude = Literal["assignee", "shift_override", "shift_shadow", "user"] LIST_SHIFTS_INCLUDE_VALUES: set[ListShiftsInclude] = { "assignee", "shift_override", + "shift_shadow", "user", } diff --git a/rootly_sdk/models/live_call_router.py b/rootly_sdk/models/live_call_router.py index 77cda5f7..99bf8142 100644 --- a/rootly_sdk/models/live_call_router.py +++ b/rootly_sdk/models/live_call_router.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,50 +30,48 @@ class LiveCallRouter: name (str): The name of the live_call_router created_at (str): Date of creation updated_at (str): Date of last update - kind (Union[Unset, LiveCallRouterKind]): The kind of the live_call_router - enabled (Union[Unset, bool]): Whether the live_call_router is enabled - country_code (Union[Unset, LiveCallRouterCountryCode]): The country code of the live_call_router - phone_type (Union[Unset, LiveCallRouterPhoneType]): The phone type of the live_call_router - phone_number (Union[Unset, str]): You can select a phone number using + kind (LiveCallRouterKind | Unset): The kind of the live_call_router + enabled (bool | Unset): Whether the live_call_router is enabled + country_code (LiveCallRouterCountryCode | Unset): The country code of the live_call_router + phone_type (LiveCallRouterPhoneType | Unset): The phone type of the live_call_router + phone_number (str | Unset): You can select a phone number using [generate_phone_number](#//api/v1/live_call_routers/generate_phone_number) API and pass that phone number here to register - voicemail_greeting (Union[Unset, str]): The voicemail greeting of the live_call_router - caller_greeting (Union[Unset, str]): The caller greeting message of the live_call_router - waiting_music_url (Union[Unset, LiveCallRouterWaitingMusicUrl]): The waiting music URL of the live_call_router - sent_to_voicemail_delay (Union[Unset, int]): The delay (seconds) after which the caller in redirected to - voicemail - should_redirect_to_voicemail_on_no_answer (Union[Unset, bool]): This prompts the caller to choose voicemail or - connect live - escalation_level_delay_in_seconds (Union[Unset, int]): This overrides the delay (seconds) in escalation levels - should_auto_resolve_alert_on_call_end (Union[Unset, bool]): This overrides the delay (seconds) in escalation - levels - alert_urgency_id (Union[Unset, str]): This is used in escalation paths to determine who to page - calling_tree_prompt (Union[Unset, str]): The audio instructions callers will hear when they call this number, + voicemail_greeting (str | Unset): The voicemail greeting of the live_call_router + caller_greeting (str | Unset): The caller greeting message of the live_call_router + waiting_music_url (LiveCallRouterWaitingMusicUrl | Unset): The waiting music URL of the live_call_router + sent_to_voicemail_delay (int | Unset): The delay (seconds) after which the caller in redirected to voicemail + should_redirect_to_voicemail_on_no_answer (bool | Unset): This prompts the caller to choose voicemail or connect + live + escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels + should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels + alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page + calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number, prompting them to select from available options to route their call - paging_targets (Union[Unset, list['LiveCallRouterPagingTargetsItem']]): Paging targets that callers can select - from when this live call router is configured as a phone tree. - escalation_policy_trigger_params (Union[Unset, LiveCallRouterEscalationPolicyTriggerParams]): + paging_targets (list[LiveCallRouterPagingTargetsItem] | Unset): Paging targets that callers can select from when + this live call router is configured as a phone tree. + escalation_policy_trigger_params (LiveCallRouterEscalationPolicyTriggerParams | Unset): """ name: str created_at: str updated_at: str - kind: Unset | LiveCallRouterKind = UNSET - enabled: Unset | bool = UNSET - country_code: Unset | LiveCallRouterCountryCode = UNSET - phone_type: Unset | LiveCallRouterPhoneType = UNSET - phone_number: Unset | str = UNSET - voicemail_greeting: Unset | str = UNSET - caller_greeting: Unset | str = UNSET - waiting_music_url: Unset | LiveCallRouterWaitingMusicUrl = UNSET - sent_to_voicemail_delay: Unset | int = UNSET - should_redirect_to_voicemail_on_no_answer: Unset | bool = UNSET - escalation_level_delay_in_seconds: Unset | int = UNSET - should_auto_resolve_alert_on_call_end: Unset | bool = UNSET - alert_urgency_id: Unset | str = UNSET - calling_tree_prompt: Unset | str = UNSET - paging_targets: Unset | list["LiveCallRouterPagingTargetsItem"] = UNSET - escalation_policy_trigger_params: Union[Unset, "LiveCallRouterEscalationPolicyTriggerParams"] = UNSET + kind: LiveCallRouterKind | Unset = UNSET + enabled: bool | Unset = UNSET + country_code: LiveCallRouterCountryCode | Unset = UNSET + phone_type: LiveCallRouterPhoneType | Unset = UNSET + phone_number: str | Unset = UNSET + voicemail_greeting: str | Unset = UNSET + caller_greeting: str | Unset = UNSET + waiting_music_url: LiveCallRouterWaitingMusicUrl | Unset = UNSET + sent_to_voicemail_delay: int | Unset = UNSET + should_redirect_to_voicemail_on_no_answer: bool | Unset = UNSET + escalation_level_delay_in_seconds: int | Unset = UNSET + should_auto_resolve_alert_on_call_end: bool | Unset = UNSET + alert_urgency_id: str | Unset = UNSET + calling_tree_prompt: str | Unset = UNSET + paging_targets: list[LiveCallRouterPagingTargetsItem] | Unset = UNSET + escalation_policy_trigger_params: LiveCallRouterEscalationPolicyTriggerParams | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -81,17 +81,17 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind enabled = self.enabled - country_code: Unset | str = UNSET + country_code: str | Unset = UNSET if not isinstance(self.country_code, Unset): country_code = self.country_code - phone_type: Unset | str = UNSET + phone_type: str | Unset = UNSET if not isinstance(self.phone_type, Unset): phone_type = self.phone_type @@ -101,7 +101,7 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting - waiting_music_url: Unset | str = UNSET + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -117,14 +117,14 @@ def to_dict(self) -> dict[str, Any]: calling_tree_prompt = self.calling_tree_prompt - paging_targets: Unset | list[dict[str, Any]] = UNSET + paging_targets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.paging_targets, Unset): paging_targets = [] for paging_targets_item_data in self.paging_targets: paging_targets_item = paging_targets_item_data.to_dict() paging_targets.append(paging_targets_item) - escalation_policy_trigger_params: Unset | dict[str, Any] = UNSET + escalation_policy_trigger_params: dict[str, Any] | Unset = UNSET if not isinstance(self.escalation_policy_trigger_params, Unset): escalation_policy_trigger_params = self.escalation_policy_trigger_params.to_dict() @@ -187,7 +187,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") _kind = d.pop("kind", UNSET) - kind: Unset | LiveCallRouterKind + kind: LiveCallRouterKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -196,14 +196,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _country_code = d.pop("country_code", UNSET) - country_code: Unset | LiveCallRouterCountryCode + country_code: LiveCallRouterCountryCode | Unset if isinstance(_country_code, Unset): country_code = UNSET else: country_code = check_live_call_router_country_code(_country_code) _phone_type = d.pop("phone_type", UNSET) - phone_type: Unset | LiveCallRouterPhoneType + phone_type: LiveCallRouterPhoneType | Unset if isinstance(_phone_type, Unset): phone_type = UNSET else: @@ -216,7 +216,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) _waiting_music_url = d.pop("waiting_music_url", UNSET) - waiting_music_url: Unset | LiveCallRouterWaitingMusicUrl + waiting_music_url: LiveCallRouterWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): waiting_music_url = UNSET else: @@ -234,15 +234,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) - paging_targets = [] _paging_targets = d.pop("paging_targets", UNSET) - for paging_targets_item_data in _paging_targets or []: - paging_targets_item = LiveCallRouterPagingTargetsItem.from_dict(paging_targets_item_data) + paging_targets: list[LiveCallRouterPagingTargetsItem] | Unset = UNSET + if _paging_targets is not UNSET: + paging_targets = [] + for paging_targets_item_data in _paging_targets: + paging_targets_item = LiveCallRouterPagingTargetsItem.from_dict(paging_targets_item_data) - paging_targets.append(paging_targets_item) + paging_targets.append(paging_targets_item) _escalation_policy_trigger_params = d.pop("escalation_policy_trigger_params", UNSET) - escalation_policy_trigger_params: Unset | LiveCallRouterEscalationPolicyTriggerParams + escalation_policy_trigger_params: LiveCallRouterEscalationPolicyTriggerParams | Unset if isinstance(_escalation_policy_trigger_params, Unset): escalation_policy_trigger_params = UNSET else: diff --git a/rootly_sdk/models/live_call_router_country_code.py b/rootly_sdk/models/live_call_router_country_code.py index c37af893..c9309c8f 100644 --- a/rootly_sdk/models/live_call_router_country_code.py +++ b/rootly_sdk/models/live_call_router_country_code.py @@ -1,6 +1,6 @@ from typing import Literal, cast -LiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "US"] +LiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] LIVE_CALL_ROUTER_COUNTRY_CODE_VALUES: set[LiveCallRouterCountryCode] = { "AU", @@ -9,6 +9,7 @@ "GB", "NL", "NZ", + "SE", "US", } diff --git a/rootly_sdk/models/live_call_router_escalation_policy_trigger_params.py b/rootly_sdk/models/live_call_router_escalation_policy_trigger_params.py index f587e724..4963b65f 100644 --- a/rootly_sdk/models/live_call_router_escalation_policy_trigger_params.py +++ b/rootly_sdk/models/live_call_router_escalation_policy_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,7 +19,8 @@ class LiveCallRouterEscalationPolicyTriggerParams: """ Attributes: id (str): The ID of notification target - type_ (LiveCallRouterEscalationPolicyTriggerParamsType): The type of the notification target + type_ (LiveCallRouterEscalationPolicyTriggerParamsType): The type of the notification target. Please contact + support if you encounter issues using `Functionality` as a target type. """ id: str diff --git a/rootly_sdk/models/live_call_router_escalation_policy_trigger_params_type.py b/rootly_sdk/models/live_call_router_escalation_policy_trigger_params_type.py index 9d1fc80a..bada1658 100644 --- a/rootly_sdk/models/live_call_router_escalation_policy_trigger_params_type.py +++ b/rootly_sdk/models/live_call_router_escalation_policy_trigger_params_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -LiveCallRouterEscalationPolicyTriggerParamsType = Literal["EscalationPolicy", "Group", "Service"] +LiveCallRouterEscalationPolicyTriggerParamsType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] LIVE_CALL_ROUTER_ESCALATION_POLICY_TRIGGER_PARAMS_TYPE_VALUES: set[LiveCallRouterEscalationPolicyTriggerParamsType] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/live_call_router_list.py b/rootly_sdk/models/live_call_router_list.py index c3e55160..1b74775b 100644 --- a/rootly_sdk/models/live_call_router_list.py +++ b/rootly_sdk/models/live_call_router_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class LiveCallRouterList: """ Attributes: - data (list['LiveCallRouterListDataItem']): + data (list[LiveCallRouterListDataItem]): links (Links): meta (Meta): """ - data: list["LiveCallRouterListDataItem"] - links: "Links" - meta: "Meta" + data: list[LiveCallRouterListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/live_call_router_list_data_item.py b/rootly_sdk/models/live_call_router_list_data_item.py index cc64df7e..622c19a8 100644 --- a/rootly_sdk/models/live_call_router_list_data_item.py +++ b/rootly_sdk/models/live_call_router_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class LiveCallRouterListDataItem: id: str type_: LiveCallRouterListDataItemType - attributes: "LiveCallRouter" + attributes: LiveCallRouter additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/live_call_router_paging_targets_item.py b/rootly_sdk/models/live_call_router_paging_targets_item.py index a3f109df..33e6941c 100644 --- a/rootly_sdk/models/live_call_router_paging_targets_item.py +++ b/rootly_sdk/models/live_call_router_paging_targets_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,7 +19,8 @@ class LiveCallRouterPagingTargetsItem: """ Attributes: id (str): The ID of paging target - type_ (LiveCallRouterPagingTargetsItemType): The type of the paging target + type_ (LiveCallRouterPagingTargetsItemType): The type of the paging target. Please contact support if you + encounter issues using `functionality` as a target type. alert_urgency_id (str): This is used in escalation paths to determine who to page """ diff --git a/rootly_sdk/models/live_call_router_paging_targets_item_type.py b/rootly_sdk/models/live_call_router_paging_targets_item_type.py index 2a5842d6..72403c9d 100644 --- a/rootly_sdk/models/live_call_router_paging_targets_item_type.py +++ b/rootly_sdk/models/live_call_router_paging_targets_item_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -LiveCallRouterPagingTargetsItemType = Literal["escalation_policy", "service", "team"] +LiveCallRouterPagingTargetsItemType = Literal["escalation_policy", "functionality", "service", "team"] LIVE_CALL_ROUTER_PAGING_TARGETS_ITEM_TYPE_VALUES: set[LiveCallRouterPagingTargetsItemType] = { "escalation_policy", + "functionality", "service", "team", } diff --git a/rootly_sdk/models/live_call_router_response.py b/rootly_sdk/models/live_call_router_response.py index c5929ed3..bcf58bdc 100644 --- a/rootly_sdk/models/live_call_router_response.py +++ b/rootly_sdk/models/live_call_router_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class LiveCallRouterResponse: data (LiveCallRouterResponseData): """ - data: "LiveCallRouterResponseData" + data: LiveCallRouterResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/live_call_router_response_data.py b/rootly_sdk/models/live_call_router_response_data.py index 6f15f45b..3618b0d6 100644 --- a/rootly_sdk/models/live_call_router_response_data.py +++ b/rootly_sdk/models/live_call_router_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class LiveCallRouterResponseData: id: str type_: LiveCallRouterResponseDataType - attributes: "LiveCallRouter" + attributes: LiveCallRouter additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/meeting_recording.py b/rootly_sdk/models/meeting_recording.py new file mode 100644 index 00000000..02298be2 --- /dev/null +++ b/rootly_sdk/models/meeting_recording.py @@ -0,0 +1,228 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.meeting_recording_platform import MeetingRecordingPlatform, check_meeting_recording_platform +from ..models.meeting_recording_status import MeetingRecordingStatus, check_meeting_recording_status +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MeetingRecording") + + +@_attrs_define +class MeetingRecording: + """ + Attributes: + platform (MeetingRecordingPlatform): Meeting platform + session_number (int): Session number within the incident for this platform (starts at 1, increments on re- + invite) + status (MeetingRecordingStatus): Current recording lifecycle status + created_at (datetime.datetime): When the recording session was created + updated_at (datetime.datetime): When the recording session was last updated + started_at (datetime.datetime | None | Unset): When the bot started recording (null if bot never joined) + ended_at (datetime.datetime | None | Unset): When the recording ended + duration_minutes (float | None | Unset): Recording duration in minutes (null if not started) + speaker_count (int | Unset): Number of unique speakers detected in the transcript + word_count (int | Unset): Total word count across all transcript segments + transcript_summary (None | str | Unset): AI-generated summary of the meeting transcript (null if no transcript + or not yet analyzed) + has_video (bool | Unset): Whether a video recording file is attached + """ + + platform: MeetingRecordingPlatform + session_number: int + status: MeetingRecordingStatus + created_at: datetime.datetime + updated_at: datetime.datetime + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + duration_minutes: float | None | Unset = UNSET + speaker_count: int | Unset = UNSET + word_count: int | Unset = UNSET + transcript_summary: None | str | Unset = UNSET + has_video: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + platform: str = self.platform + + session_number = self.session_number + + status: str = self.status + + created_at = self.created_at.isoformat() + + updated_at = self.updated_at.isoformat() + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + elif isinstance(self.started_at, datetime.datetime): + started_at = self.started_at.isoformat() + else: + started_at = self.started_at + + ended_at: None | str | Unset + if isinstance(self.ended_at, Unset): + ended_at = UNSET + elif isinstance(self.ended_at, datetime.datetime): + ended_at = self.ended_at.isoformat() + else: + ended_at = self.ended_at + + duration_minutes: float | None | Unset + if isinstance(self.duration_minutes, Unset): + duration_minutes = UNSET + else: + duration_minutes = self.duration_minutes + + speaker_count = self.speaker_count + + word_count = self.word_count + + transcript_summary: None | str | Unset + if isinstance(self.transcript_summary, Unset): + transcript_summary = UNSET + else: + transcript_summary = self.transcript_summary + + has_video = self.has_video + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "platform": platform, + "session_number": session_number, + "status": status, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if started_at is not UNSET: + field_dict["started_at"] = started_at + if ended_at is not UNSET: + field_dict["ended_at"] = ended_at + if duration_minutes is not UNSET: + field_dict["duration_minutes"] = duration_minutes + if speaker_count is not UNSET: + field_dict["speaker_count"] = speaker_count + if word_count is not UNSET: + field_dict["word_count"] = word_count + if transcript_summary is not UNSET: + field_dict["transcript_summary"] = transcript_summary + if has_video is not UNSET: + field_dict["has_video"] = has_video + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + platform = check_meeting_recording_platform(d.pop("platform")) + + session_number = d.pop("session_number") + + status = check_meeting_recording_status(d.pop("status")) + + created_at = isoparse(d.pop("created_at")) + + updated_at = isoparse(d.pop("updated_at")) + + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + started_at_type_0 = isoparse(data) + + return started_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + started_at = _parse_started_at(d.pop("started_at", UNSET)) + + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + ended_at_type_0 = isoparse(data) + + return ended_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) + + def _parse_duration_minutes(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + duration_minutes = _parse_duration_minutes(d.pop("duration_minutes", UNSET)) + + speaker_count = d.pop("speaker_count", UNSET) + + word_count = d.pop("word_count", UNSET) + + def _parse_transcript_summary(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + transcript_summary = _parse_transcript_summary(d.pop("transcript_summary", UNSET)) + + has_video = d.pop("has_video", UNSET) + + meeting_recording = cls( + platform=platform, + session_number=session_number, + status=status, + created_at=created_at, + updated_at=updated_at, + started_at=started_at, + ended_at=ended_at, + duration_minutes=duration_minutes, + speaker_count=speaker_count, + word_count=word_count, + transcript_summary=transcript_summary, + has_video=has_video, + ) + + meeting_recording.additional_properties = d + return meeting_recording + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_list.py b/rootly_sdk/models/meeting_recording_list.py new file mode 100644 index 00000000..0590db47 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_list.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.meeting_recording_list_data_item import MeetingRecordingListDataItem + from ..models.meta import Meta + + +T = TypeVar("T", bound="MeetingRecordingList") + + +@_attrs_define +class MeetingRecordingList: + """ + Attributes: + data (list[MeetingRecordingListDataItem]): + meta (Meta | Unset): + """ + + data: list[MeetingRecordingListDataItem] + meta: Meta | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta: dict[str, Any] | Unset = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if meta is not UNSET: + field_dict["meta"] = meta + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_list_data_item import MeetingRecordingListDataItem + from ..models.meta import Meta + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = MeetingRecordingListDataItem.from_dict(data_item_data) + + data.append(data_item) + + _meta = d.pop("meta", UNSET) + meta: Meta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = Meta.from_dict(_meta) + + meeting_recording_list = cls( + data=data, + meta=meta, + ) + + meeting_recording_list.additional_properties = d + return meeting_recording_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_list_data_item.py b/rootly_sdk/models/meeting_recording_list_data_item.py new file mode 100644 index 00000000..7b57bf19 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_list_data_item.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.meeting_recording_list_data_item_type import ( + MeetingRecordingListDataItemType, + check_meeting_recording_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.meeting_recording import MeetingRecording + + +T = TypeVar("T", bound="MeetingRecordingListDataItem") + + +@_attrs_define +class MeetingRecordingListDataItem: + """ + Attributes: + id (str): Unique UUID of the meeting recording + type_ (MeetingRecordingListDataItemType): + attributes (MeetingRecording): + """ + + id: str + type_: MeetingRecordingListDataItemType + attributes: MeetingRecording + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording import MeetingRecording + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_meeting_recording_list_data_item_type(d.pop("type")) + + attributes = MeetingRecording.from_dict(d.pop("attributes")) + + meeting_recording_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + meeting_recording_list_data_item.additional_properties = d + return meeting_recording_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/meeting_recording_list_data_item_type.py b/rootly_sdk/models/meeting_recording_list_data_item_type.py new file mode 100644 index 00000000..2e05597a --- /dev/null +++ b/rootly_sdk/models/meeting_recording_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +MeetingRecordingListDataItemType = Literal["meeting_recordings"] + +MEETING_RECORDING_LIST_DATA_ITEM_TYPE_VALUES: set[MeetingRecordingListDataItemType] = { + "meeting_recordings", +} + + +def check_meeting_recording_list_data_item_type(value: str | None) -> MeetingRecordingListDataItemType | None: + if value is None: + return None + if value in MEETING_RECORDING_LIST_DATA_ITEM_TYPE_VALUES: + return cast(MeetingRecordingListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/meeting_recording_platform.py b/rootly_sdk/models/meeting_recording_platform.py new file mode 100644 index 00000000..14d4efbc --- /dev/null +++ b/rootly_sdk/models/meeting_recording_platform.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +MeetingRecordingPlatform = Literal["google_meet", "microsoft_teams", "webex", "zoom"] + +MEETING_RECORDING_PLATFORM_VALUES: set[MeetingRecordingPlatform] = { + "google_meet", + "microsoft_teams", + "webex", + "zoom", +} + + +def check_meeting_recording_platform(value: str | None) -> MeetingRecordingPlatform | None: + if value is None: + return None + if value in MEETING_RECORDING_PLATFORM_VALUES: + return cast(MeetingRecordingPlatform, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_PLATFORM_VALUES!r}") diff --git a/rootly_sdk/models/meeting_recording_status.py b/rootly_sdk/models/meeting_recording_status.py new file mode 100644 index 00000000..638ecdfb --- /dev/null +++ b/rootly_sdk/models/meeting_recording_status.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +MeetingRecordingStatus = Literal["analyzing", "call_ended", "completed", "failed", "paused", "pending", "recording"] + +MEETING_RECORDING_STATUS_VALUES: set[MeetingRecordingStatus] = { + "analyzing", + "call_ended", + "completed", + "failed", + "paused", + "pending", + "recording", +} + + +def check_meeting_recording_status(value: str | None) -> MeetingRecordingStatus | None: + if value is None: + return None + if value in MEETING_RECORDING_STATUS_VALUES: + return cast(MeetingRecordingStatus, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_STATUS_VALUES!r}") diff --git a/rootly_sdk/models/meta.py b/rootly_sdk/models/meta.py index 674b67d5..5612bb1e 100644 --- a/rootly_sdk/models/meta.py +++ b/rootly_sdk/models/meta.py @@ -1,9 +1,13 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="Meta") @@ -11,33 +15,42 @@ class Meta: """ Attributes: - current_page (int): - next_page (Union[None, int]): - prev_page (Union[None, int]): + current_page (int | None): + next_page (int | None): + prev_page (int | None): total_count (int): total_pages (int): + next_cursor (None | str | Unset): """ - current_page: int - next_page: None | int - prev_page: None | int + current_page: int | None + next_page: int | None + prev_page: int | None total_count: int total_pages: int + next_cursor: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + current_page: int | None current_page = self.current_page - next_page: None | int + next_page: int | None next_page = self.next_page - prev_page: None | int + prev_page: int | None prev_page = self.prev_page total_count = self.total_count total_pages = self.total_pages + next_cursor: None | str | Unset + if isinstance(self.next_cursor, Unset): + next_cursor = UNSET + else: + next_cursor = self.next_cursor + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -49,25 +62,33 @@ def to_dict(self) -> dict[str, Any]: "total_pages": total_pages, } ) + if next_cursor is not UNSET: + field_dict["next_cursor"] = next_cursor return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - current_page = d.pop("current_page") - def _parse_next_page(data: object) -> None | int: + def _parse_current_page(data: object) -> int | None: + if data is None: + return data + return cast(int | None, data) + + current_page = _parse_current_page(d.pop("current_page")) + + def _parse_next_page(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) next_page = _parse_next_page(d.pop("next_page")) - def _parse_prev_page(data: object) -> None | int: + def _parse_prev_page(data: object) -> int | None: if data is None: return data - return cast(None | int, data) + return cast(int | None, data) prev_page = _parse_prev_page(d.pop("prev_page")) @@ -75,12 +96,22 @@ def _parse_prev_page(data: object) -> None | int: total_pages = d.pop("total_pages") + def _parse_next_cursor(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + next_cursor = _parse_next_cursor(d.pop("next_cursor", UNSET)) + meta = cls( current_page=current_page, next_page=next_page, prev_page=prev_page, total_count=total_count, total_pages=total_pages, + next_cursor=next_cursor, ) meta.additional_properties = d diff --git a/rootly_sdk/models/mitigate_incident.py b/rootly_sdk/models/mitigate_incident.py index 618e5265..a81c52a8 100644 --- a/rootly_sdk/models/mitigate_incident.py +++ b/rootly_sdk/models/mitigate_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class MitigateIncident: data (MitigateIncidentData): """ - data: "MitigateIncidentData" + data: MitigateIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/mitigate_incident_data.py b/rootly_sdk/models/mitigate_incident_data.py index 2ba8ea98..755f1f4e 100644 --- a/rootly_sdk/models/mitigate_incident_data.py +++ b/rootly_sdk/models/mitigate_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class MitigateIncidentData: """ type_: MitigateIncidentDataType - attributes: "MitigateIncidentDataAttributes" + attributes: MitigateIncidentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/mitigate_incident_data_attributes.py b/rootly_sdk/models/mitigate_incident_data_attributes.py index d18c92cc..58606b79 100644 --- a/rootly_sdk/models/mitigate_incident_data_attributes.py +++ b/rootly_sdk/models/mitigate_incident_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,13 +14,13 @@ class MitigateIncidentDataAttributes: """ Attributes: - mitigation_message (Union[None, Unset, str]): How was the incident mitigated? + mitigation_message (None | str | Unset): How was the incident mitigated? """ - mitigation_message: None | Unset | str = UNSET + mitigation_message: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - mitigation_message: None | Unset | str + mitigation_message: None | str | Unset if isinstance(self.mitigation_message, Unset): mitigation_message = UNSET else: @@ -36,12 +38,12 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_mitigation_message(data: object) -> None | Unset | str: + def _parse_mitigation_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigation_message = _parse_mitigation_message(d.pop("mitigation_message", UNSET)) diff --git a/rootly_sdk/models/new_alert.py b/rootly_sdk/models/new_alert.py index 234e2282..37faac29 100644 --- a/rootly_sdk/models/new_alert.py +++ b/rootly_sdk/models/new_alert.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlert: data (NewAlertData): """ - data: "NewAlertData" + data: NewAlertData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_data.py b/rootly_sdk/models/new_alert_data.py index 1c0d27b1..09c26da5 100644 --- a/rootly_sdk/models/new_alert_data.py +++ b/rootly_sdk/models/new_alert_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAlertData: """ type_: NewAlertDataType - attributes: "NewAlertDataAttributes" + attributes: NewAlertDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_data_attributes.py b/rootly_sdk/models/new_alert_data_attributes.py index 2827b5d2..658edf63 100644 --- a/rootly_sdk/models/new_alert_data_attributes.py +++ b/rootly_sdk/models/new_alert_data_attributes.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from dateutil.parser import isoparse @@ -37,54 +39,52 @@ class NewAlertDataAttributes: Attributes: source (NewAlertDataAttributesSource): The source of the alert summary (str): The summary of the alert - noise (Union[Unset, NewAlertDataAttributesNoise]): Whether the alert is marked as noise - status (Union[Unset, NewAlertDataAttributesStatus]): Only available for organizations with Rootly On-Call - enabled. Can be one of open, triggered. - description (Union[None, Unset, str]): The description of the alert - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the alert. If your organization has - On-Call enabled and your notification target is a Service. This field will be automatically set for you. - group_ids (Union[None, Unset, list[str]]): The Group IDs to attach to the alert. If your organization has On- - Call enabled and your notification target is a Group. This field will be automatically set for you. - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the alert - started_at (Union[None, Unset, datetime.datetime]): Alert start datetime - ended_at (Union[None, Unset, datetime.datetime]): Alert end datetime - external_id (Union[None, Unset, str]): External ID - external_url (Union[None, Unset, str]): External Url - alert_urgency_id (Union[None, Unset, str]): The ID of the alert urgency - notification_target_type (Union[Unset, NewAlertDataAttributesNotificationTargetType]): Only available for + noise (NewAlertDataAttributesNoise | Unset): Whether the alert is marked as noise + status (NewAlertDataAttributesStatus | Unset): Only available for organizations with Rootly On-Call enabled. Can + be one of open, triggered. + description (None | str | Unset): The description of the alert + service_ids (list[str] | None | Unset): The Service IDs to attach to the alert. If your organization has On-Call + enabled and your notification target is a Service. This field will be automatically set for you. + group_ids (list[str] | None | Unset): The Group IDs to attach to the alert. If your organization has On-Call + enabled and your notification target is a Group. This field will be automatically set for you. + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the alert + started_at (datetime.datetime | None | Unset): Alert start datetime + ended_at (datetime.datetime | None | Unset): Alert end datetime + external_id (None | str | Unset): External ID + external_url (None | str | Unset): External Url + alert_urgency_id (None | str | Unset): The ID of the alert urgency + notification_target_type (NewAlertDataAttributesNotificationTargetType | Unset): Only available for organizations with Rootly On-Call enabled. Can be one of Group, Service, EscalationPolicy, User. - notification_target_id (Union[None, Unset, str]): Only available for organizations with Rootly On-Call enabled. - The _identifier_ of the notification target object. - labels (Union[Unset, list[Union['NewAlertDataAttributesLabelsItemType0', None]]]): - data (Union['NewAlertDataAttributesDataType0', None, Unset]): Additional data - deduplication_key (Union[None, Unset, str]): Alerts sharing the same deduplication key are treated as a single - alert. - alert_field_values_attributes (Union[Unset, - list[Union['NewAlertDataAttributesAlertFieldValuesAttributesItemType0', None]]]): Custom alert field values to - create with the alert + notification_target_id (None | str | Unset): Only available for organizations with Rootly On-Call enabled. The + _identifier_ of the notification target object. + labels (list[NewAlertDataAttributesLabelsItemType0 | None] | Unset): + data (NewAlertDataAttributesDataType0 | None | Unset): Additional data + deduplication_key (None | str | Unset): Alerts sharing the same deduplication key are treated as a single alert. + alert_field_values_attributes (list[NewAlertDataAttributesAlertFieldValuesAttributesItemType0 | None] | Unset): + Custom alert field values to create with the alert """ source: NewAlertDataAttributesSource summary: str - noise: Unset | NewAlertDataAttributesNoise = UNSET - status: Unset | NewAlertDataAttributesStatus = UNSET - description: None | Unset | str = UNSET - service_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - started_at: None | Unset | datetime.datetime = UNSET - ended_at: None | Unset | datetime.datetime = UNSET - external_id: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - notification_target_type: Unset | NewAlertDataAttributesNotificationTargetType = UNSET - notification_target_id: None | Unset | str = UNSET - labels: Unset | list[Union["NewAlertDataAttributesLabelsItemType0", None]] = UNSET - data: Union["NewAlertDataAttributesDataType0", None, Unset] = UNSET - deduplication_key: None | Unset | str = UNSET - alert_field_values_attributes: ( - Unset | list[Union["NewAlertDataAttributesAlertFieldValuesAttributesItemType0", None]] - ) = UNSET + noise: NewAlertDataAttributesNoise | Unset = UNSET + status: NewAlertDataAttributesStatus | Unset = UNSET + description: None | str | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + external_id: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + notification_target_type: NewAlertDataAttributesNotificationTargetType | Unset = UNSET + notification_target_id: None | str | Unset = UNSET + labels: list[NewAlertDataAttributesLabelsItemType0 | None] | Unset = UNSET + data: NewAlertDataAttributesDataType0 | None | Unset = UNSET + deduplication_key: None | str | Unset = UNSET + alert_field_values_attributes: list[NewAlertDataAttributesAlertFieldValuesAttributesItemType0 | None] | Unset = ( + UNSET + ) def to_dict(self) -> dict[str, Any]: from ..models.new_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( @@ -97,21 +97,21 @@ def to_dict(self) -> dict[str, Any]: summary = self.summary - noise: Unset | str = UNSET + noise: str | Unset = UNSET if not isinstance(self.noise, Unset): noise = self.noise - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -120,7 +120,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -129,7 +129,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -138,7 +138,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET elif isinstance(self.started_at, datetime.datetime): @@ -146,7 +146,7 @@ def to_dict(self) -> dict[str, Any]: else: started_at = self.started_at - ended_at: None | Unset | str + ended_at: None | str | Unset if isinstance(self.ended_at, Unset): ended_at = UNSET elif isinstance(self.ended_at, datetime.datetime): @@ -154,46 +154,46 @@ def to_dict(self) -> dict[str, Any]: else: ended_at = self.ended_at - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - notification_target_type: Unset | str = UNSET + notification_target_type: str | Unset = UNSET if not isinstance(self.notification_target_type, Unset): notification_target_type = self.notification_target_type - notification_target_id: None | Unset | str + notification_target_id: None | str | Unset if isinstance(self.notification_target_id, Unset): notification_target_id = UNSET else: notification_target_id = self.notification_target_id - labels: Unset | list[None | dict[str, Any]] = UNSET + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: - labels_item: None | dict[str, Any] + labels_item: dict[str, Any] | None if isinstance(labels_item_data, NewAlertDataAttributesLabelsItemType0): labels_item = labels_item_data.to_dict() else: labels_item = labels_item_data labels.append(labels_item) - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, NewAlertDataAttributesDataType0): @@ -201,17 +201,17 @@ def to_dict(self) -> dict[str, Any]: else: data = self.data - deduplication_key: None | Unset | str + deduplication_key: None | str | Unset if isinstance(self.deduplication_key, Unset): deduplication_key = UNSET else: deduplication_key = self.deduplication_key - alert_field_values_attributes: Unset | list[None | dict[str, Any]] = UNSET + alert_field_values_attributes: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.alert_field_values_attributes, Unset): alert_field_values_attributes = [] for alert_field_values_attributes_item_data in self.alert_field_values_attributes: - alert_field_values_attributes_item: None | dict[str, Any] + alert_field_values_attributes_item: dict[str, Any] | None if isinstance( alert_field_values_attributes_item_data, NewAlertDataAttributesAlertFieldValuesAttributesItemType0 ): @@ -279,29 +279,29 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: summary = d.pop("summary") _noise = d.pop("noise", UNSET) - noise: Unset | NewAlertDataAttributesNoise + noise: NewAlertDataAttributesNoise | Unset if isinstance(_noise, Unset): noise = UNSET else: noise = check_new_alert_data_attributes_noise(_noise) _status = d.pop("status", UNSET) - status: Unset | NewAlertDataAttributesStatus + status: NewAlertDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_new_alert_data_attributes_status(_status) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -312,13 +312,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -329,13 +329,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -346,13 +346,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_started_at(data: object) -> None | Unset | datetime.datetime: + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -363,13 +363,13 @@ def _parse_started_at(data: object) -> None | Unset | datetime.datetime: started_at_type_0 = isoparse(data) return started_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -380,41 +380,41 @@ def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: ended_at_type_0 = isoparse(data) return ended_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) _notification_target_type = d.pop("notification_target_type", UNSET) - notification_target_type: Unset | NewAlertDataAttributesNotificationTargetType + notification_target_type: NewAlertDataAttributesNotificationTargetType | Unset if isinstance(_notification_target_type, Unset): notification_target_type = UNSET else: @@ -422,37 +422,39 @@ def _parse_alert_urgency_id(data: object) -> None | Unset | str: _notification_target_type ) - def _parse_notification_target_id(data: object) -> None | Unset | str: + def _parse_notification_target_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) notification_target_id = _parse_notification_target_id(d.pop("notification_target_id", UNSET)) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: + labels: list[NewAlertDataAttributesLabelsItemType0 | None] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: - def _parse_labels_item(data: object) -> Union["NewAlertDataAttributesLabelsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - labels_item_type_0 = NewAlertDataAttributesLabelsItemType0.from_dict(data) + def _parse_labels_item(data: object) -> NewAlertDataAttributesLabelsItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + labels_item_type_0 = NewAlertDataAttributesLabelsItemType0.from_dict(data) - return labels_item_type_0 - except: # noqa: E722 - pass - return cast(Union["NewAlertDataAttributesLabelsItemType0", None], data) + return labels_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(NewAlertDataAttributesLabelsItemType0 | None, data) - labels_item = _parse_labels_item(labels_item_data) + labels_item = _parse_labels_item(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) - def _parse_data(data: object) -> Union["NewAlertDataAttributesDataType0", None, Unset]: + def _parse_data(data: object) -> NewAlertDataAttributesDataType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -463,47 +465,51 @@ def _parse_data(data: object) -> Union["NewAlertDataAttributesDataType0", None, data_type_0 = NewAlertDataAttributesDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewAlertDataAttributesDataType0", None, Unset], data) + return cast(NewAlertDataAttributesDataType0 | None | Unset, data) data = _parse_data(d.pop("data", UNSET)) - def _parse_deduplication_key(data: object) -> None | Unset | str: + def _parse_deduplication_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key = _parse_deduplication_key(d.pop("deduplication_key", UNSET)) - alert_field_values_attributes = [] _alert_field_values_attributes = d.pop("alert_field_values_attributes", UNSET) - for alert_field_values_attributes_item_data in _alert_field_values_attributes or []: - - def _parse_alert_field_values_attributes_item( - data: object, - ) -> Union["NewAlertDataAttributesAlertFieldValuesAttributesItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - alert_field_values_attributes_item_type_0 = ( - NewAlertDataAttributesAlertFieldValuesAttributesItemType0.from_dict(data) - ) - - return alert_field_values_attributes_item_type_0 - except: # noqa: E722 - pass - return cast(Union["NewAlertDataAttributesAlertFieldValuesAttributesItemType0", None], data) - - alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( - alert_field_values_attributes_item_data - ) + alert_field_values_attributes: ( + list[NewAlertDataAttributesAlertFieldValuesAttributesItemType0 | None] | Unset + ) = UNSET + if _alert_field_values_attributes is not UNSET: + alert_field_values_attributes = [] + for alert_field_values_attributes_item_data in _alert_field_values_attributes: + + def _parse_alert_field_values_attributes_item( + data: object, + ) -> NewAlertDataAttributesAlertFieldValuesAttributesItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + alert_field_values_attributes_item_type_0 = ( + NewAlertDataAttributesAlertFieldValuesAttributesItemType0.from_dict(data) + ) + + return alert_field_values_attributes_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(NewAlertDataAttributesAlertFieldValuesAttributesItemType0 | None, data) + + alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( + alert_field_values_attributes_item_data + ) - alert_field_values_attributes.append(alert_field_values_attributes_item) + alert_field_values_attributes.append(alert_field_values_attributes_item) new_alert_data_attributes = cls( source=source, diff --git a/rootly_sdk/models/new_alert_data_attributes_alert_field_values_attributes_item_type_0.py b/rootly_sdk/models/new_alert_data_attributes_alert_field_values_attributes_item_type_0.py index 32034f4e..d6390a5a 100644 --- a/rootly_sdk/models/new_alert_data_attributes_alert_field_values_attributes_item_type_0.py +++ b/rootly_sdk/models/new_alert_data_attributes_alert_field_values_attributes_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_alert_data_attributes_data_type_0.py b/rootly_sdk/models/new_alert_data_attributes_data_type_0.py index dd2efbaf..407a47f0 100644 --- a/rootly_sdk/models/new_alert_data_attributes_data_type_0.py +++ b/rootly_sdk/models/new_alert_data_attributes_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewAlertDataAttributesDataType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_alert_data_attributes_labels_item_type_0.py b/rootly_sdk/models/new_alert_data_attributes_labels_item_type_0.py index d3341fa6..024b581d 100644 --- a/rootly_sdk/models/new_alert_data_attributes_labels_item_type_0.py +++ b/rootly_sdk/models/new_alert_data_attributes_labels_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,7 +14,7 @@ class NewAlertDataAttributesLabelsItemType0: """ Attributes: key (str): Key of the tag - value (Union[bool, float, str]): Value of the tag + value (bool | float | str): Value of the tag """ key: str diff --git a/rootly_sdk/models/new_alert_data_attributes_source.py b/rootly_sdk/models/new_alert_data_attributes_source.py index 04e3fe38..0dd3748a 100644 --- a/rootly_sdk/models/new_alert_data_attributes_source.py +++ b/rootly_sdk/models/new_alert_data_attributes_source.py @@ -6,6 +6,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -14,6 +15,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", @@ -52,6 +54,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -60,6 +63,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", diff --git a/rootly_sdk/models/new_alert_event.py b/rootly_sdk/models/new_alert_event.py index c838ecb9..b15ea50d 100644 --- a/rootly_sdk/models/new_alert_event.py +++ b/rootly_sdk/models/new_alert_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlertEvent: data (NewAlertEventData): """ - data: "NewAlertEventData" + data: NewAlertEventData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_event_data.py b/rootly_sdk/models/new_alert_event_data.py index 94a35a34..b1834ca4 100644 --- a/rootly_sdk/models/new_alert_event_data.py +++ b/rootly_sdk/models/new_alert_event_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAlertEventData: """ type_: NewAlertEventDataType - attributes: "NewAlertEventDataAttributes" + attributes: NewAlertEventDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_event_data_attributes.py b/rootly_sdk/models/new_alert_event_data_attributes.py index be5da6d1..fa2ef336 100644 --- a/rootly_sdk/models/new_alert_event_data_attributes.py +++ b/rootly_sdk/models/new_alert_event_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,12 +20,12 @@ class NewAlertEventDataAttributes: Attributes: kind (NewAlertEventDataAttributesKind): details (str): Note message. - user_id (Union[Unset, int]): Author of the note. + user_id (int | Unset): Author of the note. """ kind: NewAlertEventDataAttributesKind details: str - user_id: Unset | int = UNSET + user_id: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: kind: str = self.kind diff --git a/rootly_sdk/models/new_alert_field.py b/rootly_sdk/models/new_alert_field.py index 8a07ae9c..fe39f1f2 100644 --- a/rootly_sdk/models/new_alert_field.py +++ b/rootly_sdk/models/new_alert_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlertField: data (NewAlertFieldData): """ - data: "NewAlertFieldData" + data: NewAlertFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_field_data.py b/rootly_sdk/models/new_alert_field_data.py index f1029426..e339edd9 100644 --- a/rootly_sdk/models/new_alert_field_data.py +++ b/rootly_sdk/models/new_alert_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAlertFieldData: """ type_: NewAlertFieldDataType - attributes: "NewAlertFieldDataAttributes" + attributes: NewAlertFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_field_data_attributes.py b/rootly_sdk/models/new_alert_field_data_attributes.py index 70261ef1..d3021a24 100644 --- a/rootly_sdk/models/new_alert_field_data_attributes.py +++ b/rootly_sdk/models/new_alert_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_alert_group.py b/rootly_sdk/models/new_alert_group.py index e61d1901..31fe2fcf 100644 --- a/rootly_sdk/models/new_alert_group.py +++ b/rootly_sdk/models/new_alert_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlertGroup: data (NewAlertGroupData): """ - data: "NewAlertGroupData" + data: NewAlertGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_group_data.py b/rootly_sdk/models/new_alert_group_data.py index c0de3056..9f3ad58e 100644 --- a/rootly_sdk/models/new_alert_group_data.py +++ b/rootly_sdk/models/new_alert_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAlertGroupData: """ type_: NewAlertGroupDataType - attributes: "NewAlertGroupDataAttributes" + attributes: NewAlertGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_group_data_attributes.py b/rootly_sdk/models/new_alert_group_data_attributes.py index cbec0c9e..61040f9b 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes.py +++ b/rootly_sdk/models/new_alert_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -31,36 +33,36 @@ class NewAlertGroupDataAttributes: """ Attributes: name (str): The name of the alert group - description (Union[None, Unset, str]): The description of the alert urgency - time_window (Union[Unset, int]): The length of time an Alert Group should stay open and accept new alerts - targets (Union[Unset, list['NewAlertGroupDataAttributesTargetsItem']]): - attributes (Union[Unset, list['NewAlertGroupDataAttributesAttributesItem']]): This field is deprecated. Please - use the `conditions` field instead, `attributes` will be removed in the future. - group_by_alert_title (Union[Unset, NewAlertGroupDataAttributesGroupByAlertTitle]): [DEPRECATED] Whether the - alerts should be grouped by titles. This field is deprecated. Please use the `conditions` field with advanced - alert grouping instead. - group_by_alert_urgency (Union[Unset, NewAlertGroupDataAttributesGroupByAlertUrgency]): [DEPRECATED] Whether the - alerts should be grouped by urgencies. This field is deprecated. Please use the `conditions` field with advanced - alert grouping instead. - condition_type (Union[Unset, NewAlertGroupDataAttributesConditionType]): Group alerts when ANY or ALL of the - fields are matching. - conditions (Union[Unset, list['NewAlertGroupDataAttributesConditionsItem']]): + description (None | str | Unset): The description of the alert urgency + time_window (int | Unset): The length of time an Alert Group should stay open and accept new alerts + targets (list[NewAlertGroupDataAttributesTargetsItem] | Unset): + attributes (list[NewAlertGroupDataAttributesAttributesItem] | Unset): This field is deprecated. Please use the + `conditions` field instead, `attributes` will be removed in the future. + group_by_alert_title (NewAlertGroupDataAttributesGroupByAlertTitle | Unset): [DEPRECATED] Whether the alerts + should be grouped by titles. This field is deprecated. Please use the `conditions` field with advanced alert + grouping instead. + group_by_alert_urgency (NewAlertGroupDataAttributesGroupByAlertUrgency | Unset): [DEPRECATED] Whether the alerts + should be grouped by urgencies. This field is deprecated. Please use the `conditions` field with advanced alert + grouping instead. + condition_type (NewAlertGroupDataAttributesConditionType | Unset): Group alerts when ANY or ALL of the fields + are matching. + conditions (list[NewAlertGroupDataAttributesConditionsItem] | Unset): """ name: str - description: None | Unset | str = UNSET - time_window: Unset | int = UNSET - targets: Unset | list["NewAlertGroupDataAttributesTargetsItem"] = UNSET - attributes: Unset | list["NewAlertGroupDataAttributesAttributesItem"] = UNSET - group_by_alert_title: Unset | NewAlertGroupDataAttributesGroupByAlertTitle = UNSET - group_by_alert_urgency: Unset | NewAlertGroupDataAttributesGroupByAlertUrgency = UNSET - condition_type: Unset | NewAlertGroupDataAttributesConditionType = UNSET - conditions: Unset | list["NewAlertGroupDataAttributesConditionsItem"] = UNSET + description: None | str | Unset = UNSET + time_window: int | Unset = UNSET + targets: list[NewAlertGroupDataAttributesTargetsItem] | Unset = UNSET + attributes: list[NewAlertGroupDataAttributesAttributesItem] | Unset = UNSET + group_by_alert_title: NewAlertGroupDataAttributesGroupByAlertTitle | Unset = UNSET + group_by_alert_urgency: NewAlertGroupDataAttributesGroupByAlertUrgency | Unset = UNSET + condition_type: NewAlertGroupDataAttributesConditionType | Unset = UNSET + conditions: list[NewAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -68,33 +70,33 @@ def to_dict(self) -> dict[str, Any]: time_window = self.time_window - targets: Unset | list[dict[str, Any]] = UNSET + targets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.targets, Unset): targets = [] for targets_item_data in self.targets: targets_item = targets_item_data.to_dict() targets.append(targets_item) - attributes: Unset | list[dict[str, Any]] = UNSET + attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = [] for attributes_item_data in self.attributes: attributes_item = attributes_item_data.to_dict() attributes.append(attributes_item) - group_by_alert_title: Unset | int = UNSET + group_by_alert_title: int | Unset = UNSET if not isinstance(self.group_by_alert_title, Unset): group_by_alert_title = self.group_by_alert_title - group_by_alert_urgency: Unset | int = UNSET + group_by_alert_urgency: int | Unset = UNSET if not isinstance(self.group_by_alert_urgency, Unset): group_by_alert_urgency = self.group_by_alert_urgency - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -136,40 +138,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) time_window = d.pop("time_window", UNSET) - targets = [] _targets = d.pop("targets", UNSET) - for targets_item_data in _targets or []: - targets_item = NewAlertGroupDataAttributesTargetsItem.from_dict(targets_item_data) + targets: list[NewAlertGroupDataAttributesTargetsItem] | Unset = UNSET + if _targets is not UNSET: + targets = [] + for targets_item_data in _targets: + targets_item = NewAlertGroupDataAttributesTargetsItem.from_dict(targets_item_data) - targets.append(targets_item) + targets.append(targets_item) - attributes = [] _attributes = d.pop("attributes", UNSET) - for attributes_item_data in _attributes or []: - attributes_item = NewAlertGroupDataAttributesAttributesItem.from_dict(attributes_item_data) + attributes: list[NewAlertGroupDataAttributesAttributesItem] | Unset = UNSET + if _attributes is not UNSET: + attributes = [] + for attributes_item_data in _attributes: + attributes_item = NewAlertGroupDataAttributesAttributesItem.from_dict(attributes_item_data) - attributes.append(attributes_item) + attributes.append(attributes_item) _group_by_alert_title = d.pop("group_by_alert_title", UNSET) - group_by_alert_title: Unset | NewAlertGroupDataAttributesGroupByAlertTitle + group_by_alert_title: NewAlertGroupDataAttributesGroupByAlertTitle | Unset if isinstance(_group_by_alert_title, Unset): group_by_alert_title = UNSET else: group_by_alert_title = check_new_alert_group_data_attributes_group_by_alert_title(_group_by_alert_title) _group_by_alert_urgency = d.pop("group_by_alert_urgency", UNSET) - group_by_alert_urgency: Unset | NewAlertGroupDataAttributesGroupByAlertUrgency + group_by_alert_urgency: NewAlertGroupDataAttributesGroupByAlertUrgency | Unset if isinstance(_group_by_alert_urgency, Unset): group_by_alert_urgency = UNSET else: @@ -178,18 +184,20 @@ def _parse_description(data: object) -> None | Unset | str: ) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | NewAlertGroupDataAttributesConditionType + condition_type: NewAlertGroupDataAttributesConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_new_alert_group_data_attributes_condition_type(_condition_type) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = NewAlertGroupDataAttributesConditionsItem.from_dict(conditions_item_data) + conditions: list[NewAlertGroupDataAttributesConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = NewAlertGroupDataAttributesConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) new_alert_group_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/new_alert_group_data_attributes_attributes_item.py b/rootly_sdk/models/new_alert_group_data_attributes_attributes_item.py index 7137d960..32f2336b 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes_attributes_item.py +++ b/rootly_sdk/models/new_alert_group_data_attributes_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class NewAlertGroupDataAttributesAttributesItem: """ Attributes: - json_path (Union[Unset, str]): The JSON path to the value to group by. + json_path (str | Unset): The JSON path to the value to group by. """ - json_path: Unset | str = UNSET + json_path: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_group_data_attributes_conditions_item.py b/rootly_sdk/models/new_alert_group_data_attributes_conditions_item.py index bc64e1f2..b4add325 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes_conditions_item.py +++ b/rootly_sdk/models/new_alert_group_data_attributes_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -28,32 +30,31 @@ class NewAlertGroupDataAttributesConditionsItem: property_field_type (NewAlertGroupDataAttributesConditionsItemPropertyFieldType): The type of the property field property_field_condition_type (NewAlertGroupDataAttributesConditionsItemPropertyFieldConditionType): The condition type of the property field - property_field_name (Union[Unset, str]): The name of the property field. If the property field type is selected - as 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' - and 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the - property field name should be supplied in JSON Path syntax. - property_field_value (Union[Unset, str]): The value of the property field. Can be null if the property field - condition type is 'is_one_of' or 'is_not_one_of' - property_field_values (Union[Unset, list[str]]): The values of the property field. Need to be passed if the - property field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is - 'alert_urgency' - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition. Only need to - be set when the property field type is 'attribute', the property field name is 'alert_urgency' and the property + property_field_name (str | Unset): The name of the property field. If the property field type is selected as + 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' and + 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the property + field name should be supplied in JSON Path syntax. + property_field_value (str | Unset): The value of the property field. Can be null if the property field condition + type is 'is_one_of' or 'is_not_one_of' + property_field_values (list[str] | Unset): The values of the property field. Need to be passed if the property + field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is 'alert_urgency' + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition. Only need to be + set when the property field type is 'attribute', the property field name is 'alert_urgency' and the property field condition type is 'is_one_of' or 'is_not_one_of' - conditionable_type (Union[Unset, NewAlertGroupDataAttributesConditionsItemConditionableType]): The type of the + conditionable_type (NewAlertGroupDataAttributesConditionsItemConditionableType | Unset): The type of the conditionable - conditionable_id (Union[Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, this is - the ID of the alert field. + conditionable_id (str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is the ID + of the alert field. """ property_field_type: NewAlertGroupDataAttributesConditionsItemPropertyFieldType property_field_condition_type: NewAlertGroupDataAttributesConditionsItemPropertyFieldConditionType - property_field_name: Unset | str = UNSET - property_field_value: Unset | str = UNSET - property_field_values: Unset | list[str] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET - conditionable_type: Unset | NewAlertGroupDataAttributesConditionsItemConditionableType = UNSET - conditionable_id: Unset | str = UNSET + property_field_name: str | Unset = UNSET + property_field_value: str | Unset = UNSET + property_field_values: list[str] | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET + conditionable_type: NewAlertGroupDataAttributesConditionsItemConditionableType | Unset = UNSET + conditionable_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -65,11 +66,11 @@ def to_dict(self) -> dict[str, Any]: property_field_value = self.property_field_value - property_field_values: Unset | list[str] = UNSET + property_field_values: list[str] | Unset = UNSET if not isinstance(self.property_field_values, Unset): property_field_values = self.property_field_values - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -78,7 +79,7 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type @@ -126,7 +127,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: property_field_values = cast(list[str], d.pop("property_field_values", UNSET)) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -137,14 +138,14 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | NewAlertGroupDataAttributesConditionsItemConditionableType + conditionable_type: NewAlertGroupDataAttributesConditionsItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: diff --git a/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py b/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py index 7fdde8a8..74afd762 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py +++ b/rootly_sdk/models/new_alert_group_data_attributes_targets_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID diff --git a/rootly_sdk/models/new_alert_route.py b/rootly_sdk/models/new_alert_route.py index 44053e1b..79625248 100644 --- a/rootly_sdk/models/new_alert_route.py +++ b/rootly_sdk/models/new_alert_route.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class NewAlertRoute: """ Attributes: - data (Union[Unset, NewAlertRouteData]): + data (NewAlertRouteData | Unset): """ - data: Union[Unset, "NewAlertRouteData"] = UNSET + data: NewAlertRouteData | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | NewAlertRouteData + data: NewAlertRouteData | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/new_alert_route_data.py b/rootly_sdk/models/new_alert_route_data.py index 8f32aa22..13b160fb 100644 --- a/rootly_sdk/models/new_alert_route_data.py +++ b/rootly_sdk/models/new_alert_route_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class NewAlertRouteData: """ Attributes: - type_ (Union[Unset, NewAlertRouteDataType]): - attributes (Union[Unset, NewAlertRouteDataAttributes]): + type_ (NewAlertRouteDataType | Unset): + attributes (NewAlertRouteDataAttributes | Unset): """ - type_: Unset | NewAlertRouteDataType = UNSET - attributes: Union[Unset, "NewAlertRouteDataAttributes"] = UNSET + type_: NewAlertRouteDataType | Unset = UNSET + attributes: NewAlertRouteDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -51,14 +53,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _type_ = d.pop("type", UNSET) - type_: Unset | NewAlertRouteDataType + type_: NewAlertRouteDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_new_alert_route_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | NewAlertRouteDataAttributes + attributes: NewAlertRouteDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/new_alert_route_data_attributes.py b/rootly_sdk/models/new_alert_route_data_attributes.py index 6f14fe06..8ed8b1a7 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes.py +++ b/rootly_sdk/models/new_alert_route_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -20,16 +22,16 @@ class NewAlertRouteDataAttributes: Attributes: name (str): The name of the alert route alerts_source_ids (list[UUID]): - enabled (Union[Unset, bool]): Whether the alert route is enabled - owning_team_ids (Union[Unset, list[UUID]]): - rules (Union[Unset, list['NewAlertRouteDataAttributesRulesItem']]): + enabled (bool | Unset): Whether the alert route is enabled + owning_team_ids (list[UUID] | Unset): + rules (list[NewAlertRouteDataAttributesRulesItem] | Unset): """ name: str alerts_source_ids: list[UUID] - enabled: Unset | bool = UNSET - owning_team_ids: Unset | list[UUID] = UNSET - rules: Unset | list["NewAlertRouteDataAttributesRulesItem"] = UNSET + enabled: bool | Unset = UNSET + owning_team_ids: list[UUID] | Unset = UNSET + rules: list[NewAlertRouteDataAttributesRulesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,14 +44,14 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - owning_team_ids: Unset | list[str] = UNSET + owning_team_ids: list[str] | Unset = UNSET if not isinstance(self.owning_team_ids, Unset): owning_team_ids = [] for owning_team_ids_item_data in self.owning_team_ids: owning_team_ids_item = str(owning_team_ids_item_data) owning_team_ids.append(owning_team_ids_item) - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -89,19 +91,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) - owning_team_ids = [] _owning_team_ids = d.pop("owning_team_ids", UNSET) - for owning_team_ids_item_data in _owning_team_ids or []: - owning_team_ids_item = UUID(owning_team_ids_item_data) + owning_team_ids: list[UUID] | Unset = UNSET + if _owning_team_ids is not UNSET: + owning_team_ids = [] + for owning_team_ids_item_data in _owning_team_ids: + owning_team_ids_item = UUID(owning_team_ids_item_data) - owning_team_ids.append(owning_team_ids_item) + owning_team_ids.append(owning_team_ids_item) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = NewAlertRouteDataAttributesRulesItem.from_dict(rules_item_data) + rules: list[NewAlertRouteDataAttributesRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = NewAlertRouteDataAttributesRulesItem.from_dict(rules_item_data) - rules.append(rules_item) + rules.append(rules_item) new_alert_route_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py index e59a7a18..8e5042f2 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,17 +25,17 @@ class NewAlertRouteDataAttributesRulesItem: """ Attributes: name (str): The name of the alert routing rule - destinations (list['NewAlertRouteDataAttributesRulesItemDestinationsItem']): - condition_groups (list['NewAlertRouteDataAttributesRulesItemConditionGroupsItem']): - position (Union[Unset, int]): The position of the alert routing rule for ordering evaluation - fallback_rule (Union[Unset, bool]): Whether this is a fallback rule + destinations (list[NewAlertRouteDataAttributesRulesItemDestinationsItem]): + condition_groups (list[NewAlertRouteDataAttributesRulesItemConditionGroupsItem]): + position (int | Unset): The position of the alert routing rule for ordering evaluation + fallback_rule (bool | Unset): Whether this is a fallback rule Default: False. """ name: str - destinations: list["NewAlertRouteDataAttributesRulesItemDestinationsItem"] - condition_groups: list["NewAlertRouteDataAttributesRulesItemConditionGroupsItem"] - position: Unset | int = UNSET - fallback_rule: Unset | bool = UNSET + destinations: list[NewAlertRouteDataAttributesRulesItemDestinationsItem] + condition_groups: list[NewAlertRouteDataAttributesRulesItemConditionGroupsItem] + position: int | Unset = UNSET + fallback_rule: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py index 68d9d2c3..b32250f0 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,12 +21,12 @@ class NewAlertRouteDataAttributesRulesItemConditionGroupsItem: """ Attributes: - conditions (list['NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem']): - position (Union[Unset, int]): The position of the condition group + conditions (list[NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem]): + position (int | Unset): The position of the condition group """ - conditions: list["NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem"] - position: Unset | int = UNSET + conditions: list[NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem] + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py index 76514557..22a91c83 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -29,28 +31,27 @@ class NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem: property_field_condition_type (NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType): property_field_type (NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType): - property_field_name (Union[Unset, str]): The name of the property field - property_field_value (Union[None, Unset, str]): The value of the property field - property_field_values (Union[None, Unset, list[str]]): - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition - conditionable_type (Union[Unset, - NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType]): The type of the - conditionable - conditionable_id (Union[None, UUID, Unset]): The ID of the conditionable + property_field_name (str | Unset): The name of the property field + property_field_value (None | str | Unset): The value of the property field + property_field_values (list[str] | None | Unset): + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition + conditionable_type (NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | + Unset): The type of the conditionable + conditionable_id (None | Unset | UUID): The ID of the conditionable """ property_field_condition_type: ( NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType ) property_field_type: NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType - property_field_name: Unset | str = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: None | Unset | list[str] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET + property_field_name: str | Unset = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | None | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET conditionable_type: ( - Unset | NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType + NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | Unset ) = UNSET - conditionable_id: None | UUID | Unset = UNSET + conditionable_id: None | Unset | UUID = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -60,13 +61,13 @@ def to_dict(self) -> dict[str, Any]: property_field_name = self.property_field_name - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: None | Unset | list[str] + property_field_values: list[str] | None | Unset if isinstance(self.property_field_values, Unset): property_field_values = UNSET elif isinstance(self.property_field_values, list): @@ -75,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: property_field_values = self.property_field_values - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -84,11 +85,11 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET elif isinstance(self.conditionable_id, UUID): @@ -134,16 +135,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: property_field_name = d.pop("property_field_name", UNSET) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) - def _parse_property_field_values(data: object) -> None | Unset | list[str]: + def _parse_property_field_values(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -154,13 +155,13 @@ def _parse_property_field_values(data: object) -> None | Unset | list[str]: property_field_values_type_0 = cast(list[str], data) return property_field_values_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) property_field_values = _parse_property_field_values(d.pop("property_field_values", UNSET)) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -171,15 +172,15 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) conditionable_type: ( - Unset | NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType + NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | Unset ) if isinstance(_conditionable_type, Unset): conditionable_type = UNSET @@ -188,7 +189,7 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | UUID | Unset: + def _parse_conditionable_id(data: object) -> None | Unset | UUID: if data is None: return data if isinstance(data, Unset): @@ -199,9 +200,9 @@ def _parse_conditionable_id(data: object) -> None | UUID | Unset: conditionable_id_type_0 = UUID(data) return conditionable_id_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | UUID | Unset, data) + return cast(None | Unset | UUID, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item.py index 939865fb..988b84be 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -17,7 +19,8 @@ class NewAlertRouteDataAttributesRulesItemDestinationsItem: """ Attributes: - target_type (NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType): The type of the target + target_type (NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType): The type of the target. Please + contact support if you encounter issues using `Functionality` as a target type. target_id (UUID): The ID of the target """ diff --git a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item_target_type.py b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item_target_type.py index fa84e139..040f3ccf 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item_target_type.py +++ b/rootly_sdk/models/new_alert_route_data_attributes_rules_item_destinations_item_target_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service" +] NEW_ALERT_ROUTE_DATA_ATTRIBUTES_RULES_ITEM_DESTINATIONS_ITEM_TARGET_TYPE_VALUES: set[ NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/new_alert_routing_rule.py b/rootly_sdk/models/new_alert_routing_rule.py index 2dd1368b..f60b001a 100644 --- a/rootly_sdk/models/new_alert_routing_rule.py +++ b/rootly_sdk/models/new_alert_routing_rule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlertRoutingRule: data (NewAlertRoutingRuleData): """ - data: "NewAlertRoutingRuleData" + data: NewAlertRoutingRuleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_routing_rule_data.py b/rootly_sdk/models/new_alert_routing_rule_data.py index 038cc9b0..81681d74 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data.py +++ b/rootly_sdk/models/new_alert_routing_rule_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewAlertRoutingRuleData: """ type_: NewAlertRoutingRuleDataType - attributes: "NewAlertRoutingRuleDataAttributes" + attributes: NewAlertRoutingRuleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_routing_rule_data_attributes.py b/rootly_sdk/models/new_alert_routing_rule_data_attributes.py index e6198f3d..384761d5 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -27,24 +29,24 @@ class NewAlertRoutingRuleDataAttributes: name (str): The name of the alert routing rule alerts_source_id (UUID): The ID of the alerts source destination (NewAlertRoutingRuleDataAttributesDestination): - enabled (Union[Unset, bool]): Whether the alert routing rule is enabled - owning_team_ids (Union[Unset, list[UUID]]): The IDs of the teams which own the alert routing rule. If the user - doesn't have Alert Routing Create Permission in On-Call Roles, then this field is required and can contain Team - IDs the user is an admin of. - position (Union[Unset, int]): The position of the alert routing rule for ordering evaluation - condition_type (Union[Unset, NewAlertRoutingRuleDataAttributesConditionType]): The type of condition for the - alert routing rule - conditions (Union[Unset, list['NewAlertRoutingRuleDataAttributesConditionsItem']]): + enabled (bool | Unset): Whether the alert routing rule is enabled + owning_team_ids (list[UUID] | Unset): The IDs of the teams which own the alert routing rule. If the user doesn't + have Alert Routing Create Permission in On-Call Roles, then this field is required and can contain Team IDs the + user is an admin of. + position (int | Unset): The position of the alert routing rule for ordering evaluation + condition_type (NewAlertRoutingRuleDataAttributesConditionType | Unset): The type of condition for the alert + routing rule + conditions (list[NewAlertRoutingRuleDataAttributesConditionsItem] | Unset): """ name: str alerts_source_id: UUID - destination: "NewAlertRoutingRuleDataAttributesDestination" - enabled: Unset | bool = UNSET - owning_team_ids: Unset | list[UUID] = UNSET - position: Unset | int = UNSET - condition_type: Unset | NewAlertRoutingRuleDataAttributesConditionType = UNSET - conditions: Unset | list["NewAlertRoutingRuleDataAttributesConditionsItem"] = UNSET + destination: NewAlertRoutingRuleDataAttributesDestination + enabled: bool | Unset = UNSET + owning_team_ids: list[UUID] | Unset = UNSET + position: int | Unset = UNSET + condition_type: NewAlertRoutingRuleDataAttributesConditionType | Unset = UNSET + conditions: list[NewAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -55,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - owning_team_ids: Unset | list[str] = UNSET + owning_team_ids: list[str] | Unset = UNSET if not isinstance(self.owning_team_ids, Unset): owning_team_ids = [] for owning_team_ids_item_data in self.owning_team_ids: @@ -64,11 +66,11 @@ def to_dict(self) -> dict[str, Any]: position = self.position - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -115,28 +117,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) - owning_team_ids = [] _owning_team_ids = d.pop("owning_team_ids", UNSET) - for owning_team_ids_item_data in _owning_team_ids or []: - owning_team_ids_item = UUID(owning_team_ids_item_data) + owning_team_ids: list[UUID] | Unset = UNSET + if _owning_team_ids is not UNSET: + owning_team_ids = [] + for owning_team_ids_item_data in _owning_team_ids: + owning_team_ids_item = UUID(owning_team_ids_item_data) - owning_team_ids.append(owning_team_ids_item) + owning_team_ids.append(owning_team_ids_item) position = d.pop("position", UNSET) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | NewAlertRoutingRuleDataAttributesConditionType + condition_type: NewAlertRoutingRuleDataAttributesConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_new_alert_routing_rule_data_attributes_condition_type(_condition_type) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = NewAlertRoutingRuleDataAttributesConditionsItem.from_dict(conditions_item_data) + conditions: list[NewAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = NewAlertRoutingRuleDataAttributesConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) new_alert_routing_rule_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/new_alert_routing_rule_data_attributes_conditions_item.py b/rootly_sdk/models/new_alert_routing_rule_data_attributes_conditions_item.py index 2ec23593..8d4358b9 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes_conditions_item.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -29,18 +31,17 @@ class NewAlertRoutingRuleDataAttributesConditionsItem: field name should be supplied in JSON Path syntax. property_field_condition_type (NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType): The condition type of the property field - property_field_value (Union[Unset, str]): The value of the property field. Can be null if the property field - condition type is 'is_one_of' or 'is_not_one_of' - property_field_values (Union[Unset, list[str]]): The values of the property field. Need to be passed if the - property field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is - 'alert_urgency' + property_field_value (str | Unset): The value of the property field. Can be null if the property field condition + type is 'is_one_of' or 'is_not_one_of' + property_field_values (list[str] | Unset): The values of the property field. Need to be passed if the property + field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is 'alert_urgency' """ property_field_type: NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType property_field_name: str property_field_condition_type: NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType - property_field_value: Unset | str = UNSET - property_field_values: Unset | list[str] = UNSET + property_field_value: str | Unset = UNSET + property_field_values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: property_field_value = self.property_field_value - property_field_values: Unset | list[str] = UNSET + property_field_values: list[str] | Unset = UNSET if not isinstance(self.property_field_values, Unset): property_field_values = self.property_field_values diff --git a/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination.py b/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination.py index 27fe92d0..09bebab5 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -17,7 +19,8 @@ class NewAlertRoutingRuleDataAttributesDestination: """ Attributes: - target_type (NewAlertRoutingRuleDataAttributesDestinationTargetType): The type of the target + target_type (NewAlertRoutingRuleDataAttributesDestinationTargetType): The type of the target. Please contact + support if you encounter issues using `Functionality` as a target type. target_id (UUID): The ID of the target """ diff --git a/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination_target_type.py b/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination_target_type.py index 99302e8a..e62ae911 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination_target_type.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes_destination_target_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -NewAlertRoutingRuleDataAttributesDestinationTargetType = Literal["EscalationPolicy", "Group", "Service"] +NewAlertRoutingRuleDataAttributesDestinationTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service" +] NEW_ALERT_ROUTING_RULE_DATA_ATTRIBUTES_DESTINATION_TARGET_TYPE_VALUES: set[ NewAlertRoutingRuleDataAttributesDestinationTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/new_alert_urgency.py b/rootly_sdk/models/new_alert_urgency.py index 0e0e8d79..14f3b152 100644 --- a/rootly_sdk/models/new_alert_urgency.py +++ b/rootly_sdk/models/new_alert_urgency.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlertUrgency: data (NewAlertUrgencyData): """ - data: "NewAlertUrgencyData" + data: NewAlertUrgencyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_urgency_data.py b/rootly_sdk/models/new_alert_urgency_data.py index 345905e1..05d2e804 100644 --- a/rootly_sdk/models/new_alert_urgency_data.py +++ b/rootly_sdk/models/new_alert_urgency_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAlertUrgencyData: """ type_: NewAlertUrgencyDataType - attributes: "NewAlertUrgencyDataAttributes" + attributes: NewAlertUrgencyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alert_urgency_data_attributes.py b/rootly_sdk/models/new_alert_urgency_data_attributes.py index 7227524c..9a51775d 100644 --- a/rootly_sdk/models/new_alert_urgency_data_attributes.py +++ b/rootly_sdk/models/new_alert_urgency_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -14,19 +16,19 @@ class NewAlertUrgencyDataAttributes: Attributes: name (str): The name of the alert urgency description (str): The description of the alert urgency - position (Union[None, Unset, int]): Position of the alert urgency + position (int | None | Unset): Position of the alert urgency """ name: str description: str - position: None | Unset | int = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -52,12 +54,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description") - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_alerts_source.py b/rootly_sdk/models/new_alerts_source.py index ecb9f870..4ea3cade 100644 --- a/rootly_sdk/models/new_alerts_source.py +++ b/rootly_sdk/models/new_alerts_source.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAlertsSource: data (NewAlertsSourceData): """ - data: "NewAlertsSourceData" + data: NewAlertsSourceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alerts_source_data.py b/rootly_sdk/models/new_alerts_source_data.py index ab42b780..41b6af4d 100644 --- a/rootly_sdk/models/new_alerts_source_data.py +++ b/rootly_sdk/models/new_alerts_source_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAlertsSourceData: """ type_: NewAlertsSourceDataType - attributes: "NewAlertsSourceDataAttributes" + attributes: NewAlertsSourceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_alerts_source_data_attributes.py b/rootly_sdk/models/new_alerts_source_data_attributes.py index 0a71782e..72099088 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -39,46 +41,43 @@ class NewAlertsSourceDataAttributes: """ Attributes: name (str): The name of the alert source - source_type (Union[Unset, NewAlertsSourceDataAttributesSourceType]): The alert source type - alert_urgency_id (Union[Unset, str]): ID for the default alert urgency assigned to this alert source - deduplicate_alerts_by_key (Union[Unset, bool]): Toggle alert deduplication using deduplication key. If enabled, + source_type (NewAlertsSourceDataAttributesSourceType | Unset): The alert source type + alert_urgency_id (str | Unset): ID for the default alert urgency assigned to this alert source + deduplicate_alerts_by_key (bool | Unset): Toggle alert deduplication using deduplication key. If enabled, deduplication_key_kind and deduplication_key_path are required. - deduplication_key_kind (Union[Unset, NewAlertsSourceDataAttributesDeduplicationKeyKind]): Kind of deduplication - key. - deduplication_key_path (Union[None, Unset, str]): Path to deduplication key. This is a JSON Path to extract the + deduplication_key_kind (NewAlertsSourceDataAttributesDeduplicationKeyKind | Unset): Kind of deduplication key. + deduplication_key_path (None | str | Unset): Path to deduplication key. This is a JSON Path to extract the deduplication key from the request body. - deduplication_key_regexp (Union[None, Unset, str]): Regular expression to extract key from value found at key - path. - owner_group_ids (Union[Unset, list[str]]): List of team IDs that will own the alert source - alert_template_attributes (Union['NewAlertsSourceDataAttributesAlertTemplateAttributesType0', None, Unset]): - alert_source_urgency_rules_attributes (Union[Unset, - list['NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem']]): List of rules that define the - conditions under which the alert urgency will be set automatically based on the alert payload - sourceable_attributes (Union['NewAlertsSourceDataAttributesSourceableAttributesType0', None, Unset]): Provide + deduplication_key_regexp (None | str | Unset): Regular expression to extract key from value found at key path. + owner_group_ids (list[str] | Unset): List of team IDs that will own the alert source + alert_template_attributes (NewAlertsSourceDataAttributesAlertTemplateAttributesType0 | None | Unset): + alert_source_urgency_rules_attributes (list[NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem] + | Unset): List of rules that define the conditions under which the alert urgency will be set automatically based + on the alert payload + sourceable_attributes (NewAlertsSourceDataAttributesSourceableAttributesType0 | None | Unset): Provide additional attributes for generic_webhook alerts source - resolution_rule_attributes (Union['NewAlertsSourceDataAttributesResolutionRuleAttributesType0', None, Unset]): - Provide additional attributes for email alerts source - alert_source_fields_attributes (Union[Unset, - list['NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem']]): List of alert fields to be added to the - alert source. Note: This attribute requires the alert field feature to be enabled on your account. Contact - Rootly customer support if you need assistance with this feature. + resolution_rule_attributes (NewAlertsSourceDataAttributesResolutionRuleAttributesType0 | None | Unset): Provide + additional attributes for email alerts source + alert_source_fields_attributes (list[NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset): + List of alert fields to be added to the alert source. Note: This attribute requires the alert field feature to + be enabled on your account. Contact Rootly customer support if you need assistance with this feature. """ name: str - source_type: Unset | NewAlertsSourceDataAttributesSourceType = UNSET - alert_urgency_id: Unset | str = UNSET - deduplicate_alerts_by_key: Unset | bool = UNSET - deduplication_key_kind: Unset | NewAlertsSourceDataAttributesDeduplicationKeyKind = UNSET - deduplication_key_path: None | Unset | str = UNSET - deduplication_key_regexp: None | Unset | str = UNSET - owner_group_ids: Unset | list[str] = UNSET - alert_template_attributes: Union["NewAlertsSourceDataAttributesAlertTemplateAttributesType0", None, Unset] = UNSET + source_type: NewAlertsSourceDataAttributesSourceType | Unset = UNSET + alert_urgency_id: str | Unset = UNSET + deduplicate_alerts_by_key: bool | Unset = UNSET + deduplication_key_kind: NewAlertsSourceDataAttributesDeduplicationKeyKind | Unset = UNSET + deduplication_key_path: None | str | Unset = UNSET + deduplication_key_regexp: None | str | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET + alert_template_attributes: NewAlertsSourceDataAttributesAlertTemplateAttributesType0 | None | Unset = UNSET alert_source_urgency_rules_attributes: ( - Unset | list["NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem"] + list[NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem] | Unset ) = UNSET - sourceable_attributes: Union["NewAlertsSourceDataAttributesSourceableAttributesType0", None, Unset] = UNSET - resolution_rule_attributes: Union["NewAlertsSourceDataAttributesResolutionRuleAttributesType0", None, Unset] = UNSET - alert_source_fields_attributes: Unset | list["NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem"] = UNSET + sourceable_attributes: NewAlertsSourceDataAttributesSourceableAttributesType0 | None | Unset = UNSET + resolution_rule_attributes: NewAlertsSourceDataAttributesResolutionRuleAttributesType0 | None | Unset = UNSET + alert_source_fields_attributes: list[NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_alerts_source_data_attributes_alert_template_attributes_type_0 import ( @@ -93,7 +92,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - source_type: Unset | str = UNSET + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -101,27 +100,27 @@ def to_dict(self) -> dict[str, Any]: deduplicate_alerts_by_key = self.deduplicate_alerts_by_key - deduplication_key_kind: Unset | str = UNSET + deduplication_key_kind: str | Unset = UNSET if not isinstance(self.deduplication_key_kind, Unset): deduplication_key_kind = self.deduplication_key_kind - deduplication_key_path: None | Unset | str + deduplication_key_path: None | str | Unset if isinstance(self.deduplication_key_path, Unset): deduplication_key_path = UNSET else: deduplication_key_path = self.deduplication_key_path - deduplication_key_regexp: None | Unset | str + deduplication_key_regexp: None | str | Unset if isinstance(self.deduplication_key_regexp, Unset): deduplication_key_regexp = UNSET else: deduplication_key_regexp = self.deduplication_key_regexp - owner_group_ids: Unset | list[str] = UNSET + owner_group_ids: list[str] | Unset = UNSET if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids - alert_template_attributes: None | Unset | dict[str, Any] + alert_template_attributes: dict[str, Any] | None | Unset if isinstance(self.alert_template_attributes, Unset): alert_template_attributes = UNSET elif isinstance(self.alert_template_attributes, NewAlertsSourceDataAttributesAlertTemplateAttributesType0): @@ -129,14 +128,14 @@ def to_dict(self) -> dict[str, Any]: else: alert_template_attributes = self.alert_template_attributes - alert_source_urgency_rules_attributes: Unset | list[dict[str, Any]] = UNSET + alert_source_urgency_rules_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_source_urgency_rules_attributes, Unset): alert_source_urgency_rules_attributes = [] for alert_source_urgency_rules_attributes_item_data in self.alert_source_urgency_rules_attributes: alert_source_urgency_rules_attributes_item = alert_source_urgency_rules_attributes_item_data.to_dict() alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) - sourceable_attributes: None | Unset | dict[str, Any] + sourceable_attributes: dict[str, Any] | None | Unset if isinstance(self.sourceable_attributes, Unset): sourceable_attributes = UNSET elif isinstance(self.sourceable_attributes, NewAlertsSourceDataAttributesSourceableAttributesType0): @@ -144,7 +143,7 @@ def to_dict(self) -> dict[str, Any]: else: sourceable_attributes = self.sourceable_attributes - resolution_rule_attributes: None | Unset | dict[str, Any] + resolution_rule_attributes: dict[str, Any] | None | Unset if isinstance(self.resolution_rule_attributes, Unset): resolution_rule_attributes = UNSET elif isinstance(self.resolution_rule_attributes, NewAlertsSourceDataAttributesResolutionRuleAttributesType0): @@ -152,7 +151,7 @@ def to_dict(self) -> dict[str, Any]: else: resolution_rule_attributes = self.resolution_rule_attributes - alert_source_fields_attributes: Unset | list[dict[str, Any]] = UNSET + alert_source_fields_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_source_fields_attributes, Unset): alert_source_fields_attributes = [] for alert_source_fields_attributes_item_data in self.alert_source_fields_attributes: @@ -215,7 +214,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") _source_type = d.pop("source_type", UNSET) - source_type: Unset | NewAlertsSourceDataAttributesSourceType + source_type: NewAlertsSourceDataAttributesSourceType | Unset if isinstance(_source_type, Unset): source_type = UNSET else: @@ -226,7 +225,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: deduplicate_alerts_by_key = d.pop("deduplicate_alerts_by_key", UNSET) _deduplication_key_kind = d.pop("deduplication_key_kind", UNSET) - deduplication_key_kind: Unset | NewAlertsSourceDataAttributesDeduplicationKeyKind + deduplication_key_kind: NewAlertsSourceDataAttributesDeduplicationKeyKind | Unset if isinstance(_deduplication_key_kind, Unset): deduplication_key_kind = UNSET else: @@ -234,21 +233,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _deduplication_key_kind ) - def _parse_deduplication_key_path(data: object) -> None | Unset | str: + def _parse_deduplication_key_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key_path = _parse_deduplication_key_path(d.pop("deduplication_key_path", UNSET)) - def _parse_deduplication_key_regexp(data: object) -> None | Unset | str: + def _parse_deduplication_key_regexp(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key_regexp = _parse_deduplication_key_regexp(d.pop("deduplication_key_regexp", UNSET)) @@ -256,7 +255,7 @@ def _parse_deduplication_key_regexp(data: object) -> None | Unset | str: def _parse_alert_template_attributes( data: object, - ) -> Union["NewAlertsSourceDataAttributesAlertTemplateAttributesType0", None, Unset]: + ) -> NewAlertsSourceDataAttributesAlertTemplateAttributesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -269,26 +268,30 @@ def _parse_alert_template_attributes( ) return alert_template_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewAlertsSourceDataAttributesAlertTemplateAttributesType0", None, Unset], data) + return cast(NewAlertsSourceDataAttributesAlertTemplateAttributesType0 | None | Unset, data) alert_template_attributes = _parse_alert_template_attributes(d.pop("alert_template_attributes", UNSET)) - alert_source_urgency_rules_attributes = [] _alert_source_urgency_rules_attributes = d.pop("alert_source_urgency_rules_attributes", UNSET) - for alert_source_urgency_rules_attributes_item_data in _alert_source_urgency_rules_attributes or []: - alert_source_urgency_rules_attributes_item = ( - NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem.from_dict( - alert_source_urgency_rules_attributes_item_data + alert_source_urgency_rules_attributes: ( + list[NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem] | Unset + ) = UNSET + if _alert_source_urgency_rules_attributes is not UNSET: + alert_source_urgency_rules_attributes = [] + for alert_source_urgency_rules_attributes_item_data in _alert_source_urgency_rules_attributes: + alert_source_urgency_rules_attributes_item = ( + NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem.from_dict( + alert_source_urgency_rules_attributes_item_data + ) ) - ) - alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) + alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) def _parse_sourceable_attributes( data: object, - ) -> Union["NewAlertsSourceDataAttributesSourceableAttributesType0", None, Unset]: + ) -> NewAlertsSourceDataAttributesSourceableAttributesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -299,15 +302,15 @@ def _parse_sourceable_attributes( sourceable_attributes_type_0 = NewAlertsSourceDataAttributesSourceableAttributesType0.from_dict(data) return sourceable_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewAlertsSourceDataAttributesSourceableAttributesType0", None, Unset], data) + return cast(NewAlertsSourceDataAttributesSourceableAttributesType0 | None | Unset, data) sourceable_attributes = _parse_sourceable_attributes(d.pop("sourceable_attributes", UNSET)) def _parse_resolution_rule_attributes( data: object, - ) -> Union["NewAlertsSourceDataAttributesResolutionRuleAttributesType0", None, Unset]: + ) -> NewAlertsSourceDataAttributesResolutionRuleAttributesType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -320,22 +323,26 @@ def _parse_resolution_rule_attributes( ) return resolution_rule_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewAlertsSourceDataAttributesResolutionRuleAttributesType0", None, Unset], data) + return cast(NewAlertsSourceDataAttributesResolutionRuleAttributesType0 | None | Unset, data) resolution_rule_attributes = _parse_resolution_rule_attributes(d.pop("resolution_rule_attributes", UNSET)) - alert_source_fields_attributes = [] _alert_source_fields_attributes = d.pop("alert_source_fields_attributes", UNSET) - for alert_source_fields_attributes_item_data in _alert_source_fields_attributes or []: - alert_source_fields_attributes_item = ( - NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem.from_dict( - alert_source_fields_attributes_item_data + alert_source_fields_attributes: list[NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset = ( + UNSET + ) + if _alert_source_fields_attributes is not UNSET: + alert_source_fields_attributes = [] + for alert_source_fields_attributes_item_data in _alert_source_fields_attributes: + alert_source_fields_attributes_item = ( + NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem.from_dict( + alert_source_fields_attributes_item_data + ) ) - ) - alert_source_fields_attributes.append(alert_source_fields_attributes_item) + alert_source_fields_attributes.append(alert_source_fields_attributes_item) new_alerts_source_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_fields_attributes_item.py b/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_fields_attributes_item.py index 9604cf22..7b99100f 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_fields_attributes_item.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_fields_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,19 +15,19 @@ class NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem: """ Attributes: - alert_field_id (Union[Unset, str]): The ID of the alert field - template_body (Union[None, Unset, str]): Liquid expression to extract a specific value from the alert's payload - for evaluation + alert_field_id (str | Unset): The ID of the alert field + template_body (None | str | Unset): Liquid expression to extract a specific value from the alert's payload for + evaluation """ - alert_field_id: Unset | str = UNSET - template_body: None | Unset | str = UNSET + alert_field_id: str | Unset = UNSET + template_body: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: alert_field_id = self.alert_field_id - template_body: None | Unset | str + template_body: None | str | Unset if isinstance(self.template_body, Unset): template_body = UNSET else: @@ -46,12 +48,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) alert_field_id = d.pop("alert_field_id", UNSET) - def _parse_template_body(data: object) -> None | Unset | str: + def _parse_template_body(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) template_body = _parse_template_body(d.pop("template_body", UNSET)) diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py b/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py index 936d25df..a410af64 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,57 +27,56 @@ class NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem: """ Attributes: - json_path (Union[None, Unset, str]): JSON path expression to extract a specific value from the alert's payload - for evaluation - operator (Union[Unset, NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator]): Comparison + json_path (None | str | Unset): JSON path expression to extract a specific value from the alert's payload for + evaluation + operator (NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator | Unset): Comparison operator used to evaluate the extracted value against the specified condition - value (Union[Unset, str]): Value that the extracted payload data is compared to using the specified operator to + value (str | Unset): Value that the extracted payload data is compared to using the specified operator to determine a match - conditionable_type (Union[Unset, - NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType]): The type of the - conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. - kind (Union[Unset, NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind]): The kind of the + conditionable_type (NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType | + Unset): The type of the conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. + kind (NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind | Unset): The kind of the conditionable - alert_urgency_id (Union[Unset, str]): The ID of the alert urgency + alert_urgency_id (str | Unset): The ID of the alert urgency """ - json_path: None | Unset | str = UNSET - operator: Unset | NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator = UNSET - value: Unset | str = UNSET - conditionable_type: Unset | NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType = ( + json_path: None | str | Unset = UNSET + operator: NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator | Unset = UNSET + value: str | Unset = UNSET + conditionable_type: NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType | Unset = ( UNSET ) - conditionable_id: None | Unset | str = UNSET - kind: Unset | NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind = UNSET - alert_urgency_id: Unset | str = UNSET + conditionable_id: None | str | Unset = UNSET + kind: NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind | Unset = UNSET + alert_urgency_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - json_path: None | Unset | str + json_path: None | str | Unset if isinstance(self.json_path, Unset): json_path = UNSET else: json_path = self.json_path - operator: Unset | str = UNSET + operator: str | Unset = UNSET if not isinstance(self.operator, Unset): operator = self.operator value = self.value - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: conditionable_id = self.conditionable_id - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -105,17 +106,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_json_path(data: object) -> None | Unset | str: + def _parse_json_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) json_path = _parse_json_path(d.pop("json_path", UNSET)) _operator = d.pop("operator", UNSET) - operator: Unset | NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator + operator: NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator | Unset if isinstance(_operator, Unset): operator = UNSET else: @@ -126,7 +127,7 @@ def _parse_json_path(data: object) -> None | Unset | str: value = d.pop("value", UNSET) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType + conditionable_type: NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: @@ -136,17 +137,17 @@ def _parse_json_path(data: object) -> None | Unset | str: ) ) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind + kind: NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_alert_template_attributes_type_0.py b/rootly_sdk/models/new_alerts_source_data_attributes_alert_template_attributes_type_0.py index f4593a89..7d672082 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_alert_template_attributes_type_0.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_alert_template_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,30 +15,30 @@ class NewAlertsSourceDataAttributesAlertTemplateAttributesType0: """ Attributes: - title (Union[None, Unset, str]): The alert title. - description (Union[None, Unset, str]): The alert description. - external_url (Union[None, Unset, str]): The alert URL. + title (None | str | Unset): The alert title. + description (None | str | Unset): The alert description. + external_url (None | str | Unset): The alert URL. """ - title: None | Unset | str = UNSET - description: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET + title: None | str | Unset = UNSET + description: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: @@ -58,30 +60,30 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py b/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py index 534a697e..f1890f82 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -32,76 +34,73 @@ class NewAlertsSourceDataAttributesResolutionRuleAttributesType0: """Provide additional attributes for email alerts source Attributes: - enabled (Union[Unset, bool]): Set this to true to enable the auto resolution rule - condition_type (Union[Unset, NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType]): The type - of condition to evaluate to apply auto resolution rule - identifier_matchable_type (Union[Unset, - NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType]): The type of the identifier - matchable - identifier_matchable_id (Union[None, Unset, str]): The ID of the identifier matchable. If - identifier_matchable_type is AlertField, this is the ID of the alert field. - identifier_reference_kind (Union[Unset, - NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind]): The kind of the identifier - reference - identifier_json_path (Union[None, Unset, str]): JSON path expression to extract unique alert identifier used to - match triggered alerts with resolving alerts - identifier_value_regex (Union[None, Unset, str]): Regex group to further specify the part of the string used as - a unique identifier - conditions_attributes (Union[Unset, - list['NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem']]): List of conditions - to evaluate for auto resolution + enabled (bool | Unset): Set this to true to enable the auto resolution rule + condition_type (NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType | Unset): The type of + condition to evaluate to apply auto resolution rule + identifier_matchable_type (NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType | + Unset): The type of the identifier matchable + identifier_matchable_id (None | str | Unset): The ID of the identifier matchable. If identifier_matchable_type + is AlertField, this is the ID of the alert field. + identifier_reference_kind (NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind | + Unset): The kind of the identifier reference + identifier_json_path (None | str | Unset): JSON path expression to extract unique alert identifier used to match + triggered alerts with resolving alerts + identifier_value_regex (None | str | Unset): Regex group to further specify the part of the string used as a + unique identifier + conditions_attributes (list[NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem] + | Unset): List of conditions to evaluate for auto resolution """ - enabled: Unset | bool = UNSET - condition_type: Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType = UNSET + enabled: bool | Unset = UNSET + condition_type: NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType | Unset = UNSET identifier_matchable_type: ( - Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType + NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType | Unset ) = UNSET - identifier_matchable_id: None | Unset | str = UNSET + identifier_matchable_id: None | str | Unset = UNSET identifier_reference_kind: ( - Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind + NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind | Unset ) = UNSET - identifier_json_path: None | Unset | str = UNSET - identifier_value_regex: None | Unset | str = UNSET + identifier_json_path: None | str | Unset = UNSET + identifier_value_regex: None | str | Unset = UNSET conditions_attributes: ( - Unset | list["NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem"] + list[NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem] | Unset ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: enabled = self.enabled - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - identifier_matchable_type: Unset | str = UNSET + identifier_matchable_type: str | Unset = UNSET if not isinstance(self.identifier_matchable_type, Unset): identifier_matchable_type = self.identifier_matchable_type - identifier_matchable_id: None | Unset | str + identifier_matchable_id: None | str | Unset if isinstance(self.identifier_matchable_id, Unset): identifier_matchable_id = UNSET else: identifier_matchable_id = self.identifier_matchable_id - identifier_reference_kind: Unset | str = UNSET + identifier_reference_kind: str | Unset = UNSET if not isinstance(self.identifier_reference_kind, Unset): identifier_reference_kind = self.identifier_reference_kind - identifier_json_path: None | Unset | str + identifier_json_path: None | str | Unset if isinstance(self.identifier_json_path, Unset): identifier_json_path = UNSET else: identifier_json_path = self.identifier_json_path - identifier_value_regex: None | Unset | str + identifier_value_regex: None | str | Unset if isinstance(self.identifier_value_regex, Unset): identifier_value_regex = UNSET else: identifier_value_regex = self.identifier_value_regex - conditions_attributes: Unset | list[dict[str, Any]] = UNSET + conditions_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions_attributes, Unset): conditions_attributes = [] for conditions_attributes_item_data in self.conditions_attributes: @@ -140,7 +139,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType + condition_type: NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: @@ -150,7 +149,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _identifier_matchable_type = d.pop("identifier_matchable_type", UNSET) identifier_matchable_type: ( - Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType + NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType | Unset ) if isinstance(_identifier_matchable_type, Unset): identifier_matchable_type = UNSET @@ -161,18 +160,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) ) - def _parse_identifier_matchable_id(data: object) -> None | Unset | str: + def _parse_identifier_matchable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_matchable_id = _parse_identifier_matchable_id(d.pop("identifier_matchable_id", UNSET)) _identifier_reference_kind = d.pop("identifier_reference_kind", UNSET) identifier_reference_kind: ( - Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind + NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind | Unset ) if isinstance(_identifier_reference_kind, Unset): identifier_reference_kind = UNSET @@ -183,34 +182,38 @@ def _parse_identifier_matchable_id(data: object) -> None | Unset | str: ) ) - def _parse_identifier_json_path(data: object) -> None | Unset | str: + def _parse_identifier_json_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_json_path = _parse_identifier_json_path(d.pop("identifier_json_path", UNSET)) - def _parse_identifier_value_regex(data: object) -> None | Unset | str: + def _parse_identifier_value_regex(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_value_regex = _parse_identifier_value_regex(d.pop("identifier_value_regex", UNSET)) - conditions_attributes = [] _conditions_attributes = d.pop("conditions_attributes", UNSET) - for conditions_attributes_item_data in _conditions_attributes or []: - conditions_attributes_item = ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem.from_dict( - conditions_attributes_item_data + conditions_attributes: ( + list[NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem] | Unset + ) = UNSET + if _conditions_attributes is not UNSET: + conditions_attributes = [] + for conditions_attributes_item_data in _conditions_attributes: + conditions_attributes_item = ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem.from_dict( + conditions_attributes_item_data + ) ) - ) - conditions_attributes.append(conditions_attributes_item) + conditions_attributes.append(conditions_attributes_item) new_alerts_source_data_attributes_resolution_rule_attributes_type_0 = cls( enabled=enabled, diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py b/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py index 111fd8fc..a3163489 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,56 +27,55 @@ class NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem: """ Attributes: - field (Union[None, Unset, str]): JSON path expression to extract a specific value from the alert's payload for + field (None | str | Unset): JSON path expression to extract a specific value from the alert's payload for evaluation - operator (Union[Unset, - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator]): Comparison - operator used to evaluate the extracted value against the specified condition - value (Union[Unset, str]): Value that the extracted payload data is compared to using the specified operator to + operator (NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset): + Comparison operator used to evaluate the extracted value against the specified condition + value (str | Unset): Value that the extracted payload data is compared to using the specified operator to determine a match - conditionable_type (Union[Unset, - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType]): The type + conditionable_type + (NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset): + The type of the conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. + kind (NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset): The kind of the conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. - kind (Union[Unset, NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind]): The - kind of the conditionable """ - field: None | Unset | str = UNSET - operator: Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator = UNSET - value: Unset | str = UNSET + field: None | str | Unset = UNSET + operator: NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset = UNSET + value: str | Unset = UNSET conditionable_type: ( - Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset ) = UNSET - conditionable_id: None | Unset | str = UNSET - kind: Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind = UNSET + conditionable_id: None | str | Unset = UNSET + kind: NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - field: None | Unset | str + field: None | str | Unset if isinstance(self.field, Unset): field = UNSET else: field = self.field - operator: Unset | str = UNSET + operator: str | Unset = UNSET if not isinstance(self.operator, Unset): operator = self.operator value = self.value - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: conditionable_id = self.conditionable_id - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -100,17 +101,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_field(data: object) -> None | Unset | str: + def _parse_field(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) field = _parse_field(d.pop("field", UNSET)) _operator = d.pop("operator", UNSET) - operator: Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator + operator: NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset if isinstance(_operator, Unset): operator = UNSET else: @@ -122,7 +123,7 @@ def _parse_field(data: object) -> None | Unset | str: _conditionable_type = d.pop("conditionable_type", UNSET) conditionable_type: ( - Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset ) if isinstance(_conditionable_type, Unset): conditionable_type = UNSET @@ -131,17 +132,17 @@ def _parse_field(data: object) -> None | Unset | str: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind + kind: NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py b/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py index aa7b65e2..47ce1af4 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_source_type.py @@ -4,6 +4,7 @@ "alertmanager", "app_dynamics", "app_optics", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -11,6 +12,7 @@ "chronosphere", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "google_cloud", @@ -28,6 +30,7 @@ "alertmanager", "app_dynamics", "app_optics", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -35,6 +38,7 @@ "chronosphere", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "google_cloud", diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py index 8d6d4b32..3fe2cadd 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -20,28 +22,28 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0: """Provide additional attributes for generic_webhook alerts source Attributes: - auto_resolve (Union[Unset, bool]): Set this to true to auto-resolve alerts based on field_mappings_attributes + auto_resolve (bool | Unset): Set this to true to auto-resolve alerts based on field_mappings_attributes conditions - resolve_state (Union[None, Unset, str]): This value is matched with the value extracted from alerts payload - using JSON path in field_mappings_attributes - accept_threaded_emails (Union[Unset, bool]): Set this to false to reject threaded emails - field_mappings_attributes (Union[Unset, - list['NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem']]): Specify rules to - auto resolve alerts + resolve_state (None | str | Unset): This value is matched with the value extracted from alerts payload using + JSON path in field_mappings_attributes + accept_threaded_emails (bool | Unset): Set this to false to reject threaded emails + field_mappings_attributes + (list[NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem] | Unset): Specify rules + to auto resolve alerts """ - auto_resolve: Unset | bool = UNSET - resolve_state: None | Unset | str = UNSET - accept_threaded_emails: Unset | bool = UNSET + auto_resolve: bool | Unset = UNSET + resolve_state: None | str | Unset = UNSET + accept_threaded_emails: bool | Unset = UNSET field_mappings_attributes: ( - Unset | list["NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem"] + list[NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem] | Unset ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: auto_resolve = self.auto_resolve - resolve_state: None | Unset | str + resolve_state: None | str | Unset if isinstance(self.resolve_state, Unset): resolve_state = UNSET else: @@ -49,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: accept_threaded_emails = self.accept_threaded_emails - field_mappings_attributes: Unset | list[dict[str, Any]] = UNSET + field_mappings_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.field_mappings_attributes, Unset): field_mappings_attributes = [] for field_mappings_attributes_item_data in self.field_mappings_attributes: @@ -79,27 +81,31 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) auto_resolve = d.pop("auto_resolve", UNSET) - def _parse_resolve_state(data: object) -> None | Unset | str: + def _parse_resolve_state(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolve_state = _parse_resolve_state(d.pop("resolve_state", UNSET)) accept_threaded_emails = d.pop("accept_threaded_emails", UNSET) - field_mappings_attributes = [] _field_mappings_attributes = d.pop("field_mappings_attributes", UNSET) - for field_mappings_attributes_item_data in _field_mappings_attributes or []: - field_mappings_attributes_item = ( - NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem.from_dict( - field_mappings_attributes_item_data + field_mappings_attributes: ( + list[NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem] | Unset + ) = UNSET + if _field_mappings_attributes is not UNSET: + field_mappings_attributes = [] + for field_mappings_attributes_item_data in _field_mappings_attributes: + field_mappings_attributes_item = ( + NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem.from_dict( + field_mappings_attributes_item_data + ) ) - ) - field_mappings_attributes.append(field_mappings_attributes_item) + field_mappings_attributes.append(field_mappings_attributes_item) new_alerts_source_data_attributes_sourceable_attributes_type_0 = cls( auto_resolve=auto_resolve, diff --git a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py index c4a72e13..b76f4001 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem: """ Attributes: - field (Union[Unset, NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField]): - Select the field on which the condition to be evaluated - json_path (Union[Unset, str]): JSON path expression to extract a specific value from the alert's payload for + field (NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset): Select + the field on which the condition to be evaluated + json_path (str | Unset): JSON path expression to extract a specific value from the alert's payload for evaluation """ - field: Unset | NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField = UNSET - json_path: Unset | str = UNSET + field: NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET + json_path: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - field: Unset | str = UNSET + field: str | Unset = UNSET if not isinstance(self.field, Unset): field = self.field @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _field = d.pop("field", UNSET) - field: Unset | NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField + field: NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset if isinstance(_field, Unset): field = UNSET else: diff --git a/rootly_sdk/models/new_api_key.py b/rootly_sdk/models/new_api_key.py new file mode 100644 index 00000000..4a091d1c --- /dev/null +++ b/rootly_sdk/models/new_api_key.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_api_key_data import NewApiKeyData + + +T = TypeVar("T", bound="NewApiKey") + + +@_attrs_define +class NewApiKey: + """ + Attributes: + data (NewApiKeyData): + """ + + data: NewApiKeyData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_api_key_data import NewApiKeyData + + d = dict(src_dict) + data = NewApiKeyData.from_dict(d.pop("data")) + + new_api_key = cls( + data=data, + ) + + new_api_key.additional_properties = d + return new_api_key + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_api_key_data.py b/rootly_sdk/models/new_api_key_data.py new file mode 100644 index 00000000..ce01acec --- /dev/null +++ b/rootly_sdk/models/new_api_key_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_api_key_data_type import NewApiKeyDataType, check_new_api_key_data_type + +if TYPE_CHECKING: + from ..models.new_api_key_data_attributes import NewApiKeyDataAttributes + + +T = TypeVar("T", bound="NewApiKeyData") + + +@_attrs_define +class NewApiKeyData: + """ + Attributes: + type_ (NewApiKeyDataType): + attributes (NewApiKeyDataAttributes): + """ + + type_: NewApiKeyDataType + attributes: NewApiKeyDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_api_key_data_attributes import NewApiKeyDataAttributes + + d = dict(src_dict) + type_ = check_new_api_key_data_type(d.pop("type")) + + attributes = NewApiKeyDataAttributes.from_dict(d.pop("attributes")) + + new_api_key_data = cls( + type_=type_, + attributes=attributes, + ) + + new_api_key_data.additional_properties = d + return new_api_key_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_api_key_data_attributes.py b/rootly_sdk/models/new_api_key_data_attributes.py new file mode 100644 index 00000000..8c211349 --- /dev/null +++ b/rootly_sdk/models/new_api_key_data_attributes.py @@ -0,0 +1,146 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from dateutil.parser import isoparse + +from ..models.new_api_key_data_attributes_kind import ( + NewApiKeyDataAttributesKind, + check_new_api_key_data_attributes_kind, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewApiKeyDataAttributes") + + +@_attrs_define +class NewApiKeyDataAttributes: + """ + Attributes: + name (str): The name of the API key + kind (NewApiKeyDataAttributesKind): The kind of the API key + expires_at (datetime.datetime): The expiration date of the API key (ISO 8601) + description (None | str | Unset): A description of the API key + group_id (None | str | Unset): The group (team) ID. Required when kind is 'team'. + role_id (None | str | Unset): The role ID for organization API keys + on_call_role_id (None | str | Unset): The on-call role ID for organization API keys + """ + + name: str + kind: NewApiKeyDataAttributesKind + expires_at: datetime.datetime + description: None | str | Unset = UNSET + group_id: None | str | Unset = UNSET + role_id: None | str | Unset = UNSET + on_call_role_id: None | str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + name = self.name + + kind: str = self.kind + + expires_at = self.expires_at.isoformat() + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + group_id: None | str | Unset + if isinstance(self.group_id, Unset): + group_id = UNSET + else: + group_id = self.group_id + + role_id: None | str | Unset + if isinstance(self.role_id, Unset): + role_id = UNSET + else: + role_id = self.role_id + + on_call_role_id: None | str | Unset + if isinstance(self.on_call_role_id, Unset): + on_call_role_id = UNSET + else: + on_call_role_id = self.on_call_role_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "kind": kind, + "expires_at": expires_at, + } + ) + if description is not UNSET: + field_dict["description"] = description + if group_id is not UNSET: + field_dict["group_id"] = group_id + if role_id is not UNSET: + field_dict["role_id"] = role_id + if on_call_role_id is not UNSET: + field_dict["on_call_role_id"] = on_call_role_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + kind = check_new_api_key_data_attributes_kind(d.pop("kind")) + + expires_at = isoparse(d.pop("expires_at")) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_group_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + group_id = _parse_group_id(d.pop("group_id", UNSET)) + + def _parse_role_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + role_id = _parse_role_id(d.pop("role_id", UNSET)) + + def _parse_on_call_role_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + on_call_role_id = _parse_on_call_role_id(d.pop("on_call_role_id", UNSET)) + + new_api_key_data_attributes = cls( + name=name, + kind=kind, + expires_at=expires_at, + description=description, + group_id=group_id, + role_id=role_id, + on_call_role_id=on_call_role_id, + ) + + return new_api_key_data_attributes diff --git a/rootly_sdk/models/new_api_key_data_attributes_kind.py b/rootly_sdk/models/new_api_key_data_attributes_kind.py new file mode 100644 index 00000000..2c61f87b --- /dev/null +++ b/rootly_sdk/models/new_api_key_data_attributes_kind.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +NewApiKeyDataAttributesKind = Literal["organization", "personal", "team"] + +NEW_API_KEY_DATA_ATTRIBUTES_KIND_VALUES: set[NewApiKeyDataAttributesKind] = { + "organization", + "personal", + "team", +} + + +def check_new_api_key_data_attributes_kind(value: str | None) -> NewApiKeyDataAttributesKind | None: + if value is None: + return None + if value in NEW_API_KEY_DATA_ATTRIBUTES_KIND_VALUES: + return cast(NewApiKeyDataAttributesKind, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_API_KEY_DATA_ATTRIBUTES_KIND_VALUES!r}") diff --git a/rootly_sdk/models/new_api_key_data_type.py b/rootly_sdk/models/new_api_key_data_type.py new file mode 100644 index 00000000..e46744fa --- /dev/null +++ b/rootly_sdk/models/new_api_key_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewApiKeyDataType = Literal["api_keys"] + +NEW_API_KEY_DATA_TYPE_VALUES: set[NewApiKeyDataType] = { + "api_keys", +} + + +def check_new_api_key_data_type(value: str | None) -> NewApiKeyDataType | None: + if value is None: + return None + if value in NEW_API_KEY_DATA_TYPE_VALUES: + return cast(NewApiKeyDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_API_KEY_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_authorization.py b/rootly_sdk/models/new_authorization.py index 8aa7035b..796d7ade 100644 --- a/rootly_sdk/models/new_authorization.py +++ b/rootly_sdk/models/new_authorization.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewAuthorization: data (NewAuthorizationData): """ - data: "NewAuthorizationData" + data: NewAuthorizationData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_authorization_data.py b/rootly_sdk/models/new_authorization_data.py index b92c08f5..7d6db6dd 100644 --- a/rootly_sdk/models/new_authorization_data.py +++ b/rootly_sdk/models/new_authorization_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewAuthorizationData: """ type_: NewAuthorizationDataType - attributes: "NewAuthorizationDataAttributes" + attributes: NewAuthorizationDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_authorization_data_attributes.py b/rootly_sdk/models/new_authorization_data_attributes.py index 937caafc..b0ef4f6f 100644 --- a/rootly_sdk/models/new_authorization_data_attributes.py +++ b/rootly_sdk/models/new_authorization_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_catalog.py b/rootly_sdk/models/new_catalog.py index 48c41be3..ea8382b6 100644 --- a/rootly_sdk/models/new_catalog.py +++ b/rootly_sdk/models/new_catalog.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCatalog: data (NewCatalogData): """ - data: "NewCatalogData" + data: NewCatalogData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_checklist_template.py b/rootly_sdk/models/new_catalog_checklist_template.py new file mode 100644 index 00000000..b407d01c --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_catalog_checklist_template_data import NewCatalogChecklistTemplateData + + +T = TypeVar("T", bound="NewCatalogChecklistTemplate") + + +@_attrs_define +class NewCatalogChecklistTemplate: + """ + Attributes: + data (NewCatalogChecklistTemplateData): + """ + + data: NewCatalogChecklistTemplateData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_catalog_checklist_template_data import NewCatalogChecklistTemplateData + + d = dict(src_dict) + data = NewCatalogChecklistTemplateData.from_dict(d.pop("data")) + + new_catalog_checklist_template = cls( + data=data, + ) + + new_catalog_checklist_template.additional_properties = d + return new_catalog_checklist_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_checklist_template_data.py b/rootly_sdk/models/new_catalog_checklist_template_data.py new file mode 100644 index 00000000..30791aec --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_catalog_checklist_template_data_type import ( + NewCatalogChecklistTemplateDataType, + check_new_catalog_checklist_template_data_type, +) + +if TYPE_CHECKING: + from ..models.new_catalog_checklist_template_data_attributes import NewCatalogChecklistTemplateDataAttributes + + +T = TypeVar("T", bound="NewCatalogChecklistTemplateData") + + +@_attrs_define +class NewCatalogChecklistTemplateData: + """ + Attributes: + type_ (NewCatalogChecklistTemplateDataType): + attributes (NewCatalogChecklistTemplateDataAttributes): + """ + + type_: NewCatalogChecklistTemplateDataType + attributes: NewCatalogChecklistTemplateDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_catalog_checklist_template_data_attributes import NewCatalogChecklistTemplateDataAttributes + + d = dict(src_dict) + type_ = check_new_catalog_checklist_template_data_type(d.pop("type")) + + attributes = NewCatalogChecklistTemplateDataAttributes.from_dict(d.pop("attributes")) + + new_catalog_checklist_template_data = cls( + type_=type_, + attributes=attributes, + ) + + new_catalog_checklist_template_data.additional_properties = d + return new_catalog_checklist_template_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py new file mode 100644 index 00000000..1d8669c8 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py @@ -0,0 +1,260 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.new_catalog_checklist_template_data_attributes_catalog_type import ( + NewCatalogChecklistTemplateDataAttributesCatalogType, + check_new_catalog_checklist_template_data_attributes_catalog_type, +) +from ..models.new_catalog_checklist_template_data_attributes_scope_type import ( + NewCatalogChecklistTemplateDataAttributesScopeType, + check_new_catalog_checklist_template_data_attributes_scope_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( + NewCatalogChecklistTemplateDataAttributesBuiltinField, + ) + from ..models.new_catalog_checklist_template_data_attributes_custom_field import ( + NewCatalogChecklistTemplateDataAttributesCustomField, + ) + from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0Item, + ) + + +T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributes") + + +@_attrs_define +class NewCatalogChecklistTemplateDataAttributes: + """ + Attributes: + name (str): The name of the checklist template + catalog_type (NewCatalogChecklistTemplateDataAttributesCatalogType): The catalog type + scope_type (NewCatalogChecklistTemplateDataAttributesScopeType): The scope type + description (None | str | Unset): The description of the checklist template + scope_id (str | Unset): The scope ID (team or catalog UUID) + fields (list[NewCatalogChecklistTemplateDataAttributesBuiltinField | + NewCatalogChecklistTemplateDataAttributesCustomField] | None | Unset): Template fields. Position is determined + by array order. + owners (list[NewCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset): Template owners + """ + + name: str + catalog_type: NewCatalogChecklistTemplateDataAttributesCatalogType + scope_type: NewCatalogChecklistTemplateDataAttributesScopeType + description: None | str | Unset = UNSET + scope_id: str | Unset = UNSET + fields: ( + list[ + NewCatalogChecklistTemplateDataAttributesBuiltinField | NewCatalogChecklistTemplateDataAttributesCustomField + ] + | None + | Unset + ) = UNSET + owners: list[NewCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( + NewCatalogChecklistTemplateDataAttributesBuiltinField, + ) + + name = self.name + + catalog_type: str = self.catalog_type + + scope_type: str = self.scope_type + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + scope_id = self.scope_id + + fields: list[dict[str, Any]] | None | Unset + if isinstance(self.fields, Unset): + fields = UNSET + elif isinstance(self.fields, list): + fields = [] + for fields_type_0_item_data in self.fields: + fields_type_0_item: dict[str, Any] + if isinstance(fields_type_0_item_data, NewCatalogChecklistTemplateDataAttributesBuiltinField): + fields_type_0_item = fields_type_0_item_data.to_dict() + else: + fields_type_0_item = fields_type_0_item_data.to_dict() + + fields.append(fields_type_0_item) + + else: + fields = self.fields + + owners: list[dict[str, Any]] | None | Unset + if isinstance(self.owners, Unset): + owners = UNSET + elif isinstance(self.owners, list): + owners = [] + for owners_type_0_item_data in self.owners: + owners_type_0_item = owners_type_0_item_data.to_dict() + owners.append(owners_type_0_item) + + else: + owners = self.owners + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "catalog_type": catalog_type, + "scope_type": scope_type, + } + ) + if description is not UNSET: + field_dict["description"] = description + if scope_id is not UNSET: + field_dict["scope_id"] = scope_id + if fields is not UNSET: + field_dict["fields"] = fields + if owners is not UNSET: + field_dict["owners"] = owners + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( + NewCatalogChecklistTemplateDataAttributesBuiltinField, + ) + from ..models.new_catalog_checklist_template_data_attributes_custom_field import ( + NewCatalogChecklistTemplateDataAttributesCustomField, + ) + from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0Item, + ) + + d = dict(src_dict) + name = d.pop("name") + + catalog_type = check_new_catalog_checklist_template_data_attributes_catalog_type(d.pop("catalog_type")) + + scope_type = check_new_catalog_checklist_template_data_attributes_scope_type(d.pop("scope_type")) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + scope_id = d.pop("scope_id", UNSET) + + def _parse_fields( + data: object, + ) -> ( + list[ + NewCatalogChecklistTemplateDataAttributesBuiltinField + | NewCatalogChecklistTemplateDataAttributesCustomField + ] + | None + | Unset + ): + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + fields_type_0 = [] + _fields_type_0 = data + for fields_type_0_item_data in _fields_type_0: + + def _parse_fields_type_0_item( + data: object, + ) -> ( + NewCatalogChecklistTemplateDataAttributesBuiltinField + | NewCatalogChecklistTemplateDataAttributesCustomField + ): + try: + if not isinstance(data, dict): + raise TypeError() + fields_type_0_item_builtin_field = ( + NewCatalogChecklistTemplateDataAttributesBuiltinField.from_dict(data) + ) + + return fields_type_0_item_builtin_field + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + fields_type_0_item_custom_field = ( + NewCatalogChecklistTemplateDataAttributesCustomField.from_dict(data) + ) + + return fields_type_0_item_custom_field + + fields_type_0_item = _parse_fields_type_0_item(fields_type_0_item_data) + + fields_type_0.append(fields_type_0_item) + + return fields_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[ + NewCatalogChecklistTemplateDataAttributesBuiltinField + | NewCatalogChecklistTemplateDataAttributesCustomField + ] + | None + | Unset, + data, + ) + + fields = _parse_fields(d.pop("fields", UNSET)) + + def _parse_owners( + data: object, + ) -> list[NewCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + owners_type_0 = [] + _owners_type_0 = data + for owners_type_0_item_data in _owners_type_0: + owners_type_0_item = NewCatalogChecklistTemplateDataAttributesOwnersType0Item.from_dict( + owners_type_0_item_data + ) + + owners_type_0.append(owners_type_0_item) + + return owners_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[NewCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset, data) + + owners = _parse_owners(d.pop("owners", UNSET)) + + new_catalog_checklist_template_data_attributes = cls( + name=name, + catalog_type=catalog_type, + scope_type=scope_type, + description=description, + scope_id=scope_id, + fields=fields, + owners=owners, + ) + + return new_catalog_checklist_template_data_attributes diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field.py new file mode 100644 index 00000000..59cbd408 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_catalog_checklist_template_data_attributes_builtin_field_field_source import ( + NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, + check_new_catalog_checklist_template_data_attributes_builtin_field_field_source, +) + +T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesBuiltinField") + + +@_attrs_define +class NewCatalogChecklistTemplateDataAttributesBuiltinField: + """ + Attributes: + field_source (NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource): + field_key (str): Key identifying the builtin field + """ + + field_source: NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource + field_key: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_source: str = self.field_source + + field_key = self.field_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "field_source": field_source, + "field_key": field_key, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field_source = check_new_catalog_checklist_template_data_attributes_builtin_field_field_source( + d.pop("field_source") + ) + + field_key = d.pop("field_key") + + new_catalog_checklist_template_data_attributes_builtin_field = cls( + field_source=field_source, + field_key=field_key, + ) + + new_catalog_checklist_template_data_attributes_builtin_field.additional_properties = d + return new_catalog_checklist_template_data_attributes_builtin_field + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field_field_source.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field_field_source.py new file mode 100644 index 00000000..6887a1b8 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_builtin_field_field_source.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource = Literal["builtin"] + +NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_BUILTIN_FIELD_FIELD_SOURCE_VALUES: set[ + NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource +] = { + "builtin", +} + + +def check_new_catalog_checklist_template_data_attributes_builtin_field_field_source( + value: str | None, +) -> NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource | None: + if value is None: + return None + if value in NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_BUILTIN_FIELD_FIELD_SOURCE_VALUES: + return cast(NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_BUILTIN_FIELD_FIELD_SOURCE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_catalog_type.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_catalog_type.py new file mode 100644 index 00000000..4a7d4b0b --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_catalog_type.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +NewCatalogChecklistTemplateDataAttributesCatalogType = Literal[ + "Catalog", "Cause", "Environment", "Functionality", "Group", "IncidentType", "Service" +] + +NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES: set[ + NewCatalogChecklistTemplateDataAttributesCatalogType +] = { + "Catalog", + "Cause", + "Environment", + "Functionality", + "Group", + "IncidentType", + "Service", +} + + +def check_new_catalog_checklist_template_data_attributes_catalog_type( + value: str | None, +) -> NewCatalogChecklistTemplateDataAttributesCatalogType | None: + if value is None: + return None + if value in NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES: + return cast(NewCatalogChecklistTemplateDataAttributesCatalogType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field.py new file mode 100644 index 00000000..4c8ca431 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_catalog_checklist_template_data_attributes_custom_field_field_source import ( + NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, + check_new_catalog_checklist_template_data_attributes_custom_field_field_source, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesCustomField") + + +@_attrs_define +class NewCatalogChecklistTemplateDataAttributesCustomField: + """ + Attributes: + field_source (NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource): + catalog_property_id (str): ID of the catalog property + field_key (str | Unset): Ignored for custom fields (auto-derived from catalog property) + """ + + field_source: NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource + catalog_property_id: str + field_key: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_source: str = self.field_source + + catalog_property_id = self.catalog_property_id + + field_key = self.field_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "field_source": field_source, + "catalog_property_id": catalog_property_id, + } + ) + if field_key is not UNSET: + field_dict["field_key"] = field_key + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field_source = check_new_catalog_checklist_template_data_attributes_custom_field_field_source( + d.pop("field_source") + ) + + catalog_property_id = d.pop("catalog_property_id") + + field_key = d.pop("field_key", UNSET) + + new_catalog_checklist_template_data_attributes_custom_field = cls( + field_source=field_source, + catalog_property_id=catalog_property_id, + field_key=field_key, + ) + + new_catalog_checklist_template_data_attributes_custom_field.additional_properties = d + return new_catalog_checklist_template_data_attributes_custom_field + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field_field_source.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field_field_source.py new file mode 100644 index 00000000..1deedafa --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_custom_field_field_source.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource = Literal["custom"] + +NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CUSTOM_FIELD_FIELD_SOURCE_VALUES: set[ + NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource +] = { + "custom", +} + + +def check_new_catalog_checklist_template_data_attributes_custom_field_field_source( + value: str | None, +) -> NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource | None: + if value is None: + return None + if value in NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CUSTOM_FIELD_FIELD_SOURCE_VALUES: + return cast(NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CUSTOM_FIELD_FIELD_SOURCE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item.py new file mode 100644 index 00000000..36a28929 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType, + check_new_catalog_checklist_template_data_attributes_owners_type_0_item_type, +) + +T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesOwnersType0Item") + + +@_attrs_define +class NewCatalogChecklistTemplateDataAttributesOwnersType0Item: + """ + Attributes: + id (str): User ID for user owners, or field key for field owners + type_ (NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType): Type of owner + """ + + id: str + type_: NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + type_ = check_new_catalog_checklist_template_data_attributes_owners_type_0_item_type(d.pop("type")) + + new_catalog_checklist_template_data_attributes_owners_type_0_item = cls( + id=id, + type_=type_, + ) + + new_catalog_checklist_template_data_attributes_owners_type_0_item.additional_properties = d + return new_catalog_checklist_template_data_attributes_owners_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item_type.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item_type.py new file mode 100644 index 00000000..d56a0db7 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_owners_type_0_item_type.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType = Literal["field", "user"] + +NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_OWNERS_TYPE_0_ITEM_TYPE_VALUES: set[ + NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType +] = { + "field", + "user", +} + + +def check_new_catalog_checklist_template_data_attributes_owners_type_0_item_type( + value: str | None, +) -> NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType | None: + if value is None: + return None + if value in NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_OWNERS_TYPE_0_ITEM_TYPE_VALUES: + return cast(NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_OWNERS_TYPE_0_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes_scope_type.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_scope_type.py new file mode 100644 index 00000000..91082f94 --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes_scope_type.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewCatalogChecklistTemplateDataAttributesScopeType = Literal["Catalog", "Team"] + +NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_SCOPE_TYPE_VALUES: set[ + NewCatalogChecklistTemplateDataAttributesScopeType +] = { + "Catalog", + "Team", +} + + +def check_new_catalog_checklist_template_data_attributes_scope_type( + value: str | None, +) -> NewCatalogChecklistTemplateDataAttributesScopeType | None: + if value is None: + return None + if value in NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_SCOPE_TYPE_VALUES: + return cast(NewCatalogChecklistTemplateDataAttributesScopeType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_SCOPE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_type.py b/rootly_sdk/models/new_catalog_checklist_template_data_type.py new file mode 100644 index 00000000..b729d4cd --- /dev/null +++ b/rootly_sdk/models/new_catalog_checklist_template_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewCatalogChecklistTemplateDataType = Literal["catalog_checklist_templates"] + +NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_TYPE_VALUES: set[NewCatalogChecklistTemplateDataType] = { + "catalog_checklist_templates", +} + + +def check_new_catalog_checklist_template_data_type(value: str | None) -> NewCatalogChecklistTemplateDataType | None: + if value is None: + return None + if value in NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_TYPE_VALUES: + return cast(NewCatalogChecklistTemplateDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_CHECKLIST_TEMPLATE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_catalog_data.py b/rootly_sdk/models/new_catalog_data.py index 47f0b5c0..783329ff 100644 --- a/rootly_sdk/models/new_catalog_data.py +++ b/rootly_sdk/models/new_catalog_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewCatalogData: """ type_: NewCatalogDataType - attributes: "NewCatalogDataAttributes" + attributes: NewCatalogDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_data_attributes.py b/rootly_sdk/models/new_catalog_data_attributes.py index 965ae500..a6d96bb9 100644 --- a/rootly_sdk/models/new_catalog_data_attributes.py +++ b/rootly_sdk/models/new_catalog_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,30 +19,30 @@ class NewCatalogDataAttributes: """ Attributes: name (str): - description (Union[None, Unset, str]): - icon (Union[Unset, NewCatalogDataAttributesIcon]): - position (Union[None, Unset, int]): Default position of the catalog when displayed in a list. + description (None | str | Unset): + icon (NewCatalogDataAttributesIcon | Unset): + position (int | None | Unset): Default position of the catalog when displayed in a list. """ name: str - description: None | Unset | str = UNSET - icon: Unset | NewCatalogDataAttributesIcon = UNSET - position: None | Unset | int = UNSET + description: None | str | Unset = UNSET + icon: NewCatalogDataAttributesIcon | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - icon: Unset | str = UNSET + icon: str | Unset = UNSET if not isinstance(self.icon, Unset): icon = self.icon - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -67,28 +69,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _icon = d.pop("icon", UNSET) - icon: Unset | NewCatalogDataAttributesIcon + icon: NewCatalogDataAttributesIcon | Unset if isinstance(_icon, Unset): icon = UNSET else: icon = check_new_catalog_data_attributes_icon(_icon) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_catalog_entity.py b/rootly_sdk/models/new_catalog_entity.py index 54f5b515..205712e1 100644 --- a/rootly_sdk/models/new_catalog_entity.py +++ b/rootly_sdk/models/new_catalog_entity.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCatalogEntity: data (NewCatalogEntityData): """ - data: "NewCatalogEntityData" + data: NewCatalogEntityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_entity_data.py b/rootly_sdk/models/new_catalog_entity_data.py index 1b84bedf..c8ccfd27 100644 --- a/rootly_sdk/models/new_catalog_entity_data.py +++ b/rootly_sdk/models/new_catalog_entity_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewCatalogEntityData: """ type_: NewCatalogEntityDataType - attributes: "NewCatalogEntityDataAttributes" + attributes: NewCatalogEntityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes.py b/rootly_sdk/models/new_catalog_entity_data_attributes.py index de2a74e5..ac88c87a 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.new_catalog_entity_data_attributes_fields_item import NewCatalogEntityDataAttributesFieldsItem + from ..models.new_catalog_entity_data_attributes_properties_item import NewCatalogEntityDataAttributesPropertiesItem T = TypeVar("T", bound="NewCatalogEntityDataAttributes") @@ -17,38 +19,38 @@ class NewCatalogEntityDataAttributes: """ Attributes: name (str): - description (Union[None, Unset, str]): - position (Union[None, Unset, int]): Default position of the item when displayed in a list. - fields (Union[Unset, list['NewCatalogEntityDataAttributesFieldsItem']]): Array of field values for this catalog - entity + description (None | str | Unset): + position (int | None | Unset): Default position of the item when displayed in a list. + properties (list[NewCatalogEntityDataAttributesPropertiesItem] | Unset): Array of property values for this + catalog entity """ name: str - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - fields: Unset | list["NewCatalogEntityDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -61,48 +63,52 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.new_catalog_entity_data_attributes_fields_item import NewCatalogEntityDataAttributesFieldsItem + from ..models.new_catalog_entity_data_attributes_properties_item import ( + NewCatalogEntityDataAttributesPropertiesItem, + ) d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewCatalogEntityDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewCatalogEntityDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_catalog_entity_data_attributes = cls( name=name, description=description, position=position, - fields=fields, + properties=properties, ) return new_catalog_entity_data_attributes diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes_fields_item.py b/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py similarity index 62% rename from rootly_sdk/models/new_catalog_entity_data_attributes_fields_item.py rename to rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py index 4544661d..f5636592 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes_fields_item.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py @@ -1,26 +1,28 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="NewCatalogEntityDataAttributesFieldsItem") +T = TypeVar("T", bound="NewCatalogEntityDataAttributesPropertiesItem") @_attrs_define -class NewCatalogEntityDataAttributesFieldsItem: +class NewCatalogEntityDataAttributesPropertiesItem: """ Attributes: - catalog_field_id (str): Unique ID of the catalog field - value (str): The value for this field + catalog_property_id (str): Unique ID of the catalog property + value (str): The value for this property """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -28,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -38,17 +40,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - new_catalog_entity_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + new_catalog_entity_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - new_catalog_entity_data_attributes_fields_item.additional_properties = d - return new_catalog_entity_data_attributes_fields_item + new_catalog_entity_data_attributes_properties_item.additional_properties = d + return new_catalog_entity_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/new_catalog_entity_property.py b/rootly_sdk/models/new_catalog_entity_property.py index 8e004ed0..83d2b11e 100644 --- a/rootly_sdk/models/new_catalog_entity_property.py +++ b/rootly_sdk/models/new_catalog_entity_property.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -20,7 +22,7 @@ class NewCatalogEntityProperty: data (NewCatalogEntityPropertyData): """ - data: "NewCatalogEntityPropertyData" + data: NewCatalogEntityPropertyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_entity_property_data.py b/rootly_sdk/models/new_catalog_entity_property_data.py index a0ad259e..e6683ffd 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data.py +++ b/rootly_sdk/models/new_catalog_entity_property_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewCatalogEntityPropertyData: """ type_: NewCatalogEntityPropertyDataType - attributes: "NewCatalogEntityPropertyDataAttributes" + attributes: NewCatalogEntityPropertyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_entity_property_data_attributes.py b/rootly_sdk/models/new_catalog_entity_property_data_attributes.py index c3ae6eaa..b1521147 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data_attributes.py +++ b/rootly_sdk/models/new_catalog_entity_property_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -20,13 +22,13 @@ class NewCatalogEntityPropertyDataAttributes: catalog_field_id (str): key (NewCatalogEntityPropertyDataAttributesKey): value (str): - catalog_entity_id (Union[Unset, str]): + catalog_entity_id (str | Unset): """ catalog_field_id: str key: NewCatalogEntityPropertyDataAttributesKey value: str - catalog_entity_id: Unset | str = UNSET + catalog_entity_id: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: catalog_field_id = self.catalog_field_id diff --git a/rootly_sdk/models/new_catalog_entity_property_data_attributes_key.py b/rootly_sdk/models/new_catalog_entity_property_data_attributes_key.py index 2a084d46..2d7098cd 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data_attributes_key.py +++ b/rootly_sdk/models/new_catalog_entity_property_data_attributes_key.py @@ -1,9 +1,10 @@ from typing import Literal, cast -NewCatalogEntityPropertyDataAttributesKey = Literal["catalog_entity", "text"] +NewCatalogEntityPropertyDataAttributesKey = Literal["catalog_entity", "slack", "text"] NEW_CATALOG_ENTITY_PROPERTY_DATA_ATTRIBUTES_KEY_VALUES: set[NewCatalogEntityPropertyDataAttributesKey] = { "catalog_entity", + "slack", "text", } diff --git a/rootly_sdk/models/new_catalog_field.py b/rootly_sdk/models/new_catalog_field.py index ab48fe98..b899e41e 100644 --- a/rootly_sdk/models/new_catalog_field.py +++ b/rootly_sdk/models/new_catalog_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,7 +21,7 @@ class NewCatalogField: data (NewCatalogFieldData): """ - data: "NewCatalogFieldData" + data: NewCatalogFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_field_data.py b/rootly_sdk/models/new_catalog_field_data.py index 2ae4472c..095d3491 100644 --- a/rootly_sdk/models/new_catalog_field_data.py +++ b/rootly_sdk/models/new_catalog_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewCatalogFieldData: """ type_: NewCatalogFieldDataType - attributes: "NewCatalogFieldDataAttributes" + attributes: NewCatalogFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_catalog_field_data_attributes.py b/rootly_sdk/models/new_catalog_field_data_attributes.py index 2034353e..e6ed87d5 100644 --- a/rootly_sdk/models/new_catalog_field_data_attributes.py +++ b/rootly_sdk/models/new_catalog_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -22,27 +24,27 @@ class NewCatalogFieldDataAttributes: Attributes: name (str): kind (NewCatalogFieldDataAttributesKind): - kind_catalog_id (Union[None, Unset, str]): Restricts values to items of specified catalog. - multiple (Union[Unset, bool]): Whether the attribute accepts multiple values. - position (Union[None, Unset, int]): Default position of the item when displayed in a list. - required (Union[Unset, bool]): Whether the field is required. - catalog_type (Union[Unset, NewCatalogFieldDataAttributesCatalogType]): The type of catalog the field belongs to. + kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. + multiple (bool | Unset): Whether the attribute accepts multiple values. + position (int | None | Unset): Default position of the item when displayed in a list. + required (bool | Unset): Whether the field is required. + catalog_type (NewCatalogFieldDataAttributesCatalogType | Unset): The type of catalog the field belongs to. """ name: str kind: NewCatalogFieldDataAttributesKind - kind_catalog_id: None | Unset | str = UNSET - multiple: Unset | bool = UNSET - position: None | Unset | int = UNSET - required: Unset | bool = UNSET - catalog_type: Unset | NewCatalogFieldDataAttributesCatalogType = UNSET + kind_catalog_id: None | str | Unset = UNSET + multiple: bool | Unset = UNSET + position: int | None | Unset = UNSET + required: bool | Unset = UNSET + catalog_type: NewCatalogFieldDataAttributesCatalogType | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name kind: str = self.kind - kind_catalog_id: None | Unset | str + kind_catalog_id: None | str | Unset if isinstance(self.kind_catalog_id, Unset): kind_catalog_id = UNSET else: @@ -50,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: multiple = self.multiple - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -58,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: required = self.required - catalog_type: Unset | str = UNSET + catalog_type: str | Unset = UNSET if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type @@ -90,30 +92,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: kind = check_new_catalog_field_data_attributes_kind(d.pop("kind")) - def _parse_kind_catalog_id(data: object) -> None | Unset | str: + def _parse_kind_catalog_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kind_catalog_id = _parse_kind_catalog_id(d.pop("kind_catalog_id", UNSET)) multiple = d.pop("multiple", UNSET) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) required = d.pop("required", UNSET) _catalog_type = d.pop("catalog_type", UNSET) - catalog_type: Unset | NewCatalogFieldDataAttributesCatalogType + catalog_type: NewCatalogFieldDataAttributesCatalogType | Unset if isinstance(_catalog_type, Unset): catalog_type = UNSET else: diff --git a/rootly_sdk/models/new_catalog_field_data_type.py b/rootly_sdk/models/new_catalog_field_data_type.py index 0ce5c73d..da55b11b 100644 --- a/rootly_sdk/models/new_catalog_field_data_type.py +++ b/rootly_sdk/models/new_catalog_field_data_type.py @@ -1,9 +1,9 @@ from typing import Literal, cast -NewCatalogFieldDataType = Literal["catalog_fields"] +NewCatalogFieldDataType = Literal["catalog_properties"] NEW_CATALOG_FIELD_DATA_TYPE_VALUES: set[NewCatalogFieldDataType] = { - "catalog_fields", + "catalog_properties", } diff --git a/rootly_sdk/models/new_catalog_property.py b/rootly_sdk/models/new_catalog_property.py new file mode 100644 index 00000000..a8c21f3d --- /dev/null +++ b/rootly_sdk/models/new_catalog_property.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_catalog_property_data import NewCatalogPropertyData + + +T = TypeVar("T", bound="NewCatalogProperty") + + +@_attrs_define +class NewCatalogProperty: + """A catalog can have a maximum of 50 properties. + + Attributes: + data (NewCatalogPropertyData): + """ + + data: NewCatalogPropertyData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_catalog_property_data import NewCatalogPropertyData + + d = dict(src_dict) + data = NewCatalogPropertyData.from_dict(d.pop("data")) + + new_catalog_property = cls( + data=data, + ) + + new_catalog_property.additional_properties = d + return new_catalog_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_property_data.py b/rootly_sdk/models/new_catalog_property_data.py new file mode 100644 index 00000000..2823db19 --- /dev/null +++ b/rootly_sdk/models/new_catalog_property_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_catalog_property_data_type import NewCatalogPropertyDataType, check_new_catalog_property_data_type + +if TYPE_CHECKING: + from ..models.new_catalog_property_data_attributes import NewCatalogPropertyDataAttributes + + +T = TypeVar("T", bound="NewCatalogPropertyData") + + +@_attrs_define +class NewCatalogPropertyData: + """ + Attributes: + type_ (NewCatalogPropertyDataType): + attributes (NewCatalogPropertyDataAttributes): + """ + + type_: NewCatalogPropertyDataType + attributes: NewCatalogPropertyDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_catalog_property_data_attributes import NewCatalogPropertyDataAttributes + + d = dict(src_dict) + type_ = check_new_catalog_property_data_type(d.pop("type")) + + attributes = NewCatalogPropertyDataAttributes.from_dict(d.pop("attributes")) + + new_catalog_property_data = cls( + type_=type_, + attributes=attributes, + ) + + new_catalog_property_data.additional_properties = d + return new_catalog_property_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_catalog_property_data_attributes.py b/rootly_sdk/models/new_catalog_property_data_attributes.py new file mode 100644 index 00000000..9e42a192 --- /dev/null +++ b/rootly_sdk/models/new_catalog_property_data_attributes.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.new_catalog_property_data_attributes_catalog_type import ( + NewCatalogPropertyDataAttributesCatalogType, + check_new_catalog_property_data_attributes_catalog_type, +) +from ..models.new_catalog_property_data_attributes_kind import ( + NewCatalogPropertyDataAttributesKind, + check_new_catalog_property_data_attributes_kind, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewCatalogPropertyDataAttributes") + + +@_attrs_define +class NewCatalogPropertyDataAttributes: + """ + Attributes: + name (str): + kind (NewCatalogPropertyDataAttributesKind): + kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. + multiple (bool | Unset): Whether the attribute accepts multiple values. + position (int | None | Unset): Default position of the item when displayed in a list. + required (bool | Unset): Whether the property is required. + catalog_type (NewCatalogPropertyDataAttributesCatalogType | Unset): The type of catalog the property belongs to. + """ + + name: str + kind: NewCatalogPropertyDataAttributesKind + kind_catalog_id: None | str | Unset = UNSET + multiple: bool | Unset = UNSET + position: int | None | Unset = UNSET + required: bool | Unset = UNSET + catalog_type: NewCatalogPropertyDataAttributesCatalogType | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + name = self.name + + kind: str = self.kind + + kind_catalog_id: None | str | Unset + if isinstance(self.kind_catalog_id, Unset): + kind_catalog_id = UNSET + else: + kind_catalog_id = self.kind_catalog_id + + multiple = self.multiple + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + required = self.required + + catalog_type: str | Unset = UNSET + if not isinstance(self.catalog_type, Unset): + catalog_type = self.catalog_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "kind": kind, + } + ) + if kind_catalog_id is not UNSET: + field_dict["kind_catalog_id"] = kind_catalog_id + if multiple is not UNSET: + field_dict["multiple"] = multiple + if position is not UNSET: + field_dict["position"] = position + if required is not UNSET: + field_dict["required"] = required + if catalog_type is not UNSET: + field_dict["catalog_type"] = catalog_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + kind = check_new_catalog_property_data_attributes_kind(d.pop("kind")) + + def _parse_kind_catalog_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kind_catalog_id = _parse_kind_catalog_id(d.pop("kind_catalog_id", UNSET)) + + multiple = d.pop("multiple", UNSET) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + required = d.pop("required", UNSET) + + _catalog_type = d.pop("catalog_type", UNSET) + catalog_type: NewCatalogPropertyDataAttributesCatalogType | Unset + if isinstance(_catalog_type, Unset): + catalog_type = UNSET + else: + catalog_type = check_new_catalog_property_data_attributes_catalog_type(_catalog_type) + + new_catalog_property_data_attributes = cls( + name=name, + kind=kind, + kind_catalog_id=kind_catalog_id, + multiple=multiple, + position=position, + required=required, + catalog_type=catalog_type, + ) + + return new_catalog_property_data_attributes diff --git a/rootly_sdk/models/new_catalog_property_data_attributes_catalog_type.py b/rootly_sdk/models/new_catalog_property_data_attributes_catalog_type.py new file mode 100644 index 00000000..b824b8bd --- /dev/null +++ b/rootly_sdk/models/new_catalog_property_data_attributes_catalog_type.py @@ -0,0 +1,27 @@ +from typing import Literal, cast + +NewCatalogPropertyDataAttributesCatalogType = Literal[ + "catalog", "cause", "environment", "functionality", "incident_type", "service", "team" +] + +NEW_CATALOG_PROPERTY_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES: set[NewCatalogPropertyDataAttributesCatalogType] = { + "catalog", + "cause", + "environment", + "functionality", + "incident_type", + "service", + "team", +} + + +def check_new_catalog_property_data_attributes_catalog_type( + value: str | None, +) -> NewCatalogPropertyDataAttributesCatalogType | None: + if value is None: + return None + if value in NEW_CATALOG_PROPERTY_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES: + return cast(NewCatalogPropertyDataAttributesCatalogType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_PROPERTY_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_catalog_property_data_attributes_kind.py b/rootly_sdk/models/new_catalog_property_data_attributes_kind.py new file mode 100644 index 00000000..07291c81 --- /dev/null +++ b/rootly_sdk/models/new_catalog_property_data_attributes_kind.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +NewCatalogPropertyDataAttributesKind = Literal[ + "boolean", "cause", "environment", "functionality", "group", "incident_type", "reference", "service", "text", "user" +] + +NEW_CATALOG_PROPERTY_DATA_ATTRIBUTES_KIND_VALUES: set[NewCatalogPropertyDataAttributesKind] = { + "boolean", + "cause", + "environment", + "functionality", + "group", + "incident_type", + "reference", + "service", + "text", + "user", +} + + +def check_new_catalog_property_data_attributes_kind(value: str | None) -> NewCatalogPropertyDataAttributesKind | None: + if value is None: + return None + if value in NEW_CATALOG_PROPERTY_DATA_ATTRIBUTES_KIND_VALUES: + return cast(NewCatalogPropertyDataAttributesKind, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_PROPERTY_DATA_ATTRIBUTES_KIND_VALUES!r}") diff --git a/rootly_sdk/models/new_catalog_property_data_type.py b/rootly_sdk/models/new_catalog_property_data_type.py new file mode 100644 index 00000000..e7f2b253 --- /dev/null +++ b/rootly_sdk/models/new_catalog_property_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewCatalogPropertyDataType = Literal["catalog_properties"] + +NEW_CATALOG_PROPERTY_DATA_TYPE_VALUES: set[NewCatalogPropertyDataType] = { + "catalog_properties", +} + + +def check_new_catalog_property_data_type(value: str | None) -> NewCatalogPropertyDataType | None: + if value is None: + return None + if value in NEW_CATALOG_PROPERTY_DATA_TYPE_VALUES: + return cast(NewCatalogPropertyDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_CATALOG_PROPERTY_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_cause.py b/rootly_sdk/models/new_cause.py index ba1af3e7..4daf1828 100644 --- a/rootly_sdk/models/new_cause.py +++ b/rootly_sdk/models/new_cause.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCause: data (NewCauseData): """ - data: "NewCauseData" + data: NewCauseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_cause_data.py b/rootly_sdk/models/new_cause_data.py index 2a5015be..96dd5a44 100644 --- a/rootly_sdk/models/new_cause_data.py +++ b/rootly_sdk/models/new_cause_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewCauseData: """ type_: NewCauseDataType - attributes: "NewCauseDataAttributes" + attributes: NewCauseDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_cause_data_attributes.py b/rootly_sdk/models/new_cause_data_attributes.py index b89d5cea..f0655b4e 100644 --- a/rootly_sdk/models/new_cause_data_attributes.py +++ b/rootly_sdk/models/new_cause_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.new_cause_data_attributes_fields_item import NewCauseDataAttributesFieldsItem + from ..models.new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem T = TypeVar("T", bound="NewCauseDataAttributes") @@ -17,37 +19,37 @@ class NewCauseDataAttributes: """ Attributes: name (str): The name of the cause - description (Union[None, Unset, str]): The description of the cause - position (Union[None, Unset, int]): Position of the cause - fields (Union[Unset, list['NewCauseDataAttributesFieldsItem']]): Array of field values for this cause. + description (None | str | Unset): The description of the cause + position (int | None | Unset): Position of the cause + properties (list[NewCauseDataAttributesPropertiesItem] | Unset): Array of property values for this cause. """ name: str - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - fields: Unset | list["NewCauseDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + properties: list[NewCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -60,48 +62,50 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.new_cause_data_attributes_fields_item import NewCauseDataAttributesFieldsItem + from ..models.new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewCauseDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewCauseDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewCauseDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_cause_data_attributes = cls( name=name, description=description, position=position, - fields=fields, + properties=properties, ) return new_cause_data_attributes diff --git a/rootly_sdk/models/new_cause_data_attributes_fields_item.py b/rootly_sdk/models/new_cause_data_attributes_fields_item.py deleted file mode 100644 index 7b53bf65..00000000 --- a/rootly_sdk/models/new_cause_data_attributes_fields_item.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="NewCauseDataAttributesFieldsItem") - - -@_attrs_define -class NewCauseDataAttributesFieldsItem: - """Set a value for a catalog field - - Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value - """ - - catalog_field_id: str - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "catalog_field_id": catalog_field_id, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") - - value = d.pop("value") - - new_cause_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, - value=value, - ) - - new_cause_data_attributes_fields_item.additional_properties = d - return new_cause_data_attributes_fields_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/functionality_fields_type_0_item.py b/rootly_sdk/models/new_cause_data_attributes_properties_item.py similarity index 63% rename from rootly_sdk/models/functionality_fields_type_0_item.py rename to rootly_sdk/models/new_cause_data_attributes_properties_item.py index 9de07d13..da071245 100644 --- a/rootly_sdk/models/functionality_fields_type_0_item.py +++ b/rootly_sdk/models/new_cause_data_attributes_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="FunctionalityFieldsType0Item") +T = TypeVar("T", bound="NewCauseDataAttributesPropertiesItem") @_attrs_define -class FunctionalityFieldsType0Item: - """Set a value for a catalog field +class NewCauseDataAttributesPropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - functionality_fields_type_0_item = cls( - catalog_field_id=catalog_field_id, + new_cause_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - functionality_fields_type_0_item.additional_properties = d - return functionality_fields_type_0_item + new_cause_data_attributes_properties_item.additional_properties = d + return new_cause_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/new_communications_group.py b/rootly_sdk/models/new_communications_group.py index c59f5362..5cf224fc 100644 --- a/rootly_sdk/models/new_communications_group.py +++ b/rootly_sdk/models/new_communications_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCommunicationsGroup: data (NewCommunicationsGroupData): """ - data: "NewCommunicationsGroupData" + data: NewCommunicationsGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_group_data.py b/rootly_sdk/models/new_communications_group_data.py index ef36edb1..19358383 100644 --- a/rootly_sdk/models/new_communications_group_data.py +++ b/rootly_sdk/models/new_communications_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewCommunicationsGroupData: """ type_: NewCommunicationsGroupDataType - attributes: "NewCommunicationsGroupDataAttributes" + attributes: NewCommunicationsGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_group_data_attributes.py b/rootly_sdk/models/new_communications_group_data_attributes.py index 8f9e4197..a605c9dc 100644 --- a/rootly_sdk/models/new_communications_group_data_attributes.py +++ b/rootly_sdk/models/new_communications_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -27,34 +29,34 @@ class NewCommunicationsGroupDataAttributes: Attributes: name (str): The name of the communications group communication_type_id (str): The communication type ID - description (Union[None, Unset, str]): The description of the communications group - is_private (Union[None, Unset, bool]): Whether the group is private - condition_type (Union[Unset, NewCommunicationsGroupDataAttributesConditionType]): Condition type - sms_channel (Union[None, Unset, bool]): SMS channel enabled - email_channel (Union[None, Unset, bool]): Email channel enabled - member_ids (Union[None, Unset, list[int]]): Array of member user IDs - slack_channel_ids (Union[None, Unset, list[str]]): Array of Slack channel IDs - communication_group_conditions (Union[None, Unset, - list['NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item']]): Group conditions attributes - communication_external_group_members (Union[None, Unset, - list['NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item']]): External group members - attributes + description (None | str | Unset): The description of the communications group + is_private (bool | None | Unset): Whether the group is private + condition_type (NewCommunicationsGroupDataAttributesConditionType | Unset): Condition type + sms_channel (bool | None | Unset): SMS channel enabled + email_channel (bool | None | Unset): Email channel enabled + member_ids (list[int] | None | Unset): Array of member user IDs + slack_channel_ids (list[str] | None | Unset): Array of Slack channel IDs + communication_group_conditions (list[NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] + | None | Unset): Group conditions attributes + communication_external_group_members + (list[NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset): External + group members attributes """ name: str communication_type_id: str - description: None | Unset | str = UNSET - is_private: None | Unset | bool = UNSET - condition_type: Unset | NewCommunicationsGroupDataAttributesConditionType = UNSET - sms_channel: None | Unset | bool = UNSET - email_channel: None | Unset | bool = UNSET - member_ids: None | Unset | list[int] = UNSET - slack_channel_ids: None | Unset | list[str] = UNSET + description: None | str | Unset = UNSET + is_private: bool | None | Unset = UNSET + condition_type: NewCommunicationsGroupDataAttributesConditionType | Unset = UNSET + sms_channel: bool | None | Unset = UNSET + email_channel: bool | None | Unset = UNSET + member_ids: list[int] | None | Unset = UNSET + slack_channel_ids: list[str] | None | Unset = UNSET communication_group_conditions: ( - None | Unset | list["NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item"] + list[NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset ) = UNSET communication_external_group_members: ( - None | Unset | list["NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item"] + list[NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: @@ -62,35 +64,35 @@ def to_dict(self) -> dict[str, Any]: communication_type_id = self.communication_type_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - is_private: None | Unset | bool + is_private: bool | None | Unset if isinstance(self.is_private, Unset): is_private = UNSET else: is_private = self.is_private - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - sms_channel: None | Unset | bool + sms_channel: bool | None | Unset if isinstance(self.sms_channel, Unset): sms_channel = UNSET else: sms_channel = self.sms_channel - email_channel: None | Unset | bool + email_channel: bool | None | Unset if isinstance(self.email_channel, Unset): email_channel = UNSET else: email_channel = self.email_channel - member_ids: None | Unset | list[int] + member_ids: list[int] | None | Unset if isinstance(self.member_ids, Unset): member_ids = UNSET elif isinstance(self.member_ids, list): @@ -99,7 +101,7 @@ def to_dict(self) -> dict[str, Any]: else: member_ids = self.member_ids - slack_channel_ids: None | Unset | list[str] + slack_channel_ids: list[str] | None | Unset if isinstance(self.slack_channel_ids, Unset): slack_channel_ids = UNSET elif isinstance(self.slack_channel_ids, list): @@ -108,7 +110,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channel_ids = self.slack_channel_ids - communication_group_conditions: None | Unset | list[dict[str, Any]] + communication_group_conditions: list[dict[str, Any]] | None | Unset if isinstance(self.communication_group_conditions, Unset): communication_group_conditions = UNSET elif isinstance(self.communication_group_conditions, list): @@ -120,7 +122,7 @@ def to_dict(self) -> dict[str, Any]: else: communication_group_conditions = self.communication_group_conditions - communication_external_group_members: None | Unset | list[dict[str, Any]] + communication_external_group_members: list[dict[str, Any]] | None | Unset if isinstance(self.communication_external_group_members, Unset): communication_external_group_members = UNSET elif isinstance(self.communication_external_group_members, list): @@ -177,50 +179,50 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: communication_type_id = d.pop("communication_type_id") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_is_private(data: object) -> None | Unset | bool: + def _parse_is_private(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) is_private = _parse_is_private(d.pop("is_private", UNSET)) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | NewCommunicationsGroupDataAttributesConditionType + condition_type: NewCommunicationsGroupDataAttributesConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_new_communications_group_data_attributes_condition_type(_condition_type) - def _parse_sms_channel(data: object) -> None | Unset | bool: + def _parse_sms_channel(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) sms_channel = _parse_sms_channel(d.pop("sms_channel", UNSET)) - def _parse_email_channel(data: object) -> None | Unset | bool: + def _parse_email_channel(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) email_channel = _parse_email_channel(d.pop("email_channel", UNSET)) - def _parse_member_ids(data: object) -> None | Unset | list[int]: + def _parse_member_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -231,13 +233,13 @@ def _parse_member_ids(data: object) -> None | Unset | list[int]: member_ids_type_0 = cast(list[int], data) return member_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) member_ids = _parse_member_ids(d.pop("member_ids", UNSET)) - def _parse_slack_channel_ids(data: object) -> None | Unset | list[str]: + def _parse_slack_channel_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -248,15 +250,15 @@ def _parse_slack_channel_ids(data: object) -> None | Unset | list[str]: slack_channel_ids_type_0 = cast(list[str], data) return slack_channel_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) slack_channel_ids = _parse_slack_channel_ids(d.pop("slack_channel_ids", UNSET)) def _parse_communication_group_conditions( data: object, - ) -> None | Unset | list["NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item"]: + ) -> list[NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -276,11 +278,10 @@ def _parse_communication_group_conditions( communication_group_conditions_type_0.append(communication_group_conditions_type_0_item) return communication_group_conditions_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - None | Unset | list["NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item"], - data, + list[NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset, data ) communication_group_conditions = _parse_communication_group_conditions( @@ -289,7 +290,7 @@ def _parse_communication_group_conditions( def _parse_communication_external_group_members( data: object, - ) -> None | Unset | list["NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item"]: + ) -> list[NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -311,10 +312,10 @@ def _parse_communication_external_group_members( communication_external_group_members_type_0.append(communication_external_group_members_type_0_item) return communication_external_group_members_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - None | Unset | list["NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item"], + list[NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset, data, ) diff --git a/rootly_sdk/models/new_communications_group_data_attributes_communication_external_group_members_type_0_item.py b/rootly_sdk/models/new_communications_group_data_attributes_communication_external_group_members_type_0_item.py index ef8f8260..4cb512ee 100644 --- a/rootly_sdk/models/new_communications_group_data_attributes_communication_external_group_members_type_0_item.py +++ b/rootly_sdk/models/new_communications_group_data_attributes_communication_external_group_members_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,14 +15,14 @@ class NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item: """ Attributes: - name (Union[Unset, str]): Name of the external member - email (Union[Unset, str]): Email of the external member - phone_number (Union[Unset, str]): Phone number of the external member + name (str | Unset): Name of the external member + email (str | Unset): Email of the external member + phone_number (str | Unset): Phone number of the external member """ - name: Unset | str = UNSET - email: Unset | str = UNSET - phone_number: Unset | str = UNSET + name: str | Unset = UNSET + email: str | Unset = UNSET + phone_number: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_group_data_attributes_communication_group_conditions_type_0_item.py b/rootly_sdk/models/new_communications_group_data_attributes_communication_group_conditions_type_0_item.py index e5b2ed63..06d190a0 100644 --- a/rootly_sdk/models/new_communications_group_data_attributes_communication_group_conditions_type_0_item.py +++ b/rootly_sdk/models/new_communications_group_data_attributes_communication_group_conditions_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,29 +19,29 @@ class NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item: """ Attributes: - property_type (Union[Unset, - NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType]): Property type - service_ids (Union[None, Unset, list[str]]): Array of service IDs - severity_ids (Union[None, Unset, list[str]]): Array of severity IDs - functionality_ids (Union[None, Unset, list[str]]): Array of functionality IDs - group_ids (Union[None, Unset, list[str]]): Array of group IDs - incident_type_ids (Union[None, Unset, list[str]]): Array of incident type IDs + property_type (NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType | Unset): + Property type + service_ids (list[str] | None | Unset): Array of service IDs + severity_ids (list[str] | None | Unset): Array of severity IDs + functionality_ids (list[str] | None | Unset): Array of functionality IDs + group_ids (list[str] | None | Unset): Array of group IDs + incident_type_ids (list[str] | None | Unset): Array of incident type IDs """ - property_type: Unset | NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType = UNSET - service_ids: None | Unset | list[str] = UNSET - severity_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + property_type: NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - property_type: Unset | str = UNSET + property_type: str | Unset = UNSET if not isinstance(self.property_type, Unset): property_type = self.property_type - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -57,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -66,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -75,7 +77,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -106,7 +108,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _property_type = d.pop("property_type", UNSET) - property_type: Unset | NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType + property_type: NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType | Unset if isinstance(_property_type, Unset): property_type = UNSET else: @@ -116,7 +118,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) ) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -127,13 +129,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -144,13 +146,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -161,13 +163,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -178,13 +180,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -195,9 +197,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/new_communications_stage.py b/rootly_sdk/models/new_communications_stage.py index 255f3d6e..d11ef2f1 100644 --- a/rootly_sdk/models/new_communications_stage.py +++ b/rootly_sdk/models/new_communications_stage.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCommunicationsStage: data (NewCommunicationsStageData): """ - data: "NewCommunicationsStageData" + data: NewCommunicationsStageData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_stage_data.py b/rootly_sdk/models/new_communications_stage_data.py index 7b63efc0..e805f5f3 100644 --- a/rootly_sdk/models/new_communications_stage_data.py +++ b/rootly_sdk/models/new_communications_stage_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewCommunicationsStageData: """ type_: NewCommunicationsStageDataType - attributes: "NewCommunicationsStageDataAttributes" + attributes: NewCommunicationsStageDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_stage_data_attributes.py b/rootly_sdk/models/new_communications_stage_data_attributes.py index 23f129b1..625f18e7 100644 --- a/rootly_sdk/models/new_communications_stage_data_attributes.py +++ b/rootly_sdk/models/new_communications_stage_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,24 +15,24 @@ class NewCommunicationsStageDataAttributes: """ Attributes: name (str): The name of the communications stage - description (Union[None, Unset, str]): The description of the communications stage - position (Union[None, Unset, int]): Position of the communications stage + description (None | str | Unset): The description of the communications stage + position (int | None | Unset): Position of the communications stage """ name: str - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -55,21 +57,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_communications_template.py b/rootly_sdk/models/new_communications_template.py index 9736c747..d92e27ed 100644 --- a/rootly_sdk/models/new_communications_template.py +++ b/rootly_sdk/models/new_communications_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCommunicationsTemplate: data (NewCommunicationsTemplateData): """ - data: "NewCommunicationsTemplateData" + data: NewCommunicationsTemplateData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_template_data.py b/rootly_sdk/models/new_communications_template_data.py index d82c8d18..36258107 100644 --- a/rootly_sdk/models/new_communications_template_data.py +++ b/rootly_sdk/models/new_communications_template_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewCommunicationsTemplateData: """ type_: NewCommunicationsTemplateDataType - attributes: "NewCommunicationsTemplateDataAttributes" + attributes: NewCommunicationsTemplateDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_template_data_attributes.py b/rootly_sdk/models/new_communications_template_data_attributes.py index e25d102a..32c12e4a 100644 --- a/rootly_sdk/models/new_communications_template_data_attributes.py +++ b/rootly_sdk/models/new_communications_template_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -20,19 +22,19 @@ class NewCommunicationsTemplateDataAttributes: Attributes: name (str): The name of the communications template communication_type_id (str): The communication type ID - description (Union[None, Unset, str]): The description of the communications template - position (Union[None, Unset, int]): Position of the communications template - communication_template_stages_attributes (Union[None, Unset, - list['NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item']]): Template stages - attributes + description (None | str | Unset): The description of the communications template + position (int | None | Unset): Position of the communications template + communication_template_stages_attributes + (list[NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] | None | Unset): + Template stages attributes """ name: str communication_type_id: str - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET communication_template_stages_attributes: ( - None | Unset | list["NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item"] + list[NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: @@ -40,19 +42,19 @@ def to_dict(self) -> dict[str, Any]: communication_type_id = self.communication_type_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - communication_template_stages_attributes: None | Unset | list[dict[str, Any]] + communication_template_stages_attributes: list[dict[str, Any]] | None | Unset if isinstance(self.communication_template_stages_attributes, Unset): communication_template_stages_attributes = UNSET elif isinstance(self.communication_template_stages_attributes, list): @@ -96,29 +98,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: communication_type_id = d.pop("communication_type_id") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) def _parse_communication_template_stages_attributes( data: object, - ) -> ( - None | Unset | list["NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item"] - ): + ) -> list[NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -142,12 +142,12 @@ def _parse_communication_template_stages_attributes( ) return communication_template_stages_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - None - | Unset - | list["NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item"], + list[NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] + | None + | Unset, data, ) diff --git a/rootly_sdk/models/new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py b/rootly_sdk/models/new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py index 1a52b6f1..07f47a09 100644 --- a/rootly_sdk/models/new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py +++ b/rootly_sdk/models/new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,42 +15,42 @@ class NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item: """ Attributes: - communication_stage_id (Union[Unset, str]): The communication stage ID - sms_content (Union[None, Unset, str]): SMS content for the stage - email_subject (Union[None, Unset, str]): Email subject for the stage - email_body (Union[None, Unset, str]): Email body for the stage - slack_content (Union[None, Unset, str]): Slack content for the stage + communication_stage_id (str | Unset): The communication stage ID + sms_content (None | str | Unset): SMS content for the stage + email_subject (None | str | Unset): Email subject for the stage + email_body (None | str | Unset): Email body for the stage + slack_content (None | str | Unset): Slack content for the stage """ - communication_stage_id: Unset | str = UNSET - sms_content: None | Unset | str = UNSET - email_subject: None | Unset | str = UNSET - email_body: None | Unset | str = UNSET - slack_content: None | Unset | str = UNSET + communication_stage_id: str | Unset = UNSET + sms_content: None | str | Unset = UNSET + email_subject: None | str | Unset = UNSET + email_body: None | str | Unset = UNSET + slack_content: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: communication_stage_id = self.communication_stage_id - sms_content: None | Unset | str + sms_content: None | str | Unset if isinstance(self.sms_content, Unset): sms_content = UNSET else: sms_content = self.sms_content - email_subject: None | Unset | str + email_subject: None | str | Unset if isinstance(self.email_subject, Unset): email_subject = UNSET else: email_subject = self.email_subject - email_body: None | Unset | str + email_body: None | str | Unset if isinstance(self.email_body, Unset): email_body = UNSET else: email_body = self.email_body - slack_content: None | Unset | str + slack_content: None | str | Unset if isinstance(self.slack_content, Unset): slack_content = UNSET else: @@ -75,39 +77,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) communication_stage_id = d.pop("communication_stage_id", UNSET) - def _parse_sms_content(data: object) -> None | Unset | str: + def _parse_sms_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) sms_content = _parse_sms_content(d.pop("sms_content", UNSET)) - def _parse_email_subject(data: object) -> None | Unset | str: + def _parse_email_subject(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_subject = _parse_email_subject(d.pop("email_subject", UNSET)) - def _parse_email_body(data: object) -> None | Unset | str: + def _parse_email_body(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_body = _parse_email_body(d.pop("email_body", UNSET)) - def _parse_slack_content(data: object) -> None | Unset | str: + def _parse_slack_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_content = _parse_slack_content(d.pop("slack_content", UNSET)) diff --git a/rootly_sdk/models/new_communications_type.py b/rootly_sdk/models/new_communications_type.py index 13a637a3..078ae90a 100644 --- a/rootly_sdk/models/new_communications_type.py +++ b/rootly_sdk/models/new_communications_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCommunicationsType: data (NewCommunicationsTypeData): """ - data: "NewCommunicationsTypeData" + data: NewCommunicationsTypeData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_type_data.py b/rootly_sdk/models/new_communications_type_data.py index b3f273d1..435176de 100644 --- a/rootly_sdk/models/new_communications_type_data.py +++ b/rootly_sdk/models/new_communications_type_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewCommunicationsTypeData: """ type_: NewCommunicationsTypeDataType - attributes: "NewCommunicationsTypeDataAttributes" + attributes: NewCommunicationsTypeDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_communications_type_data_attributes.py b/rootly_sdk/models/new_communications_type_data_attributes.py index 615773b0..3d65eda4 100644 --- a/rootly_sdk/models/new_communications_type_data_attributes.py +++ b/rootly_sdk/models/new_communications_type_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,15 +15,15 @@ class NewCommunicationsTypeDataAttributes: """ Attributes: name (str): The name of the communications type - color (Union[None, str]): The color of the communications type - description (Union[None, Unset, str]): The description of the communications type - position (Union[None, Unset, int]): Position of the communications type + color (None | str): The color of the communications type + description (None | str | Unset): The description of the communications type + position (int | None | Unset): Position of the communications type """ name: str color: None | str - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -29,13 +31,13 @@ def to_dict(self) -> dict[str, Any]: color: None | str color = self.color - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -68,21 +70,21 @@ def _parse_color(data: object) -> None | str: color = _parse_color(d.pop("color")) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_custom_field.py b/rootly_sdk/models/new_custom_field.py index 4e234541..837b303d 100644 --- a/rootly_sdk/models/new_custom_field.py +++ b/rootly_sdk/models/new_custom_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCustomField: data (NewCustomFieldData): """ - data: "NewCustomFieldData" + data: NewCustomFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_custom_field_data.py b/rootly_sdk/models/new_custom_field_data.py index 4d28f75f..f6f5a39d 100644 --- a/rootly_sdk/models/new_custom_field_data.py +++ b/rootly_sdk/models/new_custom_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewCustomFieldData: """ type_: NewCustomFieldDataType - attributes: "NewCustomFieldDataAttributes" + attributes: NewCustomFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_custom_field_data_attributes.py b/rootly_sdk/models/new_custom_field_data_attributes.py index 93a5e0aa..f91d2f06 100644 --- a/rootly_sdk/models/new_custom_field_data_attributes.py +++ b/rootly_sdk/models/new_custom_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,37 +23,37 @@ class NewCustomFieldDataAttributes: """ Attributes: label (str): The name of the custom_field - description (Union[None, Unset, str]): The description of the custom_field - shown (Union[Unset, list[NewCustomFieldDataAttributesShownItem]]): - required (Union[None, Unset, list[NewCustomFieldDataAttributesRequiredType0Item]]): - default (Union[None, Unset, str]): The default value for text field kinds - position (Union[Unset, int]): The position of the custom_field + description (None | str | Unset): The description of the custom_field + shown (list[NewCustomFieldDataAttributesShownItem] | Unset): + required (list[NewCustomFieldDataAttributesRequiredType0Item] | None | Unset): + default (None | str | Unset): The default value for text field kinds + position (int | Unset): The position of the custom_field """ label: str - description: None | Unset | str = UNSET - shown: Unset | list[NewCustomFieldDataAttributesShownItem] = UNSET - required: None | Unset | list[NewCustomFieldDataAttributesRequiredType0Item] = UNSET - default: None | Unset | str = UNSET - position: Unset | int = UNSET + description: None | str | Unset = UNSET + shown: list[NewCustomFieldDataAttributesShownItem] | Unset = UNSET + required: list[NewCustomFieldDataAttributesRequiredType0Item] | None | Unset = UNSET + default: None | str | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: label = self.label - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - shown: Unset | list[str] = UNSET + shown: list[str] | Unset = UNSET if not isinstance(self.shown, Unset): shown = [] for shown_item_data in self.shown: shown_item: str = shown_item_data shown.append(shown_item) - required: None | Unset | list[str] + required: list[str] | None | Unset if isinstance(self.required, Unset): required = UNSET elif isinstance(self.required, list): @@ -63,7 +65,7 @@ def to_dict(self) -> dict[str, Any]: else: required = self.required - default: None | Unset | str + default: None | str | Unset if isinstance(self.default, Unset): default = UNSET else: @@ -96,23 +98,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) label = d.pop("label") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - shown = [] _shown = d.pop("shown", UNSET) - for shown_item_data in _shown or []: - shown_item = check_new_custom_field_data_attributes_shown_item(shown_item_data) + shown: list[NewCustomFieldDataAttributesShownItem] | Unset = UNSET + if _shown is not UNSET: + shown = [] + for shown_item_data in _shown: + shown_item = check_new_custom_field_data_attributes_shown_item(shown_item_data) - shown.append(shown_item) + shown.append(shown_item) - def _parse_required(data: object) -> None | Unset | list[NewCustomFieldDataAttributesRequiredType0Item]: + def _parse_required(data: object) -> list[NewCustomFieldDataAttributesRequiredType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -130,18 +134,18 @@ def _parse_required(data: object) -> None | Unset | list[NewCustomFieldDataAttri required_type_0.append(required_type_0_item) return required_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[NewCustomFieldDataAttributesRequiredType0Item], data) + return cast(list[NewCustomFieldDataAttributesRequiredType0Item] | None | Unset, data) required = _parse_required(d.pop("required", UNSET)) - def _parse_default(data: object) -> None | Unset | str: + def _parse_default(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) default = _parse_default(d.pop("default", UNSET)) diff --git a/rootly_sdk/models/new_custom_field_option.py b/rootly_sdk/models/new_custom_field_option.py index 21bc5210..818c5ca1 100644 --- a/rootly_sdk/models/new_custom_field_option.py +++ b/rootly_sdk/models/new_custom_field_option.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCustomFieldOption: data (NewCustomFieldOptionData): """ - data: "NewCustomFieldOptionData" + data: NewCustomFieldOptionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_custom_field_option_data.py b/rootly_sdk/models/new_custom_field_option_data.py index 44112638..e1cd69c1 100644 --- a/rootly_sdk/models/new_custom_field_option_data.py +++ b/rootly_sdk/models/new_custom_field_option_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewCustomFieldOptionData: """ type_: NewCustomFieldOptionDataType - attributes: "NewCustomFieldOptionDataAttributes" + attributes: NewCustomFieldOptionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_custom_field_option_data_attributes.py b/rootly_sdk/models/new_custom_field_option_data_attributes.py index 6316c183..327dadf0 100644 --- a/rootly_sdk/models/new_custom_field_option_data_attributes.py +++ b/rootly_sdk/models/new_custom_field_option_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,15 +15,15 @@ class NewCustomFieldOptionDataAttributes: """ Attributes: value (str): The value of the custom_field_option - color (Union[Unset, str]): The hex color of the custom_field_option - default (Union[Unset, bool]): - position (Union[Unset, int]): The position of the custom_field_option + color (str | Unset): The hex color of the custom_field_option + default (bool | Unset): + position (int | Unset): The position of the custom_field_option """ value: str - color: Unset | str = UNSET - default: Unset | bool = UNSET - position: Unset | int = UNSET + color: str | Unset = UNSET + default: bool | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: value = self.value diff --git a/rootly_sdk/models/new_custom_form.py b/rootly_sdk/models/new_custom_form.py index b4884ddc..82676702 100644 --- a/rootly_sdk/models/new_custom_form.py +++ b/rootly_sdk/models/new_custom_form.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewCustomForm: data (NewCustomFormData): """ - data: "NewCustomFormData" + data: NewCustomFormData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_custom_form_data.py b/rootly_sdk/models/new_custom_form_data.py index e4300fab..426c7e13 100644 --- a/rootly_sdk/models/new_custom_form_data.py +++ b/rootly_sdk/models/new_custom_form_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewCustomFormData: """ type_: NewCustomFormDataType - attributes: "NewCustomFormDataAttributes" + attributes: NewCustomFormDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_custom_form_data_attributes.py b/rootly_sdk/models/new_custom_form_data_attributes.py index 16f790b6..747cac35 100644 --- a/rootly_sdk/models/new_custom_form_data_attributes.py +++ b/rootly_sdk/models/new_custom_form_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -14,21 +16,21 @@ class NewCustomFormDataAttributes: Attributes: name (str): The name of the custom form. command (str): The Slack command used to trigger this form. - description (Union[None, Unset, str]): - enabled (Union[Unset, bool]): + description (None | str | Unset): + enabled (bool | Unset): """ name: str command: str - description: None | Unset | str = UNSET - enabled: Unset | bool = UNSET + description: None | str | Unset = UNSET + enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name command = self.command - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -58,12 +60,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: command = d.pop("command") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/new_dashboard.py b/rootly_sdk/models/new_dashboard.py index 83310749..108a2f0f 100644 --- a/rootly_sdk/models/new_dashboard.py +++ b/rootly_sdk/models/new_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewDashboard: data (NewDashboardData): """ - data: "NewDashboardData" + data: NewDashboardData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_dashboard_data.py b/rootly_sdk/models/new_dashboard_data.py index 36644464..b4f8d6aa 100644 --- a/rootly_sdk/models/new_dashboard_data.py +++ b/rootly_sdk/models/new_dashboard_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewDashboardData: """ type_: NewDashboardDataType - attributes: "NewDashboardDataAttributes" + attributes: NewDashboardDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_dashboard_data_attributes.py b/rootly_sdk/models/new_dashboard_data_attributes.py index 81e91767..95617d9a 100644 --- a/rootly_sdk/models/new_dashboard_data_attributes.py +++ b/rootly_sdk/models/new_dashboard_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -26,31 +28,31 @@ class NewDashboardDataAttributes: Attributes: name (str): The name of the dashboard owner (NewDashboardDataAttributesOwner): The owner type of the dashboard - description (Union[None, Unset, str]): The description of the dashboard - public (Union[Unset, bool]): Whether the dashboard is public - range_ (Union[None, Unset, str]): The date range for dashboard panel data - auto_refresh (Union[Unset, bool]): Whether the dashboard auto-updates the UI with new data. - color (Union[Unset, NewDashboardDataAttributesColor]): The hex color of the dashboard - icon (Union[Unset, str]): The emoji icon of the dashboard - period (Union[Unset, NewDashboardDataAttributesPeriod]): The grouping period for dashboard panel data + description (None | str | Unset): The description of the dashboard + public (bool | Unset): Whether the dashboard is public + range_ (None | str | Unset): The date range for dashboard panel data + auto_refresh (bool | Unset): Whether the dashboard auto-updates the UI with new data. + color (NewDashboardDataAttributesColor | Unset): The hex color of the dashboard + icon (str | Unset): The emoji icon of the dashboard + period (NewDashboardDataAttributesPeriod | Unset): The grouping period for dashboard panel data """ name: str owner: NewDashboardDataAttributesOwner - description: None | Unset | str = UNSET - public: Unset | bool = UNSET - range_: None | Unset | str = UNSET - auto_refresh: Unset | bool = UNSET - color: Unset | NewDashboardDataAttributesColor = UNSET - icon: Unset | str = UNSET - period: Unset | NewDashboardDataAttributesPeriod = UNSET + description: None | str | Unset = UNSET + public: bool | Unset = UNSET + range_: None | str | Unset = UNSET + auto_refresh: bool | Unset = UNSET + color: NewDashboardDataAttributesColor | Unset = UNSET + icon: str | Unset = UNSET + period: NewDashboardDataAttributesPeriod | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name owner: str = self.owner - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -58,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: public = self.public - range_: None | Unset | str + range_: None | str | Unset if isinstance(self.range_, Unset): range_ = UNSET else: @@ -66,13 +68,13 @@ def to_dict(self) -> dict[str, Any]: auto_refresh = self.auto_refresh - color: Unset | str = UNSET + color: str | Unset = UNSET if not isinstance(self.color, Unset): color = self.color icon = self.icon - period: Unset | str = UNSET + period: str | Unset = UNSET if not isinstance(self.period, Unset): period = self.period @@ -108,30 +110,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: owner = check_new_dashboard_data_attributes_owner(d.pop("owner")) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) public = d.pop("public", UNSET) - def _parse_range_(data: object) -> None | Unset | str: + def _parse_range_(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) range_ = _parse_range_(d.pop("range", UNSET)) auto_refresh = d.pop("auto_refresh", UNSET) _color = d.pop("color", UNSET) - color: Unset | NewDashboardDataAttributesColor + color: NewDashboardDataAttributesColor | Unset if isinstance(_color, Unset): color = UNSET else: @@ -140,7 +142,7 @@ def _parse_range_(data: object) -> None | Unset | str: icon = d.pop("icon", UNSET) _period = d.pop("period", UNSET) - period: Unset | NewDashboardDataAttributesPeriod + period: NewDashboardDataAttributesPeriod | Unset if isinstance(_period, Unset): period = UNSET else: diff --git a/rootly_sdk/models/new_dashboard_panel.py b/rootly_sdk/models/new_dashboard_panel.py index 1d97f0c7..5683778a 100644 --- a/rootly_sdk/models/new_dashboard_panel.py +++ b/rootly_sdk/models/new_dashboard_panel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewDashboardPanel: data (NewDashboardPanelData): """ - data: "NewDashboardPanelData" + data: NewDashboardPanelData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_dashboard_panel_data.py b/rootly_sdk/models/new_dashboard_panel_data.py index 78a4f6cf..28985bdf 100644 --- a/rootly_sdk/models/new_dashboard_panel_data.py +++ b/rootly_sdk/models/new_dashboard_panel_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewDashboardPanelData: """ type_: NewDashboardPanelDataType - attributes: "NewDashboardPanelDataAttributes" + attributes: NewDashboardPanelDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes.py b/rootly_sdk/models/new_dashboard_panel_data_attributes.py index 26381827..3571d9eb 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -20,13 +22,13 @@ class NewDashboardPanelDataAttributes: """ Attributes: params (NewDashboardPanelDataAttributesParams): - name (Union[None, Unset, str]): The name of the dashboard_panel - position (Union['NewDashboardPanelDataAttributesPositionType0', None, Unset]): + name (None | str | Unset): The name of the dashboard_panel + position (NewDashboardPanelDataAttributesPositionType0 | None | Unset): """ - params: "NewDashboardPanelDataAttributesParams" - name: None | Unset | str = UNSET - position: Union["NewDashboardPanelDataAttributesPositionType0", None, Unset] = UNSET + params: NewDashboardPanelDataAttributesParams + name: None | str | Unset = UNSET + position: NewDashboardPanelDataAttributesPositionType0 | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_dashboard_panel_data_attributes_position_type_0 import ( @@ -35,13 +37,13 @@ def to_dict(self) -> dict[str, Any]: params = self.params.to_dict() - name: None | Unset | str + name: None | str | Unset if isinstance(self.name, Unset): name = UNSET else: name = self.name - position: None | Unset | dict[str, Any] + position: dict[str, Any] | None | Unset if isinstance(self.position, Unset): position = UNSET elif isinstance(self.position, NewDashboardPanelDataAttributesPositionType0): @@ -73,16 +75,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) params = NewDashboardPanelDataAttributesParams.from_dict(d.pop("params")) - def _parse_name(data: object) -> None | Unset | str: + def _parse_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) name = _parse_name(d.pop("name", UNSET)) - def _parse_position(data: object) -> Union["NewDashboardPanelDataAttributesPositionType0", None, Unset]: + def _parse_position(data: object) -> NewDashboardPanelDataAttributesPositionType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -93,9 +95,9 @@ def _parse_position(data: object) -> Union["NewDashboardPanelDataAttributesPosit position_type_0 = NewDashboardPanelDataAttributesPositionType0.from_dict(data) return position_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewDashboardPanelDataAttributesPositionType0", None, Unset], data) + return cast(NewDashboardPanelDataAttributesPositionType0 | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py index 866c7b91..3bb4b26d 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,42 +29,42 @@ class NewDashboardPanelDataAttributesParams: """ Attributes: - display (Union[Unset, NewDashboardPanelDataAttributesParamsDisplay]): - description (Union[Unset, str]): - table_fields (Union[Unset, list[str]]): - legend (Union[Unset, NewDashboardPanelDataAttributesParamsLegend]): - datalabels (Union[Unset, NewDashboardPanelDataAttributesParamsDatalabels]): - datasets (Union[Unset, list['NewDashboardPanelDataAttributesParamsDatasetsItem']]): + display (NewDashboardPanelDataAttributesParamsDisplay | Unset): + description (str | Unset): + table_fields (list[str] | Unset): + legend (NewDashboardPanelDataAttributesParamsLegend | Unset): + datalabels (NewDashboardPanelDataAttributesParamsDatalabels | Unset): + datasets (list[NewDashboardPanelDataAttributesParamsDatasetsItem] | Unset): """ - display: Unset | NewDashboardPanelDataAttributesParamsDisplay = UNSET - description: Unset | str = UNSET - table_fields: Unset | list[str] = UNSET - legend: Union[Unset, "NewDashboardPanelDataAttributesParamsLegend"] = UNSET - datalabels: Union[Unset, "NewDashboardPanelDataAttributesParamsDatalabels"] = UNSET - datasets: Unset | list["NewDashboardPanelDataAttributesParamsDatasetsItem"] = UNSET + display: NewDashboardPanelDataAttributesParamsDisplay | Unset = UNSET + description: str | Unset = UNSET + table_fields: list[str] | Unset = UNSET + legend: NewDashboardPanelDataAttributesParamsLegend | Unset = UNSET + datalabels: NewDashboardPanelDataAttributesParamsDatalabels | Unset = UNSET + datasets: list[NewDashboardPanelDataAttributesParamsDatasetsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - display: Unset | str = UNSET + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display description = self.description - table_fields: Unset | list[str] = UNSET + table_fields: list[str] | Unset = UNSET if not isinstance(self.table_fields, Unset): table_fields = self.table_fields - legend: Unset | dict[str, Any] = UNSET + legend: dict[str, Any] | Unset = UNSET if not isinstance(self.legend, Unset): legend = self.legend.to_dict() - datalabels: Unset | dict[str, Any] = UNSET + datalabels: dict[str, Any] | Unset = UNSET if not isinstance(self.datalabels, Unset): datalabels = self.datalabels.to_dict() - datasets: Unset | list[dict[str, Any]] = UNSET + datasets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.datasets, Unset): datasets = [] for datasets_item_data in self.datasets: @@ -101,7 +103,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _display = d.pop("display", UNSET) - display: Unset | NewDashboardPanelDataAttributesParamsDisplay + display: NewDashboardPanelDataAttributesParamsDisplay | Unset if isinstance(_display, Unset): display = UNSET else: @@ -112,25 +114,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: table_fields = cast(list[str], d.pop("table_fields", UNSET)) _legend = d.pop("legend", UNSET) - legend: Unset | NewDashboardPanelDataAttributesParamsLegend + legend: NewDashboardPanelDataAttributesParamsLegend | Unset if isinstance(_legend, Unset): legend = UNSET else: legend = NewDashboardPanelDataAttributesParamsLegend.from_dict(_legend) _datalabels = d.pop("datalabels", UNSET) - datalabels: Unset | NewDashboardPanelDataAttributesParamsDatalabels + datalabels: NewDashboardPanelDataAttributesParamsDatalabels | Unset if isinstance(_datalabels, Unset): datalabels = UNSET else: datalabels = NewDashboardPanelDataAttributesParamsDatalabels.from_dict(_datalabels) - datasets = [] _datasets = d.pop("datasets", UNSET) - for datasets_item_data in _datasets or []: - datasets_item = NewDashboardPanelDataAttributesParamsDatasetsItem.from_dict(datasets_item_data) + datasets: list[NewDashboardPanelDataAttributesParamsDatasetsItem] | Unset = UNSET + if _datasets is not UNSET: + datasets = [] + for datasets_item_data in _datasets: + datasets_item = NewDashboardPanelDataAttributesParamsDatasetsItem.from_dict(datasets_item_data) - datasets.append(datasets_item) + datasets.append(datasets_item) new_dashboard_panel_data_attributes_params = cls( display=display, diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datalabels.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datalabels.py index 2293464d..adb508ca 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datalabels.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datalabels.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class NewDashboardPanelDataAttributesParamsDatalabels: """ Attributes: - enabled (Union[Unset, bool]): + enabled (bool | Unset): """ - enabled: Unset | bool = UNSET + enabled: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item.py index 64e20254..5e2ae7c9 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,18 +31,18 @@ class NewDashboardPanelDataAttributesParamsDatasetsItem: """ Attributes: - name (Union[None, Unset, str]): - collection (Union[Unset, NewDashboardPanelDataAttributesParamsDatasetsItemCollection]): - filter_ (Union[Unset, list['NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem']]): - group_by (Union['NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0', None, Unset, str]): - aggregate (Union['NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0', None, Unset]): + name (None | str | Unset): + collection (NewDashboardPanelDataAttributesParamsDatasetsItemCollection | Unset): + filter_ (list[NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem] | Unset): + group_by (NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0 | None | str | Unset): + aggregate (NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0 | None | Unset): """ - name: None | Unset | str = UNSET - collection: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemCollection = UNSET - filter_: Unset | list["NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem"] = UNSET - group_by: Union["NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0", None, Unset, str] = UNSET - aggregate: Union["NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0", None, Unset] = UNSET + name: None | str | Unset = UNSET + collection: NewDashboardPanelDataAttributesParamsDatasetsItemCollection | Unset = UNSET + filter_: list[NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem] | Unset = UNSET + group_by: NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0 | None | str | Unset = UNSET + aggregate: NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0 | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,24 +53,24 @@ def to_dict(self) -> dict[str, Any]: NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, ) - name: None | Unset | str + name: None | str | Unset if isinstance(self.name, Unset): name = UNSET else: name = self.name - collection: Unset | str = UNSET + collection: str | Unset = UNSET if not isinstance(self.collection, Unset): collection = self.collection - filter_: Unset | list[dict[str, Any]] = UNSET + filter_: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.filter_, Unset): filter_ = [] for filter_item_data in self.filter_: filter_item = filter_item_data.to_dict() filter_.append(filter_item) - group_by: None | Unset | dict[str, Any] | str + group_by: dict[str, Any] | None | str | Unset if isinstance(self.group_by, Unset): group_by = UNSET elif isinstance(self.group_by, NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0): @@ -76,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: else: group_by = self.group_by - aggregate: None | Unset | dict[str, Any] + aggregate: dict[str, Any] | None | Unset if isinstance(self.aggregate, Unset): aggregate = UNSET elif isinstance(self.aggregate, NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0): @@ -114,32 +116,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_name(data: object) -> None | Unset | str: + def _parse_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) name = _parse_name(d.pop("name", UNSET)) _collection = d.pop("collection", UNSET) - collection: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemCollection + collection: NewDashboardPanelDataAttributesParamsDatasetsItemCollection | Unset if isinstance(_collection, Unset): collection = UNSET else: collection = check_new_dashboard_panel_data_attributes_params_datasets_item_collection(_collection) - filter_ = [] _filter_ = d.pop("filter", UNSET) - for filter_item_data in _filter_ or []: - filter_item = NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem.from_dict(filter_item_data) + filter_: list[NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem] | Unset = UNSET + if _filter_ is not UNSET: + filter_ = [] + for filter_item_data in _filter_: + filter_item = NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem.from_dict(filter_item_data) - filter_.append(filter_item) + filter_.append(filter_item) def _parse_group_by( data: object, - ) -> Union["NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0", None, Unset, str]: + ) -> NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0 | None | str | Unset: if data is None: return data if isinstance(data, Unset): @@ -152,17 +156,15 @@ def _parse_group_by( ) return group_by_type_1_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - Union["NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0", None, Unset, str], data - ) + return cast(NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0 | None | str | Unset, data) group_by = _parse_group_by(d.pop("group_by", UNSET)) def _parse_aggregate( data: object, - ) -> Union["NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0", None, Unset]: + ) -> NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -173,9 +175,9 @@ def _parse_aggregate( aggregate_type_0 = NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0.from_dict(data) return aggregate_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0", None, Unset], data) + return cast(NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0 | None | Unset, data) aggregate = _parse_aggregate(d.pop("aggregate", UNSET)) diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py index a92aa09f..e3ed83f7 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,28 +19,28 @@ class NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0: """ Attributes: - operation (Union[Unset, NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation]): - key (Union[None, Unset, str]): - cumulative (Union[None, Unset, bool]): + operation (NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation | Unset): + key (None | str | Unset): + cumulative (bool | None | Unset): """ - operation: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation = UNSET - key: None | Unset | str = UNSET - cumulative: None | Unset | bool = UNSET + operation: NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation | Unset = UNSET + key: None | str | Unset = UNSET + cumulative: bool | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - key: None | Unset | str + key: None | str | Unset if isinstance(self.key, Unset): key = UNSET else: key = self.key - cumulative: None | Unset | bool + cumulative: bool | None | Unset if isinstance(self.cumulative, Unset): cumulative = UNSET else: @@ -60,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation + operation: NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation | Unset if isinstance(_operation, Unset): operation = UNSET else: @@ -68,21 +70,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _operation ) - def _parse_key(data: object) -> None | Unset | str: + def _parse_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) key = _parse_key(d.pop("key", UNSET)) - def _parse_cumulative(data: object) -> None | Unset | bool: + def _parse_cumulative(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) cumulative = _parse_cumulative(d.pop("cumulative", UNSET)) diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py index 628c4993..eba2d965 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,20 +25,20 @@ class NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem: """ Attributes: - operation (Union[Unset, NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation]): - rules (Union[Unset, list['NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem']]): + operation (NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation | Unset): + rules (list[NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem] | Unset): """ - operation: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation = UNSET - rules: Unset | list["NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem"] = UNSET + operation: NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation | Unset = UNSET + rules: list[NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -61,18 +63,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation + operation: NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation | Unset if isinstance(_operation, Unset): operation = UNSET else: operation = check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation(_operation) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem.from_dict(rules_item_data) + rules: list[NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem.from_dict( + rules_item_data + ) - rules.append(rules_item) + rules.append(rules_item) new_dashboard_panel_data_attributes_params_datasets_item_filter_item = cls( operation=operation, diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py index 64adb14c..1e50dd93 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,24 +23,24 @@ class NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem: """ Attributes: - operation (Union[Unset, NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation]): - condition (Union[Unset, NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition]): - key (Union[Unset, str]): - value (Union[Unset, str]): + operation (NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation | Unset): + condition (NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition | Unset): + key (str | Unset): + value (str | Unset): """ - operation: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation = UNSET - condition: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition = UNSET - key: Unset | str = UNSET - value: Unset | str = UNSET + operation: NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation | Unset = UNSET + condition: NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition | Unset = UNSET + key: str | Unset = UNSET + value: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - condition: Unset | str = UNSET + condition: str | Unset = UNSET if not isinstance(self.condition, Unset): condition = self.condition @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation + operation: NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation | Unset if isinstance(_operation, Unset): operation = UNSET else: @@ -73,7 +75,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _condition = d.pop("condition", UNSET) - condition: Unset | NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition + condition: NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition | Unset if isinstance(_condition, Unset): condition = UNSET else: diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py index baa6f0ba..7119aaa4 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py index 1c0d102d..bfe98211 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py @@ -1,10 +1,13 @@ from typing import Literal, cast -NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key = Literal["custom_field", "incident_role"] +NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key = Literal[ + "alert_field", "custom_field", "incident_role" +] NEW_DASHBOARD_PANEL_DATA_ATTRIBUTES_PARAMS_DATASETS_ITEM_GROUP_BY_TYPE_1_TYPE_0_KEY_VALUES: set[ NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key ] = { + "alert_field", "custom_field", "incident_role", } diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_legend.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_legend.py index 2b500d0d..7628e602 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params_legend.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params_legend.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,14 +19,14 @@ class NewDashboardPanelDataAttributesParamsLegend: """ Attributes: - groups (Union[Unset, NewDashboardPanelDataAttributesParamsLegendGroups]): Default: 'all'. + groups (NewDashboardPanelDataAttributesParamsLegendGroups | Unset): Default: 'all'. """ - groups: Unset | NewDashboardPanelDataAttributesParamsLegendGroups = "all" + groups: NewDashboardPanelDataAttributesParamsLegendGroups | Unset = "all" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - groups: Unset | str = UNSET + groups: str | Unset = UNSET if not isinstance(self.groups, Unset): groups = self.groups @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _groups = d.pop("groups", UNSET) - groups: Unset | NewDashboardPanelDataAttributesParamsLegendGroups + groups: NewDashboardPanelDataAttributesParamsLegendGroups | Unset if isinstance(_groups, Unset): groups = UNSET else: diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes_position_type_0.py b/rootly_sdk/models/new_dashboard_panel_data_attributes_position_type_0.py index bc42d2ce..4937e4d2 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_position_type_0.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_position_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_edge_connector.py b/rootly_sdk/models/new_edge_connector.py index c6ec30be..ad031287 100644 --- a/rootly_sdk/models/new_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewEdgeConnector: edge_connector (NewEdgeConnectorEdgeConnector): """ - edge_connector: "NewEdgeConnectorEdgeConnector" + edge_connector: NewEdgeConnectorEdgeConnector additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_edge_connector_action.py b/rootly_sdk/models/new_edge_connector_action.py index 3312bc3c..83cba905 100644 --- a/rootly_sdk/models/new_edge_connector_action.py +++ b/rootly_sdk/models/new_edge_connector_action.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewEdgeConnectorAction: action (NewEdgeConnectorActionAction): """ - action: "NewEdgeConnectorActionAction" + action: NewEdgeConnectorActionAction additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_edge_connector_action_action.py b/rootly_sdk/models/new_edge_connector_action_action.py index 0d749327..de102e90 100644 --- a/rootly_sdk/models/new_edge_connector_action_action.py +++ b/rootly_sdk/models/new_edge_connector_action_action.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,12 +25,12 @@ class NewEdgeConnectorActionAction: Attributes: name (str): Action name action_type (NewEdgeConnectorActionActionActionType): Action type - metadata (Union[Unset, NewEdgeConnectorActionActionMetadata]): + metadata (NewEdgeConnectorActionActionMetadata | Unset): """ name: str action_type: NewEdgeConnectorActionActionActionType - metadata: Union[Unset, "NewEdgeConnectorActionActionMetadata"] = UNSET + metadata: NewEdgeConnectorActionActionMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: action_type: str = self.action_type - metadata: Unset | dict[str, Any] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_type = check_new_edge_connector_action_action_action_type(d.pop("action_type")) _metadata = d.pop("metadata", UNSET) - metadata: Unset | NewEdgeConnectorActionActionMetadata + metadata: NewEdgeConnectorActionActionMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/rootly_sdk/models/new_edge_connector_action_action_metadata.py b/rootly_sdk/models/new_edge_connector_action_action_metadata.py index 2af21e6c..19cb7566 100644 --- a/rootly_sdk/models/new_edge_connector_action_action_metadata.py +++ b/rootly_sdk/models/new_edge_connector_action_action_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -23,36 +25,36 @@ class NewEdgeConnectorActionActionMetadata: """ Attributes: - description (Union[None, Unset, str]): - timeout (Union[None, Unset, int]): - icon (Union[Unset, NewEdgeConnectorActionActionMetadataIcon]): - parameters (Union[None, Unset, list['NewEdgeConnectorActionActionMetadataParametersType0Item']]): + description (None | str | Unset): + timeout (int | None | Unset): + icon (NewEdgeConnectorActionActionMetadataIcon | Unset): + parameters (list[NewEdgeConnectorActionActionMetadataParametersType0Item] | None | Unset): """ - description: None | Unset | str = UNSET - timeout: None | Unset | int = UNSET - icon: Unset | NewEdgeConnectorActionActionMetadataIcon = UNSET - parameters: None | Unset | list["NewEdgeConnectorActionActionMetadataParametersType0Item"] = UNSET + description: None | str | Unset = UNSET + timeout: int | None | Unset = UNSET + icon: NewEdgeConnectorActionActionMetadataIcon | Unset = UNSET + parameters: list[NewEdgeConnectorActionActionMetadataParametersType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - timeout: None | Unset | int + timeout: int | None | Unset if isinstance(self.timeout, Unset): timeout = UNSET else: timeout = self.timeout - icon: Unset | str = UNSET + icon: str | Unset = UNSET if not isinstance(self.icon, Unset): icon = self.icon - parameters: None | Unset | list[dict[str, Any]] + parameters: list[dict[str, Any]] | None | Unset if isinstance(self.parameters, Unset): parameters = UNSET elif isinstance(self.parameters, list): @@ -86,26 +88,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_timeout(data: object) -> None | Unset | int: + def _parse_timeout(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) timeout = _parse_timeout(d.pop("timeout", UNSET)) _icon = d.pop("icon", UNSET) - icon: Unset | NewEdgeConnectorActionActionMetadataIcon + icon: NewEdgeConnectorActionActionMetadataIcon | Unset if isinstance(_icon, Unset): icon = UNSET else: @@ -113,7 +115,7 @@ def _parse_timeout(data: object) -> None | Unset | int: def _parse_parameters( data: object, - ) -> None | Unset | list["NewEdgeConnectorActionActionMetadataParametersType0Item"]: + ) -> list[NewEdgeConnectorActionActionMetadataParametersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -131,9 +133,9 @@ def _parse_parameters( parameters_type_0.append(parameters_type_0_item) return parameters_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewEdgeConnectorActionActionMetadataParametersType0Item"], data) + return cast(list[NewEdgeConnectorActionActionMetadataParametersType0Item] | None | Unset, data) parameters = _parse_parameters(d.pop("parameters", UNSET)) diff --git a/rootly_sdk/models/new_edge_connector_action_action_metadata_parameters_type_0_item.py b/rootly_sdk/models/new_edge_connector_action_action_metadata_parameters_type_0_item.py index 3d886db6..0cce53dd 100644 --- a/rootly_sdk/models/new_edge_connector_action_action_metadata_parameters_type_0_item.py +++ b/rootly_sdk/models/new_edge_connector_action_action_metadata_parameters_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,44 +19,44 @@ class NewEdgeConnectorActionActionMetadataParametersType0Item: """ Attributes: - name (Union[Unset, str]): - type_ (Union[Unset, NewEdgeConnectorActionActionMetadataParametersType0ItemType]): - required (Union[Unset, bool]): - description (Union[None, Unset, str]): - default (Union[None, Unset, str]): Default value (any type) - options (Union[None, Unset, list[str]]): + name (str | Unset): + type_ (NewEdgeConnectorActionActionMetadataParametersType0ItemType | Unset): + required (bool | Unset): + description (None | str | Unset): + default (None | str | Unset): Default value (any type) + options (list[str] | None | Unset): """ - name: Unset | str = UNSET - type_: Unset | NewEdgeConnectorActionActionMetadataParametersType0ItemType = UNSET - required: Unset | bool = UNSET - description: None | Unset | str = UNSET - default: None | Unset | str = UNSET - options: None | Unset | list[str] = UNSET + name: str | Unset = UNSET + type_: NewEdgeConnectorActionActionMetadataParametersType0ItemType | Unset = UNSET + required: bool | Unset = UNSET + description: None | str | Unset = UNSET + default: None | str | Unset = UNSET + options: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ required = self.required - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - default: None | Unset | str + default: None | str | Unset if isinstance(self.default, Unset): default = UNSET else: default = self.default - options: None | Unset | list[str] + options: list[str] | None | Unset if isinstance(self.options, Unset): options = UNSET elif isinstance(self.options, list): @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | NewEdgeConnectorActionActionMetadataParametersType0ItemType + type_: NewEdgeConnectorActionActionMetadataParametersType0ItemType | Unset if isinstance(_type_, Unset): type_ = UNSET else: @@ -95,25 +97,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: required = d.pop("required", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_default(data: object) -> None | Unset | str: + def _parse_default(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) default = _parse_default(d.pop("default", UNSET)) - def _parse_options(data: object) -> None | Unset | list[str]: + def _parse_options(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -124,9 +126,9 @@ def _parse_options(data: object) -> None | Unset | list[str]: options_type_0 = cast(list[str], data) return options_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) options = _parse_options(d.pop("options", UNSET)) diff --git a/rootly_sdk/models/new_edge_connector_edge_connector.py b/rootly_sdk/models/new_edge_connector_edge_connector.py index 1a8c5d5c..c5d16dd9 100644 --- a/rootly_sdk/models/new_edge_connector_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector_edge_connector.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,31 +20,31 @@ class NewEdgeConnectorEdgeConnector: """ Attributes: name (str): Connector name - description (Union[None, Unset, str]): Connector description - status (Union[Unset, NewEdgeConnectorEdgeConnectorStatus]): Connector status - subscriptions (Union[Unset, list[str]]): Array of event types to subscribe to + description (None | str | Unset): Connector description + status (NewEdgeConnectorEdgeConnectorStatus | Unset): Connector status + subscriptions (list[str] | Unset): Array of event types to subscribe to """ name: str - description: None | Unset | str = UNSET - status: Unset | NewEdgeConnectorEdgeConnectorStatus = UNSET - subscriptions: Unset | list[str] = UNSET + description: None | str | Unset = UNSET + status: NewEdgeConnectorEdgeConnectorStatus | Unset = UNSET + subscriptions: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - subscriptions: Unset | list[str] = UNSET + subscriptions: list[str] | Unset = UNSET if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions @@ -67,17 +69,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _status = d.pop("status", UNSET) - status: Unset | NewEdgeConnectorEdgeConnectorStatus + status: NewEdgeConnectorEdgeConnectorStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/rootly_sdk/models/new_environment.py b/rootly_sdk/models/new_environment.py index d79e5a31..2f201db7 100644 --- a/rootly_sdk/models/new_environment.py +++ b/rootly_sdk/models/new_environment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewEnvironment: data (NewEnvironmentData): """ - data: "NewEnvironmentData" + data: NewEnvironmentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_environment_data.py b/rootly_sdk/models/new_environment_data.py index 4408f696..c460b14e 100644 --- a/rootly_sdk/models/new_environment_data.py +++ b/rootly_sdk/models/new_environment_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewEnvironmentData: """ type_: NewEnvironmentDataType - attributes: "NewEnvironmentDataAttributes" + attributes: NewEnvironmentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_environment_data_attributes.py b/rootly_sdk/models/new_environment_data_attributes.py index 2ceb1445..d86a5dfe 100644 --- a/rootly_sdk/models/new_environment_data_attributes.py +++ b/rootly_sdk/models/new_environment_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.new_environment_data_attributes_fields_item import NewEnvironmentDataAttributesFieldsItem + from ..models.new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem from ..models.new_environment_data_attributes_slack_aliases_type_0_item import ( NewEnvironmentDataAttributesSlackAliasesType0Item, ) @@ -23,49 +25,49 @@ class NewEnvironmentDataAttributes: """ Attributes: name (str): The name of the environment - description (Union[None, Unset, str]): The description of the environment - color (Union[None, Unset, str]): The hex color of the environment - position (Union[None, Unset, int]): Position of the environment - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the environment - slack_channels (Union[None, Unset, list['NewEnvironmentDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this environment - slack_aliases (Union[None, Unset, list['NewEnvironmentDataAttributesSlackAliasesType0Item']]): Slack Aliases + description (None | str | Unset): The description of the environment + color (None | str | Unset): The hex color of the environment + position (int | None | Unset): Position of the environment + notify_emails (list[str] | None | Unset): Emails to attach to the environment + slack_channels (list[NewEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this environment - fields (Union[Unset, list['NewEnvironmentDataAttributesFieldsItem']]): Array of field values for this + slack_aliases (list[NewEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated + with this environment + properties (list[NewEnvironmentDataAttributesPropertiesItem] | Unset): Array of property values for this environment. """ name: str - description: None | Unset | str = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["NewEnvironmentDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["NewEnvironmentDataAttributesSlackAliasesType0Item"] = UNSET - fields: Unset | list["NewEnvironmentDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[NewEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[NewEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + properties: list[NewEnvironmentDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -86,7 +88,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -98,12 +100,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -124,14 +126,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.new_environment_data_attributes_fields_item import NewEnvironmentDataAttributesFieldsItem + from ..models.new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem from ..models.new_environment_data_attributes_slack_aliases_type_0_item import ( NewEnvironmentDataAttributesSlackAliasesType0Item, ) @@ -142,34 +144,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -180,15 +182,15 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["NewEnvironmentDataAttributesSlackChannelsType0Item"]: + ) -> list[NewEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -206,15 +208,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewEnvironmentDataAttributesSlackChannelsType0Item"], data) + return cast(list[NewEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["NewEnvironmentDataAttributesSlackAliasesType0Item"]: + ) -> list[NewEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -232,18 +234,20 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewEnvironmentDataAttributesSlackAliasesType0Item"], data) + return cast(list[NewEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewEnvironmentDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewEnvironmentDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewEnvironmentDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_environment_data_attributes = cls( name=name, @@ -253,7 +257,7 @@ def _parse_slack_aliases( notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) return new_environment_data_attributes diff --git a/rootly_sdk/models/update_incident_type_data_attributes_fields_item.py b/rootly_sdk/models/new_environment_data_attributes_properties_item.py similarity index 62% rename from rootly_sdk/models/update_incident_type_data_attributes_fields_item.py rename to rootly_sdk/models/new_environment_data_attributes_properties_item.py index 92212e6e..417ca4ce 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes_fields_item.py +++ b/rootly_sdk/models/new_environment_data_attributes_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="UpdateIncidentTypeDataAttributesFieldsItem") +T = TypeVar("T", bound="NewEnvironmentDataAttributesPropertiesItem") @_attrs_define -class UpdateIncidentTypeDataAttributesFieldsItem: - """Set a value for a catalog field +class NewEnvironmentDataAttributesPropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - update_incident_type_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + new_environment_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - update_incident_type_data_attributes_fields_item.additional_properties = d - return update_incident_type_data_attributes_fields_item + new_environment_data_attributes_properties_item.additional_properties = d + return new_environment_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/new_environment_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/new_environment_data_attributes_slack_aliases_type_0_item.py index c59113a3..cc449822 100644 --- a/rootly_sdk/models/new_environment_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/new_environment_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_environment_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/new_environment_data_attributes_slack_channels_type_0_item.py index fef9736b..49ec61b3 100644 --- a/rootly_sdk/models/new_environment_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/new_environment_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_escalation_policy.py b/rootly_sdk/models/new_escalation_policy.py index 3145c93b..60d3191b 100644 --- a/rootly_sdk/models/new_escalation_policy.py +++ b/rootly_sdk/models/new_escalation_policy.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewEscalationPolicy: data (NewEscalationPolicyData): """ - data: "NewEscalationPolicyData" + data: NewEscalationPolicyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_escalation_policy_data.py b/rootly_sdk/models/new_escalation_policy_data.py index 7abe00c2..df094d83 100644 --- a/rootly_sdk/models/new_escalation_policy_data.py +++ b/rootly_sdk/models/new_escalation_policy_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewEscalationPolicyData: """ type_: NewEscalationPolicyDataType - attributes: "NewEscalationPolicyDataAttributes" + attributes: NewEscalationPolicyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_escalation_policy_data_attributes.py b/rootly_sdk/models/new_escalation_policy_data_attributes.py index 79022943..ca904842 100644 --- a/rootly_sdk/models/new_escalation_policy_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -19,20 +21,20 @@ class NewEscalationPolicyDataAttributes: """ Attributes: name (str): The name of the escalation policy - description (Union[None, Unset, str]): The description of the escalation policy - repeat_count (Union[Unset, int]): The number of times this policy will be executed until someone acknowledges - the alert - group_ids (Union[Unset, list[str]]): Associated groups (alerting the group will trigger escalation policy) - service_ids (Union[Unset, list[str]]): Associated services (alerting the service will trigger escalation policy) - business_hours (Union['NewEscalationPolicyDataAttributesBusinessHoursType0', None, Unset]): + description (None | str | Unset): The description of the escalation policy + repeat_count (int | Unset): The number of times this policy will be executed until someone acknowledges the + alert + group_ids (list[str] | Unset): Associated groups (alerting the group will trigger escalation policy) + service_ids (list[str] | Unset): Associated services (alerting the service will trigger escalation policy) + business_hours (NewEscalationPolicyDataAttributesBusinessHoursType0 | None | Unset): """ name: str - description: None | Unset | str = UNSET - repeat_count: Unset | int = UNSET - group_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - business_hours: Union["NewEscalationPolicyDataAttributesBusinessHoursType0", None, Unset] = UNSET + description: None | str | Unset = UNSET + repeat_count: int | Unset = UNSET + group_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + business_hours: NewEscalationPolicyDataAttributesBusinessHoursType0 | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_escalation_policy_data_attributes_business_hours_type_0 import ( @@ -41,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -49,15 +51,15 @@ def to_dict(self) -> dict[str, Any]: repeat_count = self.repeat_count - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - business_hours: None | Unset | dict[str, Any] + business_hours: dict[str, Any] | None | Unset if isinstance(self.business_hours, Unset): business_hours = UNSET elif isinstance(self.business_hours, NewEscalationPolicyDataAttributesBusinessHoursType0): @@ -94,12 +96,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -109,9 +111,7 @@ def _parse_description(data: object) -> None | Unset | str: service_ids = cast(list[str], d.pop("service_ids", UNSET)) - def _parse_business_hours( - data: object, - ) -> Union["NewEscalationPolicyDataAttributesBusinessHoursType0", None, Unset]: + def _parse_business_hours(data: object) -> NewEscalationPolicyDataAttributesBusinessHoursType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -122,9 +122,9 @@ def _parse_business_hours( business_hours_type_0 = NewEscalationPolicyDataAttributesBusinessHoursType0.from_dict(data) return business_hours_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewEscalationPolicyDataAttributesBusinessHoursType0", None, Unset], data) + return cast(NewEscalationPolicyDataAttributesBusinessHoursType0 | None | Unset, data) business_hours = _parse_business_hours(d.pop("business_hours", UNSET)) diff --git a/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0.py b/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0.py index 3b974e86..60b5e2e1 100644 --- a/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0.py +++ b/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,25 +23,24 @@ class NewEscalationPolicyDataAttributesBusinessHoursType0: """ Attributes: - time_zone (Union[Unset, NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone]): Time zone for business - hours - days (Union[None, Unset, list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item]]): Business days - start_time (Union[None, Unset, str]): Start time for business hours (HH:MM) - end_time (Union[None, Unset, str]): End time for business hours (HH:MM) + time_zone (NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone | Unset): Time zone for business hours + days (list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset): Business days + start_time (None | str | Unset): Start time for business hours (HH:MM) + end_time (None | str | Unset): End time for business hours (HH:MM) """ - time_zone: Unset | NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone = UNSET - days: None | Unset | list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] = UNSET - start_time: None | Unset | str = UNSET - end_time: None | Unset | str = UNSET + time_zone: NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone | Unset = UNSET + days: list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset = UNSET + start_time: None | str | Unset = UNSET + end_time: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - time_zone: Unset | str = UNSET + time_zone: str | Unset = UNSET if not isinstance(self.time_zone, Unset): time_zone = self.time_zone - days: None | Unset | list[str] + days: list[str] | None | Unset if isinstance(self.days, Unset): days = UNSET elif isinstance(self.days, list): @@ -51,13 +52,13 @@ def to_dict(self) -> dict[str, Any]: else: days = self.days - start_time: None | Unset | str + start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET else: start_time = self.start_time - end_time: None | Unset | str + end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET else: @@ -81,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _time_zone = d.pop("time_zone", UNSET) - time_zone: Unset | NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone + time_zone: NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone | Unset if isinstance(_time_zone, Unset): time_zone = UNSET else: @@ -89,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_days( data: object, - ) -> None | Unset | list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item]: + ) -> list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -109,27 +110,27 @@ def _parse_days( days_type_0.append(days_type_0_item) return days_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item], data) + return cast(list[NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset, data) days = _parse_days(d.pop("days", UNSET)) - def _parse_start_time(data: object) -> None | Unset | str: + def _parse_start_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | Unset | str: + def _parse_end_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py b/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py index ea3722b0..c73cb5a8 100644 --- a/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py +++ b/rootly_sdk/models/new_escalation_policy_data_attributes_business_hours_type_0_time_zone.py @@ -65,6 +65,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -146,6 +147,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -195,6 +197,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -245,6 +248,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", @@ -355,6 +359,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -436,6 +441,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -485,6 +491,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -535,6 +542,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", diff --git a/rootly_sdk/models/new_escalation_policy_level.py b/rootly_sdk/models/new_escalation_policy_level.py index 29fe8142..9564eea6 100644 --- a/rootly_sdk/models/new_escalation_policy_level.py +++ b/rootly_sdk/models/new_escalation_policy_level.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewEscalationPolicyLevel: data (NewEscalationPolicyLevelData): """ - data: "NewEscalationPolicyLevelData" + data: NewEscalationPolicyLevelData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_escalation_policy_level_data.py b/rootly_sdk/models/new_escalation_policy_level_data.py index 519cc25e..2e3a2b6b 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data.py +++ b/rootly_sdk/models/new_escalation_policy_level_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewEscalationPolicyLevelData: """ type_: NewEscalationPolicyLevelDataType - attributes: "NewEscalationPolicyLevelDataAttributes" + attributes: NewEscalationPolicyLevelDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_escalation_policy_level_data_attributes.py b/rootly_sdk/models/new_escalation_policy_level_data_attributes.py index 21c0b214..247dcb2b 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_level_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -27,30 +29,28 @@ class NewEscalationPolicyLevelDataAttributes: """ Attributes: position (int): Position of the escalation policy level - notification_target_params - (list[Union['NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0', None]]): Escalation - level's notification targets - delay (Union[Unset, int]): Delay before notifying targets in the next Escalation Level. - paging_strategy_configuration_strategy (Union[Unset, - NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy]): Default: 'default'. - paging_strategy_configuration_schedule_strategy (Union[Unset, - NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy]): Default: 'on_call_only'. - escalation_policy_path_id (Union[None, Unset, str]): The ID of the dynamic escalation policy path the level will + notification_target_params (list[NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0 | + None]): Escalation level's notification targets + delay (int | Unset): Delay before notifying targets in the next Escalation Level. + paging_strategy_configuration_strategy + (NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy | Unset): Default: 'default'. + paging_strategy_configuration_schedule_strategy + (NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy | Unset): Default: + 'on_call_only'. + escalation_policy_path_id (None | str | Unset): The ID of the dynamic escalation policy path the level will belong to. If nothing is specified it will add the level to your default path. """ position: int - notification_target_params: list[ - Union["NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0", None] - ] - delay: Unset | int = UNSET + notification_target_params: list[NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0 | None] + delay: int | Unset = UNSET paging_strategy_configuration_strategy: ( - Unset | NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy + NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy | Unset ) = "default" paging_strategy_configuration_schedule_strategy: ( - Unset | NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy + NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy | Unset ) = "on_call_only" - escalation_policy_path_id: None | Unset | str = UNSET + escalation_policy_path_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0 import ( @@ -61,7 +61,7 @@ def to_dict(self) -> dict[str, Any]: notification_target_params = [] for notification_target_params_item_data in self.notification_target_params: - notification_target_params_item: None | dict[str, Any] + notification_target_params_item: dict[str, Any] | None if isinstance( notification_target_params_item_data, NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0, @@ -73,15 +73,15 @@ def to_dict(self) -> dict[str, Any]: delay = self.delay - paging_strategy_configuration_strategy: Unset | str = UNSET + paging_strategy_configuration_strategy: str | Unset = UNSET if not isinstance(self.paging_strategy_configuration_strategy, Unset): paging_strategy_configuration_strategy = self.paging_strategy_configuration_strategy - paging_strategy_configuration_schedule_strategy: Unset | str = UNSET + paging_strategy_configuration_schedule_strategy: str | Unset = UNSET if not isinstance(self.paging_strategy_configuration_schedule_strategy, Unset): paging_strategy_configuration_schedule_strategy = self.paging_strategy_configuration_schedule_strategy - escalation_policy_path_id: None | Unset | str + escalation_policy_path_id: None | str | Unset if isinstance(self.escalation_policy_path_id, Unset): escalation_policy_path_id = UNSET else: @@ -123,7 +123,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_notification_target_params_item( data: object, - ) -> Union["NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0", None]: + ) -> NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0 | None: if data is None: return data try: @@ -134,11 +134,9 @@ def _parse_notification_target_params_item( ) return notification_target_params_item_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - Union["NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0", None], data - ) + return cast(NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0 | None, data) notification_target_params_item = _parse_notification_target_params_item( notification_target_params_item_data @@ -150,7 +148,7 @@ def _parse_notification_target_params_item( _paging_strategy_configuration_strategy = d.pop("paging_strategy_configuration_strategy", UNSET) paging_strategy_configuration_strategy: ( - Unset | NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy + NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy | Unset ) if isinstance(_paging_strategy_configuration_strategy, Unset): paging_strategy_configuration_strategy = UNSET @@ -165,7 +163,7 @@ def _parse_notification_target_params_item( "paging_strategy_configuration_schedule_strategy", UNSET ) paging_strategy_configuration_schedule_strategy: ( - Unset | NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy + NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy | Unset ) if isinstance(_paging_strategy_configuration_schedule_strategy, Unset): paging_strategy_configuration_schedule_strategy = UNSET @@ -176,12 +174,12 @@ def _parse_notification_target_params_item( ) ) - def _parse_escalation_policy_path_id(data: object) -> None | Unset | str: + def _parse_escalation_policy_path_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) escalation_policy_path_id = _parse_escalation_policy_path_id(d.pop("escalation_policy_path_id", UNSET)) diff --git a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py index 8148e7db..8a9782da 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py +++ b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -24,13 +26,13 @@ class NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0: id (str): The ID of notification target. If Slack channel, then id of the slack channel (eg. C06Q2JK7RQW) type_ (NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type): The type of the notification target - team_members (Union[Unset, NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers]): - For targets with type=team, controls whether to notify admins, all team members, or escalate to team EP. + team_members (NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset): For + targets with type=team, controls whether to notify admins, all team members, or escalate to team EP. """ id: str type_: NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type - team_members: Unset | NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers = UNSET + team_members: NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: type_: str = self.type_ - team_members: Unset | str = UNSET + team_members: str | Unset = UNSET if not isinstance(self.team_members, Unset): team_members = self.team_members @@ -65,7 +67,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _team_members = d.pop("team_members", UNSET) - team_members: Unset | NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers + team_members: NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset if isinstance(_team_members, Unset): team_members = UNSET else: diff --git a/rootly_sdk/models/new_form_field.py b/rootly_sdk/models/new_form_field.py index 478e6ca9..23c1709b 100644 --- a/rootly_sdk/models/new_form_field.py +++ b/rootly_sdk/models/new_form_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormField: data (NewFormFieldData): """ - data: "NewFormFieldData" + data: NewFormFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_data.py b/rootly_sdk/models/new_form_field_data.py index 029c332a..62d7fcd6 100644 --- a/rootly_sdk/models/new_form_field_data.py +++ b/rootly_sdk/models/new_form_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewFormFieldData: """ type_: NewFormFieldDataType - attributes: "NewFormFieldDataAttributes" + attributes: NewFormFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_data_attributes.py b/rootly_sdk/models/new_form_field_data_attributes.py index ac503d72..b33f425d 100644 --- a/rootly_sdk/models/new_form_field_data_attributes.py +++ b/rootly_sdk/models/new_form_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -26,62 +28,62 @@ class NewFormFieldDataAttributes: Attributes: kind (NewFormFieldDataAttributesKind): The kind of the form field name (str): The name of the form field - input_kind (Union[Unset, NewFormFieldDataAttributesInputKind]): The input kind of the form field - value_kind (Union[Unset, NewFormFieldDataAttributesValueKind]): The value kind of the form field - value_kind_catalog_id (Union[None, Unset, str]): The ID of the catalog used when value_kind is `catalog_entity` - description (Union[None, Unset, str]): The description of the form field - shown (Union[Unset, list[str]]): - required (Union[Unset, list[str]]): - show_on_incident_details (Union[Unset, bool]): Whether the form field is shown on the incident details panel - enabled (Union[Unset, bool]): Whether the form field is enabled - default_values (Union[Unset, list[str]]): - auto_set_by_catalog_field_id (Union[None, Unset, str]): Catalog field ID to auto-set this form field. Only - reference-kind catalog fields are supported. + input_kind (NewFormFieldDataAttributesInputKind | Unset): The input kind of the form field + value_kind (NewFormFieldDataAttributesValueKind | Unset): The value kind of the form field + value_kind_catalog_id (None | str | Unset): The ID of the catalog used when value_kind is `catalog_entity` + description (None | str | Unset): The description of the form field + shown (list[str] | Unset): + required (list[str] | Unset): + show_on_incident_details (bool | Unset): Whether the form field is shown on the incident details panel + enabled (bool | Unset): Whether the form field is enabled + default_values (list[str] | Unset): + auto_set_by_catalog_property_id (None | str | Unset): Catalog property ID to auto-set this form field. Only + reference-kind catalog properties are supported. """ kind: NewFormFieldDataAttributesKind name: str - input_kind: Unset | NewFormFieldDataAttributesInputKind = UNSET - value_kind: Unset | NewFormFieldDataAttributesValueKind = UNSET - value_kind_catalog_id: None | Unset | str = UNSET - description: None | Unset | str = UNSET - shown: Unset | list[str] = UNSET - required: Unset | list[str] = UNSET - show_on_incident_details: Unset | bool = UNSET - enabled: Unset | bool = UNSET - default_values: Unset | list[str] = UNSET - auto_set_by_catalog_field_id: None | Unset | str = UNSET + input_kind: NewFormFieldDataAttributesInputKind | Unset = UNSET + value_kind: NewFormFieldDataAttributesValueKind | Unset = UNSET + value_kind_catalog_id: None | str | Unset = UNSET + description: None | str | Unset = UNSET + shown: list[str] | Unset = UNSET + required: list[str] | Unset = UNSET + show_on_incident_details: bool | Unset = UNSET + enabled: bool | Unset = UNSET + default_values: list[str] | Unset = UNSET + auto_set_by_catalog_property_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: kind: str = self.kind name = self.name - input_kind: Unset | str = UNSET + input_kind: str | Unset = UNSET if not isinstance(self.input_kind, Unset): input_kind = self.input_kind - value_kind: Unset | str = UNSET + value_kind: str | Unset = UNSET if not isinstance(self.value_kind, Unset): value_kind = self.value_kind - value_kind_catalog_id: None | Unset | str + value_kind_catalog_id: None | str | Unset if isinstance(self.value_kind_catalog_id, Unset): value_kind_catalog_id = UNSET else: value_kind_catalog_id = self.value_kind_catalog_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - shown: Unset | list[str] = UNSET + shown: list[str] | Unset = UNSET if not isinstance(self.shown, Unset): shown = self.shown - required: Unset | list[str] = UNSET + required: list[str] | Unset = UNSET if not isinstance(self.required, Unset): required = self.required @@ -89,15 +91,15 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - default_values: Unset | list[str] = UNSET + default_values: list[str] | Unset = UNSET if not isinstance(self.default_values, Unset): default_values = self.default_values - auto_set_by_catalog_field_id: None | Unset | str - if isinstance(self.auto_set_by_catalog_field_id, Unset): - auto_set_by_catalog_field_id = UNSET + auto_set_by_catalog_property_id: None | str | Unset + if isinstance(self.auto_set_by_catalog_property_id, Unset): + auto_set_by_catalog_property_id = UNSET else: - auto_set_by_catalog_field_id = self.auto_set_by_catalog_field_id + auto_set_by_catalog_property_id = self.auto_set_by_catalog_property_id field_dict: dict[str, Any] = {} @@ -125,8 +127,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["enabled"] = enabled if default_values is not UNSET: field_dict["default_values"] = default_values - if auto_set_by_catalog_field_id is not UNSET: - field_dict["auto_set_by_catalog_field_id"] = auto_set_by_catalog_field_id + if auto_set_by_catalog_property_id is not UNSET: + field_dict["auto_set_by_catalog_property_id"] = auto_set_by_catalog_property_id return field_dict @@ -138,34 +140,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") _input_kind = d.pop("input_kind", UNSET) - input_kind: Unset | NewFormFieldDataAttributesInputKind + input_kind: NewFormFieldDataAttributesInputKind | Unset if isinstance(_input_kind, Unset): input_kind = UNSET else: input_kind = check_new_form_field_data_attributes_input_kind(_input_kind) _value_kind = d.pop("value_kind", UNSET) - value_kind: Unset | NewFormFieldDataAttributesValueKind + value_kind: NewFormFieldDataAttributesValueKind | Unset if isinstance(_value_kind, Unset): value_kind = UNSET else: value_kind = check_new_form_field_data_attributes_value_kind(_value_kind) - def _parse_value_kind_catalog_id(data: object) -> None | Unset | str: + def _parse_value_kind_catalog_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value_kind_catalog_id = _parse_value_kind_catalog_id(d.pop("value_kind_catalog_id", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -179,14 +181,16 @@ def _parse_description(data: object) -> None | Unset | str: default_values = cast(list[str], d.pop("default_values", UNSET)) - def _parse_auto_set_by_catalog_field_id(data: object) -> None | Unset | str: + def _parse_auto_set_by_catalog_property_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) - auto_set_by_catalog_field_id = _parse_auto_set_by_catalog_field_id(d.pop("auto_set_by_catalog_field_id", UNSET)) + auto_set_by_catalog_property_id = _parse_auto_set_by_catalog_property_id( + d.pop("auto_set_by_catalog_property_id", UNSET) + ) new_form_field_data_attributes = cls( kind=kind, @@ -200,7 +204,7 @@ def _parse_auto_set_by_catalog_field_id(data: object) -> None | Unset | str: show_on_incident_details=show_on_incident_details, enabled=enabled, default_values=default_values, - auto_set_by_catalog_field_id=auto_set_by_catalog_field_id, + auto_set_by_catalog_property_id=auto_set_by_catalog_property_id, ) return new_form_field_data_attributes diff --git a/rootly_sdk/models/new_form_field_option.py b/rootly_sdk/models/new_form_field_option.py index 79703c57..88305549 100644 --- a/rootly_sdk/models/new_form_field_option.py +++ b/rootly_sdk/models/new_form_field_option.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormFieldOption: data (NewFormFieldOptionData): """ - data: "NewFormFieldOptionData" + data: NewFormFieldOptionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_option_data.py b/rootly_sdk/models/new_form_field_option_data.py index 2f424967..4bd5f1a1 100644 --- a/rootly_sdk/models/new_form_field_option_data.py +++ b/rootly_sdk/models/new_form_field_option_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewFormFieldOptionData: """ type_: NewFormFieldOptionDataType - attributes: "NewFormFieldOptionDataAttributes" + attributes: NewFormFieldOptionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_option_data_attributes.py b/rootly_sdk/models/new_form_field_option_data_attributes.py index 0ea3b51f..b9f918b7 100644 --- a/rootly_sdk/models/new_form_field_option_data_attributes.py +++ b/rootly_sdk/models/new_form_field_option_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,16 +16,16 @@ class NewFormFieldOptionDataAttributes: Attributes: form_field_id (str): The ID of the form field value (str): The value of the form field option - color (Union[Unset, str]): The hex color of the form field option - default (Union[Unset, bool]): - position (Union[Unset, int]): The position of the form field option + color (str | Unset): The hex color of the form field option + default (bool | Unset): + position (int | Unset): The position of the form field option """ form_field_id: str value: str - color: Unset | str = UNSET - default: Unset | bool = UNSET - position: Unset | int = UNSET + color: str | Unset = UNSET + default: bool | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: form_field_id = self.form_field_id diff --git a/rootly_sdk/models/new_form_field_placement.py b/rootly_sdk/models/new_form_field_placement.py index 3f1a430c..0bcb1658 100644 --- a/rootly_sdk/models/new_form_field_placement.py +++ b/rootly_sdk/models/new_form_field_placement.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormFieldPlacement: data (NewFormFieldPlacementData): """ - data: "NewFormFieldPlacementData" + data: NewFormFieldPlacementData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_placement_condition.py b/rootly_sdk/models/new_form_field_placement_condition.py index e70a15e2..bfe8014b 100644 --- a/rootly_sdk/models/new_form_field_placement_condition.py +++ b/rootly_sdk/models/new_form_field_placement_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormFieldPlacementCondition: data (NewFormFieldPlacementConditionData): """ - data: "NewFormFieldPlacementConditionData" + data: NewFormFieldPlacementConditionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_placement_condition_data.py b/rootly_sdk/models/new_form_field_placement_condition_data.py index eb94f22a..76c152f4 100644 --- a/rootly_sdk/models/new_form_field_placement_condition_data.py +++ b/rootly_sdk/models/new_form_field_placement_condition_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewFormFieldPlacementConditionData: """ type_: NewFormFieldPlacementConditionDataType - attributes: "NewFormFieldPlacementConditionDataAttributes" + attributes: NewFormFieldPlacementConditionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_placement_condition_data_attributes.py b/rootly_sdk/models/new_form_field_placement_condition_data_attributes.py index e99d57d1..eef1987c 100644 --- a/rootly_sdk/models/new_form_field_placement_condition_data_attributes.py +++ b/rootly_sdk/models/new_form_field_placement_condition_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -26,14 +28,14 @@ class NewFormFieldPlacementConditionDataAttributes: form_field_id (str): The condition field. comparison (NewFormFieldPlacementConditionDataAttributesComparison): The condition comparison. values (list[str]): The values for comparison. - position (Union[Unset, int]): The condition position. + position (int | Unset): The condition position. """ conditioned: NewFormFieldPlacementConditionDataAttributesConditioned form_field_id: str comparison: NewFormFieldPlacementConditionDataAttributesComparison values: list[str] - position: Unset | int = UNSET + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_placement_data.py b/rootly_sdk/models/new_form_field_placement_data.py index 44210baf..4e2ff019 100644 --- a/rootly_sdk/models/new_form_field_placement_data.py +++ b/rootly_sdk/models/new_form_field_placement_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewFormFieldPlacementData: """ type_: NewFormFieldPlacementDataType - attributes: "NewFormFieldPlacementDataAttributes" + attributes: NewFormFieldPlacementDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_placement_data_attributes.py b/rootly_sdk/models/new_form_field_placement_data_attributes.py index 8b7dafa5..a424cde9 100644 --- a/rootly_sdk/models/new_form_field_placement_data_attributes.py +++ b/rootly_sdk/models/new_form_field_placement_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -23,22 +25,22 @@ class NewFormFieldPlacementDataAttributes: Attributes: form_set_id (str): The form set this field is placed in. form (str): The form this field is placed on. - position (Union[Unset, int]): The position of the field placement. - required (Union[Unset, bool]): Whether the field is unconditionally required on this form. - required_operator (Union[Unset, NewFormFieldPlacementDataAttributesRequiredOperator]): Logical operator when + position (int | Unset): The position of the field placement. + required (bool | Unset): Whether the field is unconditionally required on this form. + required_operator (NewFormFieldPlacementDataAttributesRequiredOperator | Unset): Logical operator when evaluating multiple form_field_placement_conditions with conditioned=required - placement_operator (Union[Unset, NewFormFieldPlacementDataAttributesPlacementOperator]): Logical operator when + placement_operator (NewFormFieldPlacementDataAttributesPlacementOperator | Unset): Logical operator when evaluating multiple form_field_placement_conditions with conditioned=placement - non_editable (Union[Unset, bool]): Whether the field is read-only and cannot be edited by users. + non_editable (bool | Unset): Whether the field is read-only and cannot be edited by users. """ form_set_id: str form: str - position: Unset | int = UNSET - required: Unset | bool = UNSET - required_operator: Unset | NewFormFieldPlacementDataAttributesRequiredOperator = UNSET - placement_operator: Unset | NewFormFieldPlacementDataAttributesPlacementOperator = UNSET - non_editable: Unset | bool = UNSET + position: int | Unset = UNSET + required: bool | Unset = UNSET + required_operator: NewFormFieldPlacementDataAttributesRequiredOperator | Unset = UNSET + placement_operator: NewFormFieldPlacementDataAttributesPlacementOperator | Unset = UNSET + non_editable: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,11 +52,11 @@ def to_dict(self) -> dict[str, Any]: required = self.required - required_operator: Unset | str = UNSET + required_operator: str | Unset = UNSET if not isinstance(self.required_operator, Unset): required_operator = self.required_operator - placement_operator: Unset | str = UNSET + placement_operator: str | Unset = UNSET if not isinstance(self.placement_operator, Unset): placement_operator = self.placement_operator @@ -93,14 +95,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: required = d.pop("required", UNSET) _required_operator = d.pop("required_operator", UNSET) - required_operator: Unset | NewFormFieldPlacementDataAttributesRequiredOperator + required_operator: NewFormFieldPlacementDataAttributesRequiredOperator | Unset if isinstance(_required_operator, Unset): required_operator = UNSET else: required_operator = check_new_form_field_placement_data_attributes_required_operator(_required_operator) _placement_operator = d.pop("placement_operator", UNSET) - placement_operator: Unset | NewFormFieldPlacementDataAttributesPlacementOperator + placement_operator: NewFormFieldPlacementDataAttributesPlacementOperator | Unset if isinstance(_placement_operator, Unset): placement_operator = UNSET else: diff --git a/rootly_sdk/models/new_form_field_position.py b/rootly_sdk/models/new_form_field_position.py index c876c3a3..64dfd111 100644 --- a/rootly_sdk/models/new_form_field_position.py +++ b/rootly_sdk/models/new_form_field_position.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormFieldPosition: data (NewFormFieldPositionData): """ - data: "NewFormFieldPositionData" + data: NewFormFieldPositionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_position_data.py b/rootly_sdk/models/new_form_field_position_data.py index 24542508..d470c33e 100644 --- a/rootly_sdk/models/new_form_field_position_data.py +++ b/rootly_sdk/models/new_form_field_position_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewFormFieldPositionData: """ type_: NewFormFieldPositionDataType - attributes: "NewFormFieldPositionDataAttributes" + attributes: NewFormFieldPositionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_field_position_data_attributes.py b/rootly_sdk/models/new_form_field_position_data_attributes.py index d4037f7f..8bbc0e05 100644 --- a/rootly_sdk/models/new_form_field_position_data_attributes.py +++ b/rootly_sdk/models/new_form_field_position_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_form_set.py b/rootly_sdk/models/new_form_set.py index af5fe62b..f8cc6714 100644 --- a/rootly_sdk/models/new_form_set.py +++ b/rootly_sdk/models/new_form_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormSet: data (NewFormSetData): """ - data: "NewFormSetData" + data: NewFormSetData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_set_condition.py b/rootly_sdk/models/new_form_set_condition.py index 1ca4d3cd..10ca9707 100644 --- a/rootly_sdk/models/new_form_set_condition.py +++ b/rootly_sdk/models/new_form_set_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFormSetCondition: data (NewFormSetConditionData): """ - data: "NewFormSetConditionData" + data: NewFormSetConditionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_set_condition_data.py b/rootly_sdk/models/new_form_set_condition_data.py index f5e62dc1..782a46c9 100644 --- a/rootly_sdk/models/new_form_set_condition_data.py +++ b/rootly_sdk/models/new_form_set_condition_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewFormSetConditionData: """ type_: NewFormSetConditionDataType - attributes: "NewFormSetConditionDataAttributes" + attributes: NewFormSetConditionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_set_condition_data_attributes.py b/rootly_sdk/models/new_form_set_condition_data_attributes.py index 50e8eb01..072db657 100644 --- a/rootly_sdk/models/new_form_set_condition_data_attributes.py +++ b/rootly_sdk/models/new_form_set_condition_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/new_form_set_data.py b/rootly_sdk/models/new_form_set_data.py index 5dd21340..18988ea0 100644 --- a/rootly_sdk/models/new_form_set_data.py +++ b/rootly_sdk/models/new_form_set_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewFormSetData: """ type_: NewFormSetDataType - attributes: "NewFormSetDataAttributes" + attributes: NewFormSetDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_form_set_data_attributes.py b/rootly_sdk/models/new_form_set_data_attributes.py index 420685c6..8547badd 100644 --- a/rootly_sdk/models/new_form_set_data_attributes.py +++ b/rootly_sdk/models/new_form_set_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/new_functionality.py b/rootly_sdk/models/new_functionality.py index ab4c8a72..74f3df0d 100644 --- a/rootly_sdk/models/new_functionality.py +++ b/rootly_sdk/models/new_functionality.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewFunctionality: data (NewFunctionalityData): """ - data: "NewFunctionalityData" + data: NewFunctionalityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_functionality_data.py b/rootly_sdk/models/new_functionality_data.py index 97c55928..21eb1b4a 100644 --- a/rootly_sdk/models/new_functionality_data.py +++ b/rootly_sdk/models/new_functionality_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewFunctionalityData: """ type_: NewFunctionalityDataType - attributes: "NewFunctionalityDataAttributes" + attributes: NewFunctionalityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_functionality_data_attributes.py b/rootly_sdk/models/new_functionality_data_attributes.py index dda44d03..a3f21577 100644 --- a/rootly_sdk/models/new_functionality_data_attributes.py +++ b/rootly_sdk/models/new_functionality_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -10,7 +12,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.new_functionality_data_attributes_fields_item import NewFunctionalityDataAttributesFieldsItem + from ..models.new_functionality_data_attributes_properties_item import NewFunctionalityDataAttributesPropertiesItem from ..models.new_functionality_data_attributes_slack_aliases_type_0_item import ( NewFunctionalityDataAttributesSlackAliasesType0Item, ) @@ -27,73 +29,73 @@ class NewFunctionalityDataAttributes: """ Attributes: name (str): The name of the functionality - description (Union[None, Unset, str]): The description of the functionality - public_description (Union[None, Unset, str]): The public description of the functionality - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the functionality - color (Union[None, Unset, str]): The hex color of the functionality - position (Union[None, Unset, int]): Position of the functionality - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this functionality. eg: + description (None | str | Unset): The description of the functionality + public_description (None | str | Unset): The public description of the functionality + notify_emails (list[str] | None | Unset): Emails to attach to the functionality + color (None | str | Unset): The hex color of the functionality + position (int | None | Unset): Position of the functionality + backstage_id (None | str | Unset): The Backstage entity id associated to this functionality. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this functionality - pagerduty_id (Union[None, Unset, str]): The PagerDuty service id associated to this functionality - opsgenie_id (Union[None, Unset, str]): The Opsgenie service id associated to this functionality - opsgenie_team_id (Union[None, Unset, str]): The Opsgenie team id associated to this functionality - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this functionality - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this functionality - show_uptime (Union[None, Unset, bool]): Show uptime - show_uptime_last_days (Union[Unset, NewFunctionalityDataAttributesShowUptimeLastDays]): Show uptime over x days + external_id (None | str | Unset): The external id associated to this functionality + pagerduty_id (None | str | Unset): The PagerDuty service id associated to this functionality + opsgenie_id (None | str | Unset): The Opsgenie service id associated to this functionality + opsgenie_team_id (None | str | Unset): The Opsgenie team id associated to this functionality + cortex_id (None | str | Unset): The Cortex group id associated to this functionality + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this functionality + show_uptime (bool | None | Unset): Show uptime + show_uptime_last_days (NewFunctionalityDataAttributesShowUptimeLastDays | Unset): Show uptime over x days Default: 60. - environment_ids (Union[None, Unset, list[str]]): Environments associated with this functionality - service_ids (Union[None, Unset, list[str]]): Services associated with this functionality - owner_group_ids (Union[None, Unset, list[str]]): Owner Teams associated with this functionality - owner_user_ids (Union[None, Unset, list[int]]): Owner Users associated with this functionality - slack_channels (Union[None, Unset, list['NewFunctionalityDataAttributesSlackChannelsType0Item']]): Slack - Channels associated with this functionality - slack_aliases (Union[None, Unset, list['NewFunctionalityDataAttributesSlackAliasesType0Item']]): Slack Aliases + environment_ids (list[str] | None | Unset): Environments associated with this functionality + service_ids (list[str] | None | Unset): Services associated with this functionality + owner_group_ids (list[str] | None | Unset): Owner Teams associated with this functionality + owner_user_ids (list[int] | None | Unset): Owner Users associated with this functionality + slack_channels (list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels + associated with this functionality + slack_aliases (list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated with this functionality - fields (Union[Unset, list['NewFunctionalityDataAttributesFieldsItem']]): Array of field values for this + properties (list[NewFunctionalityDataAttributesPropertiesItem] | Unset): Array of property values for this functionality. """ name: str - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - opsgenie_team_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - show_uptime: None | Unset | bool = UNSET - show_uptime_last_days: Unset | NewFunctionalityDataAttributesShowUptimeLastDays = 60 - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - owner_group_ids: None | Unset | list[str] = UNSET - owner_user_ids: None | Unset | list[int] = UNSET - slack_channels: None | Unset | list["NewFunctionalityDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["NewFunctionalityDataAttributesSlackAliasesType0Item"] = UNSET - fields: Unset | list["NewFunctionalityDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: NewFunctionalityDataAttributesShowUptimeLastDays | Unset = 60 + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + owner_group_ids: list[str] | None | Unset = UNSET + owner_user_ids: list[int] | None | Unset = UNSET + slack_channels: list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + properties: list[NewFunctionalityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -102,71 +104,71 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - opsgenie_team_id: None | Unset | str + opsgenie_team_id: None | str | Unset if isinstance(self.opsgenie_team_id, Unset): opsgenie_team_id = UNSET else: opsgenie_team_id = self.opsgenie_team_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - show_uptime: None | Unset | bool + show_uptime: bool | None | Unset if isinstance(self.show_uptime, Unset): show_uptime = UNSET else: show_uptime = self.show_uptime - show_uptime_last_days: Unset | int = UNSET + show_uptime_last_days: int | Unset = UNSET if not isinstance(self.show_uptime_last_days, Unset): show_uptime_last_days = self.show_uptime_last_days - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -175,7 +177,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -184,7 +186,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - owner_group_ids: None | Unset | list[str] + owner_group_ids: list[str] | None | Unset if isinstance(self.owner_group_ids, Unset): owner_group_ids = UNSET elif isinstance(self.owner_group_ids, list): @@ -193,7 +195,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_group_ids = self.owner_group_ids - owner_user_ids: None | Unset | list[int] + owner_user_ids: list[int] | None | Unset if isinstance(self.owner_user_ids, Unset): owner_user_ids = UNSET elif isinstance(self.owner_user_ids, list): @@ -202,7 +204,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -214,7 +216,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -226,12 +228,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -280,14 +282,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.new_functionality_data_attributes_fields_item import NewFunctionalityDataAttributesFieldsItem + from ..models.new_functionality_data_attributes_properties_item import ( + NewFunctionalityDataAttributesPropertiesItem, + ) from ..models.new_functionality_data_attributes_slack_aliases_type_0_item import ( NewFunctionalityDataAttributesSlackAliasesType0Item, ) @@ -298,25 +302,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -327,104 +331,104 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_opsgenie_team_id(data: object) -> None | Unset | str: + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_show_uptime(data: object) -> None | Unset | bool: + def _parse_show_uptime(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) _show_uptime_last_days = d.pop("show_uptime_last_days", UNSET) - show_uptime_last_days: Unset | NewFunctionalityDataAttributesShowUptimeLastDays + show_uptime_last_days: NewFunctionalityDataAttributesShowUptimeLastDays | Unset if isinstance(_show_uptime_last_days, Unset): show_uptime_last_days = UNSET else: @@ -432,7 +436,7 @@ def _parse_show_uptime(data: object) -> None | Unset | bool: _show_uptime_last_days ) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -443,13 +447,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -460,13 +464,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: + def _parse_owner_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -477,13 +481,13 @@ def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: owner_group_ids_type_0 = cast(list[str], data) return owner_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) owner_group_ids = _parse_owner_group_ids(d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: + def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -494,15 +498,15 @@ def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: owner_user_ids_type_0 = cast(list[int], data) return owner_user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["NewFunctionalityDataAttributesSlackChannelsType0Item"]: + ) -> list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -520,15 +524,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewFunctionalityDataAttributesSlackChannelsType0Item"], data) + return cast(list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["NewFunctionalityDataAttributesSlackAliasesType0Item"]: + ) -> list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -546,18 +550,20 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewFunctionalityDataAttributesSlackAliasesType0Item"], data) + return cast(list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewFunctionalityDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewFunctionalityDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewFunctionalityDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_functionality_data_attributes = cls( name=name, @@ -581,7 +587,7 @@ def _parse_slack_aliases( owner_user_ids=owner_user_ids, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) return new_functionality_data_attributes diff --git a/rootly_sdk/models/new_functionality_data_attributes_fields_item.py b/rootly_sdk/models/new_functionality_data_attributes_fields_item.py deleted file mode 100644 index e257fbed..00000000 --- a/rootly_sdk/models/new_functionality_data_attributes_fields_item.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="NewFunctionalityDataAttributesFieldsItem") - - -@_attrs_define -class NewFunctionalityDataAttributesFieldsItem: - """Set a value for a catalog field - - Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value - """ - - catalog_field_id: str - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "catalog_field_id": catalog_field_id, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") - - value = d.pop("value") - - new_functionality_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, - value=value, - ) - - new_functionality_data_attributes_fields_item.additional_properties = d - return new_functionality_data_attributes_fields_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/new_functionality_data_attributes_properties_item.py b/rootly_sdk/models/new_functionality_data_attributes_properties_item.py new file mode 100644 index 00000000..b3518fb5 --- /dev/null +++ b/rootly_sdk/models/new_functionality_data_attributes_properties_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="NewFunctionalityDataAttributesPropertiesItem") + + +@_attrs_define +class NewFunctionalityDataAttributesPropertiesItem: + """Set a value for a catalog property + + Attributes: + catalog_property_id (str): Catalog property ID + value (str): The property value + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + new_functionality_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + new_functionality_data_attributes_properties_item.additional_properties = d + return new_functionality_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_functionality_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/new_functionality_data_attributes_slack_aliases_type_0_item.py index a304c3b3..ca6ead65 100644 --- a/rootly_sdk/models/new_functionality_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/new_functionality_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_functionality_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/new_functionality_data_attributes_slack_channels_type_0_item.py index 608aa018..2d997f77 100644 --- a/rootly_sdk/models/new_functionality_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/new_functionality_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_heartbeat.py b/rootly_sdk/models/new_heartbeat.py index efd23daf..295e7de4 100644 --- a/rootly_sdk/models/new_heartbeat.py +++ b/rootly_sdk/models/new_heartbeat.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewHeartbeat: data (NewHeartbeatData): """ - data: "NewHeartbeatData" + data: NewHeartbeatData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_heartbeat_data.py b/rootly_sdk/models/new_heartbeat_data.py index 14046489..b6263e13 100644 --- a/rootly_sdk/models/new_heartbeat_data.py +++ b/rootly_sdk/models/new_heartbeat_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewHeartbeatData: """ type_: NewHeartbeatDataType - attributes: "NewHeartbeatDataAttributes" + attributes: NewHeartbeatDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_heartbeat_data_attributes.py b/rootly_sdk/models/new_heartbeat_data_attributes.py index 4e269e2c..05a9817f 100644 --- a/rootly_sdk/models/new_heartbeat_data_attributes.py +++ b/rootly_sdk/models/new_heartbeat_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,11 +27,12 @@ class NewHeartbeatDataAttributes: interval (int): interval_unit (NewHeartbeatDataAttributesIntervalUnit): notification_target_id (str): - notification_target_type (NewHeartbeatDataAttributesNotificationTargetType): - description (Union[None, Unset, str]): The description of the heartbeat - alert_description (Union[None, Unset, str]): Description of alerts triggered when heartbeat expires. - alert_urgency_id (Union[None, Unset, str]): Urgency of alerts triggered when heartbeat expires. - enabled (Union[Unset, bool]): Whether to trigger alerts when heartbeat is expired. + notification_target_type (NewHeartbeatDataAttributesNotificationTargetType): The type of the notification + target. Please contact support if you encounter issues using `Functionality` as a target type. + description (None | str | Unset): The description of the heartbeat + alert_description (None | str | Unset): Description of alerts triggered when heartbeat expires. + alert_urgency_id (None | str | Unset): Urgency of alerts triggered when heartbeat expires. + enabled (bool | Unset): Whether to trigger alerts when heartbeat is expired. """ name: str @@ -38,10 +41,10 @@ class NewHeartbeatDataAttributes: interval_unit: NewHeartbeatDataAttributesIntervalUnit notification_target_id: str notification_target_type: NewHeartbeatDataAttributesNotificationTargetType - description: None | Unset | str = UNSET - alert_description: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - enabled: Unset | bool = UNSET + description: None | str | Unset = UNSET + alert_description: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -56,19 +59,19 @@ def to_dict(self) -> dict[str, Any]: notification_target_type: str = self.notification_target_type - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - alert_description: None | Unset | str + alert_description: None | str | Unset if isinstance(self.alert_description, Unset): alert_description = UNSET else: alert_description = self.alert_description - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: @@ -116,30 +119,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d.pop("notification_target_type") ) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_alert_description(data: object) -> None | Unset | str: + def _parse_alert_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_description = _parse_alert_description(d.pop("alert_description", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) diff --git a/rootly_sdk/models/new_heartbeat_data_attributes_notification_target_type.py b/rootly_sdk/models/new_heartbeat_data_attributes_notification_target_type.py index 4c8aade3..b6f8f88b 100644 --- a/rootly_sdk/models/new_heartbeat_data_attributes_notification_target_type.py +++ b/rootly_sdk/models/new_heartbeat_data_attributes_notification_target_type.py @@ -1,9 +1,12 @@ from typing import Literal, cast -NewHeartbeatDataAttributesNotificationTargetType = Literal["EscalationPolicy", "Group", "Service", "User"] +NewHeartbeatDataAttributesNotificationTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service", "User" +] NEW_HEARTBEAT_DATA_ATTRIBUTES_NOTIFICATION_TARGET_TYPE_VALUES: set[NewHeartbeatDataAttributesNotificationTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", "User", diff --git a/rootly_sdk/models/new_incident.py b/rootly_sdk/models/new_incident.py index 9be29c67..87aa5321 100644 --- a/rootly_sdk/models/new_incident.py +++ b/rootly_sdk/models/new_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncident: data (NewIncidentData): """ - data: "NewIncidentData" + data: NewIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_action_item.py b/rootly_sdk/models/new_incident_action_item.py index 004ae495..086ae407 100644 --- a/rootly_sdk/models/new_incident_action_item.py +++ b/rootly_sdk/models/new_incident_action_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentActionItem: data (NewIncidentActionItemData): """ - data: "NewIncidentActionItemData" + data: NewIncidentActionItemData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_action_item_data.py b/rootly_sdk/models/new_incident_action_item_data.py index 9ee79a63..d11d9f3c 100644 --- a/rootly_sdk/models/new_incident_action_item_data.py +++ b/rootly_sdk/models/new_incident_action_item_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentActionItemData: """ type_: NewIncidentActionItemDataType - attributes: "NewIncidentActionItemDataAttributes" + attributes: NewIncidentActionItemDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_action_item_data_attributes.py b/rootly_sdk/models/new_incident_action_item_data_attributes.py index 09467761..45137063 100644 --- a/rootly_sdk/models/new_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/new_incident_action_item_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,80 +27,80 @@ class NewIncidentActionItemDataAttributes: """ Attributes: summary (str): The summary of the action item - description (Union[None, Unset, str]): The description of the action item - kind (Union[Unset, NewIncidentActionItemDataAttributesKind]): The kind of the action item - assigned_to_user_id (Union[None, Unset, int]): ID of user you wish to assign this action item - assigned_to_group_ids (Union[Unset, list[str]]): IDs of groups you wish to assign this action item - priority (Union[Unset, NewIncidentActionItemDataAttributesPriority]): The priority of the action item - status (Union[Unset, NewIncidentActionItemDataAttributesStatus]): The status of the action item - due_date (Union[None, Unset, str]): The due date of the action item - jira_issue_id (Union[None, Unset, str]): The Jira issue ID. - jira_issue_key (Union[None, Unset, str]): The Jira issue key. - jira_issue_url (Union[None, Unset, str]): The Jira issue URL. + description (None | str | Unset): The description of the action item + kind (NewIncidentActionItemDataAttributesKind | Unset): The kind of the action item + assigned_to_user_id (int | None | Unset): ID of user you wish to assign this action item + assigned_to_group_ids (list[str] | Unset): IDs of groups you wish to assign this action item + priority (NewIncidentActionItemDataAttributesPriority | Unset): The priority of the action item + status (NewIncidentActionItemDataAttributesStatus | Unset): The status of the action item + due_date (None | str | Unset): The due date of the action item + jira_issue_id (None | str | Unset): The Jira issue ID. + jira_issue_key (None | str | Unset): The Jira issue key. + jira_issue_url (None | str | Unset): The Jira issue URL. """ summary: str - description: None | Unset | str = UNSET - kind: Unset | NewIncidentActionItemDataAttributesKind = UNSET - assigned_to_user_id: None | Unset | int = UNSET - assigned_to_group_ids: Unset | list[str] = UNSET - priority: Unset | NewIncidentActionItemDataAttributesPriority = UNSET - status: Unset | NewIncidentActionItemDataAttributesStatus = UNSET - due_date: None | Unset | str = UNSET - jira_issue_id: None | Unset | str = UNSET - jira_issue_key: None | Unset | str = UNSET - jira_issue_url: None | Unset | str = UNSET + description: None | str | Unset = UNSET + kind: NewIncidentActionItemDataAttributesKind | Unset = UNSET + assigned_to_user_id: int | None | Unset = UNSET + assigned_to_group_ids: list[str] | Unset = UNSET + priority: NewIncidentActionItemDataAttributesPriority | Unset = UNSET + status: NewIncidentActionItemDataAttributesStatus | Unset = UNSET + due_date: None | str | Unset = UNSET + jira_issue_id: None | str | Unset = UNSET + jira_issue_key: None | str | Unset = UNSET + jira_issue_url: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: summary = self.summary - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - assigned_to_user_id: None | Unset | int + assigned_to_user_id: int | None | Unset if isinstance(self.assigned_to_user_id, Unset): assigned_to_user_id = UNSET else: assigned_to_user_id = self.assigned_to_user_id - assigned_to_group_ids: Unset | list[str] = UNSET + assigned_to_group_ids: list[str] | Unset = UNSET if not isinstance(self.assigned_to_group_ids, Unset): assigned_to_group_ids = self.assigned_to_group_ids - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - due_date: None | Unset | str + due_date: None | str | Unset if isinstance(self.due_date, Unset): due_date = UNSET else: due_date = self.due_date - jira_issue_id: None | Unset | str + jira_issue_id: None | str | Unset if isinstance(self.jira_issue_id, Unset): jira_issue_id = UNSET else: jira_issue_id = self.jira_issue_id - jira_issue_key: None | Unset | str + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET else: jira_issue_key = self.jira_issue_key - jira_issue_url: None | Unset | str + jira_issue_url: None | str | Unset if isinstance(self.jira_issue_url, Unset): jira_issue_url = UNSET else: @@ -139,80 +141,80 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) summary = d.pop("summary") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | NewIncidentActionItemDataAttributesKind + kind: NewIncidentActionItemDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_new_incident_action_item_data_attributes_kind(_kind) - def _parse_assigned_to_user_id(data: object) -> None | Unset | int: + def _parse_assigned_to_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) assigned_to_user_id = _parse_assigned_to_user_id(d.pop("assigned_to_user_id", UNSET)) assigned_to_group_ids = cast(list[str], d.pop("assigned_to_group_ids", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | NewIncidentActionItemDataAttributesPriority + priority: NewIncidentActionItemDataAttributesPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = check_new_incident_action_item_data_attributes_priority(_priority) _status = d.pop("status", UNSET) - status: Unset | NewIncidentActionItemDataAttributesStatus + status: NewIncidentActionItemDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_new_incident_action_item_data_attributes_status(_status) - def _parse_due_date(data: object) -> None | Unset | str: + def _parse_due_date(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) due_date = _parse_due_date(d.pop("due_date", UNSET)) - def _parse_jira_issue_id(data: object) -> None | Unset | str: + def _parse_jira_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_id = _parse_jira_issue_id(d.pop("jira_issue_id", UNSET)) - def _parse_jira_issue_key(data: object) -> None | Unset | str: + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_key = _parse_jira_issue_key(d.pop("jira_issue_key", UNSET)) - def _parse_jira_issue_url(data: object) -> None | Unset | str: + def _parse_jira_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) diff --git a/rootly_sdk/models/new_incident_custom_field_selection.py b/rootly_sdk/models/new_incident_custom_field_selection.py index ed0e7abc..aaac33e2 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection.py +++ b/rootly_sdk/models/new_incident_custom_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentCustomFieldSelection: data (NewIncidentCustomFieldSelectionData): """ - data: "NewIncidentCustomFieldSelectionData" + data: NewIncidentCustomFieldSelectionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_custom_field_selection_data.py b/rootly_sdk/models/new_incident_custom_field_selection_data.py index a59f3532..326ecdd6 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/new_incident_custom_field_selection_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class NewIncidentCustomFieldSelectionData: """ type_: NewIncidentCustomFieldSelectionDataType - attributes: "NewIncidentCustomFieldSelectionDataAttributes" + attributes: NewIncidentCustomFieldSelectionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_custom_field_selection_data_attributes.py b/rootly_sdk/models/new_incident_custom_field_selection_data_attributes.py index 31f89ff4..9d28b839 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection_data_attributes.py +++ b/rootly_sdk/models/new_incident_custom_field_selection_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,13 +15,13 @@ class NewIncidentCustomFieldSelectionDataAttributes: """ Attributes: custom_field_id (int): The custom field for this selection - value (Union[None, str]): The selected value for text kind custom fields - selected_option_ids (Union[Unset, list[int]]): + value (None | str): The selected value for text kind custom fields + selected_option_ids (list[int] | Unset): """ custom_field_id: int value: None | str - selected_option_ids: Unset | list[int] = UNSET + selected_option_ids: list[int] | Unset = UNSET def to_dict(self) -> dict[str, Any]: custom_field_id = self.custom_field_id @@ -27,7 +29,7 @@ def to_dict(self) -> dict[str, Any]: value: None | str value = self.value - selected_option_ids: Unset | list[int] = UNSET + selected_option_ids: list[int] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids diff --git a/rootly_sdk/models/new_incident_data.py b/rootly_sdk/models/new_incident_data.py index ebe1a219..dbe22c6f 100644 --- a/rootly_sdk/models/new_incident_data.py +++ b/rootly_sdk/models/new_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewIncidentData: """ type_: NewIncidentDataType - attributes: "NewIncidentDataAttributes" + attributes: NewIncidentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_data_attributes.py b/rootly_sdk/models/new_incident_data_attributes.py index abb989bf..8a795611 100644 --- a/rootly_sdk/models/new_incident_data_attributes.py +++ b/rootly_sdk/models/new_incident_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -24,149 +26,149 @@ class NewIncidentDataAttributes: """ Attributes: - title (Union[None, Unset, str]): The title of the incident. We will autogenerate one if null - kind (Union[Unset, NewIncidentDataAttributesKind]): The kind of the incident Default: 'normal'. - parent_incident_id (Union[None, Unset, str]): ID of parent incident - duplicate_incident_id (Union[None, Unset, str]): ID of duplicated incident - private (Union[None, Unset, bool]): Create an incident as private. Once an incident is made as private it cannot - be undone Default: False. - summary (Union[None, Unset, str]): The summary of the incident - user_id (Union[None, Unset, str]): User ID of the creator of the incident. Default to the user attached to the - Api Key - severity_id (Union[None, Unset, str]): The Severity ID to attach to the incident - public_title (Union[None, Unset, str]): The public title of the incident - alert_ids (Union[None, Unset, list[str]]): The Alert IDs to attach to the incident - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the incident - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the incident - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the incident - functionality_ids (Union[None, Unset, list[str]]): The Functionality IDs to attach to the incident - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the incident - cause_ids (Union[None, Unset, list[str]]): The Cause IDs to attach to the incident - muted_service_ids (Union[None, Unset, list[str]]): The Service IDs to mute alerts for during maintenance. Alerts - for these services will still be triggered and attached to the incident, but won't page responders. - labels (Union['NewIncidentDataAttributesLabelsType0', None, Unset]): Labels to attach to the incidents. eg: + title (None | str | Unset): The title of the incident. We will autogenerate one if null + kind (NewIncidentDataAttributesKind | Unset): The kind of the incident Default: 'normal'. + parent_incident_id (None | str | Unset): ID of parent incident + duplicate_incident_id (None | str | Unset): ID of duplicated incident + private (bool | None | Unset): Create an incident as private. Once an incident is made as private it cannot be + undone Default: False. + summary (None | str | Unset): The summary of the incident + user_id (None | str | Unset): User ID of the creator of the incident. Default to the user attached to the Api + Key + severity_id (None | str | Unset): The Severity ID to attach to the incident + public_title (None | str | Unset): The public title of the incident + alert_ids (list[str] | None | Unset): The Alert IDs to attach to the incident + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the incident + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the incident + service_ids (list[str] | None | Unset): The Service IDs to attach to the incident + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the incident + group_ids (list[str] | None | Unset): The Team IDs to attach to the incident + cause_ids (list[str] | None | Unset): The Cause IDs to attach to the incident + muted_service_ids (list[str] | None | Unset): The Service IDs to mute alerts for during maintenance. Alerts for + these services will still be triggered and attached to the incident, but won't page responders. + labels (NewIncidentDataAttributesLabelsType0 | None | Unset): Labels to attach to the incidents. eg: {"platform":"osx", "version": "1.29"} - slack_channel_name (Union[None, Unset, str]): Slack channel name - slack_channel_id (Union[None, Unset, str]): Slack channel id - slack_channel_url (Union[None, Unset, str]): Slack channel url - slack_channel_archived (Union[None, Unset, bool]): Whether the Slack channel is archived - google_drive_parent_id (Union[None, Unset, str]): Google Drive parent folder ID - google_drive_url (Union[None, Unset, str]): Google Drive URL - jira_issue_key (Union[None, Unset, str]): Jira issue key - jira_issue_id (Union[None, Unset, str]): Jira issue ID - jira_issue_url (Union[None, Unset, str]): Jira issue URL - notify_emails (Union[None, Unset, list[str]]): Emails you want to notify - status (Union[Unset, NewIncidentDataAttributesStatus]): The status of the incident - url (Union[Unset, str]): The url to the incident - scheduled_for (Union[None, Unset, str]): Date of when the maintenance begins - scheduled_until (Union[None, Unset, str]): Date of when the maintenance ends - in_triage_at (Union[None, Unset, str]): Date of triage - started_at (Union[None, Unset, str]): Date of start - detected_at (Union[None, Unset, str]): Date of detection - acknowledged_at (Union[None, Unset, str]): Date of acknowledgment - mitigated_at (Union[None, Unset, str]): Date of mitigation - resolved_at (Union[None, Unset, str]): Date of resolution - closed_at (Union[None, Unset, str]): Date of closure - cancelled_at (Union[None, Unset, str]): Date of cancellation + slack_channel_name (None | str | Unset): Slack channel name + slack_channel_id (None | str | Unset): Slack channel id + slack_channel_url (None | str | Unset): Slack channel url + slack_channel_archived (bool | None | Unset): Whether the Slack channel is archived + google_drive_parent_id (None | str | Unset): Google Drive parent folder ID + google_drive_url (None | str | Unset): Google Drive URL + jira_issue_key (None | str | Unset): Jira issue key + jira_issue_id (None | str | Unset): Jira issue ID + jira_issue_url (None | str | Unset): Jira issue URL + notify_emails (list[str] | None | Unset): Emails you want to notify + status (NewIncidentDataAttributesStatus | Unset): The status of the incident + url (str | Unset): The url to the incident + scheduled_for (None | str | Unset): Date of when the maintenance begins + scheduled_until (None | str | Unset): Date of when the maintenance ends + in_triage_at (None | str | Unset): Date of triage + started_at (None | str | Unset): Date of start + detected_at (None | str | Unset): Date of detection + acknowledged_at (None | str | Unset): Date of acknowledgment + mitigated_at (None | str | Unset): Date of mitigation + resolved_at (None | str | Unset): Date of resolution + closed_at (None | str | Unset): Date of closure + cancelled_at (None | str | Unset): Date of cancellation """ - title: None | Unset | str = UNSET - kind: Unset | NewIncidentDataAttributesKind = "normal" - parent_incident_id: None | Unset | str = UNSET - duplicate_incident_id: None | Unset | str = UNSET - private: None | Unset | bool = False - summary: None | Unset | str = UNSET - user_id: None | Unset | str = UNSET - severity_id: None | Unset | str = UNSET - public_title: None | Unset | str = UNSET - alert_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - cause_ids: None | Unset | list[str] = UNSET - muted_service_ids: None | Unset | list[str] = UNSET - labels: Union["NewIncidentDataAttributesLabelsType0", None, Unset] = UNSET - slack_channel_name: None | Unset | str = UNSET - slack_channel_id: None | Unset | str = UNSET - slack_channel_url: None | Unset | str = UNSET - slack_channel_archived: None | Unset | bool = UNSET - google_drive_parent_id: None | Unset | str = UNSET - google_drive_url: None | Unset | str = UNSET - jira_issue_key: None | Unset | str = UNSET - jira_issue_id: None | Unset | str = UNSET - jira_issue_url: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - status: Unset | NewIncidentDataAttributesStatus = UNSET - url: Unset | str = UNSET - scheduled_for: None | Unset | str = UNSET - scheduled_until: None | Unset | str = UNSET - in_triage_at: None | Unset | str = UNSET - started_at: None | Unset | str = UNSET - detected_at: None | Unset | str = UNSET - acknowledged_at: None | Unset | str = UNSET - mitigated_at: None | Unset | str = UNSET - resolved_at: None | Unset | str = UNSET - closed_at: None | Unset | str = UNSET - cancelled_at: None | Unset | str = UNSET + title: None | str | Unset = UNSET + kind: NewIncidentDataAttributesKind | Unset = "normal" + parent_incident_id: None | str | Unset = UNSET + duplicate_incident_id: None | str | Unset = UNSET + private: bool | None | Unset = False + summary: None | str | Unset = UNSET + user_id: None | str | Unset = UNSET + severity_id: None | str | Unset = UNSET + public_title: None | str | Unset = UNSET + alert_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + cause_ids: list[str] | None | Unset = UNSET + muted_service_ids: list[str] | None | Unset = UNSET + labels: NewIncidentDataAttributesLabelsType0 | None | Unset = UNSET + slack_channel_name: None | str | Unset = UNSET + slack_channel_id: None | str | Unset = UNSET + slack_channel_url: None | str | Unset = UNSET + slack_channel_archived: bool | None | Unset = UNSET + google_drive_parent_id: None | str | Unset = UNSET + google_drive_url: None | str | Unset = UNSET + jira_issue_key: None | str | Unset = UNSET + jira_issue_id: None | str | Unset = UNSET + jira_issue_url: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + status: NewIncidentDataAttributesStatus | Unset = UNSET + url: str | Unset = UNSET + scheduled_for: None | str | Unset = UNSET + scheduled_until: None | str | Unset = UNSET + in_triage_at: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + detected_at: None | str | Unset = UNSET + acknowledged_at: None | str | Unset = UNSET + mitigated_at: None | str | Unset = UNSET + resolved_at: None | str | Unset = UNSET + closed_at: None | str | Unset = UNSET + cancelled_at: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_incident_data_attributes_labels_type_0 import NewIncidentDataAttributesLabelsType0 - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - parent_incident_id: None | Unset | str + parent_incident_id: None | str | Unset if isinstance(self.parent_incident_id, Unset): parent_incident_id = UNSET else: parent_incident_id = self.parent_incident_id - duplicate_incident_id: None | Unset | str + duplicate_incident_id: None | str | Unset if isinstance(self.duplicate_incident_id, Unset): duplicate_incident_id = UNSET else: duplicate_incident_id = self.duplicate_incident_id - private: None | Unset | bool + private: bool | None | Unset if isinstance(self.private, Unset): private = UNSET else: private = self.private - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - user_id: None | Unset | str + user_id: None | str | Unset if isinstance(self.user_id, Unset): user_id = UNSET else: user_id = self.user_id - severity_id: None | Unset | str + severity_id: None | str | Unset if isinstance(self.severity_id, Unset): severity_id = UNSET else: severity_id = self.severity_id - public_title: None | Unset | str + public_title: None | str | Unset if isinstance(self.public_title, Unset): public_title = UNSET else: public_title = self.public_title - alert_ids: None | Unset | list[str] + alert_ids: list[str] | None | Unset if isinstance(self.alert_ids, Unset): alert_ids = UNSET elif isinstance(self.alert_ids, list): @@ -175,7 +177,7 @@ def to_dict(self) -> dict[str, Any]: else: alert_ids = self.alert_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -184,7 +186,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -193,7 +195,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_type_ids = self.incident_type_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -202,7 +204,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -211,7 +213,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -220,7 +222,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - cause_ids: None | Unset | list[str] + cause_ids: list[str] | None | Unset if isinstance(self.cause_ids, Unset): cause_ids = UNSET elif isinstance(self.cause_ids, list): @@ -229,7 +231,7 @@ def to_dict(self) -> dict[str, Any]: else: cause_ids = self.cause_ids - muted_service_ids: None | Unset | list[str] + muted_service_ids: list[str] | None | Unset if isinstance(self.muted_service_ids, Unset): muted_service_ids = UNSET elif isinstance(self.muted_service_ids, list): @@ -238,7 +240,7 @@ def to_dict(self) -> dict[str, Any]: else: muted_service_ids = self.muted_service_ids - labels: None | Unset | dict[str, Any] + labels: dict[str, Any] | None | Unset if isinstance(self.labels, Unset): labels = UNSET elif isinstance(self.labels, NewIncidentDataAttributesLabelsType0): @@ -246,61 +248,61 @@ def to_dict(self) -> dict[str, Any]: else: labels = self.labels - slack_channel_name: None | Unset | str + slack_channel_name: None | str | Unset if isinstance(self.slack_channel_name, Unset): slack_channel_name = UNSET else: slack_channel_name = self.slack_channel_name - slack_channel_id: None | Unset | str + slack_channel_id: None | str | Unset if isinstance(self.slack_channel_id, Unset): slack_channel_id = UNSET else: slack_channel_id = self.slack_channel_id - slack_channel_url: None | Unset | str + slack_channel_url: None | str | Unset if isinstance(self.slack_channel_url, Unset): slack_channel_url = UNSET else: slack_channel_url = self.slack_channel_url - slack_channel_archived: None | Unset | bool + slack_channel_archived: bool | None | Unset if isinstance(self.slack_channel_archived, Unset): slack_channel_archived = UNSET else: slack_channel_archived = self.slack_channel_archived - google_drive_parent_id: None | Unset | str + google_drive_parent_id: None | str | Unset if isinstance(self.google_drive_parent_id, Unset): google_drive_parent_id = UNSET else: google_drive_parent_id = self.google_drive_parent_id - google_drive_url: None | Unset | str + google_drive_url: None | str | Unset if isinstance(self.google_drive_url, Unset): google_drive_url = UNSET else: google_drive_url = self.google_drive_url - jira_issue_key: None | Unset | str + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET else: jira_issue_key = self.jira_issue_key - jira_issue_id: None | Unset | str + jira_issue_id: None | str | Unset if isinstance(self.jira_issue_id, Unset): jira_issue_id = UNSET else: jira_issue_id = self.jira_issue_id - jira_issue_url: None | Unset | str + jira_issue_url: None | str | Unset if isinstance(self.jira_issue_url, Unset): jira_issue_url = UNSET else: jira_issue_url = self.jira_issue_url - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -309,67 +311,67 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status url = self.url - scheduled_for: None | Unset | str + scheduled_for: None | str | Unset if isinstance(self.scheduled_for, Unset): scheduled_for = UNSET else: scheduled_for = self.scheduled_for - scheduled_until: None | Unset | str + scheduled_until: None | str | Unset if isinstance(self.scheduled_until, Unset): scheduled_until = UNSET else: scheduled_until = self.scheduled_until - in_triage_at: None | Unset | str + in_triage_at: None | str | Unset if isinstance(self.in_triage_at, Unset): in_triage_at = UNSET else: in_triage_at = self.in_triage_at - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - detected_at: None | Unset | str + detected_at: None | str | Unset if isinstance(self.detected_at, Unset): detected_at = UNSET else: detected_at = self.detected_at - acknowledged_at: None | Unset | str + acknowledged_at: None | str | Unset if isinstance(self.acknowledged_at, Unset): acknowledged_at = UNSET else: acknowledged_at = self.acknowledged_at - mitigated_at: None | Unset | str + mitigated_at: None | str | Unset if isinstance(self.mitigated_at, Unset): mitigated_at = UNSET else: mitigated_at = self.mitigated_at - resolved_at: None | Unset | str + resolved_at: None | str | Unset if isinstance(self.resolved_at, Unset): resolved_at = UNSET else: resolved_at = self.resolved_at - closed_at: None | Unset | str + closed_at: None | str | Unset if isinstance(self.closed_at, Unset): closed_at = UNSET else: closed_at = self.closed_at - cancelled_at: None | Unset | str + cancelled_at: None | str | Unset if isinstance(self.cancelled_at, Unset): cancelled_at = UNSET else: @@ -467,86 +469,86 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | NewIncidentDataAttributesKind + kind: NewIncidentDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_new_incident_data_attributes_kind(_kind) - def _parse_parent_incident_id(data: object) -> None | Unset | str: + def _parse_parent_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) parent_incident_id = _parse_parent_incident_id(d.pop("parent_incident_id", UNSET)) - def _parse_duplicate_incident_id(data: object) -> None | Unset | str: + def _parse_duplicate_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) duplicate_incident_id = _parse_duplicate_incident_id(d.pop("duplicate_incident_id", UNSET)) - def _parse_private(data: object) -> None | Unset | bool: + def _parse_private(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) private = _parse_private(d.pop("private", UNSET)) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_user_id(data: object) -> None | Unset | str: + def _parse_user_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_id = _parse_user_id(d.pop("user_id", UNSET)) - def _parse_severity_id(data: object) -> None | Unset | str: + def _parse_severity_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) severity_id = _parse_severity_id(d.pop("severity_id", UNSET)) - def _parse_public_title(data: object) -> None | Unset | str: + def _parse_public_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_title = _parse_public_title(d.pop("public_title", UNSET)) - def _parse_alert_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -557,13 +559,13 @@ def _parse_alert_ids(data: object) -> None | Unset | list[str]: alert_ids_type_0 = cast(list[str], data) return alert_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_ids = _parse_alert_ids(d.pop("alert_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -574,13 +576,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -591,13 +593,13 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -608,13 +610,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -625,13 +627,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -642,13 +644,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_cause_ids(data: object) -> None | Unset | list[str]: + def _parse_cause_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -659,13 +661,13 @@ def _parse_cause_ids(data: object) -> None | Unset | list[str]: cause_ids_type_0 = cast(list[str], data) return cause_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) cause_ids = _parse_cause_ids(d.pop("cause_ids", UNSET)) - def _parse_muted_service_ids(data: object) -> None | Unset | list[str]: + def _parse_muted_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -676,13 +678,13 @@ def _parse_muted_service_ids(data: object) -> None | Unset | list[str]: muted_service_ids_type_0 = cast(list[str], data) return muted_service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) muted_service_ids = _parse_muted_service_ids(d.pop("muted_service_ids", UNSET)) - def _parse_labels(data: object) -> Union["NewIncidentDataAttributesLabelsType0", None, Unset]: + def _parse_labels(data: object) -> NewIncidentDataAttributesLabelsType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -693,94 +695,94 @@ def _parse_labels(data: object) -> Union["NewIncidentDataAttributesLabelsType0", labels_type_0 = NewIncidentDataAttributesLabelsType0.from_dict(data) return labels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewIncidentDataAttributesLabelsType0", None, Unset], data) + return cast(NewIncidentDataAttributesLabelsType0 | None | Unset, data) labels = _parse_labels(d.pop("labels", UNSET)) - def _parse_slack_channel_name(data: object) -> None | Unset | str: + def _parse_slack_channel_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_name = _parse_slack_channel_name(d.pop("slack_channel_name", UNSET)) - def _parse_slack_channel_id(data: object) -> None | Unset | str: + def _parse_slack_channel_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_id = _parse_slack_channel_id(d.pop("slack_channel_id", UNSET)) - def _parse_slack_channel_url(data: object) -> None | Unset | str: + def _parse_slack_channel_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_url = _parse_slack_channel_url(d.pop("slack_channel_url", UNSET)) - def _parse_slack_channel_archived(data: object) -> None | Unset | bool: + def _parse_slack_channel_archived(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) slack_channel_archived = _parse_slack_channel_archived(d.pop("slack_channel_archived", UNSET)) - def _parse_google_drive_parent_id(data: object) -> None | Unset | str: + def _parse_google_drive_parent_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_parent_id = _parse_google_drive_parent_id(d.pop("google_drive_parent_id", UNSET)) - def _parse_google_drive_url(data: object) -> None | Unset | str: + def _parse_google_drive_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_url = _parse_google_drive_url(d.pop("google_drive_url", UNSET)) - def _parse_jira_issue_key(data: object) -> None | Unset | str: + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_key = _parse_jira_issue_key(d.pop("jira_issue_key", UNSET)) - def _parse_jira_issue_id(data: object) -> None | Unset | str: + def _parse_jira_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_id = _parse_jira_issue_id(d.pop("jira_issue_id", UNSET)) - def _parse_jira_issue_url(data: object) -> None | Unset | str: + def _parse_jira_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -791,14 +793,14 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) _status = d.pop("status", UNSET) - status: Unset | NewIncidentDataAttributesStatus + status: NewIncidentDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: @@ -806,93 +808,93 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: url = d.pop("url", UNSET) - def _parse_scheduled_for(data: object) -> None | Unset | str: + def _parse_scheduled_for(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) scheduled_for = _parse_scheduled_for(d.pop("scheduled_for", UNSET)) - def _parse_scheduled_until(data: object) -> None | Unset | str: + def _parse_scheduled_until(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) scheduled_until = _parse_scheduled_until(d.pop("scheduled_until", UNSET)) - def _parse_in_triage_at(data: object) -> None | Unset | str: + def _parse_in_triage_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) in_triage_at = _parse_in_triage_at(d.pop("in_triage_at", UNSET)) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_detected_at(data: object) -> None | Unset | str: + def _parse_detected_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) detected_at = _parse_detected_at(d.pop("detected_at", UNSET)) - def _parse_acknowledged_at(data: object) -> None | Unset | str: + def _parse_acknowledged_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) acknowledged_at = _parse_acknowledged_at(d.pop("acknowledged_at", UNSET)) - def _parse_mitigated_at(data: object) -> None | Unset | str: + def _parse_mitigated_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigated_at = _parse_mitigated_at(d.pop("mitigated_at", UNSET)) - def _parse_resolved_at(data: object) -> None | Unset | str: + def _parse_resolved_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) - def _parse_closed_at(data: object) -> None | Unset | str: + def _parse_closed_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) closed_at = _parse_closed_at(d.pop("closed_at", UNSET)) - def _parse_cancelled_at(data: object) -> None | Unset | str: + def _parse_cancelled_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cancelled_at = _parse_cancelled_at(d.pop("cancelled_at", UNSET)) diff --git a/rootly_sdk/models/new_incident_data_attributes_labels_type_0.py b/rootly_sdk/models/new_incident_data_attributes_labels_type_0.py index 538c971f..5e4e81b3 100644 --- a/rootly_sdk/models/new_incident_data_attributes_labels_type_0.py +++ b/rootly_sdk/models/new_incident_data_attributes_labels_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewIncidentDataAttributesLabelsType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_incident_event.py b/rootly_sdk/models/new_incident_event.py index 86de32cc..823c24c2 100644 --- a/rootly_sdk/models/new_incident_event.py +++ b/rootly_sdk/models/new_incident_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentEvent: data (NewIncidentEventData): """ - data: "NewIncidentEventData" + data: NewIncidentEventData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_event_data.py b/rootly_sdk/models/new_incident_event_data.py index 6304f06d..5b1ad4c1 100644 --- a/rootly_sdk/models/new_incident_event_data.py +++ b/rootly_sdk/models/new_incident_event_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewIncidentEventData: """ type_: NewIncidentEventDataType - attributes: "NewIncidentEventDataAttributes" + attributes: NewIncidentEventDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_event_data_attributes.py b/rootly_sdk/models/new_incident_event_data_attributes.py index 1255db60..c7702049 100644 --- a/rootly_sdk/models/new_incident_event_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,16 +19,16 @@ class NewIncidentEventDataAttributes: """ Attributes: event (str): The summary of the incident event - visibility (Union[Unset, NewIncidentEventDataAttributesVisibility]): The visibility of the incident action item + visibility (NewIncidentEventDataAttributesVisibility | Unset): The visibility of the incident action item """ event: str - visibility: Unset | NewIncidentEventDataAttributesVisibility = UNSET + visibility: NewIncidentEventDataAttributesVisibility | Unset = UNSET def to_dict(self) -> dict[str, Any]: event = self.event - visibility: Unset | str = UNSET + visibility: str | Unset = UNSET if not isinstance(self.visibility, Unset): visibility = self.visibility @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: event = d.pop("event") _visibility = d.pop("visibility", UNSET) - visibility: Unset | NewIncidentEventDataAttributesVisibility + visibility: NewIncidentEventDataAttributesVisibility | Unset if isinstance(_visibility, Unset): visibility = UNSET else: diff --git a/rootly_sdk/models/new_incident_event_functionality.py b/rootly_sdk/models/new_incident_event_functionality.py index 14bfcce4..9fb2df7e 100644 --- a/rootly_sdk/models/new_incident_event_functionality.py +++ b/rootly_sdk/models/new_incident_event_functionality.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentEventFunctionality: data (NewIncidentEventFunctionalityData): """ - data: "NewIncidentEventFunctionalityData" + data: NewIncidentEventFunctionalityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_event_functionality_data.py b/rootly_sdk/models/new_incident_event_functionality_data.py index 16c96a63..61b6fde9 100644 --- a/rootly_sdk/models/new_incident_event_functionality_data.py +++ b/rootly_sdk/models/new_incident_event_functionality_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentEventFunctionalityData: """ type_: NewIncidentEventFunctionalityDataType - attributes: "NewIncidentEventFunctionalityDataAttributes" + attributes: NewIncidentEventFunctionalityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_event_functionality_data_attributes.py b/rootly_sdk/models/new_incident_event_functionality_data_attributes.py index 26cb7912..e14b6383 100644 --- a/rootly_sdk/models/new_incident_event_functionality_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_functionality_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_incident_event_service.py b/rootly_sdk/models/new_incident_event_service.py index 97f4925c..098597f3 100644 --- a/rootly_sdk/models/new_incident_event_service.py +++ b/rootly_sdk/models/new_incident_event_service.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentEventService: data (NewIncidentEventServiceData): """ - data: "NewIncidentEventServiceData" + data: NewIncidentEventServiceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_event_service_data.py b/rootly_sdk/models/new_incident_event_service_data.py index 71e69bfd..786ba6db 100644 --- a/rootly_sdk/models/new_incident_event_service_data.py +++ b/rootly_sdk/models/new_incident_event_service_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentEventServiceData: """ type_: NewIncidentEventServiceDataType - attributes: "NewIncidentEventServiceDataAttributes" + attributes: NewIncidentEventServiceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_event_service_data_attributes.py b/rootly_sdk/models/new_incident_event_service_data_attributes.py index 7e6413f0..8e2c72b4 100644 --- a/rootly_sdk/models/new_incident_event_service_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_service_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_incident_feedback.py b/rootly_sdk/models/new_incident_feedback.py index 93f6dcb0..1f6d9c6c 100644 --- a/rootly_sdk/models/new_incident_feedback.py +++ b/rootly_sdk/models/new_incident_feedback.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentFeedback: data (NewIncidentFeedbackData): """ - data: "NewIncidentFeedbackData" + data: NewIncidentFeedbackData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_feedback_data.py b/rootly_sdk/models/new_incident_feedback_data.py index dfb54c06..67126f31 100644 --- a/rootly_sdk/models/new_incident_feedback_data.py +++ b/rootly_sdk/models/new_incident_feedback_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewIncidentFeedbackData: """ type_: NewIncidentFeedbackDataType - attributes: "NewIncidentFeedbackDataAttributes" + attributes: NewIncidentFeedbackDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_feedback_data_attributes.py b/rootly_sdk/models/new_incident_feedback_data_attributes.py index eea1850a..0f7b6fec 100644 --- a/rootly_sdk/models/new_incident_feedback_data_attributes.py +++ b/rootly_sdk/models/new_incident_feedback_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,12 +20,12 @@ class NewIncidentFeedbackDataAttributes: Attributes: feedback (str): The feedback of the incident feedback rating (NewIncidentFeedbackDataAttributesRating): The rating of the incident feedback - anonymous (Union[Unset, bool]): Is the feedback anonymous? + anonymous (bool | Unset): Is the feedback anonymous? """ feedback: str rating: NewIncidentFeedbackDataAttributesRating - anonymous: Unset | bool = UNSET + anonymous: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: feedback = self.feedback diff --git a/rootly_sdk/models/new_incident_form_field_selection.py b/rootly_sdk/models/new_incident_form_field_selection.py index c3af5a5d..fd48d34f 100644 --- a/rootly_sdk/models/new_incident_form_field_selection.py +++ b/rootly_sdk/models/new_incident_form_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentFormFieldSelection: data (NewIncidentFormFieldSelectionData): """ - data: "NewIncidentFormFieldSelectionData" + data: NewIncidentFormFieldSelectionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_form_field_selection_data.py b/rootly_sdk/models/new_incident_form_field_selection_data.py index 5468b67e..327f7a4a 100644 --- a/rootly_sdk/models/new_incident_form_field_selection_data.py +++ b/rootly_sdk/models/new_incident_form_field_selection_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentFormFieldSelectionData: """ type_: NewIncidentFormFieldSelectionDataType - attributes: "NewIncidentFormFieldSelectionDataAttributes" + attributes: NewIncidentFormFieldSelectionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_form_field_selection_data_attributes.py b/rootly_sdk/models/new_incident_form_field_selection_data_attributes.py index 5eb356f5..10a4cf9e 100644 --- a/rootly_sdk/models/new_incident_form_field_selection_data_attributes.py +++ b/rootly_sdk/models/new_incident_form_field_selection_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -14,75 +16,75 @@ class NewIncidentFormFieldSelectionDataAttributes: Attributes: incident_id (str): form_field_id (str): The custom field for this selection - value (Union[None, Unset, str]): The selected value for text kind custom fields - selected_catalog_entity_ids (Union[Unset, list[str]]): - selected_group_ids (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[str]]): - selected_service_ids (Union[Unset, list[str]]): - selected_functionality_ids (Union[Unset, list[str]]): - selected_user_ids (Union[Unset, list[int]]): - selected_environment_ids (Union[Unset, list[str]]): - selected_cause_ids (Union[Unset, list[str]]): - selected_incident_type_ids (Union[Unset, list[str]]): + value (None | str | Unset): The selected value for text kind custom fields + selected_catalog_entity_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_environment_ids (list[str] | Unset): + selected_cause_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): """ incident_id: str form_field_id: str - value: None | Unset | str = UNSET - selected_catalog_entity_ids: Unset | list[str] = UNSET - selected_group_ids: Unset | list[str] = UNSET - selected_option_ids: Unset | list[str] = UNSET - selected_service_ids: Unset | list[str] = UNSET - selected_functionality_ids: Unset | list[str] = UNSET - selected_user_ids: Unset | list[int] = UNSET - selected_environment_ids: Unset | list[str] = UNSET - selected_cause_ids: Unset | list[str] = UNSET - selected_incident_type_ids: Unset | list[str] = UNSET + value: None | str | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: incident_id = self.incident_id form_field_id = self.form_field_id - value: None | Unset | str + value: None | str | Unset if isinstance(self.value, Unset): value = UNSET else: value = self.value - selected_catalog_entity_ids: Unset | list[str] = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET if not isinstance(self.selected_catalog_entity_ids, Unset): selected_catalog_entity_ids = self.selected_catalog_entity_ids - selected_group_ids: Unset | list[str] = UNSET + selected_group_ids: list[str] | Unset = UNSET if not isinstance(self.selected_group_ids, Unset): selected_group_ids = self.selected_group_ids - selected_option_ids: Unset | list[str] = UNSET + selected_option_ids: list[str] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids - selected_service_ids: Unset | list[str] = UNSET + selected_service_ids: list[str] | Unset = UNSET if not isinstance(self.selected_service_ids, Unset): selected_service_ids = self.selected_service_ids - selected_functionality_ids: Unset | list[str] = UNSET + selected_functionality_ids: list[str] | Unset = UNSET if not isinstance(self.selected_functionality_ids, Unset): selected_functionality_ids = self.selected_functionality_ids - selected_user_ids: Unset | list[int] = UNSET + selected_user_ids: list[int] | Unset = UNSET if not isinstance(self.selected_user_ids, Unset): selected_user_ids = self.selected_user_ids - selected_environment_ids: Unset | list[str] = UNSET + selected_environment_ids: list[str] | Unset = UNSET if not isinstance(self.selected_environment_ids, Unset): selected_environment_ids = self.selected_environment_ids - selected_cause_ids: Unset | list[str] = UNSET + selected_cause_ids: list[str] | Unset = UNSET if not isinstance(self.selected_cause_ids, Unset): selected_cause_ids = self.selected_cause_ids - selected_incident_type_ids: Unset | list[str] = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.selected_incident_type_ids, Unset): selected_incident_type_ids = self.selected_incident_type_ids @@ -124,12 +126,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: form_field_id = d.pop("form_field_id") - def _parse_value(data: object) -> None | Unset | str: + def _parse_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value = _parse_value(d.pop("value", UNSET)) diff --git a/rootly_sdk/models/new_incident_permission_set.py b/rootly_sdk/models/new_incident_permission_set.py index a6e79085..202c8a3c 100644 --- a/rootly_sdk/models/new_incident_permission_set.py +++ b/rootly_sdk/models/new_incident_permission_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentPermissionSet: data (NewIncidentPermissionSetData): """ - data: "NewIncidentPermissionSetData" + data: NewIncidentPermissionSetData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_permission_set_boolean.py b/rootly_sdk/models/new_incident_permission_set_boolean.py index 5cb940b0..e8f90d1a 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentPermissionSetBoolean: data (NewIncidentPermissionSetBooleanData): """ - data: "NewIncidentPermissionSetBooleanData" + data: NewIncidentPermissionSetBooleanData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_permission_set_boolean_data.py b/rootly_sdk/models/new_incident_permission_set_boolean_data.py index 616b4b97..03268ed5 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class NewIncidentPermissionSetBooleanData: """ type_: NewIncidentPermissionSetBooleanDataType - attributes: "NewIncidentPermissionSetBooleanDataAttributes" + attributes: NewIncidentPermissionSetBooleanDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py b/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py index ae802724..1410bb1e 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -24,16 +26,16 @@ class NewIncidentPermissionSetBooleanDataAttributes: Attributes: incident_permission_set_id (str): kind (NewIncidentPermissionSetBooleanDataAttributesKind): - private (Union[Unset, bool]): - enabled (Union[Unset, bool]): - severity_params (Union[Unset, NewIncidentPermissionSetBooleanDataAttributesSeverityParams]): + private (bool | Unset): + enabled (bool | Unset): + severity_params (NewIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset): """ incident_permission_set_id: str kind: NewIncidentPermissionSetBooleanDataAttributesKind - private: Unset | bool = UNSET - enabled: Unset | bool = UNSET - severity_params: Union[Unset, "NewIncidentPermissionSetBooleanDataAttributesSeverityParams"] = UNSET + private: bool | Unset = UNSET + enabled: bool | Unset = UNSET + severity_params: NewIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: incident_permission_set_id = self.incident_permission_set_id @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - severity_params: Unset | dict[str, Any] = UNSET + severity_params: dict[str, Any] | Unset = UNSET if not isinstance(self.severity_params, Unset): severity_params = self.severity_params.to_dict() @@ -81,7 +83,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _severity_params = d.pop("severity_params", UNSET) - severity_params: Unset | NewIncidentPermissionSetBooleanDataAttributesSeverityParams + severity_params: NewIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset if isinstance(_severity_params, Unset): severity_params = UNSET else: diff --git a/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes_severity_params.py b/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes_severity_params.py index fd4c5616..8785fea3 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes_severity_params.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data_attributes_severity_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,18 +15,18 @@ class NewIncidentPermissionSetBooleanDataAttributesSeverityParams: """ Attributes: - fully_enabled (Union[Unset, bool]): Whether permissions are enabled for any severity incident Default: True. - create_enabled (Union[Unset, bool]): Whether permissions are enabled when creating incident Default: False. - applies_to_unassigned (Union[Unset, bool]): Whether permissions are enabled for incident without severity - Default: True. - severity_ids (Union[None, Unset, list[str]]): Severity ids that determine if an incident is permitted based on + fully_enabled (bool | Unset): Whether permissions are enabled for any severity incident Default: True. + create_enabled (bool | Unset): Whether permissions are enabled when creating incident Default: False. + applies_to_unassigned (bool | Unset): Whether permissions are enabled for incident without severity Default: + True. + severity_ids (list[str] | None | Unset): Severity ids that determine if an incident is permitted based on matching severity """ - fully_enabled: Unset | bool = True - create_enabled: Unset | bool = False - applies_to_unassigned: Unset | bool = True - severity_ids: None | Unset | list[str] = UNSET + fully_enabled: bool | Unset = True + create_enabled: bool | Unset = False + applies_to_unassigned: bool | Unset = True + severity_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: applies_to_unassigned = self.applies_to_unassigned - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -66,7 +68,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: applies_to_unassigned = d.pop("applies_to_unassigned", UNSET) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -77,9 +79,9 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) diff --git a/rootly_sdk/models/new_incident_permission_set_data.py b/rootly_sdk/models/new_incident_permission_set_data.py index a4a36ed2..bf0aa2b4 100644 --- a/rootly_sdk/models/new_incident_permission_set_data.py +++ b/rootly_sdk/models/new_incident_permission_set_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentPermissionSetData: """ type_: NewIncidentPermissionSetDataType - attributes: "NewIncidentPermissionSetDataAttributes" + attributes: NewIncidentPermissionSetDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_permission_set_data_attributes.py b/rootly_sdk/models/new_incident_permission_set_data_attributes.py index d1fca154..6da0aeb4 100644 --- a/rootly_sdk/models/new_incident_permission_set_data_attributes.py +++ b/rootly_sdk/models/new_incident_permission_set_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,39 +23,38 @@ class NewIncidentPermissionSetDataAttributes: """ Attributes: name (str): The incident permission set name. - description (Union[None, Unset, str]): The incident permission set description. - private_incident_permissions (Union[Unset, - list[NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem]]): - public_incident_permissions (Union[Unset, - list[NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem]]): + description (None | str | Unset): The incident permission set description. + private_incident_permissions (list[NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] | + Unset): + public_incident_permissions (list[NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] | Unset): """ name: str - description: None | Unset | str = UNSET - private_incident_permissions: Unset | list[NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] = ( + description: None | str | Unset = UNSET + private_incident_permissions: list[NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] | Unset = ( UNSET ) - public_incident_permissions: Unset | list[NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] = ( + public_incident_permissions: list[NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] | Unset = ( UNSET ) def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - private_incident_permissions: Unset | list[str] = UNSET + private_incident_permissions: list[str] | Unset = UNSET if not isinstance(self.private_incident_permissions, Unset): private_incident_permissions = [] for private_incident_permissions_item_data in self.private_incident_permissions: private_incident_permissions_item: str = private_incident_permissions_item_data private_incident_permissions.append(private_incident_permissions_item) - public_incident_permissions: Unset | list[str] = UNSET + public_incident_permissions: list[str] | Unset = UNSET if not isinstance(self.public_incident_permissions, Unset): public_incident_permissions = [] for public_incident_permissions_item_data in self.public_incident_permissions: @@ -81,36 +82,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - private_incident_permissions = [] _private_incident_permissions = d.pop("private_incident_permissions", UNSET) - for private_incident_permissions_item_data in _private_incident_permissions or []: - private_incident_permissions_item = ( - check_new_incident_permission_set_data_attributes_private_incident_permissions_item( - private_incident_permissions_item_data + private_incident_permissions: ( + list[NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] | Unset + ) = UNSET + if _private_incident_permissions is not UNSET: + private_incident_permissions = [] + for private_incident_permissions_item_data in _private_incident_permissions: + private_incident_permissions_item = ( + check_new_incident_permission_set_data_attributes_private_incident_permissions_item( + private_incident_permissions_item_data + ) ) - ) - private_incident_permissions.append(private_incident_permissions_item) + private_incident_permissions.append(private_incident_permissions_item) - public_incident_permissions = [] _public_incident_permissions = d.pop("public_incident_permissions", UNSET) - for public_incident_permissions_item_data in _public_incident_permissions or []: - public_incident_permissions_item = ( - check_new_incident_permission_set_data_attributes_public_incident_permissions_item( - public_incident_permissions_item_data + public_incident_permissions: ( + list[NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] | Unset + ) = UNSET + if _public_incident_permissions is not UNSET: + public_incident_permissions = [] + for public_incident_permissions_item_data in _public_incident_permissions: + public_incident_permissions_item = ( + check_new_incident_permission_set_data_attributes_public_incident_permissions_item( + public_incident_permissions_item_data + ) ) - ) - public_incident_permissions.append(public_incident_permissions_item) + public_incident_permissions.append(public_incident_permissions_item) new_incident_permission_set_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/new_incident_permission_set_resource.py b/rootly_sdk/models/new_incident_permission_set_resource.py index df9037a6..f41a674e 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource.py +++ b/rootly_sdk/models/new_incident_permission_set_resource.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentPermissionSetResource: data (NewIncidentPermissionSetResourceData): """ - data: "NewIncidentPermissionSetResourceData" + data: NewIncidentPermissionSetResourceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_permission_set_resource_data.py b/rootly_sdk/models/new_incident_permission_set_resource_data.py index e42e991f..0e9e9b04 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class NewIncidentPermissionSetResourceData: """ type_: NewIncidentPermissionSetResourceDataType - attributes: "NewIncidentPermissionSetResourceDataAttributes" + attributes: NewIncidentPermissionSetResourceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py b/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py index e195b196..579e08c2 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -24,18 +26,18 @@ class NewIncidentPermissionSetResourceDataAttributes: Attributes: incident_permission_set_id (str): kind (NewIncidentPermissionSetResourceDataAttributesKind): - private (Union[Unset, bool]): - resource_id (Union[Unset, str]): - resource_type (Union[Unset, str]): - severity_params (Union[Unset, NewIncidentPermissionSetResourceDataAttributesSeverityParams]): + private (bool | Unset): + resource_id (str | Unset): + resource_type (str | Unset): + severity_params (NewIncidentPermissionSetResourceDataAttributesSeverityParams | Unset): """ incident_permission_set_id: str kind: NewIncidentPermissionSetResourceDataAttributesKind - private: Unset | bool = UNSET - resource_id: Unset | str = UNSET - resource_type: Unset | str = UNSET - severity_params: Union[Unset, "NewIncidentPermissionSetResourceDataAttributesSeverityParams"] = UNSET + private: bool | Unset = UNSET + resource_id: str | Unset = UNSET + resource_type: str | Unset = UNSET + severity_params: NewIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: incident_permission_set_id = self.incident_permission_set_id @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: resource_type = self.resource_type - severity_params: Unset | dict[str, Any] = UNSET + severity_params: dict[str, Any] | Unset = UNSET if not isinstance(self.severity_params, Unset): severity_params = self.severity_params.to_dict() @@ -89,7 +91,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: resource_type = d.pop("resource_type", UNSET) _severity_params = d.pop("severity_params", UNSET) - severity_params: Unset | NewIncidentPermissionSetResourceDataAttributesSeverityParams + severity_params: NewIncidentPermissionSetResourceDataAttributesSeverityParams | Unset if isinstance(_severity_params, Unset): severity_params = UNSET else: diff --git a/rootly_sdk/models/new_incident_permission_set_resource_data_attributes_severity_params.py b/rootly_sdk/models/new_incident_permission_set_resource_data_attributes_severity_params.py index e610b5e1..c5db1e9f 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data_attributes_severity_params.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data_attributes_severity_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,18 +15,18 @@ class NewIncidentPermissionSetResourceDataAttributesSeverityParams: """ Attributes: - fully_enabled (Union[Unset, bool]): Whether permissions are enabled for any severity incident Default: True. - create_enabled (Union[Unset, bool]): Whether permissions are enabled when creating incident Default: False. - applies_to_unassigned (Union[Unset, bool]): Whether permissions are enabled for incident without severity - Default: True. - severity_ids (Union[None, Unset, list[str]]): Severity ids that determine if an incident is permitted based on + fully_enabled (bool | Unset): Whether permissions are enabled for any severity incident Default: True. + create_enabled (bool | Unset): Whether permissions are enabled when creating incident Default: False. + applies_to_unassigned (bool | Unset): Whether permissions are enabled for incident without severity Default: + True. + severity_ids (list[str] | None | Unset): Severity ids that determine if an incident is permitted based on matching severity """ - fully_enabled: Unset | bool = True - create_enabled: Unset | bool = False - applies_to_unassigned: Unset | bool = True - severity_ids: None | Unset | list[str] = UNSET + fully_enabled: bool | Unset = True + create_enabled: bool | Unset = False + applies_to_unassigned: bool | Unset = True + severity_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: applies_to_unassigned = self.applies_to_unassigned - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -66,7 +68,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: applies_to_unassigned = d.pop("applies_to_unassigned", UNSET) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -77,9 +79,9 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) diff --git a/rootly_sdk/models/new_incident_role.py b/rootly_sdk/models/new_incident_role.py index 6638789a..b7ba608f 100644 --- a/rootly_sdk/models/new_incident_role.py +++ b/rootly_sdk/models/new_incident_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentRole: data (NewIncidentRoleData): """ - data: "NewIncidentRoleData" + data: NewIncidentRoleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_role_data.py b/rootly_sdk/models/new_incident_role_data.py index b7be2d03..2a142da6 100644 --- a/rootly_sdk/models/new_incident_role_data.py +++ b/rootly_sdk/models/new_incident_role_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewIncidentRoleData: """ type_: NewIncidentRoleDataType - attributes: "NewIncidentRoleDataAttributes" + attributes: NewIncidentRoleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_role_data_attributes.py b/rootly_sdk/models/new_incident_role_data_attributes.py index 873d8b73..bdf3cc53 100644 --- a/rootly_sdk/models/new_incident_role_data_attributes.py +++ b/rootly_sdk/models/new_incident_role_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,38 +15,38 @@ class NewIncidentRoleDataAttributes: """ Attributes: name (str): The name of the incident role - summary (Union[None, Unset, str]): The summary of the incident role - description (Union[None, Unset, str]): The description of the incident role - position (Union[None, Unset, int]): Position of the incident role - optional (Union[Unset, bool]): - enabled (Union[Unset, bool]): - allow_multi_user_assignment (Union[Unset, bool]): + summary (None | str | Unset): The summary of the incident role + description (None | str | Unset): The description of the incident role + position (int | None | Unset): Position of the incident role + optional (bool | Unset): + enabled (bool | Unset): + allow_multi_user_assignment (bool | Unset): """ name: str - summary: None | Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - optional: Unset | bool = UNSET - enabled: Unset | bool = UNSET - allow_multi_user_assignment: Unset | bool = UNSET + summary: None | str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + optional: bool | Unset = UNSET + enabled: bool | Unset = UNSET + allow_multi_user_assignment: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -83,30 +85,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_incident_role_task.py b/rootly_sdk/models/new_incident_role_task.py index b9c26306..2513fa9a 100644 --- a/rootly_sdk/models/new_incident_role_task.py +++ b/rootly_sdk/models/new_incident_role_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentRoleTask: data (NewIncidentRoleTaskData): """ - data: "NewIncidentRoleTaskData" + data: NewIncidentRoleTaskData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_role_task_data.py b/rootly_sdk/models/new_incident_role_task_data.py index 47f96898..53735fc8 100644 --- a/rootly_sdk/models/new_incident_role_task_data.py +++ b/rootly_sdk/models/new_incident_role_task_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentRoleTaskData: """ type_: NewIncidentRoleTaskDataType - attributes: "NewIncidentRoleTaskDataAttributes" + attributes: NewIncidentRoleTaskDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_role_task_data_attributes.py b/rootly_sdk/models/new_incident_role_task_data_attributes.py index 02f7f4c8..9de0da86 100644 --- a/rootly_sdk/models/new_incident_role_task_data_attributes.py +++ b/rootly_sdk/models/new_incident_role_task_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,28 +19,28 @@ class NewIncidentRoleTaskDataAttributes: """ Attributes: task (str): The task of the incident task - incident_role_id (Union[Unset, str]): - description (Union[None, Unset, str]): The description of the incident task - priority (Union[Unset, NewIncidentRoleTaskDataAttributesPriority]): The priority of the incident task + incident_role_id (str | Unset): + description (None | str | Unset): The description of the incident task + priority (NewIncidentRoleTaskDataAttributesPriority | Unset): The priority of the incident task """ task: str - incident_role_id: Unset | str = UNSET - description: None | Unset | str = UNSET - priority: Unset | NewIncidentRoleTaskDataAttributesPriority = UNSET + incident_role_id: str | Unset = UNSET + description: None | str | Unset = UNSET + priority: NewIncidentRoleTaskDataAttributesPriority | Unset = UNSET def to_dict(self) -> dict[str, Any]: task = self.task incident_role_id = self.incident_role_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority @@ -65,17 +67,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_role_id = d.pop("incident_role_id", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | NewIncidentRoleTaskDataAttributesPriority + priority: NewIncidentRoleTaskDataAttributesPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/new_incident_status_page_event.py b/rootly_sdk/models/new_incident_status_page_event.py index 084ae8e3..bfb8fbe5 100644 --- a/rootly_sdk/models/new_incident_status_page_event.py +++ b/rootly_sdk/models/new_incident_status_page_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentStatusPageEvent: data (NewIncidentStatusPageEventData): """ - data: "NewIncidentStatusPageEventData" + data: NewIncidentStatusPageEventData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_status_page_event_data.py b/rootly_sdk/models/new_incident_status_page_event_data.py index 2eb740df..8724c5b4 100644 --- a/rootly_sdk/models/new_incident_status_page_event_data.py +++ b/rootly_sdk/models/new_incident_status_page_event_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentStatusPageEventData: """ type_: NewIncidentStatusPageEventDataType - attributes: "NewIncidentStatusPageEventDataAttributes" + attributes: NewIncidentStatusPageEventDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_status_page_event_data_attributes.py b/rootly_sdk/models/new_incident_status_page_event_data_attributes.py index 5d489789..1d5a7003 100644 --- a/rootly_sdk/models/new_incident_status_page_event_data_attributes.py +++ b/rootly_sdk/models/new_incident_status_page_event_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,35 +19,35 @@ class NewIncidentStatusPageEventDataAttributes: """ Attributes: event (str): The summary of the incident event - status_page_id (Union[Unset, str]): Unique ID of the status page you wish to post the event to - status (Union[Unset, NewIncidentStatusPageEventDataAttributesStatus]): The status of the incident event - notify_subscribers (Union[None, Unset, bool]): Notify all status pages subscribers Default: False. - should_tweet (Union[None, Unset, bool]): For Statuspage.io integrated pages auto publishes a tweet for your - update Default: False. + status_page_id (str | Unset): Unique ID of the status page you wish to post the event to + status (NewIncidentStatusPageEventDataAttributesStatus | Unset): The status of the incident event + notify_subscribers (bool | None | Unset): Notify all status pages subscribers Default: False. + should_tweet (bool | None | Unset): For Statuspage.io integrated pages auto publishes a tweet for your update + Default: False. """ event: str - status_page_id: Unset | str = UNSET - status: Unset | NewIncidentStatusPageEventDataAttributesStatus = UNSET - notify_subscribers: None | Unset | bool = False - should_tweet: None | Unset | bool = False + status_page_id: str | Unset = UNSET + status: NewIncidentStatusPageEventDataAttributesStatus | Unset = UNSET + notify_subscribers: bool | None | Unset = False + should_tweet: bool | None | Unset = False def to_dict(self) -> dict[str, Any]: event = self.event status_page_id = self.status_page_id - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - notify_subscribers: None | Unset | bool + notify_subscribers: bool | None | Unset if isinstance(self.notify_subscribers, Unset): notify_subscribers = UNSET else: notify_subscribers = self.notify_subscribers - should_tweet: None | Unset | bool + should_tweet: bool | None | Unset if isinstance(self.should_tweet, Unset): should_tweet = UNSET else: @@ -77,27 +79,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_page_id = d.pop("status_page_id", UNSET) _status = d.pop("status", UNSET) - status: Unset | NewIncidentStatusPageEventDataAttributesStatus + status: NewIncidentStatusPageEventDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_new_incident_status_page_event_data_attributes_status(_status) - def _parse_notify_subscribers(data: object) -> None | Unset | bool: + def _parse_notify_subscribers(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) notify_subscribers = _parse_notify_subscribers(d.pop("notify_subscribers", UNSET)) - def _parse_should_tweet(data: object) -> None | Unset | bool: + def _parse_should_tweet(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) should_tweet = _parse_should_tweet(d.pop("should_tweet", UNSET)) diff --git a/rootly_sdk/models/new_incident_sub_status.py b/rootly_sdk/models/new_incident_sub_status.py index 8a1dd81b..8f448073 100644 --- a/rootly_sdk/models/new_incident_sub_status.py +++ b/rootly_sdk/models/new_incident_sub_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentSubStatus: data (NewIncidentSubStatusData): """ - data: "NewIncidentSubStatusData" + data: NewIncidentSubStatusData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_sub_status_data.py b/rootly_sdk/models/new_incident_sub_status_data.py index 7d41ff0f..2fe9ea36 100644 --- a/rootly_sdk/models/new_incident_sub_status_data.py +++ b/rootly_sdk/models/new_incident_sub_status_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewIncidentSubStatusData: """ type_: NewIncidentSubStatusDataType - attributes: "NewIncidentSubStatusDataAttributes" + attributes: NewIncidentSubStatusDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_sub_status_data_attributes.py b/rootly_sdk/models/new_incident_sub_status_data_attributes.py index 27d2e96e..b63d1823 100644 --- a/rootly_sdk/models/new_incident_sub_status_data_attributes.py +++ b/rootly_sdk/models/new_incident_sub_status_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,19 +18,19 @@ class NewIncidentSubStatusDataAttributes: sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's sub-status was assigned. assigned_at (str): - assigned_by_user_id (Union[None, Unset, int]): + assigned_by_user_id (int | None | Unset): """ sub_status_id: str assigned_at: str - assigned_by_user_id: None | Unset | int = UNSET + assigned_by_user_id: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: sub_status_id = self.sub_status_id assigned_at = self.assigned_at - assigned_by_user_id: None | Unset | int + assigned_by_user_id: int | None | Unset if isinstance(self.assigned_by_user_id, Unset): assigned_by_user_id = UNSET else: @@ -54,12 +56,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assigned_at = d.pop("assigned_at") - def _parse_assigned_by_user_id(data: object) -> None | Unset | int: + def _parse_assigned_by_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) assigned_by_user_id = _parse_assigned_by_user_id(d.pop("assigned_by_user_id", UNSET)) diff --git a/rootly_sdk/models/new_incident_type.py b/rootly_sdk/models/new_incident_type.py index 114709ac..0a7d41a3 100644 --- a/rootly_sdk/models/new_incident_type.py +++ b/rootly_sdk/models/new_incident_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewIncidentType: data (NewIncidentTypeData): """ - data: "NewIncidentTypeData" + data: NewIncidentTypeData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_type_data.py b/rootly_sdk/models/new_incident_type_data.py index 59b64a71..ca57d013 100644 --- a/rootly_sdk/models/new_incident_type_data.py +++ b/rootly_sdk/models/new_incident_type_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewIncidentTypeData: """ type_: NewIncidentTypeDataType - attributes: "NewIncidentTypeDataAttributes" + attributes: NewIncidentTypeDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_incident_type_data_attributes.py b/rootly_sdk/models/new_incident_type_data_attributes.py index 2c7f3388..4d12991d 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes.py +++ b/rootly_sdk/models/new_incident_type_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.new_incident_type_data_attributes_fields_item import NewIncidentTypeDataAttributesFieldsItem + from ..models.new_incident_type_data_attributes_properties_item import NewIncidentTypeDataAttributesPropertiesItem from ..models.new_incident_type_data_attributes_slack_aliases_type_0_item import ( NewIncidentTypeDataAttributesSlackAliasesType0Item, ) @@ -23,49 +25,49 @@ class NewIncidentTypeDataAttributes: """ Attributes: name (str): The name of the incident type - description (Union[None, Unset, str]): The description of the incident type - color (Union[None, Unset, str]): The hex color of the incident type - position (Union[None, Unset, int]): Position of the incident type - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the incident type - slack_channels (Union[None, Unset, list['NewIncidentTypeDataAttributesSlackChannelsType0Item']]): Slack Channels + description (None | str | Unset): The description of the incident type + color (None | str | Unset): The hex color of the incident type + position (int | None | Unset): Position of the incident type + notify_emails (list[str] | None | Unset): Emails to attach to the incident type + slack_channels (list[NewIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this incident type - slack_aliases (Union[None, Unset, list['NewIncidentTypeDataAttributesSlackAliasesType0Item']]): Slack Aliases + slack_aliases (list[NewIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated with this incident type - fields (Union[Unset, list['NewIncidentTypeDataAttributesFieldsItem']]): Array of field values for this incident - type. + properties (list[NewIncidentTypeDataAttributesPropertiesItem] | Unset): Array of property values for this + incident type. """ name: str - description: None | Unset | str = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["NewIncidentTypeDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["NewIncidentTypeDataAttributesSlackAliasesType0Item"] = UNSET - fields: Unset | list["NewIncidentTypeDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[NewIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[NewIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + properties: list[NewIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -86,7 +88,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -98,12 +100,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -124,14 +126,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.new_incident_type_data_attributes_fields_item import NewIncidentTypeDataAttributesFieldsItem + from ..models.new_incident_type_data_attributes_properties_item import ( + NewIncidentTypeDataAttributesPropertiesItem, + ) from ..models.new_incident_type_data_attributes_slack_aliases_type_0_item import ( NewIncidentTypeDataAttributesSlackAliasesType0Item, ) @@ -142,34 +146,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -180,15 +184,15 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["NewIncidentTypeDataAttributesSlackChannelsType0Item"]: + ) -> list[NewIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -206,15 +210,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewIncidentTypeDataAttributesSlackChannelsType0Item"], data) + return cast(list[NewIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["NewIncidentTypeDataAttributesSlackAliasesType0Item"]: + ) -> list[NewIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -232,18 +236,20 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewIncidentTypeDataAttributesSlackAliasesType0Item"], data) + return cast(list[NewIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewIncidentTypeDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewIncidentTypeDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_incident_type_data_attributes = cls( name=name, @@ -253,7 +259,7 @@ def _parse_slack_aliases( notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) return new_incident_type_data_attributes diff --git a/rootly_sdk/models/update_functionality_data_attributes_fields_item.py b/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py similarity index 62% rename from rootly_sdk/models/update_functionality_data_attributes_fields_item.py rename to rootly_sdk/models/new_incident_type_data_attributes_properties_item.py index 748989e0..5d2658eb 100644 --- a/rootly_sdk/models/update_functionality_data_attributes_fields_item.py +++ b/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="UpdateFunctionalityDataAttributesFieldsItem") +T = TypeVar("T", bound="NewIncidentTypeDataAttributesPropertiesItem") @_attrs_define -class UpdateFunctionalityDataAttributesFieldsItem: - """Set a value for a catalog field +class NewIncidentTypeDataAttributesPropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - update_functionality_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + new_incident_type_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - update_functionality_data_attributes_fields_item.additional_properties = d - return update_functionality_data_attributes_fields_item + new_incident_type_data_attributes_properties_item.additional_properties = d + return new_incident_type_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/new_incident_type_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/new_incident_type_data_attributes_slack_aliases_type_0_item.py index 3bb39fbe..99bf6dd1 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/new_incident_type_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_incident_type_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/new_incident_type_data_attributes_slack_channels_type_0_item.py index b7bde900..722bc1fe 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/new_incident_type_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_live_call_router.py b/rootly_sdk/models/new_live_call_router.py index 6bc1a616..c1c0d252 100644 --- a/rootly_sdk/models/new_live_call_router.py +++ b/rootly_sdk/models/new_live_call_router.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewLiveCallRouter: data (NewLiveCallRouterData): """ - data: "NewLiveCallRouterData" + data: NewLiveCallRouterData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_live_call_router_data.py b/rootly_sdk/models/new_live_call_router_data.py index db6aba36..594947f7 100644 --- a/rootly_sdk/models/new_live_call_router_data.py +++ b/rootly_sdk/models/new_live_call_router_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewLiveCallRouterData: """ type_: NewLiveCallRouterDataType - attributes: "NewLiveCallRouterDataAttributes" + attributes: NewLiveCallRouterDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_live_call_router_data_attributes.py b/rootly_sdk/models/new_live_call_router_data_attributes.py index dc5476aa..e9dd0bba 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -45,23 +47,21 @@ class NewLiveCallRouterDataAttributes: [generate_phone_number](#//api/v1/live_call_routers/generate_phone_number) API and pass that phone number here to register voicemail_greeting (str): The voicemail greeting of the live_call_router - paging_targets (list['NewLiveCallRouterDataAttributesPagingTargetsItem']): Paging targets that callers can - select from when this live call router is configured as a phone tree. - enabled (Union[Unset, bool]): Whether the live_call_router is enabled - caller_greeting (Union[Unset, str]): The caller greeting message of the live_call_router - waiting_music_url (Union[Unset, NewLiveCallRouterDataAttributesWaitingMusicUrl]): The waiting music URL of the + paging_targets (list[NewLiveCallRouterDataAttributesPagingTargetsItem]): Paging targets that callers can select + from when this live call router is configured as a phone tree. + enabled (bool | Unset): Whether the live_call_router is enabled + caller_greeting (str | Unset): The caller greeting message of the live_call_router + waiting_music_url (NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset): The waiting music URL of the live_call_router - sent_to_voicemail_delay (Union[Unset, int]): The delay (seconds) after which the caller in redirected to - voicemail - should_redirect_to_voicemail_on_no_answer (Union[Unset, bool]): This prompts the caller to choose voicemail or - connect live - escalation_level_delay_in_seconds (Union[Unset, int]): This overrides the delay (seconds) in escalation levels - should_auto_resolve_alert_on_call_end (Union[Unset, bool]): This overrides the delay (seconds) in escalation - levels - alert_urgency_id (Union[Unset, str]): This is used in escalation paths to determine who to page - calling_tree_prompt (Union[Unset, str]): The audio instructions callers will hear when they call this number, + sent_to_voicemail_delay (int | Unset): The delay (seconds) after which the caller in redirected to voicemail + should_redirect_to_voicemail_on_no_answer (bool | Unset): This prompts the caller to choose voicemail or connect + live + escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels + should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels + alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page + calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number, prompting them to select from available options to route their call - escalation_policy_trigger_params (Union[Unset, NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams]): + escalation_policy_trigger_params (NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset): """ kind: NewLiveCallRouterDataAttributesKind @@ -70,19 +70,17 @@ class NewLiveCallRouterDataAttributes: phone_type: NewLiveCallRouterDataAttributesPhoneType phone_number: str voicemail_greeting: str - paging_targets: list["NewLiveCallRouterDataAttributesPagingTargetsItem"] - enabled: Unset | bool = UNSET - caller_greeting: Unset | str = UNSET - waiting_music_url: Unset | NewLiveCallRouterDataAttributesWaitingMusicUrl = UNSET - sent_to_voicemail_delay: Unset | int = UNSET - should_redirect_to_voicemail_on_no_answer: Unset | bool = UNSET - escalation_level_delay_in_seconds: Unset | int = UNSET - should_auto_resolve_alert_on_call_end: Unset | bool = UNSET - alert_urgency_id: Unset | str = UNSET - calling_tree_prompt: Unset | str = UNSET - escalation_policy_trigger_params: Union[Unset, "NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams"] = ( - UNSET - ) + paging_targets: list[NewLiveCallRouterDataAttributesPagingTargetsItem] + enabled: bool | Unset = UNSET + caller_greeting: str | Unset = UNSET + waiting_music_url: NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset = UNSET + sent_to_voicemail_delay: int | Unset = UNSET + should_redirect_to_voicemail_on_no_answer: bool | Unset = UNSET + escalation_level_delay_in_seconds: int | Unset = UNSET + should_auto_resolve_alert_on_call_end: bool | Unset = UNSET + alert_urgency_id: str | Unset = UNSET + calling_tree_prompt: str | Unset = UNSET + escalation_policy_trigger_params: NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: kind: str = self.kind @@ -106,7 +104,7 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting - waiting_music_url: Unset | str = UNSET + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -122,7 +120,7 @@ def to_dict(self) -> dict[str, Any]: calling_tree_prompt = self.calling_tree_prompt - escalation_policy_trigger_params: Unset | dict[str, Any] = UNSET + escalation_policy_trigger_params: dict[str, Any] | Unset = UNSET if not isinstance(self.escalation_policy_trigger_params, Unset): escalation_policy_trigger_params = self.escalation_policy_trigger_params.to_dict() @@ -196,7 +194,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) _waiting_music_url = d.pop("waiting_music_url", UNSET) - waiting_music_url: Unset | NewLiveCallRouterDataAttributesWaitingMusicUrl + waiting_music_url: NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): waiting_music_url = UNSET else: @@ -215,7 +213,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) _escalation_policy_trigger_params = d.pop("escalation_policy_trigger_params", UNSET) - escalation_policy_trigger_params: Unset | NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams + escalation_policy_trigger_params: NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset if isinstance(_escalation_policy_trigger_params, Unset): escalation_policy_trigger_params = UNSET else: diff --git a/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py b/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py index 642d1f76..e60e3f08 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes_country_code.py @@ -1,6 +1,6 @@ from typing import Literal, cast -NewLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "US"] +NewLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] NEW_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_COUNTRY_CODE_VALUES: set[NewLiveCallRouterDataAttributesCountryCode] = { "AU", @@ -9,6 +9,7 @@ "GB", "NL", "NZ", + "SE", "US", } diff --git a/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params.py b/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params.py index 46ef8e27..53411b43 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,7 +19,8 @@ class NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams: """ Attributes: id (str): The ID of notification target - type_ (NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType): The type of the notification target + type_ (NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType): The type of the notification target. + Please contact support if you encounter issues using `functionality` as a target type. """ id: str diff --git a/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params_type.py b/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params_type.py index 39ff9577..17cae63a 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params_type.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes_escalation_policy_trigger_params_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType = Literal["escalation_policy", "group", "service"] +NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType = Literal[ + "escalation_policy", "functionality", "group", "service" +] NEW_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_ESCALATION_POLICY_TRIGGER_PARAMS_TYPE_VALUES: set[ NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType ] = { "escalation_policy", + "functionality", "group", "service", } diff --git a/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item.py b/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item.py index a88d2606..fbd27620 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,7 +19,8 @@ class NewLiveCallRouterDataAttributesPagingTargetsItem: """ Attributes: id (str): The ID of paging target - type_ (NewLiveCallRouterDataAttributesPagingTargetsItemType): The type of the paging target + type_ (NewLiveCallRouterDataAttributesPagingTargetsItemType): The type of the paging target. Please contact + support if you encounter issues using `functionality` as a target type. alert_urgency_id (str): This is used in escalation paths to determine who to page """ diff --git a/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item_type.py b/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item_type.py index 8d94d76f..920d1eed 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item_type.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes_paging_targets_item_type.py @@ -1,11 +1,12 @@ from typing import Literal, cast -NewLiveCallRouterDataAttributesPagingTargetsItemType = Literal["escalation_policy", "service", "team"] +NewLiveCallRouterDataAttributesPagingTargetsItemType = Literal["escalation_policy", "functionality", "service", "team"] NEW_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_PAGING_TARGETS_ITEM_TYPE_VALUES: set[ NewLiveCallRouterDataAttributesPagingTargetsItemType ] = { "escalation_policy", + "functionality", "service", "team", } diff --git a/rootly_sdk/models/new_on_call_pay_report.py b/rootly_sdk/models/new_on_call_pay_report.py new file mode 100644 index 00000000..7e2724df --- /dev/null +++ b/rootly_sdk/models/new_on_call_pay_report.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_on_call_pay_report_data import NewOnCallPayReportData + + +T = TypeVar("T", bound="NewOnCallPayReport") + + +@_attrs_define +class NewOnCallPayReport: + """ + Attributes: + data (NewOnCallPayReportData): + """ + + data: NewOnCallPayReportData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_on_call_pay_report_data import NewOnCallPayReportData + + d = dict(src_dict) + data = NewOnCallPayReportData.from_dict(d.pop("data")) + + new_on_call_pay_report = cls( + data=data, + ) + + new_on_call_pay_report.additional_properties = d + return new_on_call_pay_report + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_on_call_pay_report_data.py b/rootly_sdk/models/new_on_call_pay_report_data.py new file mode 100644 index 00000000..3c6e1181 --- /dev/null +++ b/rootly_sdk/models/new_on_call_pay_report_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_on_call_pay_report_data_type import NewOnCallPayReportDataType, check_new_on_call_pay_report_data_type + +if TYPE_CHECKING: + from ..models.new_on_call_pay_report_data_attributes import NewOnCallPayReportDataAttributes + + +T = TypeVar("T", bound="NewOnCallPayReportData") + + +@_attrs_define +class NewOnCallPayReportData: + """ + Attributes: + type_ (NewOnCallPayReportDataType): + attributes (NewOnCallPayReportDataAttributes): + """ + + type_: NewOnCallPayReportDataType + attributes: NewOnCallPayReportDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_on_call_pay_report_data_attributes import NewOnCallPayReportDataAttributes + + d = dict(src_dict) + type_ = check_new_on_call_pay_report_data_type(d.pop("type")) + + attributes = NewOnCallPayReportDataAttributes.from_dict(d.pop("attributes")) + + new_on_call_pay_report_data = cls( + type_=type_, + attributes=attributes, + ) + + new_on_call_pay_report_data.additional_properties = d + return new_on_call_pay_report_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_on_call_pay_report_data_attributes.py b/rootly_sdk/models/new_on_call_pay_report_data_attributes.py new file mode 100644 index 00000000..0f1861c1 --- /dev/null +++ b/rootly_sdk/models/new_on_call_pay_report_data_attributes.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewOnCallPayReportDataAttributes") + + +@_attrs_define +class NewOnCallPayReportDataAttributes: + """ + Attributes: + start_date (datetime.date): The start date for the report period. + end_date (datetime.date): The end date for the report period. + schedule_ids (list[str] | Unset): List of schedule UUIDs to scope the report. + """ + + start_date: datetime.date + end_date: datetime.date + schedule_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + start_date = self.start_date.isoformat() + + end_date = self.end_date.isoformat() + + schedule_ids: list[str] | Unset = UNSET + if not isinstance(self.schedule_ids, Unset): + schedule_ids = self.schedule_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "start_date": start_date, + "end_date": end_date, + } + ) + if schedule_ids is not UNSET: + field_dict["schedule_ids"] = schedule_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + start_date = isoparse(d.pop("start_date")).date() + + end_date = isoparse(d.pop("end_date")).date() + + schedule_ids = cast(list[str], d.pop("schedule_ids", UNSET)) + + new_on_call_pay_report_data_attributes = cls( + start_date=start_date, + end_date=end_date, + schedule_ids=schedule_ids, + ) + + return new_on_call_pay_report_data_attributes diff --git a/rootly_sdk/models/new_on_call_pay_report_data_type.py b/rootly_sdk/models/new_on_call_pay_report_data_type.py new file mode 100644 index 00000000..76ca4518 --- /dev/null +++ b/rootly_sdk/models/new_on_call_pay_report_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewOnCallPayReportDataType = Literal["on_call_pay_reports"] + +NEW_ON_CALL_PAY_REPORT_DATA_TYPE_VALUES: set[NewOnCallPayReportDataType] = { + "on_call_pay_reports", +} + + +def check_new_on_call_pay_report_data_type(value: str | None) -> NewOnCallPayReportDataType | None: + if value is None: + return None + if value in NEW_ON_CALL_PAY_REPORT_DATA_TYPE_VALUES: + return cast(NewOnCallPayReportDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_ON_CALL_PAY_REPORT_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_on_call_role.py b/rootly_sdk/models/new_on_call_role.py index 62976edf..5d5272ff 100644 --- a/rootly_sdk/models/new_on_call_role.py +++ b/rootly_sdk/models/new_on_call_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewOnCallRole: data (NewOnCallRoleData): """ - data: "NewOnCallRoleData" + data: NewOnCallRoleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_on_call_role_data.py b/rootly_sdk/models/new_on_call_role_data.py index 05e59c36..2dc68062 100644 --- a/rootly_sdk/models/new_on_call_role_data.py +++ b/rootly_sdk/models/new_on_call_role_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewOnCallRoleData: """ type_: NewOnCallRoleDataType - attributes: "NewOnCallRoleDataAttributes" + attributes: NewOnCallRoleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_on_call_role_data_attributes.py b/rootly_sdk/models/new_on_call_role_data_attributes.py index 71aa90a0..fb8da60a 100644 --- a/rootly_sdk/models/new_on_call_role_data_attributes.py +++ b/rootly_sdk/models/new_on_call_role_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -101,215 +103,212 @@ class NewOnCallRoleDataAttributes: """ Attributes: name (str): The role name. - system_role (Union[Unset, str]): The kind of role (user and custom type roles are only editable) Default: - 'custom'. - alert_fields_permissions (Union[Unset, list[NewOnCallRoleDataAttributesAlertFieldsPermissionsItem]]): - alert_groups_permissions (Union[Unset, list[NewOnCallRoleDataAttributesAlertGroupsPermissionsItem]]): - alert_routing_rules_permissions (Union[Unset, - list[NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem]]): - on_call_readiness_report_permissions (Union[Unset, - list[NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem]]): - on_call_roles_permissions (Union[Unset, list[NewOnCallRoleDataAttributesOnCallRolesPermissionsItem]]): - alert_sources_permissions (Union[Unset, list[NewOnCallRoleDataAttributesAlertSourcesPermissionsItem]]): - alert_urgency_permissions (Union[Unset, list[NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem]]): - alerts_permissions (Union[Unset, list[NewOnCallRoleDataAttributesAlertsPermissionsItem]]): - api_keys_permissions (Union[Unset, list[NewOnCallRoleDataAttributesApiKeysPermissionsItem]]): - audits_permissions (Union[Unset, list[NewOnCallRoleDataAttributesAuditsPermissionsItem]]): - contacts_permissions (Union[Unset, list[NewOnCallRoleDataAttributesContactsPermissionsItem]]): - escalation_policies_permissions (Union[Unset, - list[NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem]]): - groups_permissions (Union[Unset, list[NewOnCallRoleDataAttributesGroupsPermissionsItem]]): - heartbeats_permissions (Union[Unset, list[NewOnCallRoleDataAttributesHeartbeatsPermissionsItem]]): - integrations_permissions (Union[Unset, list[NewOnCallRoleDataAttributesIntegrationsPermissionsItem]]): - invitations_permissions (Union[Unset, list[NewOnCallRoleDataAttributesInvitationsPermissionsItem]]): - live_call_routing_permissions (Union[Unset, list[NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem]]): - schedule_override_permissions (Union[Unset, list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem]]): - schedules_permissions (Union[Unset, list[NewOnCallRoleDataAttributesSchedulesPermissionsItem]]): - services_permissions (Union[Unset, list[NewOnCallRoleDataAttributesServicesPermissionsItem]]): - webhooks_permissions (Union[Unset, list[NewOnCallRoleDataAttributesWebhooksPermissionsItem]]): - workflows_permissions (Union[Unset, list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem]]): + system_role (str | Unset): The kind of role (user and custom type roles are only editable) Default: 'custom'. + alert_fields_permissions (list[NewOnCallRoleDataAttributesAlertFieldsPermissionsItem] | Unset): + alert_groups_permissions (list[NewOnCallRoleDataAttributesAlertGroupsPermissionsItem] | Unset): + alert_routing_rules_permissions (list[NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] | Unset): + on_call_readiness_report_permissions (list[NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] | + Unset): + on_call_roles_permissions (list[NewOnCallRoleDataAttributesOnCallRolesPermissionsItem] | Unset): + alert_sources_permissions (list[NewOnCallRoleDataAttributesAlertSourcesPermissionsItem] | Unset): + alert_urgency_permissions (list[NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem] | Unset): + alerts_permissions (list[NewOnCallRoleDataAttributesAlertsPermissionsItem] | Unset): + api_keys_permissions (list[NewOnCallRoleDataAttributesApiKeysPermissionsItem] | Unset): + audits_permissions (list[NewOnCallRoleDataAttributesAuditsPermissionsItem] | Unset): + contacts_permissions (list[NewOnCallRoleDataAttributesContactsPermissionsItem] | Unset): + escalation_policies_permissions (list[NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] | Unset): + groups_permissions (list[NewOnCallRoleDataAttributesGroupsPermissionsItem] | Unset): + heartbeats_permissions (list[NewOnCallRoleDataAttributesHeartbeatsPermissionsItem] | Unset): + integrations_permissions (list[NewOnCallRoleDataAttributesIntegrationsPermissionsItem] | Unset): + invitations_permissions (list[NewOnCallRoleDataAttributesInvitationsPermissionsItem] | Unset): + live_call_routing_permissions (list[NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] | Unset): + schedule_override_permissions (list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset): + schedules_permissions (list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset): + services_permissions (list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset): + webhooks_permissions (list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset): + workflows_permissions (list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset): """ name: str - system_role: Unset | str = "custom" - alert_fields_permissions: Unset | list[NewOnCallRoleDataAttributesAlertFieldsPermissionsItem] = UNSET - alert_groups_permissions: Unset | list[NewOnCallRoleDataAttributesAlertGroupsPermissionsItem] = UNSET - alert_routing_rules_permissions: Unset | list[NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] = UNSET + system_role: str | Unset = "custom" + alert_fields_permissions: list[NewOnCallRoleDataAttributesAlertFieldsPermissionsItem] | Unset = UNSET + alert_groups_permissions: list[NewOnCallRoleDataAttributesAlertGroupsPermissionsItem] | Unset = UNSET + alert_routing_rules_permissions: list[NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] | Unset = UNSET on_call_readiness_report_permissions: ( - Unset | list[NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] + list[NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] | Unset ) = UNSET - on_call_roles_permissions: Unset | list[NewOnCallRoleDataAttributesOnCallRolesPermissionsItem] = UNSET - alert_sources_permissions: Unset | list[NewOnCallRoleDataAttributesAlertSourcesPermissionsItem] = UNSET - alert_urgency_permissions: Unset | list[NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem] = UNSET - alerts_permissions: Unset | list[NewOnCallRoleDataAttributesAlertsPermissionsItem] = UNSET - api_keys_permissions: Unset | list[NewOnCallRoleDataAttributesApiKeysPermissionsItem] = UNSET - audits_permissions: Unset | list[NewOnCallRoleDataAttributesAuditsPermissionsItem] = UNSET - contacts_permissions: Unset | list[NewOnCallRoleDataAttributesContactsPermissionsItem] = UNSET - escalation_policies_permissions: Unset | list[NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] = UNSET - groups_permissions: Unset | list[NewOnCallRoleDataAttributesGroupsPermissionsItem] = UNSET - heartbeats_permissions: Unset | list[NewOnCallRoleDataAttributesHeartbeatsPermissionsItem] = UNSET - integrations_permissions: Unset | list[NewOnCallRoleDataAttributesIntegrationsPermissionsItem] = UNSET - invitations_permissions: Unset | list[NewOnCallRoleDataAttributesInvitationsPermissionsItem] = UNSET - live_call_routing_permissions: Unset | list[NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] = UNSET - schedule_override_permissions: Unset | list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] = UNSET - schedules_permissions: Unset | list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] = UNSET - services_permissions: Unset | list[NewOnCallRoleDataAttributesServicesPermissionsItem] = UNSET - webhooks_permissions: Unset | list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] = UNSET - workflows_permissions: Unset | list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] = UNSET + on_call_roles_permissions: list[NewOnCallRoleDataAttributesOnCallRolesPermissionsItem] | Unset = UNSET + alert_sources_permissions: list[NewOnCallRoleDataAttributesAlertSourcesPermissionsItem] | Unset = UNSET + alert_urgency_permissions: list[NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem] | Unset = UNSET + alerts_permissions: list[NewOnCallRoleDataAttributesAlertsPermissionsItem] | Unset = UNSET + api_keys_permissions: list[NewOnCallRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + audits_permissions: list[NewOnCallRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + contacts_permissions: list[NewOnCallRoleDataAttributesContactsPermissionsItem] | Unset = UNSET + escalation_policies_permissions: list[NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] | Unset = UNSET + groups_permissions: list[NewOnCallRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + heartbeats_permissions: list[NewOnCallRoleDataAttributesHeartbeatsPermissionsItem] | Unset = UNSET + integrations_permissions: list[NewOnCallRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + invitations_permissions: list[NewOnCallRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + live_call_routing_permissions: list[NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] | Unset = UNSET + schedule_override_permissions: list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET + schedules_permissions: list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET + services_permissions: list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + webhooks_permissions: list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + workflows_permissions: list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name system_role = self.system_role - alert_fields_permissions: Unset | list[str] = UNSET + alert_fields_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_fields_permissions, Unset): alert_fields_permissions = [] for alert_fields_permissions_item_data in self.alert_fields_permissions: alert_fields_permissions_item: str = alert_fields_permissions_item_data alert_fields_permissions.append(alert_fields_permissions_item) - alert_groups_permissions: Unset | list[str] = UNSET + alert_groups_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_groups_permissions, Unset): alert_groups_permissions = [] for alert_groups_permissions_item_data in self.alert_groups_permissions: alert_groups_permissions_item: str = alert_groups_permissions_item_data alert_groups_permissions.append(alert_groups_permissions_item) - alert_routing_rules_permissions: Unset | list[str] = UNSET + alert_routing_rules_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_routing_rules_permissions, Unset): alert_routing_rules_permissions = [] for alert_routing_rules_permissions_item_data in self.alert_routing_rules_permissions: alert_routing_rules_permissions_item: str = alert_routing_rules_permissions_item_data alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) - on_call_readiness_report_permissions: Unset | list[str] = UNSET + on_call_readiness_report_permissions: list[str] | Unset = UNSET if not isinstance(self.on_call_readiness_report_permissions, Unset): on_call_readiness_report_permissions = [] for on_call_readiness_report_permissions_item_data in self.on_call_readiness_report_permissions: on_call_readiness_report_permissions_item: str = on_call_readiness_report_permissions_item_data on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) - on_call_roles_permissions: Unset | list[str] = UNSET + on_call_roles_permissions: list[str] | Unset = UNSET if not isinstance(self.on_call_roles_permissions, Unset): on_call_roles_permissions = [] for on_call_roles_permissions_item_data in self.on_call_roles_permissions: on_call_roles_permissions_item: str = on_call_roles_permissions_item_data on_call_roles_permissions.append(on_call_roles_permissions_item) - alert_sources_permissions: Unset | list[str] = UNSET + alert_sources_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_sources_permissions, Unset): alert_sources_permissions = [] for alert_sources_permissions_item_data in self.alert_sources_permissions: alert_sources_permissions_item: str = alert_sources_permissions_item_data alert_sources_permissions.append(alert_sources_permissions_item) - alert_urgency_permissions: Unset | list[str] = UNSET + alert_urgency_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_urgency_permissions, Unset): alert_urgency_permissions = [] for alert_urgency_permissions_item_data in self.alert_urgency_permissions: alert_urgency_permissions_item: str = alert_urgency_permissions_item_data alert_urgency_permissions.append(alert_urgency_permissions_item) - alerts_permissions: Unset | list[str] = UNSET + alerts_permissions: list[str] | Unset = UNSET if not isinstance(self.alerts_permissions, Unset): alerts_permissions = [] for alerts_permissions_item_data in self.alerts_permissions: alerts_permissions_item: str = alerts_permissions_item_data alerts_permissions.append(alerts_permissions_item) - api_keys_permissions: Unset | list[str] = UNSET + api_keys_permissions: list[str] | Unset = UNSET if not isinstance(self.api_keys_permissions, Unset): api_keys_permissions = [] for api_keys_permissions_item_data in self.api_keys_permissions: api_keys_permissions_item: str = api_keys_permissions_item_data api_keys_permissions.append(api_keys_permissions_item) - audits_permissions: Unset | list[str] = UNSET + audits_permissions: list[str] | Unset = UNSET if not isinstance(self.audits_permissions, Unset): audits_permissions = [] for audits_permissions_item_data in self.audits_permissions: audits_permissions_item: str = audits_permissions_item_data audits_permissions.append(audits_permissions_item) - contacts_permissions: Unset | list[str] = UNSET + contacts_permissions: list[str] | Unset = UNSET if not isinstance(self.contacts_permissions, Unset): contacts_permissions = [] for contacts_permissions_item_data in self.contacts_permissions: contacts_permissions_item: str = contacts_permissions_item_data contacts_permissions.append(contacts_permissions_item) - escalation_policies_permissions: Unset | list[str] = UNSET + escalation_policies_permissions: list[str] | Unset = UNSET if not isinstance(self.escalation_policies_permissions, Unset): escalation_policies_permissions = [] for escalation_policies_permissions_item_data in self.escalation_policies_permissions: escalation_policies_permissions_item: str = escalation_policies_permissions_item_data escalation_policies_permissions.append(escalation_policies_permissions_item) - groups_permissions: Unset | list[str] = UNSET + groups_permissions: list[str] | Unset = UNSET if not isinstance(self.groups_permissions, Unset): groups_permissions = [] for groups_permissions_item_data in self.groups_permissions: groups_permissions_item: str = groups_permissions_item_data groups_permissions.append(groups_permissions_item) - heartbeats_permissions: Unset | list[str] = UNSET + heartbeats_permissions: list[str] | Unset = UNSET if not isinstance(self.heartbeats_permissions, Unset): heartbeats_permissions = [] for heartbeats_permissions_item_data in self.heartbeats_permissions: heartbeats_permissions_item: str = heartbeats_permissions_item_data heartbeats_permissions.append(heartbeats_permissions_item) - integrations_permissions: Unset | list[str] = UNSET + integrations_permissions: list[str] | Unset = UNSET if not isinstance(self.integrations_permissions, Unset): integrations_permissions = [] for integrations_permissions_item_data in self.integrations_permissions: integrations_permissions_item: str = integrations_permissions_item_data integrations_permissions.append(integrations_permissions_item) - invitations_permissions: Unset | list[str] = UNSET + invitations_permissions: list[str] | Unset = UNSET if not isinstance(self.invitations_permissions, Unset): invitations_permissions = [] for invitations_permissions_item_data in self.invitations_permissions: invitations_permissions_item: str = invitations_permissions_item_data invitations_permissions.append(invitations_permissions_item) - live_call_routing_permissions: Unset | list[str] = UNSET + live_call_routing_permissions: list[str] | Unset = UNSET if not isinstance(self.live_call_routing_permissions, Unset): live_call_routing_permissions = [] for live_call_routing_permissions_item_data in self.live_call_routing_permissions: live_call_routing_permissions_item: str = live_call_routing_permissions_item_data live_call_routing_permissions.append(live_call_routing_permissions_item) - schedule_override_permissions: Unset | list[str] = UNSET + schedule_override_permissions: list[str] | Unset = UNSET if not isinstance(self.schedule_override_permissions, Unset): schedule_override_permissions = [] for schedule_override_permissions_item_data in self.schedule_override_permissions: schedule_override_permissions_item: str = schedule_override_permissions_item_data schedule_override_permissions.append(schedule_override_permissions_item) - schedules_permissions: Unset | list[str] = UNSET + schedules_permissions: list[str] | Unset = UNSET if not isinstance(self.schedules_permissions, Unset): schedules_permissions = [] for schedules_permissions_item_data in self.schedules_permissions: schedules_permissions_item: str = schedules_permissions_item_data schedules_permissions.append(schedules_permissions_item) - services_permissions: Unset | list[str] = UNSET + services_permissions: list[str] | Unset = UNSET if not isinstance(self.services_permissions, Unset): services_permissions = [] for services_permissions_item_data in self.services_permissions: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) - webhooks_permissions: Unset | list[str] = UNSET + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] for webhooks_permissions_item_data in self.webhooks_permissions: webhooks_permissions_item: str = webhooks_permissions_item_data webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions: Unset | list[str] = UNSET + workflows_permissions: list[str] | Unset = UNSET if not isinstance(self.workflows_permissions, Unset): workflows_permissions = [] for workflows_permissions_item_data in self.workflows_permissions: @@ -379,213 +378,263 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: system_role = d.pop("system_role", UNSET) - alert_fields_permissions = [] _alert_fields_permissions = d.pop("alert_fields_permissions", UNSET) - for alert_fields_permissions_item_data in _alert_fields_permissions or []: - alert_fields_permissions_item = check_new_on_call_role_data_attributes_alert_fields_permissions_item( - alert_fields_permissions_item_data - ) + alert_fields_permissions: list[NewOnCallRoleDataAttributesAlertFieldsPermissionsItem] | Unset = UNSET + if _alert_fields_permissions is not UNSET: + alert_fields_permissions = [] + for alert_fields_permissions_item_data in _alert_fields_permissions: + alert_fields_permissions_item = check_new_on_call_role_data_attributes_alert_fields_permissions_item( + alert_fields_permissions_item_data + ) - alert_fields_permissions.append(alert_fields_permissions_item) + alert_fields_permissions.append(alert_fields_permissions_item) - alert_groups_permissions = [] _alert_groups_permissions = d.pop("alert_groups_permissions", UNSET) - for alert_groups_permissions_item_data in _alert_groups_permissions or []: - alert_groups_permissions_item = check_new_on_call_role_data_attributes_alert_groups_permissions_item( - alert_groups_permissions_item_data - ) + alert_groups_permissions: list[NewOnCallRoleDataAttributesAlertGroupsPermissionsItem] | Unset = UNSET + if _alert_groups_permissions is not UNSET: + alert_groups_permissions = [] + for alert_groups_permissions_item_data in _alert_groups_permissions: + alert_groups_permissions_item = check_new_on_call_role_data_attributes_alert_groups_permissions_item( + alert_groups_permissions_item_data + ) - alert_groups_permissions.append(alert_groups_permissions_item) + alert_groups_permissions.append(alert_groups_permissions_item) - alert_routing_rules_permissions = [] _alert_routing_rules_permissions = d.pop("alert_routing_rules_permissions", UNSET) - for alert_routing_rules_permissions_item_data in _alert_routing_rules_permissions or []: - alert_routing_rules_permissions_item = ( - check_new_on_call_role_data_attributes_alert_routing_rules_permissions_item( - alert_routing_rules_permissions_item_data + alert_routing_rules_permissions: list[NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] | Unset = ( + UNSET + ) + if _alert_routing_rules_permissions is not UNSET: + alert_routing_rules_permissions = [] + for alert_routing_rules_permissions_item_data in _alert_routing_rules_permissions: + alert_routing_rules_permissions_item = ( + check_new_on_call_role_data_attributes_alert_routing_rules_permissions_item( + alert_routing_rules_permissions_item_data + ) ) - ) - alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) + alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) - on_call_readiness_report_permissions = [] _on_call_readiness_report_permissions = d.pop("on_call_readiness_report_permissions", UNSET) - for on_call_readiness_report_permissions_item_data in _on_call_readiness_report_permissions or []: - on_call_readiness_report_permissions_item = ( - check_new_on_call_role_data_attributes_on_call_readiness_report_permissions_item( - on_call_readiness_report_permissions_item_data + on_call_readiness_report_permissions: ( + list[NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] | Unset + ) = UNSET + if _on_call_readiness_report_permissions is not UNSET: + on_call_readiness_report_permissions = [] + for on_call_readiness_report_permissions_item_data in _on_call_readiness_report_permissions: + on_call_readiness_report_permissions_item = ( + check_new_on_call_role_data_attributes_on_call_readiness_report_permissions_item( + on_call_readiness_report_permissions_item_data + ) ) - ) - on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) + on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) - on_call_roles_permissions = [] _on_call_roles_permissions = d.pop("on_call_roles_permissions", UNSET) - for on_call_roles_permissions_item_data in _on_call_roles_permissions or []: - on_call_roles_permissions_item = check_new_on_call_role_data_attributes_on_call_roles_permissions_item( - on_call_roles_permissions_item_data - ) + on_call_roles_permissions: list[NewOnCallRoleDataAttributesOnCallRolesPermissionsItem] | Unset = UNSET + if _on_call_roles_permissions is not UNSET: + on_call_roles_permissions = [] + for on_call_roles_permissions_item_data in _on_call_roles_permissions: + on_call_roles_permissions_item = check_new_on_call_role_data_attributes_on_call_roles_permissions_item( + on_call_roles_permissions_item_data + ) - on_call_roles_permissions.append(on_call_roles_permissions_item) + on_call_roles_permissions.append(on_call_roles_permissions_item) - alert_sources_permissions = [] _alert_sources_permissions = d.pop("alert_sources_permissions", UNSET) - for alert_sources_permissions_item_data in _alert_sources_permissions or []: - alert_sources_permissions_item = check_new_on_call_role_data_attributes_alert_sources_permissions_item( - alert_sources_permissions_item_data - ) + alert_sources_permissions: list[NewOnCallRoleDataAttributesAlertSourcesPermissionsItem] | Unset = UNSET + if _alert_sources_permissions is not UNSET: + alert_sources_permissions = [] + for alert_sources_permissions_item_data in _alert_sources_permissions: + alert_sources_permissions_item = check_new_on_call_role_data_attributes_alert_sources_permissions_item( + alert_sources_permissions_item_data + ) - alert_sources_permissions.append(alert_sources_permissions_item) + alert_sources_permissions.append(alert_sources_permissions_item) - alert_urgency_permissions = [] _alert_urgency_permissions = d.pop("alert_urgency_permissions", UNSET) - for alert_urgency_permissions_item_data in _alert_urgency_permissions or []: - alert_urgency_permissions_item = check_new_on_call_role_data_attributes_alert_urgency_permissions_item( - alert_urgency_permissions_item_data - ) + alert_urgency_permissions: list[NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem] | Unset = UNSET + if _alert_urgency_permissions is not UNSET: + alert_urgency_permissions = [] + for alert_urgency_permissions_item_data in _alert_urgency_permissions: + alert_urgency_permissions_item = check_new_on_call_role_data_attributes_alert_urgency_permissions_item( + alert_urgency_permissions_item_data + ) - alert_urgency_permissions.append(alert_urgency_permissions_item) + alert_urgency_permissions.append(alert_urgency_permissions_item) - alerts_permissions = [] _alerts_permissions = d.pop("alerts_permissions", UNSET) - for alerts_permissions_item_data in _alerts_permissions or []: - alerts_permissions_item = check_new_on_call_role_data_attributes_alerts_permissions_item( - alerts_permissions_item_data - ) + alerts_permissions: list[NewOnCallRoleDataAttributesAlertsPermissionsItem] | Unset = UNSET + if _alerts_permissions is not UNSET: + alerts_permissions = [] + for alerts_permissions_item_data in _alerts_permissions: + alerts_permissions_item = check_new_on_call_role_data_attributes_alerts_permissions_item( + alerts_permissions_item_data + ) - alerts_permissions.append(alerts_permissions_item) + alerts_permissions.append(alerts_permissions_item) - api_keys_permissions = [] _api_keys_permissions = d.pop("api_keys_permissions", UNSET) - for api_keys_permissions_item_data in _api_keys_permissions or []: - api_keys_permissions_item = check_new_on_call_role_data_attributes_api_keys_permissions_item( - api_keys_permissions_item_data - ) + api_keys_permissions: list[NewOnCallRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + if _api_keys_permissions is not UNSET: + api_keys_permissions = [] + for api_keys_permissions_item_data in _api_keys_permissions: + api_keys_permissions_item = check_new_on_call_role_data_attributes_api_keys_permissions_item( + api_keys_permissions_item_data + ) - api_keys_permissions.append(api_keys_permissions_item) + api_keys_permissions.append(api_keys_permissions_item) - audits_permissions = [] _audits_permissions = d.pop("audits_permissions", UNSET) - for audits_permissions_item_data in _audits_permissions or []: - audits_permissions_item = check_new_on_call_role_data_attributes_audits_permissions_item( - audits_permissions_item_data - ) + audits_permissions: list[NewOnCallRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + if _audits_permissions is not UNSET: + audits_permissions = [] + for audits_permissions_item_data in _audits_permissions: + audits_permissions_item = check_new_on_call_role_data_attributes_audits_permissions_item( + audits_permissions_item_data + ) - audits_permissions.append(audits_permissions_item) + audits_permissions.append(audits_permissions_item) - contacts_permissions = [] _contacts_permissions = d.pop("contacts_permissions", UNSET) - for contacts_permissions_item_data in _contacts_permissions or []: - contacts_permissions_item = check_new_on_call_role_data_attributes_contacts_permissions_item( - contacts_permissions_item_data - ) + contacts_permissions: list[NewOnCallRoleDataAttributesContactsPermissionsItem] | Unset = UNSET + if _contacts_permissions is not UNSET: + contacts_permissions = [] + for contacts_permissions_item_data in _contacts_permissions: + contacts_permissions_item = check_new_on_call_role_data_attributes_contacts_permissions_item( + contacts_permissions_item_data + ) - contacts_permissions.append(contacts_permissions_item) + contacts_permissions.append(contacts_permissions_item) - escalation_policies_permissions = [] _escalation_policies_permissions = d.pop("escalation_policies_permissions", UNSET) - for escalation_policies_permissions_item_data in _escalation_policies_permissions or []: - escalation_policies_permissions_item = ( - check_new_on_call_role_data_attributes_escalation_policies_permissions_item( - escalation_policies_permissions_item_data + escalation_policies_permissions: list[NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] | Unset = ( + UNSET + ) + if _escalation_policies_permissions is not UNSET: + escalation_policies_permissions = [] + for escalation_policies_permissions_item_data in _escalation_policies_permissions: + escalation_policies_permissions_item = ( + check_new_on_call_role_data_attributes_escalation_policies_permissions_item( + escalation_policies_permissions_item_data + ) ) - ) - escalation_policies_permissions.append(escalation_policies_permissions_item) + escalation_policies_permissions.append(escalation_policies_permissions_item) - groups_permissions = [] _groups_permissions = d.pop("groups_permissions", UNSET) - for groups_permissions_item_data in _groups_permissions or []: - groups_permissions_item = check_new_on_call_role_data_attributes_groups_permissions_item( - groups_permissions_item_data - ) + groups_permissions: list[NewOnCallRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + if _groups_permissions is not UNSET: + groups_permissions = [] + for groups_permissions_item_data in _groups_permissions: + groups_permissions_item = check_new_on_call_role_data_attributes_groups_permissions_item( + groups_permissions_item_data + ) - groups_permissions.append(groups_permissions_item) + groups_permissions.append(groups_permissions_item) - heartbeats_permissions = [] _heartbeats_permissions = d.pop("heartbeats_permissions", UNSET) - for heartbeats_permissions_item_data in _heartbeats_permissions or []: - heartbeats_permissions_item = check_new_on_call_role_data_attributes_heartbeats_permissions_item( - heartbeats_permissions_item_data - ) + heartbeats_permissions: list[NewOnCallRoleDataAttributesHeartbeatsPermissionsItem] | Unset = UNSET + if _heartbeats_permissions is not UNSET: + heartbeats_permissions = [] + for heartbeats_permissions_item_data in _heartbeats_permissions: + heartbeats_permissions_item = check_new_on_call_role_data_attributes_heartbeats_permissions_item( + heartbeats_permissions_item_data + ) - heartbeats_permissions.append(heartbeats_permissions_item) + heartbeats_permissions.append(heartbeats_permissions_item) - integrations_permissions = [] _integrations_permissions = d.pop("integrations_permissions", UNSET) - for integrations_permissions_item_data in _integrations_permissions or []: - integrations_permissions_item = check_new_on_call_role_data_attributes_integrations_permissions_item( - integrations_permissions_item_data - ) + integrations_permissions: list[NewOnCallRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + if _integrations_permissions is not UNSET: + integrations_permissions = [] + for integrations_permissions_item_data in _integrations_permissions: + integrations_permissions_item = check_new_on_call_role_data_attributes_integrations_permissions_item( + integrations_permissions_item_data + ) - integrations_permissions.append(integrations_permissions_item) + integrations_permissions.append(integrations_permissions_item) - invitations_permissions = [] _invitations_permissions = d.pop("invitations_permissions", UNSET) - for invitations_permissions_item_data in _invitations_permissions or []: - invitations_permissions_item = check_new_on_call_role_data_attributes_invitations_permissions_item( - invitations_permissions_item_data - ) + invitations_permissions: list[NewOnCallRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + if _invitations_permissions is not UNSET: + invitations_permissions = [] + for invitations_permissions_item_data in _invitations_permissions: + invitations_permissions_item = check_new_on_call_role_data_attributes_invitations_permissions_item( + invitations_permissions_item_data + ) - invitations_permissions.append(invitations_permissions_item) + invitations_permissions.append(invitations_permissions_item) - live_call_routing_permissions = [] _live_call_routing_permissions = d.pop("live_call_routing_permissions", UNSET) - for live_call_routing_permissions_item_data in _live_call_routing_permissions or []: - live_call_routing_permissions_item = ( - check_new_on_call_role_data_attributes_live_call_routing_permissions_item( - live_call_routing_permissions_item_data + live_call_routing_permissions: list[NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] | Unset = UNSET + if _live_call_routing_permissions is not UNSET: + live_call_routing_permissions = [] + for live_call_routing_permissions_item_data in _live_call_routing_permissions: + live_call_routing_permissions_item = ( + check_new_on_call_role_data_attributes_live_call_routing_permissions_item( + live_call_routing_permissions_item_data + ) ) - ) - live_call_routing_permissions.append(live_call_routing_permissions_item) + live_call_routing_permissions.append(live_call_routing_permissions_item) - schedule_override_permissions = [] _schedule_override_permissions = d.pop("schedule_override_permissions", UNSET) - for schedule_override_permissions_item_data in _schedule_override_permissions or []: - schedule_override_permissions_item = ( - check_new_on_call_role_data_attributes_schedule_override_permissions_item( - schedule_override_permissions_item_data + schedule_override_permissions: list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET + if _schedule_override_permissions is not UNSET: + schedule_override_permissions = [] + for schedule_override_permissions_item_data in _schedule_override_permissions: + schedule_override_permissions_item = ( + check_new_on_call_role_data_attributes_schedule_override_permissions_item( + schedule_override_permissions_item_data + ) ) - ) - schedule_override_permissions.append(schedule_override_permissions_item) + schedule_override_permissions.append(schedule_override_permissions_item) - schedules_permissions = [] _schedules_permissions = d.pop("schedules_permissions", UNSET) - for schedules_permissions_item_data in _schedules_permissions or []: - schedules_permissions_item = check_new_on_call_role_data_attributes_schedules_permissions_item( - schedules_permissions_item_data - ) + schedules_permissions: list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET + if _schedules_permissions is not UNSET: + schedules_permissions = [] + for schedules_permissions_item_data in _schedules_permissions: + schedules_permissions_item = check_new_on_call_role_data_attributes_schedules_permissions_item( + schedules_permissions_item_data + ) - schedules_permissions.append(schedules_permissions_item) + schedules_permissions.append(schedules_permissions_item) - services_permissions = [] _services_permissions = d.pop("services_permissions", UNSET) - for services_permissions_item_data in _services_permissions or []: - services_permissions_item = check_new_on_call_role_data_attributes_services_permissions_item( - services_permissions_item_data - ) + services_permissions: list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + if _services_permissions is not UNSET: + services_permissions = [] + for services_permissions_item_data in _services_permissions: + services_permissions_item = check_new_on_call_role_data_attributes_services_permissions_item( + services_permissions_item_data + ) - services_permissions.append(services_permissions_item) + services_permissions.append(services_permissions_item) - webhooks_permissions = [] _webhooks_permissions = d.pop("webhooks_permissions", UNSET) - for webhooks_permissions_item_data in _webhooks_permissions or []: - webhooks_permissions_item = check_new_on_call_role_data_attributes_webhooks_permissions_item( - webhooks_permissions_item_data - ) + webhooks_permissions: list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + if _webhooks_permissions is not UNSET: + webhooks_permissions = [] + for webhooks_permissions_item_data in _webhooks_permissions: + webhooks_permissions_item = check_new_on_call_role_data_attributes_webhooks_permissions_item( + webhooks_permissions_item_data + ) - webhooks_permissions.append(webhooks_permissions_item) + webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions = [] _workflows_permissions = d.pop("workflows_permissions", UNSET) - for workflows_permissions_item_data in _workflows_permissions or []: - workflows_permissions_item = check_new_on_call_role_data_attributes_workflows_permissions_item( - workflows_permissions_item_data - ) + workflows_permissions: list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + if _workflows_permissions is not UNSET: + workflows_permissions = [] + for workflows_permissions_item_data in _workflows_permissions: + workflows_permissions_item = check_new_on_call_role_data_attributes_workflows_permissions_item( + workflows_permissions_item_data + ) - workflows_permissions.append(workflows_permissions_item) + workflows_permissions.append(workflows_permissions_item) new_on_call_role_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/new_on_call_shadow.py b/rootly_sdk/models/new_on_call_shadow.py index 789a48c4..7eecd798 100644 --- a/rootly_sdk/models/new_on_call_shadow.py +++ b/rootly_sdk/models/new_on_call_shadow.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewOnCallShadow: data (NewOnCallShadowData): """ - data: "NewOnCallShadowData" + data: NewOnCallShadowData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_on_call_shadow_data.py b/rootly_sdk/models/new_on_call_shadow_data.py index 50063cff..c649641d 100644 --- a/rootly_sdk/models/new_on_call_shadow_data.py +++ b/rootly_sdk/models/new_on_call_shadow_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewOnCallShadowData: """ type_: NewOnCallShadowDataType - attributes: "NewOnCallShadowDataAttributes" + attributes: NewOnCallShadowDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_on_call_shadow_data_attributes.py b/rootly_sdk/models/new_on_call_shadow_data_attributes.py index 038e3f86..f0ea1c0b 100644 --- a/rootly_sdk/models/new_on_call_shadow_data_attributes.py +++ b/rootly_sdk/models/new_on_call_shadow_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_override_shift.py b/rootly_sdk/models/new_override_shift.py index 6ded75a5..a0bda87a 100644 --- a/rootly_sdk/models/new_override_shift.py +++ b/rootly_sdk/models/new_override_shift.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewOverrideShift: data (NewOverrideShiftData): """ - data: "NewOverrideShiftData" + data: NewOverrideShiftData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_override_shift_data.py b/rootly_sdk/models/new_override_shift_data.py index 725b9463..2be8633b 100644 --- a/rootly_sdk/models/new_override_shift_data.py +++ b/rootly_sdk/models/new_override_shift_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewOverrideShiftData: """ type_: NewOverrideShiftDataType - attributes: "NewOverrideShiftDataAttributes" + attributes: NewOverrideShiftDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_override_shift_data_attributes.py b/rootly_sdk/models/new_override_shift_data_attributes.py index 41ca3559..028469d7 100644 --- a/rootly_sdk/models/new_override_shift_data_attributes.py +++ b/rootly_sdk/models/new_override_shift_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_playbook.py b/rootly_sdk/models/new_playbook.py index 67ea823c..dac6a6d8 100644 --- a/rootly_sdk/models/new_playbook.py +++ b/rootly_sdk/models/new_playbook.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewPlaybook: data (NewPlaybookData): """ - data: "NewPlaybookData" + data: NewPlaybookData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_playbook_data.py b/rootly_sdk/models/new_playbook_data.py index d1ca1d51..7c263a52 100644 --- a/rootly_sdk/models/new_playbook_data.py +++ b/rootly_sdk/models/new_playbook_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewPlaybookData: """ type_: NewPlaybookDataType - attributes: "NewPlaybookDataAttributes" + attributes: NewPlaybookDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_playbook_data_attributes.py b/rootly_sdk/models/new_playbook_data_attributes.py index bf242c06..5dae9c85 100644 --- a/rootly_sdk/models/new_playbook_data_attributes.py +++ b/rootly_sdk/models/new_playbook_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,42 +15,42 @@ class NewPlaybookDataAttributes: """ Attributes: title (str): The title of the playbook - summary (Union[None, Unset, str]): The summary of the playbook - external_url (Union[None, Unset, str]): The external url of the playbook - severity_ids (Union[None, Unset, list[str]]): The Severity IDs to attach to the incident - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the incident - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the incident - functionality_ids (Union[None, Unset, list[str]]): The Functionality IDs to attach to the incident - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the incident - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the incident + summary (None | str | Unset): The summary of the playbook + external_url (None | str | Unset): The external url of the playbook + severity_ids (list[str] | None | Unset): The Severity IDs to attach to the incident + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the incident + service_ids (list[str] | None | Unset): The Service IDs to attach to the incident + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the incident + group_ids (list[str] | None | Unset): The Team IDs to attach to the incident + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the incident """ title: str - summary: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET - severity_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + summary: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -57,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -66,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -75,7 +77,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -84,7 +86,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -93,7 +95,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -133,25 +135,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title") - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -162,13 +164,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -179,13 +181,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -196,13 +198,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -213,13 +215,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -230,13 +232,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -247,9 +249,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/new_playbook_task.py b/rootly_sdk/models/new_playbook_task.py index b7f5a3d5..47a722bb 100644 --- a/rootly_sdk/models/new_playbook_task.py +++ b/rootly_sdk/models/new_playbook_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewPlaybookTask: data (NewPlaybookTaskData): """ - data: "NewPlaybookTaskData" + data: NewPlaybookTaskData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_playbook_task_data.py b/rootly_sdk/models/new_playbook_task_data.py index e9008bb8..7537c231 100644 --- a/rootly_sdk/models/new_playbook_task_data.py +++ b/rootly_sdk/models/new_playbook_task_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewPlaybookTaskData: """ type_: NewPlaybookTaskDataType - attributes: "NewPlaybookTaskDataAttributes" + attributes: NewPlaybookTaskDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_playbook_task_data_attributes.py b/rootly_sdk/models/new_playbook_task_data_attributes.py index b3f89bfd..7888c99c 100644 --- a/rootly_sdk/models/new_playbook_task_data_attributes.py +++ b/rootly_sdk/models/new_playbook_task_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,24 +15,24 @@ class NewPlaybookTaskDataAttributes: """ Attributes: task (str): The task of the task - description (Union[None, Unset, str]): The description of the task - position (Union[None, Unset, int]): The position of the task + description (None | str | Unset): The description of the task + position (int | None | Unset): The position of the task """ task: str - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: task = self.task - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -55,21 +57,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) task = d.pop("task") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_post_mortem_template.py b/rootly_sdk/models/new_post_mortem_template.py index 0c6828d4..a5337ac9 100644 --- a/rootly_sdk/models/new_post_mortem_template.py +++ b/rootly_sdk/models/new_post_mortem_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewPostMortemTemplate: data (NewPostMortemTemplateData): """ - data: "NewPostMortemTemplateData" + data: NewPostMortemTemplateData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_post_mortem_template_data.py b/rootly_sdk/models/new_post_mortem_template_data.py index 538680f1..e18d907e 100644 --- a/rootly_sdk/models/new_post_mortem_template_data.py +++ b/rootly_sdk/models/new_post_mortem_template_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewPostMortemTemplateData: """ type_: NewPostMortemTemplateDataType - attributes: "NewPostMortemTemplateDataAttributes" + attributes: NewPostMortemTemplateDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_post_mortem_template_data_attributes.py b/rootly_sdk/models/new_post_mortem_template_data_attributes.py index 1cfe049a..a90a8526 100644 --- a/rootly_sdk/models/new_post_mortem_template_data_attributes.py +++ b/rootly_sdk/models/new_post_mortem_template_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,21 +19,21 @@ class NewPostMortemTemplateDataAttributes: """ Attributes: name (str): The name of the postmortem template - default (Union[None, Unset, bool]): Default selected template when editing a postmortem - content (Union[Unset, str]): The postmortem template. Supports TipTap blocks (followup and timeline components), + default (bool | None | Unset): Default selected template when editing a postmortem + content (str | Unset): The postmortem template. Supports TipTap blocks (followup and timeline components), Liquid syntax, and HTML. Will be sanitized and applied to both content and content_html fields. - format_ (Union[Unset, NewPostMortemTemplateDataAttributesFormat]): The format of the input Default: 'html'. + format_ (NewPostMortemTemplateDataAttributesFormat | Unset): The format of the input Default: 'html'. """ name: str - default: None | Unset | bool = UNSET - content: Unset | str = UNSET - format_: Unset | NewPostMortemTemplateDataAttributesFormat = "html" + default: bool | None | Unset = UNSET + content: str | Unset = UNSET + format_: NewPostMortemTemplateDataAttributesFormat | Unset = "html" def to_dict(self) -> dict[str, Any]: name = self.name - default: None | Unset | bool + default: bool | None | Unset if isinstance(self.default, Unset): default = UNSET else: @@ -39,7 +41,7 @@ def to_dict(self) -> dict[str, Any]: content = self.content - format_: Unset | str = UNSET + format_: str | Unset = UNSET if not isinstance(self.format_, Unset): format_ = self.format_ @@ -64,19 +66,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_default(data: object) -> None | Unset | bool: + def _parse_default(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) default = _parse_default(d.pop("default", UNSET)) content = d.pop("content", UNSET) _format_ = d.pop("format", UNSET) - format_: Unset | NewPostMortemTemplateDataAttributesFormat + format_: NewPostMortemTemplateDataAttributesFormat | Unset if isinstance(_format_, Unset): format_ = UNSET else: diff --git a/rootly_sdk/models/new_pulse.py b/rootly_sdk/models/new_pulse.py index 0d6e9db2..cdd2c0cc 100644 --- a/rootly_sdk/models/new_pulse.py +++ b/rootly_sdk/models/new_pulse.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewPulse: data (NewPulseData): """ - data: "NewPulseData" + data: NewPulseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_pulse_data.py b/rootly_sdk/models/new_pulse_data.py index 7d35da03..4b26421b 100644 --- a/rootly_sdk/models/new_pulse_data.py +++ b/rootly_sdk/models/new_pulse_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewPulseData: """ type_: NewPulseDataType - attributes: "NewPulseDataAttributes" + attributes: NewPulseDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_pulse_data_attributes.py b/rootly_sdk/models/new_pulse_data_attributes.py index b230c418..c16515c8 100644 --- a/rootly_sdk/models/new_pulse_data_attributes.py +++ b/rootly_sdk/models/new_pulse_data_attributes.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from dateutil.parser import isoparse @@ -21,27 +23,27 @@ class NewPulseDataAttributes: """ Attributes: summary (str): The summary of the pulse - source (Union[None, Unset, str]): The source of the pulse (eg: k8s) - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the pulse - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the pulse - started_at (Union[None, Unset, datetime.datetime]): Pulse start datetime - ended_at (Union[None, Unset, datetime.datetime]): Pulse end datetime - external_url (Union[None, Unset, str]): The external url of the pulse - labels (Union[Unset, list[Union['NewPulseDataAttributesLabelsItemType0', None]]]): - refs (Union[Unset, list[Union['NewPulseDataAttributesRefsItemType0', None]]]): - data (Union['NewPulseDataAttributesDataType0', None, Unset]): Additional data + source (None | str | Unset): The source of the pulse (eg: k8s) + service_ids (list[str] | None | Unset): The Service IDs to attach to the pulse + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the pulse + started_at (datetime.datetime | None | Unset): Pulse start datetime + ended_at (datetime.datetime | None | Unset): Pulse end datetime + external_url (None | str | Unset): The external url of the pulse + labels (list[NewPulseDataAttributesLabelsItemType0 | None] | Unset): + refs (list[NewPulseDataAttributesRefsItemType0 | None] | Unset): + data (NewPulseDataAttributesDataType0 | None | Unset): Additional data """ summary: str - source: None | Unset | str = UNSET - service_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - started_at: None | Unset | datetime.datetime = UNSET - ended_at: None | Unset | datetime.datetime = UNSET - external_url: None | Unset | str = UNSET - labels: Unset | list[Union["NewPulseDataAttributesLabelsItemType0", None]] = UNSET - refs: Unset | list[Union["NewPulseDataAttributesRefsItemType0", None]] = UNSET - data: Union["NewPulseDataAttributesDataType0", None, Unset] = UNSET + source: None | str | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + external_url: None | str | Unset = UNSET + labels: list[NewPulseDataAttributesLabelsItemType0 | None] | Unset = UNSET + refs: list[NewPulseDataAttributesRefsItemType0 | None] | Unset = UNSET + data: NewPulseDataAttributesDataType0 | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_pulse_data_attributes_data_type_0 import NewPulseDataAttributesDataType0 @@ -50,13 +52,13 @@ def to_dict(self) -> dict[str, Any]: summary = self.summary - source: None | Unset | str + source: None | str | Unset if isinstance(self.source, Unset): source = UNSET else: source = self.source - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -65,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET elif isinstance(self.started_at, datetime.datetime): @@ -82,7 +84,7 @@ def to_dict(self) -> dict[str, Any]: else: started_at = self.started_at - ended_at: None | Unset | str + ended_at: None | str | Unset if isinstance(self.ended_at, Unset): ended_at = UNSET elif isinstance(self.ended_at, datetime.datetime): @@ -90,35 +92,35 @@ def to_dict(self) -> dict[str, Any]: else: ended_at = self.ended_at - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - labels: Unset | list[None | dict[str, Any]] = UNSET + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: - labels_item: None | dict[str, Any] + labels_item: dict[str, Any] | None if isinstance(labels_item_data, NewPulseDataAttributesLabelsItemType0): labels_item = labels_item_data.to_dict() else: labels_item = labels_item_data labels.append(labels_item) - refs: Unset | list[None | dict[str, Any]] = UNSET + refs: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.refs, Unset): refs = [] for refs_item_data in self.refs: - refs_item: None | dict[str, Any] + refs_item: dict[str, Any] | None if isinstance(refs_item_data, NewPulseDataAttributesRefsItemType0): refs_item = refs_item_data.to_dict() else: refs_item = refs_item_data refs.append(refs_item) - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, NewPulseDataAttributesDataType0): @@ -163,16 +165,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) summary = d.pop("summary") - def _parse_source(data: object) -> None | Unset | str: + def _parse_source(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) source = _parse_source(d.pop("source", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -183,13 +185,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -200,13 +202,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_started_at(data: object) -> None | Unset | datetime.datetime: + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -217,13 +219,13 @@ def _parse_started_at(data: object) -> None | Unset | datetime.datetime: started_at_type_0 = isoparse(data) return started_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -234,64 +236,68 @@ def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: ended_at_type_0 = isoparse(data) return ended_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: + labels: list[NewPulseDataAttributesLabelsItemType0 | None] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: - def _parse_labels_item(data: object) -> Union["NewPulseDataAttributesLabelsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - labels_item_type_0 = NewPulseDataAttributesLabelsItemType0.from_dict(data) + def _parse_labels_item(data: object) -> NewPulseDataAttributesLabelsItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + labels_item_type_0 = NewPulseDataAttributesLabelsItemType0.from_dict(data) - return labels_item_type_0 - except: # noqa: E722 - pass - return cast(Union["NewPulseDataAttributesLabelsItemType0", None], data) + return labels_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(NewPulseDataAttributesLabelsItemType0 | None, data) - labels_item = _parse_labels_item(labels_item_data) + labels_item = _parse_labels_item(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) - refs = [] _refs = d.pop("refs", UNSET) - for refs_item_data in _refs or []: + refs: list[NewPulseDataAttributesRefsItemType0 | None] | Unset = UNSET + if _refs is not UNSET: + refs = [] + for refs_item_data in _refs: - def _parse_refs_item(data: object) -> Union["NewPulseDataAttributesRefsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - refs_item_type_0 = NewPulseDataAttributesRefsItemType0.from_dict(data) + def _parse_refs_item(data: object) -> NewPulseDataAttributesRefsItemType0 | None: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + refs_item_type_0 = NewPulseDataAttributesRefsItemType0.from_dict(data) - return refs_item_type_0 - except: # noqa: E722 - pass - return cast(Union["NewPulseDataAttributesRefsItemType0", None], data) + return refs_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(NewPulseDataAttributesRefsItemType0 | None, data) - refs_item = _parse_refs_item(refs_item_data) + refs_item = _parse_refs_item(refs_item_data) - refs.append(refs_item) + refs.append(refs_item) - def _parse_data(data: object) -> Union["NewPulseDataAttributesDataType0", None, Unset]: + def _parse_data(data: object) -> NewPulseDataAttributesDataType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -302,9 +308,9 @@ def _parse_data(data: object) -> Union["NewPulseDataAttributesDataType0", None, data_type_0 = NewPulseDataAttributesDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewPulseDataAttributesDataType0", None, Unset], data) + return cast(NewPulseDataAttributesDataType0 | None | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/new_pulse_data_attributes_data_type_0.py b/rootly_sdk/models/new_pulse_data_attributes_data_type_0.py index cbb26d78..03734676 100644 --- a/rootly_sdk/models/new_pulse_data_attributes_data_type_0.py +++ b/rootly_sdk/models/new_pulse_data_attributes_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewPulseDataAttributesDataType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_pulse_data_attributes_labels_item_type_0.py b/rootly_sdk/models/new_pulse_data_attributes_labels_item_type_0.py index 66fe8bd4..b85f9272 100644 --- a/rootly_sdk/models/new_pulse_data_attributes_labels_item_type_0.py +++ b/rootly_sdk/models/new_pulse_data_attributes_labels_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_pulse_data_attributes_refs_item_type_0.py b/rootly_sdk/models/new_pulse_data_attributes_refs_item_type_0.py index 100089af..dafc0f72 100644 --- a/rootly_sdk/models/new_pulse_data_attributes_refs_item_type_0.py +++ b/rootly_sdk/models/new_pulse_data_attributes_refs_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_retrospective_process.py b/rootly_sdk/models/new_retrospective_process.py index b24711b4..db872de5 100644 --- a/rootly_sdk/models/new_retrospective_process.py +++ b/rootly_sdk/models/new_retrospective_process.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewRetrospectiveProcess: data (NewRetrospectiveProcessData): """ - data: "NewRetrospectiveProcessData" + data: NewRetrospectiveProcessData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_process_data.py b/rootly_sdk/models/new_retrospective_process_data.py index d6925f7d..a81d545f 100644 --- a/rootly_sdk/models/new_retrospective_process_data.py +++ b/rootly_sdk/models/new_retrospective_process_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewRetrospectiveProcessData: """ type_: NewRetrospectiveProcessDataType - attributes: "NewRetrospectiveProcessDataAttributes" + attributes: NewRetrospectiveProcessDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_process_data_attributes.py b/rootly_sdk/models/new_retrospective_process_data_attributes.py index b8865f21..49bfd3bf 100644 --- a/rootly_sdk/models/new_retrospective_process_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_process_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -27,22 +29,22 @@ class NewRetrospectiveProcessDataAttributes: name (str): The name of the retrospective process copy_from (str): Retrospective process ID from which retrospective steps have to be copied. To use starter template for retrospective steps provide value: 'starter_template' - description (Union[None, Unset, str]): The description of the retrospective process + description (None | str | Unset): The description of the retrospective process retrospective_process_matching_criteria - (Union['NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0', - 'NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1', - 'NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2', Unset]): + (NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0 | + NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1 | + NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2 | Unset): """ name: str copy_from: str - description: None | Unset | str = UNSET - retrospective_process_matching_criteria: Union[ - "NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0", - "NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1", - "NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2", - Unset, - ] = UNSET + description: None | str | Unset = UNSET + retrospective_process_matching_criteria: ( + NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0 + | NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1 + | NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2 + | Unset + ) = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( @@ -56,13 +58,13 @@ def to_dict(self) -> dict[str, Any]: copy_from = self.copy_from - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - retrospective_process_matching_criteria: Unset | dict[str, Any] + retrospective_process_matching_criteria: dict[str, Any] | Unset if isinstance(self.retrospective_process_matching_criteria, Unset): retrospective_process_matching_criteria = UNSET elif isinstance( @@ -110,23 +112,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: copy_from = d.pop("copy_from") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) def _parse_retrospective_process_matching_criteria( data: object, - ) -> Union[ - "NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0", - "NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1", - "NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2", - Unset, - ]: + ) -> ( + NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0 + | NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1 + | NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2 + | Unset + ): if isinstance(data, Unset): return data try: @@ -137,7 +139,7 @@ def _parse_retrospective_process_matching_criteria( ) return retrospective_process_matching_criteria_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -147,7 +149,7 @@ def _parse_retrospective_process_matching_criteria( ) return retrospective_process_matching_criteria_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py b/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py index e4a84e85..bb07129a 100644 --- a/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py +++ b/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py b/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py index 98eba687..452c2da5 100644 --- a/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py +++ b/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py b/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py index 1a35d6a4..5645b537 100644 --- a/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py +++ b/rootly_sdk/models/new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/new_retrospective_process_group.py b/rootly_sdk/models/new_retrospective_process_group.py index 6aa11d4a..b4879e14 100644 --- a/rootly_sdk/models/new_retrospective_process_group.py +++ b/rootly_sdk/models/new_retrospective_process_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewRetrospectiveProcessGroup: data (NewRetrospectiveProcessGroupData): """ - data: "NewRetrospectiveProcessGroupData" + data: NewRetrospectiveProcessGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_process_group_data.py b/rootly_sdk/models/new_retrospective_process_group_data.py index 25dcfe6d..95af45ea 100644 --- a/rootly_sdk/models/new_retrospective_process_group_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewRetrospectiveProcessGroupData: """ type_: NewRetrospectiveProcessGroupDataType - attributes: "NewRetrospectiveProcessGroupDataAttributes" + attributes: NewRetrospectiveProcessGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_process_group_data_attributes.py b/rootly_sdk/models/new_retrospective_process_group_data_attributes.py index 151d9a3e..a9d822d9 100644 --- a/rootly_sdk/models/new_retrospective_process_group_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_process_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,11 +15,11 @@ class NewRetrospectiveProcessGroupDataAttributes: """ Attributes: sub_status_id (str): - position (Union[Unset, int]): + position (int | Unset): """ sub_status_id: str - position: Unset | int = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: sub_status_id = self.sub_status_id diff --git a/rootly_sdk/models/new_retrospective_process_group_step.py b/rootly_sdk/models/new_retrospective_process_group_step.py index 7ab02994..51c3de7e 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step.py +++ b/rootly_sdk/models/new_retrospective_process_group_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewRetrospectiveProcessGroupStep: data (NewRetrospectiveProcessGroupStepData): """ - data: "NewRetrospectiveProcessGroupStepData" + data: NewRetrospectiveProcessGroupStepData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_process_group_step_data.py b/rootly_sdk/models/new_retrospective_process_group_step_data.py index ca566165..55e5225b 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_step_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class NewRetrospectiveProcessGroupStepData: """ type_: NewRetrospectiveProcessGroupStepDataType - attributes: "NewRetrospectiveProcessGroupStepDataAttributes" + attributes: NewRetrospectiveProcessGroupStepDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_process_group_step_data_attributes.py b/rootly_sdk/models/new_retrospective_process_group_step_data_attributes.py index c25b7f09..5374e922 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_process_group_step_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,11 +15,11 @@ class NewRetrospectiveProcessGroupStepDataAttributes: """ Attributes: retrospective_step_id (str): - position (Union[Unset, int]): + position (int | Unset): """ retrospective_step_id: str - position: Unset | int = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: retrospective_step_id = self.retrospective_step_id diff --git a/rootly_sdk/models/new_retrospective_step.py b/rootly_sdk/models/new_retrospective_step.py index af77e064..fcd3c6f9 100644 --- a/rootly_sdk/models/new_retrospective_step.py +++ b/rootly_sdk/models/new_retrospective_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewRetrospectiveStep: data (NewRetrospectiveStepData): """ - data: "NewRetrospectiveStepData" + data: NewRetrospectiveStepData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_step_data.py b/rootly_sdk/models/new_retrospective_step_data.py index d15c1567..c2d74e95 100644 --- a/rootly_sdk/models/new_retrospective_step_data.py +++ b/rootly_sdk/models/new_retrospective_step_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewRetrospectiveStepData: """ type_: NewRetrospectiveStepDataType - attributes: "NewRetrospectiveStepDataAttributes" + attributes: NewRetrospectiveStepDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_retrospective_step_data_attributes.py b/rootly_sdk/models/new_retrospective_step_data_attributes.py index 9aa6bc15..3b6079ec 100644 --- a/rootly_sdk/models/new_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_step_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,43 +15,43 @@ class NewRetrospectiveStepDataAttributes: """ Attributes: title (str): The name of the step - description (Union[None, Unset, str]): The description of the step - due_after_days (Union[None, Unset, int]): Due date in days - incident_role_id (Union[None, Unset, str]): Users assigned to the selected incident role will be the default - owners for this step - position (Union[None, Unset, int]): Position of the step - skippable (Union[Unset, bool]): Is the step skippable? + description (None | str | Unset): The description of the step + due_after_days (int | None | Unset): Due date in days + incident_role_id (None | str | Unset): Users assigned to the selected incident role will be the default owners + for this step + position (int | None | Unset): Position of the step + skippable (bool | Unset): Is the step skippable? """ title: str - description: None | Unset | str = UNSET - due_after_days: None | Unset | int = UNSET - incident_role_id: None | Unset | str = UNSET - position: None | Unset | int = UNSET - skippable: Unset | bool = UNSET + description: None | str | Unset = UNSET + due_after_days: int | None | Unset = UNSET + incident_role_id: None | str | Unset = UNSET + position: int | None | Unset = UNSET + skippable: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - due_after_days: None | Unset | int + due_after_days: int | None | Unset if isinstance(self.due_after_days, Unset): due_after_days = UNSET else: due_after_days = self.due_after_days - incident_role_id: None | Unset | str + incident_role_id: None | str | Unset if isinstance(self.incident_role_id, Unset): incident_role_id = UNSET else: incident_role_id = self.incident_role_id - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -82,39 +84,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_due_after_days(data: object) -> None | Unset | int: + def _parse_due_after_days(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) due_after_days = _parse_due_after_days(d.pop("due_after_days", UNSET)) - def _parse_incident_role_id(data: object) -> None | Unset | str: + def _parse_incident_role_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_role_id = _parse_incident_role_id(d.pop("incident_role_id", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_role.py b/rootly_sdk/models/new_role.py index d8bedece..7ecd0d51 100644 --- a/rootly_sdk/models/new_role.py +++ b/rootly_sdk/models/new_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewRole: data (NewRoleData): """ - data: "NewRoleData" + data: NewRoleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_role_data.py b/rootly_sdk/models/new_role_data.py index 69f3ba5f..75843462 100644 --- a/rootly_sdk/models/new_role_data.py +++ b/rootly_sdk/models/new_role_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewRoleData: """ type_: NewRoleDataType - attributes: "NewRoleDataAttributes" + attributes: NewRoleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_role_data_attributes.py b/rootly_sdk/models/new_role_data_attributes.py index 424c4dec..db2e7aa3 100644 --- a/rootly_sdk/models/new_role_data_attributes.py +++ b/rootly_sdk/models/new_role_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,6 +21,18 @@ NewRoleDataAttributesBillingPermissionsItem, check_new_role_data_attributes_billing_permissions_item, ) +from ..models.new_role_data_attributes_catalogs_permissions_item import ( + NewRoleDataAttributesCatalogsPermissionsItem, + check_new_role_data_attributes_catalogs_permissions_item, +) +from ..models.new_role_data_attributes_communication_permissions_item import ( + NewRoleDataAttributesCommunicationPermissionsItem, + check_new_role_data_attributes_communication_permissions_item, +) +from ..models.new_role_data_attributes_edge_connector_permissions_item import ( + NewRoleDataAttributesEdgeConnectorPermissionsItem, + check_new_role_data_attributes_edge_connector_permissions_item, +) from ..models.new_role_data_attributes_environments_permissions_item import ( NewRoleDataAttributesEnvironmentsPermissionsItem, check_new_role_data_attributes_environments_permissions_item, @@ -39,6 +53,10 @@ NewRoleDataAttributesIncidentCausesPermissionsItem, check_new_role_data_attributes_incident_causes_permissions_item, ) +from ..models.new_role_data_attributes_incident_communication_permissions_item import ( + NewRoleDataAttributesIncidentCommunicationPermissionsItem, + check_new_role_data_attributes_incident_communication_permissions_item, +) from ..models.new_role_data_attributes_incident_feedbacks_permissions_item import ( NewRoleDataAttributesIncidentFeedbacksPermissionsItem, check_new_role_data_attributes_incident_feedbacks_permissions_item, @@ -63,6 +81,10 @@ NewRoleDataAttributesInvitationsPermissionsItem, check_new_role_data_attributes_invitations_permissions_item, ) +from ..models.new_role_data_attributes_paging_permissions_item import ( + NewRoleDataAttributesPagingPermissionsItem, + check_new_role_data_attributes_paging_permissions_item, +) from ..models.new_role_data_attributes_playbooks_permissions_item import ( NewRoleDataAttributesPlaybooksPermissionsItem, check_new_role_data_attributes_playbooks_permissions_item, @@ -95,10 +117,18 @@ NewRoleDataAttributesSeveritiesPermissionsItem, check_new_role_data_attributes_severities_permissions_item, ) +from ..models.new_role_data_attributes_slas_permissions_item import ( + NewRoleDataAttributesSlasPermissionsItem, + check_new_role_data_attributes_slas_permissions_item, +) from ..models.new_role_data_attributes_status_pages_permissions_item import ( NewRoleDataAttributesStatusPagesPermissionsItem, check_new_role_data_attributes_status_pages_permissions_item, ) +from ..models.new_role_data_attributes_sub_statuses_permissions_item import ( + NewRoleDataAttributesSubStatusesPermissionsItem, + check_new_role_data_attributes_sub_statuses_permissions_item, +) from ..models.new_role_data_attributes_webhooks_permissions_item import ( NewRoleDataAttributesWebhooksPermissionsItem, check_new_role_data_attributes_webhooks_permissions_item, @@ -117,255 +147,318 @@ class NewRoleDataAttributes: """ Attributes: name (str): The role name. - incident_permission_set_id (Union[None, Unset, str]): Associated incident permissions set. - alerts_permissions (Union[Unset, list[NewRoleDataAttributesAlertsPermissionsItem]]): - api_keys_permissions (Union[Unset, list[NewRoleDataAttributesApiKeysPermissionsItem]]): - audits_permissions (Union[Unset, list[NewRoleDataAttributesAuditsPermissionsItem]]): - billing_permissions (Union[Unset, list[NewRoleDataAttributesBillingPermissionsItem]]): - environments_permissions (Union[Unset, list[NewRoleDataAttributesEnvironmentsPermissionsItem]]): - form_fields_permissions (Union[Unset, list[NewRoleDataAttributesFormFieldsPermissionsItem]]): - functionalities_permissions (Union[Unset, list[NewRoleDataAttributesFunctionalitiesPermissionsItem]]): - groups_permissions (Union[Unset, list[NewRoleDataAttributesGroupsPermissionsItem]]): - incident_causes_permissions (Union[Unset, list[NewRoleDataAttributesIncidentCausesPermissionsItem]]): - incident_feedbacks_permissions (Union[Unset, list[NewRoleDataAttributesIncidentFeedbacksPermissionsItem]]): - incident_roles_permissions (Union[Unset, list[NewRoleDataAttributesIncidentRolesPermissionsItem]]): - incident_types_permissions (Union[Unset, list[NewRoleDataAttributesIncidentTypesPermissionsItem]]): - incidents_permissions (Union[Unset, list[NewRoleDataAttributesIncidentsPermissionsItem]]): - integrations_permissions (Union[Unset, list[NewRoleDataAttributesIntegrationsPermissionsItem]]): - invitations_permissions (Union[Unset, list[NewRoleDataAttributesInvitationsPermissionsItem]]): - playbooks_permissions (Union[Unset, list[NewRoleDataAttributesPlaybooksPermissionsItem]]): - private_incidents_permissions (Union[Unset, list[NewRoleDataAttributesPrivateIncidentsPermissionsItem]]): - pulses_permissions (Union[Unset, list[NewRoleDataAttributesPulsesPermissionsItem]]): - retrospective_permissions (Union[Unset, list[NewRoleDataAttributesRetrospectivePermissionsItem]]): - roles_permissions (Union[Unset, list[NewRoleDataAttributesRolesPermissionsItem]]): - secrets_permissions (Union[Unset, list[NewRoleDataAttributesSecretsPermissionsItem]]): - services_permissions (Union[Unset, list[NewRoleDataAttributesServicesPermissionsItem]]): - severities_permissions (Union[Unset, list[NewRoleDataAttributesSeveritiesPermissionsItem]]): - status_pages_permissions (Union[Unset, list[NewRoleDataAttributesStatusPagesPermissionsItem]]): - webhooks_permissions (Union[Unset, list[NewRoleDataAttributesWebhooksPermissionsItem]]): - workflows_permissions (Union[Unset, list[NewRoleDataAttributesWorkflowsPermissionsItem]]): + incident_permission_set_id (None | str | Unset): Associated incident permissions set. + alerts_permissions (list[NewRoleDataAttributesAlertsPermissionsItem] | Unset): + api_keys_permissions (list[NewRoleDataAttributesApiKeysPermissionsItem] | Unset): + audits_permissions (list[NewRoleDataAttributesAuditsPermissionsItem] | Unset): + billing_permissions (list[NewRoleDataAttributesBillingPermissionsItem] | Unset): + environments_permissions (list[NewRoleDataAttributesEnvironmentsPermissionsItem] | Unset): + form_fields_permissions (list[NewRoleDataAttributesFormFieldsPermissionsItem] | Unset): + functionalities_permissions (list[NewRoleDataAttributesFunctionalitiesPermissionsItem] | Unset): + groups_permissions (list[NewRoleDataAttributesGroupsPermissionsItem] | Unset): + incident_causes_permissions (list[NewRoleDataAttributesIncidentCausesPermissionsItem] | Unset): + incident_feedbacks_permissions (list[NewRoleDataAttributesIncidentFeedbacksPermissionsItem] | Unset): + incident_roles_permissions (list[NewRoleDataAttributesIncidentRolesPermissionsItem] | Unset): + incident_types_permissions (list[NewRoleDataAttributesIncidentTypesPermissionsItem] | Unset): + incidents_permissions (list[NewRoleDataAttributesIncidentsPermissionsItem] | Unset): + integrations_permissions (list[NewRoleDataAttributesIntegrationsPermissionsItem] | Unset): + invitations_permissions (list[NewRoleDataAttributesInvitationsPermissionsItem] | Unset): + playbooks_permissions (list[NewRoleDataAttributesPlaybooksPermissionsItem] | Unset): + private_incidents_permissions (list[NewRoleDataAttributesPrivateIncidentsPermissionsItem] | Unset): + pulses_permissions (list[NewRoleDataAttributesPulsesPermissionsItem] | Unset): + retrospective_permissions (list[NewRoleDataAttributesRetrospectivePermissionsItem] | Unset): + roles_permissions (list[NewRoleDataAttributesRolesPermissionsItem] | Unset): + secrets_permissions (list[NewRoleDataAttributesSecretsPermissionsItem] | Unset): + services_permissions (list[NewRoleDataAttributesServicesPermissionsItem] | Unset): + severities_permissions (list[NewRoleDataAttributesSeveritiesPermissionsItem] | Unset): + status_pages_permissions (list[NewRoleDataAttributesStatusPagesPermissionsItem] | Unset): + webhooks_permissions (list[NewRoleDataAttributesWebhooksPermissionsItem] | Unset): + workflows_permissions (list[NewRoleDataAttributesWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[NewRoleDataAttributesCatalogsPermissionsItem] | Unset): + sub_statuses_permissions (list[NewRoleDataAttributesSubStatusesPermissionsItem] | Unset): + edge_connector_permissions (list[NewRoleDataAttributesEdgeConnectorPermissionsItem] | Unset): + slas_permissions (list[NewRoleDataAttributesSlasPermissionsItem] | Unset): + paging_permissions (list[NewRoleDataAttributesPagingPermissionsItem] | Unset): + incident_communication_permissions (list[NewRoleDataAttributesIncidentCommunicationPermissionsItem] | Unset): + communication_permissions (list[NewRoleDataAttributesCommunicationPermissionsItem] | Unset): """ name: str - incident_permission_set_id: None | Unset | str = UNSET - alerts_permissions: Unset | list[NewRoleDataAttributesAlertsPermissionsItem] = UNSET - api_keys_permissions: Unset | list[NewRoleDataAttributesApiKeysPermissionsItem] = UNSET - audits_permissions: Unset | list[NewRoleDataAttributesAuditsPermissionsItem] = UNSET - billing_permissions: Unset | list[NewRoleDataAttributesBillingPermissionsItem] = UNSET - environments_permissions: Unset | list[NewRoleDataAttributesEnvironmentsPermissionsItem] = UNSET - form_fields_permissions: Unset | list[NewRoleDataAttributesFormFieldsPermissionsItem] = UNSET - functionalities_permissions: Unset | list[NewRoleDataAttributesFunctionalitiesPermissionsItem] = UNSET - groups_permissions: Unset | list[NewRoleDataAttributesGroupsPermissionsItem] = UNSET - incident_causes_permissions: Unset | list[NewRoleDataAttributesIncidentCausesPermissionsItem] = UNSET - incident_feedbacks_permissions: Unset | list[NewRoleDataAttributesIncidentFeedbacksPermissionsItem] = UNSET - incident_roles_permissions: Unset | list[NewRoleDataAttributesIncidentRolesPermissionsItem] = UNSET - incident_types_permissions: Unset | list[NewRoleDataAttributesIncidentTypesPermissionsItem] = UNSET - incidents_permissions: Unset | list[NewRoleDataAttributesIncidentsPermissionsItem] = UNSET - integrations_permissions: Unset | list[NewRoleDataAttributesIntegrationsPermissionsItem] = UNSET - invitations_permissions: Unset | list[NewRoleDataAttributesInvitationsPermissionsItem] = UNSET - playbooks_permissions: Unset | list[NewRoleDataAttributesPlaybooksPermissionsItem] = UNSET - private_incidents_permissions: Unset | list[NewRoleDataAttributesPrivateIncidentsPermissionsItem] = UNSET - pulses_permissions: Unset | list[NewRoleDataAttributesPulsesPermissionsItem] = UNSET - retrospective_permissions: Unset | list[NewRoleDataAttributesRetrospectivePermissionsItem] = UNSET - roles_permissions: Unset | list[NewRoleDataAttributesRolesPermissionsItem] = UNSET - secrets_permissions: Unset | list[NewRoleDataAttributesSecretsPermissionsItem] = UNSET - services_permissions: Unset | list[NewRoleDataAttributesServicesPermissionsItem] = UNSET - severities_permissions: Unset | list[NewRoleDataAttributesSeveritiesPermissionsItem] = UNSET - status_pages_permissions: Unset | list[NewRoleDataAttributesStatusPagesPermissionsItem] = UNSET - webhooks_permissions: Unset | list[NewRoleDataAttributesWebhooksPermissionsItem] = UNSET - workflows_permissions: Unset | list[NewRoleDataAttributesWorkflowsPermissionsItem] = UNSET + incident_permission_set_id: None | str | Unset = UNSET + alerts_permissions: list[NewRoleDataAttributesAlertsPermissionsItem] | Unset = UNSET + api_keys_permissions: list[NewRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + audits_permissions: list[NewRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + billing_permissions: list[NewRoleDataAttributesBillingPermissionsItem] | Unset = UNSET + environments_permissions: list[NewRoleDataAttributesEnvironmentsPermissionsItem] | Unset = UNSET + form_fields_permissions: list[NewRoleDataAttributesFormFieldsPermissionsItem] | Unset = UNSET + functionalities_permissions: list[NewRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + groups_permissions: list[NewRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + incident_causes_permissions: list[NewRoleDataAttributesIncidentCausesPermissionsItem] | Unset = UNSET + incident_feedbacks_permissions: list[NewRoleDataAttributesIncidentFeedbacksPermissionsItem] | Unset = UNSET + incident_roles_permissions: list[NewRoleDataAttributesIncidentRolesPermissionsItem] | Unset = UNSET + incident_types_permissions: list[NewRoleDataAttributesIncidentTypesPermissionsItem] | Unset = UNSET + incidents_permissions: list[NewRoleDataAttributesIncidentsPermissionsItem] | Unset = UNSET + integrations_permissions: list[NewRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + invitations_permissions: list[NewRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + playbooks_permissions: list[NewRoleDataAttributesPlaybooksPermissionsItem] | Unset = UNSET + private_incidents_permissions: list[NewRoleDataAttributesPrivateIncidentsPermissionsItem] | Unset = UNSET + pulses_permissions: list[NewRoleDataAttributesPulsesPermissionsItem] | Unset = UNSET + retrospective_permissions: list[NewRoleDataAttributesRetrospectivePermissionsItem] | Unset = UNSET + roles_permissions: list[NewRoleDataAttributesRolesPermissionsItem] | Unset = UNSET + secrets_permissions: list[NewRoleDataAttributesSecretsPermissionsItem] | Unset = UNSET + services_permissions: list[NewRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + severities_permissions: list[NewRoleDataAttributesSeveritiesPermissionsItem] | Unset = UNSET + status_pages_permissions: list[NewRoleDataAttributesStatusPagesPermissionsItem] | Unset = UNSET + webhooks_permissions: list[NewRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + workflows_permissions: list[NewRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[NewRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + sub_statuses_permissions: list[NewRoleDataAttributesSubStatusesPermissionsItem] | Unset = UNSET + edge_connector_permissions: list[NewRoleDataAttributesEdgeConnectorPermissionsItem] | Unset = UNSET + slas_permissions: list[NewRoleDataAttributesSlasPermissionsItem] | Unset = UNSET + paging_permissions: list[NewRoleDataAttributesPagingPermissionsItem] | Unset = UNSET + incident_communication_permissions: list[NewRoleDataAttributesIncidentCommunicationPermissionsItem] | Unset = UNSET + communication_permissions: list[NewRoleDataAttributesCommunicationPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - incident_permission_set_id: None | Unset | str + incident_permission_set_id: None | str | Unset if isinstance(self.incident_permission_set_id, Unset): incident_permission_set_id = UNSET else: incident_permission_set_id = self.incident_permission_set_id - alerts_permissions: Unset | list[str] = UNSET + alerts_permissions: list[str] | Unset = UNSET if not isinstance(self.alerts_permissions, Unset): alerts_permissions = [] for alerts_permissions_item_data in self.alerts_permissions: alerts_permissions_item: str = alerts_permissions_item_data alerts_permissions.append(alerts_permissions_item) - api_keys_permissions: Unset | list[str] = UNSET + api_keys_permissions: list[str] | Unset = UNSET if not isinstance(self.api_keys_permissions, Unset): api_keys_permissions = [] for api_keys_permissions_item_data in self.api_keys_permissions: api_keys_permissions_item: str = api_keys_permissions_item_data api_keys_permissions.append(api_keys_permissions_item) - audits_permissions: Unset | list[str] = UNSET + audits_permissions: list[str] | Unset = UNSET if not isinstance(self.audits_permissions, Unset): audits_permissions = [] for audits_permissions_item_data in self.audits_permissions: audits_permissions_item: str = audits_permissions_item_data audits_permissions.append(audits_permissions_item) - billing_permissions: Unset | list[str] = UNSET + billing_permissions: list[str] | Unset = UNSET if not isinstance(self.billing_permissions, Unset): billing_permissions = [] for billing_permissions_item_data in self.billing_permissions: billing_permissions_item: str = billing_permissions_item_data billing_permissions.append(billing_permissions_item) - environments_permissions: Unset | list[str] = UNSET + environments_permissions: list[str] | Unset = UNSET if not isinstance(self.environments_permissions, Unset): environments_permissions = [] for environments_permissions_item_data in self.environments_permissions: environments_permissions_item: str = environments_permissions_item_data environments_permissions.append(environments_permissions_item) - form_fields_permissions: Unset | list[str] = UNSET + form_fields_permissions: list[str] | Unset = UNSET if not isinstance(self.form_fields_permissions, Unset): form_fields_permissions = [] for form_fields_permissions_item_data in self.form_fields_permissions: form_fields_permissions_item: str = form_fields_permissions_item_data form_fields_permissions.append(form_fields_permissions_item) - functionalities_permissions: Unset | list[str] = UNSET + functionalities_permissions: list[str] | Unset = UNSET if not isinstance(self.functionalities_permissions, Unset): functionalities_permissions = [] for functionalities_permissions_item_data in self.functionalities_permissions: functionalities_permissions_item: str = functionalities_permissions_item_data functionalities_permissions.append(functionalities_permissions_item) - groups_permissions: Unset | list[str] = UNSET + groups_permissions: list[str] | Unset = UNSET if not isinstance(self.groups_permissions, Unset): groups_permissions = [] for groups_permissions_item_data in self.groups_permissions: groups_permissions_item: str = groups_permissions_item_data groups_permissions.append(groups_permissions_item) - incident_causes_permissions: Unset | list[str] = UNSET + incident_causes_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_causes_permissions, Unset): incident_causes_permissions = [] for incident_causes_permissions_item_data in self.incident_causes_permissions: incident_causes_permissions_item: str = incident_causes_permissions_item_data incident_causes_permissions.append(incident_causes_permissions_item) - incident_feedbacks_permissions: Unset | list[str] = UNSET + incident_feedbacks_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_feedbacks_permissions, Unset): incident_feedbacks_permissions = [] for incident_feedbacks_permissions_item_data in self.incident_feedbacks_permissions: incident_feedbacks_permissions_item: str = incident_feedbacks_permissions_item_data incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) - incident_roles_permissions: Unset | list[str] = UNSET + incident_roles_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_roles_permissions, Unset): incident_roles_permissions = [] for incident_roles_permissions_item_data in self.incident_roles_permissions: incident_roles_permissions_item: str = incident_roles_permissions_item_data incident_roles_permissions.append(incident_roles_permissions_item) - incident_types_permissions: Unset | list[str] = UNSET + incident_types_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_types_permissions, Unset): incident_types_permissions = [] for incident_types_permissions_item_data in self.incident_types_permissions: incident_types_permissions_item: str = incident_types_permissions_item_data incident_types_permissions.append(incident_types_permissions_item) - incidents_permissions: Unset | list[str] = UNSET + incidents_permissions: list[str] | Unset = UNSET if not isinstance(self.incidents_permissions, Unset): incidents_permissions = [] for incidents_permissions_item_data in self.incidents_permissions: incidents_permissions_item: str = incidents_permissions_item_data incidents_permissions.append(incidents_permissions_item) - integrations_permissions: Unset | list[str] = UNSET + integrations_permissions: list[str] | Unset = UNSET if not isinstance(self.integrations_permissions, Unset): integrations_permissions = [] for integrations_permissions_item_data in self.integrations_permissions: integrations_permissions_item: str = integrations_permissions_item_data integrations_permissions.append(integrations_permissions_item) - invitations_permissions: Unset | list[str] = UNSET + invitations_permissions: list[str] | Unset = UNSET if not isinstance(self.invitations_permissions, Unset): invitations_permissions = [] for invitations_permissions_item_data in self.invitations_permissions: invitations_permissions_item: str = invitations_permissions_item_data invitations_permissions.append(invitations_permissions_item) - playbooks_permissions: Unset | list[str] = UNSET + playbooks_permissions: list[str] | Unset = UNSET if not isinstance(self.playbooks_permissions, Unset): playbooks_permissions = [] for playbooks_permissions_item_data in self.playbooks_permissions: playbooks_permissions_item: str = playbooks_permissions_item_data playbooks_permissions.append(playbooks_permissions_item) - private_incidents_permissions: Unset | list[str] = UNSET + private_incidents_permissions: list[str] | Unset = UNSET if not isinstance(self.private_incidents_permissions, Unset): private_incidents_permissions = [] for private_incidents_permissions_item_data in self.private_incidents_permissions: private_incidents_permissions_item: str = private_incidents_permissions_item_data private_incidents_permissions.append(private_incidents_permissions_item) - pulses_permissions: Unset | list[str] = UNSET + pulses_permissions: list[str] | Unset = UNSET if not isinstance(self.pulses_permissions, Unset): pulses_permissions = [] for pulses_permissions_item_data in self.pulses_permissions: pulses_permissions_item: str = pulses_permissions_item_data pulses_permissions.append(pulses_permissions_item) - retrospective_permissions: Unset | list[str] = UNSET + retrospective_permissions: list[str] | Unset = UNSET if not isinstance(self.retrospective_permissions, Unset): retrospective_permissions = [] for retrospective_permissions_item_data in self.retrospective_permissions: retrospective_permissions_item: str = retrospective_permissions_item_data retrospective_permissions.append(retrospective_permissions_item) - roles_permissions: Unset | list[str] = UNSET + roles_permissions: list[str] | Unset = UNSET if not isinstance(self.roles_permissions, Unset): roles_permissions = [] for roles_permissions_item_data in self.roles_permissions: roles_permissions_item: str = roles_permissions_item_data roles_permissions.append(roles_permissions_item) - secrets_permissions: Unset | list[str] = UNSET + secrets_permissions: list[str] | Unset = UNSET if not isinstance(self.secrets_permissions, Unset): secrets_permissions = [] for secrets_permissions_item_data in self.secrets_permissions: secrets_permissions_item: str = secrets_permissions_item_data secrets_permissions.append(secrets_permissions_item) - services_permissions: Unset | list[str] = UNSET + services_permissions: list[str] | Unset = UNSET if not isinstance(self.services_permissions, Unset): services_permissions = [] for services_permissions_item_data in self.services_permissions: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) - severities_permissions: Unset | list[str] = UNSET + severities_permissions: list[str] | Unset = UNSET if not isinstance(self.severities_permissions, Unset): severities_permissions = [] for severities_permissions_item_data in self.severities_permissions: severities_permissions_item: str = severities_permissions_item_data severities_permissions.append(severities_permissions_item) - status_pages_permissions: Unset | list[str] = UNSET + status_pages_permissions: list[str] | Unset = UNSET if not isinstance(self.status_pages_permissions, Unset): status_pages_permissions = [] for status_pages_permissions_item_data in self.status_pages_permissions: status_pages_permissions_item: str = status_pages_permissions_item_data status_pages_permissions.append(status_pages_permissions_item) - webhooks_permissions: Unset | list[str] = UNSET + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] for webhooks_permissions_item_data in self.webhooks_permissions: webhooks_permissions_item: str = webhooks_permissions_item_data webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions: Unset | list[str] = UNSET + workflows_permissions: list[str] | Unset = UNSET if not isinstance(self.workflows_permissions, Unset): workflows_permissions = [] for workflows_permissions_item_data in self.workflows_permissions: workflows_permissions_item: str = workflows_permissions_item_data workflows_permissions.append(workflows_permissions_item) + catalogs_permissions: list[str] | Unset = UNSET + if not isinstance(self.catalogs_permissions, Unset): + catalogs_permissions = [] + for catalogs_permissions_item_data in self.catalogs_permissions: + catalogs_permissions_item: str = catalogs_permissions_item_data + catalogs_permissions.append(catalogs_permissions_item) + + sub_statuses_permissions: list[str] | Unset = UNSET + if not isinstance(self.sub_statuses_permissions, Unset): + sub_statuses_permissions = [] + for sub_statuses_permissions_item_data in self.sub_statuses_permissions: + sub_statuses_permissions_item: str = sub_statuses_permissions_item_data + sub_statuses_permissions.append(sub_statuses_permissions_item) + + edge_connector_permissions: list[str] | Unset = UNSET + if not isinstance(self.edge_connector_permissions, Unset): + edge_connector_permissions = [] + for edge_connector_permissions_item_data in self.edge_connector_permissions: + edge_connector_permissions_item: str = edge_connector_permissions_item_data + edge_connector_permissions.append(edge_connector_permissions_item) + + slas_permissions: list[str] | Unset = UNSET + if not isinstance(self.slas_permissions, Unset): + slas_permissions = [] + for slas_permissions_item_data in self.slas_permissions: + slas_permissions_item: str = slas_permissions_item_data + slas_permissions.append(slas_permissions_item) + + paging_permissions: list[str] | Unset = UNSET + if not isinstance(self.paging_permissions, Unset): + paging_permissions = [] + for paging_permissions_item_data in self.paging_permissions: + paging_permissions_item: str = paging_permissions_item_data + paging_permissions.append(paging_permissions_item) + + incident_communication_permissions: list[str] | Unset = UNSET + if not isinstance(self.incident_communication_permissions, Unset): + incident_communication_permissions = [] + for incident_communication_permissions_item_data in self.incident_communication_permissions: + incident_communication_permissions_item: str = incident_communication_permissions_item_data + incident_communication_permissions.append(incident_communication_permissions_item) + + communication_permissions: list[str] | Unset = UNSET + if not isinstance(self.communication_permissions, Unset): + communication_permissions = [] + for communication_permissions_item_data in self.communication_permissions: + communication_permissions_item: str = communication_permissions_item_data + communication_permissions.append(communication_permissions_item) + field_dict: dict[str, Any] = {} field_dict.update( @@ -427,6 +520,20 @@ def to_dict(self) -> dict[str, Any]: field_dict["webhooks_permissions"] = webhooks_permissions if workflows_permissions is not UNSET: field_dict["workflows_permissions"] = workflows_permissions + if catalogs_permissions is not UNSET: + field_dict["catalogs_permissions"] = catalogs_permissions + if sub_statuses_permissions is not UNSET: + field_dict["sub_statuses_permissions"] = sub_statuses_permissions + if edge_connector_permissions is not UNSET: + field_dict["edge_connector_permissions"] = edge_connector_permissions + if slas_permissions is not UNSET: + field_dict["slas_permissions"] = slas_permissions + if paging_permissions is not UNSET: + field_dict["paging_permissions"] = paging_permissions + if incident_communication_permissions is not UNSET: + field_dict["incident_communication_permissions"] = incident_communication_permissions + if communication_permissions is not UNSET: + field_dict["communication_permissions"] = communication_permissions return field_dict @@ -435,246 +542,381 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_incident_permission_set_id(data: object) -> None | Unset | str: + def _parse_incident_permission_set_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_permission_set_id = _parse_incident_permission_set_id(d.pop("incident_permission_set_id", UNSET)) - alerts_permissions = [] _alerts_permissions = d.pop("alerts_permissions", UNSET) - for alerts_permissions_item_data in _alerts_permissions or []: - alerts_permissions_item = check_new_role_data_attributes_alerts_permissions_item( - alerts_permissions_item_data - ) + alerts_permissions: list[NewRoleDataAttributesAlertsPermissionsItem] | Unset = UNSET + if _alerts_permissions is not UNSET: + alerts_permissions = [] + for alerts_permissions_item_data in _alerts_permissions: + alerts_permissions_item = check_new_role_data_attributes_alerts_permissions_item( + alerts_permissions_item_data + ) - alerts_permissions.append(alerts_permissions_item) + alerts_permissions.append(alerts_permissions_item) - api_keys_permissions = [] _api_keys_permissions = d.pop("api_keys_permissions", UNSET) - for api_keys_permissions_item_data in _api_keys_permissions or []: - api_keys_permissions_item = check_new_role_data_attributes_api_keys_permissions_item( - api_keys_permissions_item_data - ) + api_keys_permissions: list[NewRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + if _api_keys_permissions is not UNSET: + api_keys_permissions = [] + for api_keys_permissions_item_data in _api_keys_permissions: + api_keys_permissions_item = check_new_role_data_attributes_api_keys_permissions_item( + api_keys_permissions_item_data + ) - api_keys_permissions.append(api_keys_permissions_item) + api_keys_permissions.append(api_keys_permissions_item) - audits_permissions = [] _audits_permissions = d.pop("audits_permissions", UNSET) - for audits_permissions_item_data in _audits_permissions or []: - audits_permissions_item = check_new_role_data_attributes_audits_permissions_item( - audits_permissions_item_data - ) + audits_permissions: list[NewRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + if _audits_permissions is not UNSET: + audits_permissions = [] + for audits_permissions_item_data in _audits_permissions: + audits_permissions_item = check_new_role_data_attributes_audits_permissions_item( + audits_permissions_item_data + ) - audits_permissions.append(audits_permissions_item) + audits_permissions.append(audits_permissions_item) - billing_permissions = [] _billing_permissions = d.pop("billing_permissions", UNSET) - for billing_permissions_item_data in _billing_permissions or []: - billing_permissions_item = check_new_role_data_attributes_billing_permissions_item( - billing_permissions_item_data - ) + billing_permissions: list[NewRoleDataAttributesBillingPermissionsItem] | Unset = UNSET + if _billing_permissions is not UNSET: + billing_permissions = [] + for billing_permissions_item_data in _billing_permissions: + billing_permissions_item = check_new_role_data_attributes_billing_permissions_item( + billing_permissions_item_data + ) - billing_permissions.append(billing_permissions_item) + billing_permissions.append(billing_permissions_item) - environments_permissions = [] _environments_permissions = d.pop("environments_permissions", UNSET) - for environments_permissions_item_data in _environments_permissions or []: - environments_permissions_item = check_new_role_data_attributes_environments_permissions_item( - environments_permissions_item_data - ) + environments_permissions: list[NewRoleDataAttributesEnvironmentsPermissionsItem] | Unset = UNSET + if _environments_permissions is not UNSET: + environments_permissions = [] + for environments_permissions_item_data in _environments_permissions: + environments_permissions_item = check_new_role_data_attributes_environments_permissions_item( + environments_permissions_item_data + ) - environments_permissions.append(environments_permissions_item) + environments_permissions.append(environments_permissions_item) - form_fields_permissions = [] _form_fields_permissions = d.pop("form_fields_permissions", UNSET) - for form_fields_permissions_item_data in _form_fields_permissions or []: - form_fields_permissions_item = check_new_role_data_attributes_form_fields_permissions_item( - form_fields_permissions_item_data - ) + form_fields_permissions: list[NewRoleDataAttributesFormFieldsPermissionsItem] | Unset = UNSET + if _form_fields_permissions is not UNSET: + form_fields_permissions = [] + for form_fields_permissions_item_data in _form_fields_permissions: + form_fields_permissions_item = check_new_role_data_attributes_form_fields_permissions_item( + form_fields_permissions_item_data + ) - form_fields_permissions.append(form_fields_permissions_item) + form_fields_permissions.append(form_fields_permissions_item) - functionalities_permissions = [] _functionalities_permissions = d.pop("functionalities_permissions", UNSET) - for functionalities_permissions_item_data in _functionalities_permissions or []: - functionalities_permissions_item = check_new_role_data_attributes_functionalities_permissions_item( - functionalities_permissions_item_data - ) + functionalities_permissions: list[NewRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = check_new_role_data_attributes_functionalities_permissions_item( + functionalities_permissions_item_data + ) - functionalities_permissions.append(functionalities_permissions_item) + functionalities_permissions.append(functionalities_permissions_item) - groups_permissions = [] _groups_permissions = d.pop("groups_permissions", UNSET) - for groups_permissions_item_data in _groups_permissions or []: - groups_permissions_item = check_new_role_data_attributes_groups_permissions_item( - groups_permissions_item_data - ) + groups_permissions: list[NewRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + if _groups_permissions is not UNSET: + groups_permissions = [] + for groups_permissions_item_data in _groups_permissions: + groups_permissions_item = check_new_role_data_attributes_groups_permissions_item( + groups_permissions_item_data + ) - groups_permissions.append(groups_permissions_item) + groups_permissions.append(groups_permissions_item) - incident_causes_permissions = [] _incident_causes_permissions = d.pop("incident_causes_permissions", UNSET) - for incident_causes_permissions_item_data in _incident_causes_permissions or []: - incident_causes_permissions_item = check_new_role_data_attributes_incident_causes_permissions_item( - incident_causes_permissions_item_data - ) + incident_causes_permissions: list[NewRoleDataAttributesIncidentCausesPermissionsItem] | Unset = UNSET + if _incident_causes_permissions is not UNSET: + incident_causes_permissions = [] + for incident_causes_permissions_item_data in _incident_causes_permissions: + incident_causes_permissions_item = check_new_role_data_attributes_incident_causes_permissions_item( + incident_causes_permissions_item_data + ) - incident_causes_permissions.append(incident_causes_permissions_item) + incident_causes_permissions.append(incident_causes_permissions_item) - incident_feedbacks_permissions = [] _incident_feedbacks_permissions = d.pop("incident_feedbacks_permissions", UNSET) - for incident_feedbacks_permissions_item_data in _incident_feedbacks_permissions or []: - incident_feedbacks_permissions_item = check_new_role_data_attributes_incident_feedbacks_permissions_item( - incident_feedbacks_permissions_item_data - ) + incident_feedbacks_permissions: list[NewRoleDataAttributesIncidentFeedbacksPermissionsItem] | Unset = UNSET + if _incident_feedbacks_permissions is not UNSET: + incident_feedbacks_permissions = [] + for incident_feedbacks_permissions_item_data in _incident_feedbacks_permissions: + incident_feedbacks_permissions_item = ( + check_new_role_data_attributes_incident_feedbacks_permissions_item( + incident_feedbacks_permissions_item_data + ) + ) - incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) + incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) - incident_roles_permissions = [] _incident_roles_permissions = d.pop("incident_roles_permissions", UNSET) - for incident_roles_permissions_item_data in _incident_roles_permissions or []: - incident_roles_permissions_item = check_new_role_data_attributes_incident_roles_permissions_item( - incident_roles_permissions_item_data - ) + incident_roles_permissions: list[NewRoleDataAttributesIncidentRolesPermissionsItem] | Unset = UNSET + if _incident_roles_permissions is not UNSET: + incident_roles_permissions = [] + for incident_roles_permissions_item_data in _incident_roles_permissions: + incident_roles_permissions_item = check_new_role_data_attributes_incident_roles_permissions_item( + incident_roles_permissions_item_data + ) - incident_roles_permissions.append(incident_roles_permissions_item) + incident_roles_permissions.append(incident_roles_permissions_item) - incident_types_permissions = [] _incident_types_permissions = d.pop("incident_types_permissions", UNSET) - for incident_types_permissions_item_data in _incident_types_permissions or []: - incident_types_permissions_item = check_new_role_data_attributes_incident_types_permissions_item( - incident_types_permissions_item_data - ) + incident_types_permissions: list[NewRoleDataAttributesIncidentTypesPermissionsItem] | Unset = UNSET + if _incident_types_permissions is not UNSET: + incident_types_permissions = [] + for incident_types_permissions_item_data in _incident_types_permissions: + incident_types_permissions_item = check_new_role_data_attributes_incident_types_permissions_item( + incident_types_permissions_item_data + ) - incident_types_permissions.append(incident_types_permissions_item) + incident_types_permissions.append(incident_types_permissions_item) - incidents_permissions = [] _incidents_permissions = d.pop("incidents_permissions", UNSET) - for incidents_permissions_item_data in _incidents_permissions or []: - incidents_permissions_item = check_new_role_data_attributes_incidents_permissions_item( - incidents_permissions_item_data - ) + incidents_permissions: list[NewRoleDataAttributesIncidentsPermissionsItem] | Unset = UNSET + if _incidents_permissions is not UNSET: + incidents_permissions = [] + for incidents_permissions_item_data in _incidents_permissions: + incidents_permissions_item = check_new_role_data_attributes_incidents_permissions_item( + incidents_permissions_item_data + ) - incidents_permissions.append(incidents_permissions_item) + incidents_permissions.append(incidents_permissions_item) - integrations_permissions = [] _integrations_permissions = d.pop("integrations_permissions", UNSET) - for integrations_permissions_item_data in _integrations_permissions or []: - integrations_permissions_item = check_new_role_data_attributes_integrations_permissions_item( - integrations_permissions_item_data - ) + integrations_permissions: list[NewRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + if _integrations_permissions is not UNSET: + integrations_permissions = [] + for integrations_permissions_item_data in _integrations_permissions: + integrations_permissions_item = check_new_role_data_attributes_integrations_permissions_item( + integrations_permissions_item_data + ) - integrations_permissions.append(integrations_permissions_item) + integrations_permissions.append(integrations_permissions_item) - invitations_permissions = [] _invitations_permissions = d.pop("invitations_permissions", UNSET) - for invitations_permissions_item_data in _invitations_permissions or []: - invitations_permissions_item = check_new_role_data_attributes_invitations_permissions_item( - invitations_permissions_item_data - ) + invitations_permissions: list[NewRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + if _invitations_permissions is not UNSET: + invitations_permissions = [] + for invitations_permissions_item_data in _invitations_permissions: + invitations_permissions_item = check_new_role_data_attributes_invitations_permissions_item( + invitations_permissions_item_data + ) - invitations_permissions.append(invitations_permissions_item) + invitations_permissions.append(invitations_permissions_item) - playbooks_permissions = [] _playbooks_permissions = d.pop("playbooks_permissions", UNSET) - for playbooks_permissions_item_data in _playbooks_permissions or []: - playbooks_permissions_item = check_new_role_data_attributes_playbooks_permissions_item( - playbooks_permissions_item_data - ) + playbooks_permissions: list[NewRoleDataAttributesPlaybooksPermissionsItem] | Unset = UNSET + if _playbooks_permissions is not UNSET: + playbooks_permissions = [] + for playbooks_permissions_item_data in _playbooks_permissions: + playbooks_permissions_item = check_new_role_data_attributes_playbooks_permissions_item( + playbooks_permissions_item_data + ) - playbooks_permissions.append(playbooks_permissions_item) + playbooks_permissions.append(playbooks_permissions_item) - private_incidents_permissions = [] _private_incidents_permissions = d.pop("private_incidents_permissions", UNSET) - for private_incidents_permissions_item_data in _private_incidents_permissions or []: - private_incidents_permissions_item = check_new_role_data_attributes_private_incidents_permissions_item( - private_incidents_permissions_item_data - ) + private_incidents_permissions: list[NewRoleDataAttributesPrivateIncidentsPermissionsItem] | Unset = UNSET + if _private_incidents_permissions is not UNSET: + private_incidents_permissions = [] + for private_incidents_permissions_item_data in _private_incidents_permissions: + private_incidents_permissions_item = check_new_role_data_attributes_private_incidents_permissions_item( + private_incidents_permissions_item_data + ) - private_incidents_permissions.append(private_incidents_permissions_item) + private_incidents_permissions.append(private_incidents_permissions_item) - pulses_permissions = [] _pulses_permissions = d.pop("pulses_permissions", UNSET) - for pulses_permissions_item_data in _pulses_permissions or []: - pulses_permissions_item = check_new_role_data_attributes_pulses_permissions_item( - pulses_permissions_item_data - ) + pulses_permissions: list[NewRoleDataAttributesPulsesPermissionsItem] | Unset = UNSET + if _pulses_permissions is not UNSET: + pulses_permissions = [] + for pulses_permissions_item_data in _pulses_permissions: + pulses_permissions_item = check_new_role_data_attributes_pulses_permissions_item( + pulses_permissions_item_data + ) - pulses_permissions.append(pulses_permissions_item) + pulses_permissions.append(pulses_permissions_item) - retrospective_permissions = [] _retrospective_permissions = d.pop("retrospective_permissions", UNSET) - for retrospective_permissions_item_data in _retrospective_permissions or []: - retrospective_permissions_item = check_new_role_data_attributes_retrospective_permissions_item( - retrospective_permissions_item_data - ) + retrospective_permissions: list[NewRoleDataAttributesRetrospectivePermissionsItem] | Unset = UNSET + if _retrospective_permissions is not UNSET: + retrospective_permissions = [] + for retrospective_permissions_item_data in _retrospective_permissions: + retrospective_permissions_item = check_new_role_data_attributes_retrospective_permissions_item( + retrospective_permissions_item_data + ) - retrospective_permissions.append(retrospective_permissions_item) + retrospective_permissions.append(retrospective_permissions_item) - roles_permissions = [] _roles_permissions = d.pop("roles_permissions", UNSET) - for roles_permissions_item_data in _roles_permissions or []: - roles_permissions_item = check_new_role_data_attributes_roles_permissions_item(roles_permissions_item_data) + roles_permissions: list[NewRoleDataAttributesRolesPermissionsItem] | Unset = UNSET + if _roles_permissions is not UNSET: + roles_permissions = [] + for roles_permissions_item_data in _roles_permissions: + roles_permissions_item = check_new_role_data_attributes_roles_permissions_item( + roles_permissions_item_data + ) - roles_permissions.append(roles_permissions_item) + roles_permissions.append(roles_permissions_item) - secrets_permissions = [] _secrets_permissions = d.pop("secrets_permissions", UNSET) - for secrets_permissions_item_data in _secrets_permissions or []: - secrets_permissions_item = check_new_role_data_attributes_secrets_permissions_item( - secrets_permissions_item_data - ) + secrets_permissions: list[NewRoleDataAttributesSecretsPermissionsItem] | Unset = UNSET + if _secrets_permissions is not UNSET: + secrets_permissions = [] + for secrets_permissions_item_data in _secrets_permissions: + secrets_permissions_item = check_new_role_data_attributes_secrets_permissions_item( + secrets_permissions_item_data + ) - secrets_permissions.append(secrets_permissions_item) + secrets_permissions.append(secrets_permissions_item) - services_permissions = [] _services_permissions = d.pop("services_permissions", UNSET) - for services_permissions_item_data in _services_permissions or []: - services_permissions_item = check_new_role_data_attributes_services_permissions_item( - services_permissions_item_data - ) + services_permissions: list[NewRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + if _services_permissions is not UNSET: + services_permissions = [] + for services_permissions_item_data in _services_permissions: + services_permissions_item = check_new_role_data_attributes_services_permissions_item( + services_permissions_item_data + ) - services_permissions.append(services_permissions_item) + services_permissions.append(services_permissions_item) - severities_permissions = [] _severities_permissions = d.pop("severities_permissions", UNSET) - for severities_permissions_item_data in _severities_permissions or []: - severities_permissions_item = check_new_role_data_attributes_severities_permissions_item( - severities_permissions_item_data - ) + severities_permissions: list[NewRoleDataAttributesSeveritiesPermissionsItem] | Unset = UNSET + if _severities_permissions is not UNSET: + severities_permissions = [] + for severities_permissions_item_data in _severities_permissions: + severities_permissions_item = check_new_role_data_attributes_severities_permissions_item( + severities_permissions_item_data + ) - severities_permissions.append(severities_permissions_item) + severities_permissions.append(severities_permissions_item) - status_pages_permissions = [] _status_pages_permissions = d.pop("status_pages_permissions", UNSET) - for status_pages_permissions_item_data in _status_pages_permissions or []: - status_pages_permissions_item = check_new_role_data_attributes_status_pages_permissions_item( - status_pages_permissions_item_data - ) + status_pages_permissions: list[NewRoleDataAttributesStatusPagesPermissionsItem] | Unset = UNSET + if _status_pages_permissions is not UNSET: + status_pages_permissions = [] + for status_pages_permissions_item_data in _status_pages_permissions: + status_pages_permissions_item = check_new_role_data_attributes_status_pages_permissions_item( + status_pages_permissions_item_data + ) - status_pages_permissions.append(status_pages_permissions_item) + status_pages_permissions.append(status_pages_permissions_item) - webhooks_permissions = [] _webhooks_permissions = d.pop("webhooks_permissions", UNSET) - for webhooks_permissions_item_data in _webhooks_permissions or []: - webhooks_permissions_item = check_new_role_data_attributes_webhooks_permissions_item( - webhooks_permissions_item_data - ) + webhooks_permissions: list[NewRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + if _webhooks_permissions is not UNSET: + webhooks_permissions = [] + for webhooks_permissions_item_data in _webhooks_permissions: + webhooks_permissions_item = check_new_role_data_attributes_webhooks_permissions_item( + webhooks_permissions_item_data + ) - webhooks_permissions.append(webhooks_permissions_item) + webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions = [] _workflows_permissions = d.pop("workflows_permissions", UNSET) - for workflows_permissions_item_data in _workflows_permissions or []: - workflows_permissions_item = check_new_role_data_attributes_workflows_permissions_item( - workflows_permissions_item_data - ) + workflows_permissions: list[NewRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + if _workflows_permissions is not UNSET: + workflows_permissions = [] + for workflows_permissions_item_data in _workflows_permissions: + workflows_permissions_item = check_new_role_data_attributes_workflows_permissions_item( + workflows_permissions_item_data + ) - workflows_permissions.append(workflows_permissions_item) + workflows_permissions.append(workflows_permissions_item) + + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[NewRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_new_role_data_attributes_catalogs_permissions_item( + catalogs_permissions_item_data + ) + + catalogs_permissions.append(catalogs_permissions_item) + + _sub_statuses_permissions = d.pop("sub_statuses_permissions", UNSET) + sub_statuses_permissions: list[NewRoleDataAttributesSubStatusesPermissionsItem] | Unset = UNSET + if _sub_statuses_permissions is not UNSET: + sub_statuses_permissions = [] + for sub_statuses_permissions_item_data in _sub_statuses_permissions: + sub_statuses_permissions_item = check_new_role_data_attributes_sub_statuses_permissions_item( + sub_statuses_permissions_item_data + ) + + sub_statuses_permissions.append(sub_statuses_permissions_item) + + _edge_connector_permissions = d.pop("edge_connector_permissions", UNSET) + edge_connector_permissions: list[NewRoleDataAttributesEdgeConnectorPermissionsItem] | Unset = UNSET + if _edge_connector_permissions is not UNSET: + edge_connector_permissions = [] + for edge_connector_permissions_item_data in _edge_connector_permissions: + edge_connector_permissions_item = check_new_role_data_attributes_edge_connector_permissions_item( + edge_connector_permissions_item_data + ) + + edge_connector_permissions.append(edge_connector_permissions_item) + + _slas_permissions = d.pop("slas_permissions", UNSET) + slas_permissions: list[NewRoleDataAttributesSlasPermissionsItem] | Unset = UNSET + if _slas_permissions is not UNSET: + slas_permissions = [] + for slas_permissions_item_data in _slas_permissions: + slas_permissions_item = check_new_role_data_attributes_slas_permissions_item(slas_permissions_item_data) + + slas_permissions.append(slas_permissions_item) + + _paging_permissions = d.pop("paging_permissions", UNSET) + paging_permissions: list[NewRoleDataAttributesPagingPermissionsItem] | Unset = UNSET + if _paging_permissions is not UNSET: + paging_permissions = [] + for paging_permissions_item_data in _paging_permissions: + paging_permissions_item = check_new_role_data_attributes_paging_permissions_item( + paging_permissions_item_data + ) + + paging_permissions.append(paging_permissions_item) + + _incident_communication_permissions = d.pop("incident_communication_permissions", UNSET) + incident_communication_permissions: list[NewRoleDataAttributesIncidentCommunicationPermissionsItem] | Unset = ( + UNSET + ) + if _incident_communication_permissions is not UNSET: + incident_communication_permissions = [] + for incident_communication_permissions_item_data in _incident_communication_permissions: + incident_communication_permissions_item = ( + check_new_role_data_attributes_incident_communication_permissions_item( + incident_communication_permissions_item_data + ) + ) + + incident_communication_permissions.append(incident_communication_permissions_item) + + _communication_permissions = d.pop("communication_permissions", UNSET) + communication_permissions: list[NewRoleDataAttributesCommunicationPermissionsItem] | Unset = UNSET + if _communication_permissions is not UNSET: + communication_permissions = [] + for communication_permissions_item_data in _communication_permissions: + communication_permissions_item = check_new_role_data_attributes_communication_permissions_item( + communication_permissions_item_data + ) + + communication_permissions.append(communication_permissions_item) new_role_data_attributes = cls( name=name, @@ -705,6 +947,13 @@ def _parse_incident_permission_set_id(data: object) -> None | Unset | str: status_pages_permissions=status_pages_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, + sub_statuses_permissions=sub_statuses_permissions, + edge_connector_permissions=edge_connector_permissions, + slas_permissions=slas_permissions, + paging_permissions=paging_permissions, + incident_communication_permissions=incident_communication_permissions, + communication_permissions=communication_permissions, ) return new_role_data_attributes diff --git a/rootly_sdk/models/new_role_data_attributes_catalogs_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_catalogs_permissions_item.py new file mode 100644 index 00000000..e2faa29a --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_catalogs_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewRoleDataAttributesCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: set[NewRoleDataAttributesCatalogsPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_role_data_attributes_catalogs_permissions_item( + value: str | None, +) -> NewRoleDataAttributesCatalogsPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesCatalogsPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_role_data_attributes_communication_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_communication_permissions_item.py new file mode 100644 index 00000000..a6c8b3b5 --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_communication_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewRoleDataAttributesCommunicationPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_COMMUNICATION_PERMISSIONS_ITEM_VALUES: set[ + NewRoleDataAttributesCommunicationPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_role_data_attributes_communication_permissions_item( + value: str | None, +) -> NewRoleDataAttributesCommunicationPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_COMMUNICATION_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesCommunicationPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_COMMUNICATION_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_role_data_attributes_edge_connector_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_edge_connector_permissions_item.py new file mode 100644 index 00000000..b97f8ad6 --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_edge_connector_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewRoleDataAttributesEdgeConnectorPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES: set[ + NewRoleDataAttributesEdgeConnectorPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_role_data_attributes_edge_connector_permissions_item( + value: str | None, +) -> NewRoleDataAttributesEdgeConnectorPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesEdgeConnectorPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_role_data_attributes_incident_communication_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_incident_communication_permissions_item.py new file mode 100644 index 00000000..2225ec35 --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_incident_communication_permissions_item.py @@ -0,0 +1,25 @@ +from typing import Literal, cast + +NewRoleDataAttributesIncidentCommunicationPermissionsItem = Literal["create", "delete", "read", "send", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES: set[ + NewRoleDataAttributesIncidentCommunicationPermissionsItem +] = { + "create", + "delete", + "read", + "send", + "update", +} + + +def check_new_role_data_attributes_incident_communication_permissions_item( + value: str | None, +) -> NewRoleDataAttributesIncidentCommunicationPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesIncidentCommunicationPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_role_data_attributes_paging_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_paging_permissions_item.py new file mode 100644 index 00000000..e0cd334c --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_paging_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewRoleDataAttributesPagingPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_PAGING_PERMISSIONS_ITEM_VALUES: set[NewRoleDataAttributesPagingPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_role_data_attributes_paging_permissions_item( + value: str | None, +) -> NewRoleDataAttributesPagingPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_PAGING_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesPagingPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_PAGING_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_role_data_attributes_slas_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_slas_permissions_item.py new file mode 100644 index 00000000..e29e24b4 --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_slas_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewRoleDataAttributesSlasPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_SLAS_PERMISSIONS_ITEM_VALUES: set[NewRoleDataAttributesSlasPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_role_data_attributes_slas_permissions_item( + value: str | None, +) -> NewRoleDataAttributesSlasPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_SLAS_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesSlasPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_SLAS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_role_data_attributes_sub_statuses_permissions_item.py b/rootly_sdk/models/new_role_data_attributes_sub_statuses_permissions_item.py new file mode 100644 index 00000000..f044fd89 --- /dev/null +++ b/rootly_sdk/models/new_role_data_attributes_sub_statuses_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewRoleDataAttributesSubStatusesPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ROLE_DATA_ATTRIBUTES_SUB_STATUSES_PERMISSIONS_ITEM_VALUES: set[NewRoleDataAttributesSubStatusesPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_role_data_attributes_sub_statuses_permissions_item( + value: str | None, +) -> NewRoleDataAttributesSubStatusesPermissionsItem | None: + if value is None: + return None + if value in NEW_ROLE_DATA_ATTRIBUTES_SUB_STATUSES_PERMISSIONS_ITEM_VALUES: + return cast(NewRoleDataAttributesSubStatusesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ROLE_DATA_ATTRIBUTES_SUB_STATUSES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_schedule.py b/rootly_sdk/models/new_schedule.py index 27b30e61..8dfa2c2f 100644 --- a/rootly_sdk/models/new_schedule.py +++ b/rootly_sdk/models/new_schedule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewSchedule: data (NewScheduleData): """ - data: "NewScheduleData" + data: NewScheduleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_data.py b/rootly_sdk/models/new_schedule_data.py index 099fc2e5..3503c7c1 100644 --- a/rootly_sdk/models/new_schedule_data.py +++ b/rootly_sdk/models/new_schedule_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewScheduleData: """ type_: NewScheduleDataType - attributes: "NewScheduleDataAttributes" + attributes: NewScheduleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_data_attributes.py b/rootly_sdk/models/new_schedule_data_attributes.py index e07dfd6f..dd1a68e6 100644 --- a/rootly_sdk/models/new_schedule_data_attributes.py +++ b/rootly_sdk/models/new_schedule_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -19,20 +21,20 @@ class NewScheduleDataAttributes: Attributes: name (str): The name of the schedule owner_user_id (int): ID of the owner of the schedule - description (Union[None, Unset, str]): The description of the schedule - all_time_coverage (Union[None, Unset, bool]): 24/7 coverage of the schedule - slack_user_group (Union[Unset, NewScheduleDataAttributesSlackUserGroup]): - slack_channel (Union['NewScheduleDataAttributesSlackChannelType0', None, Unset]): - owner_group_ids (Union[Unset, list[str]]): Owning teams. + description (None | str | Unset): The description of the schedule + all_time_coverage (bool | None | Unset): 24/7 coverage of the schedule + slack_user_group (NewScheduleDataAttributesSlackUserGroup | Unset): + slack_channel (NewScheduleDataAttributesSlackChannelType0 | None | Unset): + owner_group_ids (list[str] | Unset): Owning teams. """ name: str owner_user_id: int - description: None | Unset | str = UNSET - all_time_coverage: None | Unset | bool = UNSET - slack_user_group: Union[Unset, "NewScheduleDataAttributesSlackUserGroup"] = UNSET - slack_channel: Union["NewScheduleDataAttributesSlackChannelType0", None, Unset] = UNSET - owner_group_ids: Unset | list[str] = UNSET + description: None | str | Unset = UNSET + all_time_coverage: bool | None | Unset = UNSET + slack_user_group: NewScheduleDataAttributesSlackUserGroup | Unset = UNSET + slack_channel: NewScheduleDataAttributesSlackChannelType0 | None | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_schedule_data_attributes_slack_channel_type_0 import ( @@ -43,23 +45,23 @@ def to_dict(self) -> dict[str, Any]: owner_user_id = self.owner_user_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - all_time_coverage: None | Unset | bool + all_time_coverage: bool | None | Unset if isinstance(self.all_time_coverage, Unset): all_time_coverage = UNSET else: all_time_coverage = self.all_time_coverage - slack_user_group: Unset | dict[str, Any] = UNSET + slack_user_group: dict[str, Any] | Unset = UNSET if not isinstance(self.slack_user_group, Unset): slack_user_group = self.slack_user_group.to_dict() - slack_channel: None | Unset | dict[str, Any] + slack_channel: dict[str, Any] | None | Unset if isinstance(self.slack_channel, Unset): slack_channel = UNSET elif isinstance(self.slack_channel, NewScheduleDataAttributesSlackChannelType0): @@ -67,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channel = self.slack_channel - owner_group_ids: Unset | list[str] = UNSET + owner_group_ids: list[str] | Unset = UNSET if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids @@ -104,32 +106,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: owner_user_id = d.pop("owner_user_id") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_all_time_coverage(data: object) -> None | Unset | bool: + def _parse_all_time_coverage(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) all_time_coverage = _parse_all_time_coverage(d.pop("all_time_coverage", UNSET)) _slack_user_group = d.pop("slack_user_group", UNSET) - slack_user_group: Unset | NewScheduleDataAttributesSlackUserGroup + slack_user_group: NewScheduleDataAttributesSlackUserGroup | Unset if isinstance(_slack_user_group, Unset): slack_user_group = UNSET else: slack_user_group = NewScheduleDataAttributesSlackUserGroup.from_dict(_slack_user_group) - def _parse_slack_channel(data: object) -> Union["NewScheduleDataAttributesSlackChannelType0", None, Unset]: + def _parse_slack_channel(data: object) -> NewScheduleDataAttributesSlackChannelType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -140,9 +142,9 @@ def _parse_slack_channel(data: object) -> Union["NewScheduleDataAttributesSlackC slack_channel_type_0 = NewScheduleDataAttributesSlackChannelType0.from_dict(data) return slack_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewScheduleDataAttributesSlackChannelType0", None, Unset], data) + return cast(NewScheduleDataAttributesSlackChannelType0 | None | Unset, data) slack_channel = _parse_slack_channel(d.pop("slack_channel", UNSET)) diff --git a/rootly_sdk/models/new_schedule_data_attributes_slack_channel_type_0.py b/rootly_sdk/models/new_schedule_data_attributes_slack_channel_type_0.py index 88d154f3..7ba412f5 100644 --- a/rootly_sdk/models/new_schedule_data_attributes_slack_channel_type_0.py +++ b/rootly_sdk/models/new_schedule_data_attributes_slack_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class NewScheduleDataAttributesSlackChannelType0: """ Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_data_attributes_slack_user_group.py b/rootly_sdk/models/new_schedule_data_attributes_slack_user_group.py index cf79f8e0..14467737 100644 --- a/rootly_sdk/models/new_schedule_data_attributes_slack_user_group.py +++ b/rootly_sdk/models/new_schedule_data_attributes_slack_user_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class NewScheduleDataAttributesSlackUserGroup: """ Attributes: - id (Union[Unset, str]): Slack user group ID - name (Union[Unset, str]): Slack user group name + id (str | Unset): Slack user group ID + name (str | Unset): Slack user group name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation.py b/rootly_sdk/models/new_schedule_rotation.py index 307e1325..258896ae 100644 --- a/rootly_sdk/models/new_schedule_rotation.py +++ b/rootly_sdk/models/new_schedule_rotation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewScheduleRotation: data (NewScheduleRotationData): """ - data: "NewScheduleRotationData" + data: NewScheduleRotationData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation_active_day.py b/rootly_sdk/models/new_schedule_rotation_active_day.py index d6df5007..8eaeed71 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewScheduleRotationActiveDay: data (NewScheduleRotationActiveDayData): """ - data: "NewScheduleRotationActiveDayData" + data: NewScheduleRotationActiveDayData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation_active_day_data.py b/rootly_sdk/models/new_schedule_rotation_active_day_data.py index 1d357cf3..c53fded7 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewScheduleRotationActiveDayData: """ type_: NewScheduleRotationActiveDayDataType - attributes: "NewScheduleRotationActiveDayDataAttributes" + attributes: NewScheduleRotationActiveDayDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py index 80542d68..d8ce7dc3 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class NewScheduleRotationActiveDayDataAttributes: Attributes: day_name (NewScheduleRotationActiveDayDataAttributesDayName): Schedule rotation day name for which active times to be created - active_time_attributes (list['NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem']): Schedule + active_time_attributes (list[NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem]): Schedule rotation active times per day """ day_name: NewScheduleRotationActiveDayDataAttributesDayName - active_time_attributes: list["NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem"] + active_time_attributes: list[NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] def to_dict(self) -> dict[str, Any]: day_name: str = self.day_name diff --git a/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py b/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py index b99cbf6b..de2a9d11 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem: """ Attributes: - start_time (Union[Unset, str]): Start time for schedule rotation active time - end_time (Union[Unset, str]): End time for schedule rotation active time + start_time (str | Unset): Start time for schedule rotation active time + end_time (str | Unset): End time for schedule rotation active time """ - start_time: Unset | str = UNSET - end_time: Unset | str = UNSET + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation_data.py b/rootly_sdk/models/new_schedule_rotation_data.py index e505b64a..6738b8cb 100644 --- a/rootly_sdk/models/new_schedule_rotation_data.py +++ b/rootly_sdk/models/new_schedule_rotation_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewScheduleRotationData: """ type_: NewScheduleRotationDataType - attributes: "NewScheduleRotationDataAttributes" + attributes: NewScheduleRotationDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_data_attributes.py index f918d9a3..a070e8e0 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from dateutil.parser import isoparse @@ -45,44 +47,43 @@ class NewScheduleRotationDataAttributes: Attributes: name (str): The name of the schedule rotation schedule_rotationable_type (NewScheduleRotationDataAttributesScheduleRotationableType): Schedule rotation type - schedule_rotationable_attributes (Union['NewScheduleRotationDataAttributesScheduleRotationableAttributesType0', - 'NewScheduleRotationDataAttributesScheduleRotationableAttributesType1', - 'NewScheduleRotationDataAttributesScheduleRotationableAttributesType2', - 'NewScheduleRotationDataAttributesScheduleRotationableAttributesType3']): - position (Union[Unset, int]): Position of the schedule rotation - active_all_week (Union[Unset, bool]): Schedule rotation active all week? Default: True. - active_days (Union[Unset, list[NewScheduleRotationDataAttributesActiveDaysItem]]): - active_time_type (Union[Unset, str]): - active_time_attributes (Union[Unset, list['NewScheduleRotationDataAttributesActiveTimeAttributesItem']]): - Schedule rotation's active times - time_zone (Union[Unset, str]): A valid IANA time zone name. Default: 'Etc/UTC'. - start_time (Union[None, Unset, datetime.date]): ISO8601 date and time when rotation starts. Shifts will only be + schedule_rotationable_attributes (NewScheduleRotationDataAttributesScheduleRotationableAttributesType0 | + NewScheduleRotationDataAttributesScheduleRotationableAttributesType1 | + NewScheduleRotationDataAttributesScheduleRotationableAttributesType2 | + NewScheduleRotationDataAttributesScheduleRotationableAttributesType3): + position (int | Unset): Position of the schedule rotation + active_all_week (bool | Unset): Schedule rotation active all week? Default: True. + active_days (list[NewScheduleRotationDataAttributesActiveDaysItem] | Unset): + active_time_type (str | Unset): + active_time_attributes (list[NewScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset): Schedule + rotation's active times + time_zone (str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. + start_time (datetime.date | None | Unset): ISO8601 date and time when rotation starts. Shifts will only be created after this time. - end_time (Union[None, Unset, datetime.date]): ISO8601 date and time when rotation ends. Shifts will only be - created before this time. - schedule_rotation_members (Union[None, Unset, - list['NewScheduleRotationDataAttributesScheduleRotationMembersType0Item']]): You can only add schedule rotation - members if your account has schedule nesting feature enabled + end_time (datetime.date | None | Unset): ISO8601 date and time when rotation ends. Shifts will only be created + before this time. + schedule_rotation_members (list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | + Unset): You can only add schedule rotation members if your account has schedule nesting feature enabled """ name: str schedule_rotationable_type: NewScheduleRotationDataAttributesScheduleRotationableType - schedule_rotationable_attributes: Union[ - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType0", - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType1", - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType2", - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType3", - ] - position: Unset | int = UNSET - active_all_week: Unset | bool = True - active_days: Unset | list[NewScheduleRotationDataAttributesActiveDaysItem] = UNSET - active_time_type: Unset | str = UNSET - active_time_attributes: Unset | list["NewScheduleRotationDataAttributesActiveTimeAttributesItem"] = UNSET - time_zone: Unset | str = "Etc/UTC" - start_time: None | Unset | datetime.date = UNSET - end_time: None | Unset | datetime.date = UNSET + schedule_rotationable_attributes: ( + NewScheduleRotationDataAttributesScheduleRotationableAttributesType0 + | NewScheduleRotationDataAttributesScheduleRotationableAttributesType1 + | NewScheduleRotationDataAttributesScheduleRotationableAttributesType2 + | NewScheduleRotationDataAttributesScheduleRotationableAttributesType3 + ) + position: int | Unset = UNSET + active_all_week: bool | Unset = True + active_days: list[NewScheduleRotationDataAttributesActiveDaysItem] | Unset = UNSET + active_time_type: str | Unset = UNSET + active_time_attributes: list[NewScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset = UNSET + time_zone: str | Unset = "Etc/UTC" + start_time: datetime.date | None | Unset = UNSET + end_time: datetime.date | None | Unset = UNSET schedule_rotation_members: ( - None | Unset | list["NewScheduleRotationDataAttributesScheduleRotationMembersType0Item"] + list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: @@ -120,7 +121,7 @@ def to_dict(self) -> dict[str, Any]: active_all_week = self.active_all_week - active_days: Unset | list[str] = UNSET + active_days: list[str] | Unset = UNSET if not isinstance(self.active_days, Unset): active_days = [] for active_days_item_data in self.active_days: @@ -129,7 +130,7 @@ def to_dict(self) -> dict[str, Any]: active_time_type = self.active_time_type - active_time_attributes: Unset | list[dict[str, Any]] = UNSET + active_time_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.active_time_attributes, Unset): active_time_attributes = [] for active_time_attributes_item_data in self.active_time_attributes: @@ -138,7 +139,7 @@ def to_dict(self) -> dict[str, Any]: time_zone = self.time_zone - start_time: None | Unset | str + start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET elif isinstance(self.start_time, datetime.date): @@ -146,7 +147,7 @@ def to_dict(self) -> dict[str, Any]: else: start_time = self.start_time - end_time: None | Unset | str + end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET elif isinstance(self.end_time, datetime.date): @@ -154,7 +155,7 @@ def to_dict(self) -> dict[str, Any]: else: end_time = self.end_time - schedule_rotation_members: None | Unset | list[dict[str, Any]] + schedule_rotation_members: list[dict[str, Any]] | None | Unset if isinstance(self.schedule_rotation_members, Unset): schedule_rotation_members = UNSET elif isinstance(self.schedule_rotation_members, list): @@ -226,12 +227,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_schedule_rotationable_attributes( data: object, - ) -> Union[ - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType0", - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType1", - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType2", - "NewScheduleRotationDataAttributesScheduleRotationableAttributesType3", - ]: + ) -> ( + NewScheduleRotationDataAttributesScheduleRotationableAttributesType0 + | NewScheduleRotationDataAttributesScheduleRotationableAttributesType1 + | NewScheduleRotationDataAttributesScheduleRotationableAttributesType2 + | NewScheduleRotationDataAttributesScheduleRotationableAttributesType3 + ): try: if not isinstance(data, dict): raise TypeError() @@ -240,7 +241,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -250,7 +251,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -260,7 +261,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() @@ -278,27 +279,31 @@ def _parse_schedule_rotationable_attributes( active_all_week = d.pop("active_all_week", UNSET) - active_days = [] _active_days = d.pop("active_days", UNSET) - for active_days_item_data in _active_days or []: - active_days_item = check_new_schedule_rotation_data_attributes_active_days_item(active_days_item_data) + active_days: list[NewScheduleRotationDataAttributesActiveDaysItem] | Unset = UNSET + if _active_days is not UNSET: + active_days = [] + for active_days_item_data in _active_days: + active_days_item = check_new_schedule_rotation_data_attributes_active_days_item(active_days_item_data) - active_days.append(active_days_item) + active_days.append(active_days_item) active_time_type = d.pop("active_time_type", UNSET) - active_time_attributes = [] _active_time_attributes = d.pop("active_time_attributes", UNSET) - for active_time_attributes_item_data in _active_time_attributes or []: - active_time_attributes_item = NewScheduleRotationDataAttributesActiveTimeAttributesItem.from_dict( - active_time_attributes_item_data - ) + active_time_attributes: list[NewScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset = UNSET + if _active_time_attributes is not UNSET: + active_time_attributes = [] + for active_time_attributes_item_data in _active_time_attributes: + active_time_attributes_item = NewScheduleRotationDataAttributesActiveTimeAttributesItem.from_dict( + active_time_attributes_item_data + ) - active_time_attributes.append(active_time_attributes_item) + active_time_attributes.append(active_time_attributes_item) time_zone = d.pop("time_zone", UNSET) - def _parse_start_time(data: object) -> None | Unset | datetime.date: + def _parse_start_time(data: object) -> datetime.date | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -309,13 +314,13 @@ def _parse_start_time(data: object) -> None | Unset | datetime.date: start_time_type_0 = isoparse(data).date() return start_time_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.date, data) + return cast(datetime.date | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | Unset | datetime.date: + def _parse_end_time(data: object) -> datetime.date | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -326,15 +331,15 @@ def _parse_end_time(data: object) -> None | Unset | datetime.date: end_time_type_0 = isoparse(data).date() return end_time_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.date, data) + return cast(datetime.date | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) def _parse_schedule_rotation_members( data: object, - ) -> None | Unset | list["NewScheduleRotationDataAttributesScheduleRotationMembersType0Item"]: + ) -> list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -354,9 +359,9 @@ def _parse_schedule_rotation_members( schedule_rotation_members_type_0.append(schedule_rotation_members_type_0_item) return schedule_rotation_members_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewScheduleRotationDataAttributesScheduleRotationMembersType0Item"], data) + return cast(list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset, data) schedule_rotation_members = _parse_schedule_rotation_members(d.pop("schedule_rotation_members", UNSET)) diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes_active_time_attributes_item.py b/rootly_sdk/models/new_schedule_rotation_data_attributes_active_time_attributes_item.py index 537d6cc7..ea904017 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes_active_time_attributes_item.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes_active_time_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py index 7d563c07..a92b1c18 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -19,12 +21,12 @@ class NewScheduleRotationDataAttributesScheduleRotationMembersType0Item: Attributes: member_type (NewScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType): Type of member member_id (str): ID of the member - position (Union[Unset, int]): Position of the member in rotation + position (int | Unset): Position of the member in rotation """ member_type: NewScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType member_id: str - position: Unset | int = UNSET + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py index eefc9fec..449f524c 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py index 072117a6..e9acdcbb 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py index a360a993..138831b9 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py index 3aeaa7eb..2f076f7f 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_schedule_rotation_user.py b/rootly_sdk/models/new_schedule_rotation_user.py index 70c1f040..9bfed8be 100644 --- a/rootly_sdk/models/new_schedule_rotation_user.py +++ b/rootly_sdk/models/new_schedule_rotation_user.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class NewScheduleRotationUser: """ Attributes: - data (Union[Unset, NewScheduleRotationUserData]): + data (NewScheduleRotationUserData | Unset): """ - data: Union[Unset, "NewScheduleRotationUserData"] = UNSET + data: NewScheduleRotationUserData | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | NewScheduleRotationUserData + data: NewScheduleRotationUserData | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/new_schedule_rotation_user_data.py b/rootly_sdk/models/new_schedule_rotation_user_data.py index 45266c80..dae70928 100644 --- a/rootly_sdk/models/new_schedule_rotation_user_data.py +++ b/rootly_sdk/models/new_schedule_rotation_user_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,20 +23,20 @@ class NewScheduleRotationUserData: """ Attributes: - type_ (Union[Unset, NewScheduleRotationUserDataType]): - attributes (Union[Unset, NewScheduleRotationUserDataAttributes]): + type_ (NewScheduleRotationUserDataType | Unset): + attributes (NewScheduleRotationUserDataAttributes | Unset): """ - type_: Unset | NewScheduleRotationUserDataType = UNSET - attributes: Union[Unset, "NewScheduleRotationUserDataAttributes"] = UNSET + type_: NewScheduleRotationUserDataType | Unset = UNSET + attributes: NewScheduleRotationUserDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -54,14 +56,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _type_ = d.pop("type", UNSET) - type_: Unset | NewScheduleRotationUserDataType + type_: NewScheduleRotationUserDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_new_schedule_rotation_user_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | NewScheduleRotationUserDataAttributes + attributes: NewScheduleRotationUserDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/new_schedule_rotation_user_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_user_data_attributes.py index ce6d4a42..0c5bb168 100644 --- a/rootly_sdk/models/new_schedule_rotation_user_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_user_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,11 +15,11 @@ class NewScheduleRotationUserDataAttributes: """ Attributes: user_id (int): Schedule rotation user - position (Union[Unset, int]): Position of the user inside rotation + position (int | Unset): Position of the user inside rotation """ user_id: int - position: Unset | int = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: user_id = self.user_id diff --git a/rootly_sdk/models/new_secret.py b/rootly_sdk/models/new_secret.py index ce538bb4..e6b520cb 100644 --- a/rootly_sdk/models/new_secret.py +++ b/rootly_sdk/models/new_secret.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewSecret: data (NewSecretData): """ - data: "NewSecretData" + data: NewSecretData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_secret_data.py b/rootly_sdk/models/new_secret_data.py index 8afbb5d3..9936cb2e 100644 --- a/rootly_sdk/models/new_secret_data.py +++ b/rootly_sdk/models/new_secret_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewSecretData: """ type_: NewSecretDataType - attributes: "NewSecretDataAttributes" + attributes: NewSecretDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_secret_data_attributes.py b/rootly_sdk/models/new_secret_data_attributes.py index 47851d3b..53d1dd68 100644 --- a/rootly_sdk/models/new_secret_data_attributes.py +++ b/rootly_sdk/models/new_secret_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -15,41 +17,41 @@ class NewSecretDataAttributes: Attributes: name (str): The name of the secret secret (str): The secret - kind (Union[Unset, NewSecretDataAttributesKind]): The kind of the secret - hashicorp_vault_mount (Union[None, Unset, str]): The HashiCorp Vault secret mount path Default: 'secret'. - hashicorp_vault_path (Union[None, Unset, str]): The HashiCorp Vault secret path - hashicorp_vault_version (Union[None, Unset, str]): The HashiCorp Vault secret version Default: '0'. + kind (NewSecretDataAttributesKind | Unset): The kind of the secret + hashicorp_vault_mount (None | str | Unset): The HashiCorp Vault secret mount path Default: 'secret'. + hashicorp_vault_path (None | str | Unset): The HashiCorp Vault secret path + hashicorp_vault_version (None | str | Unset): The HashiCorp Vault secret version Default: '0'. """ name: str secret: str - kind: Unset | NewSecretDataAttributesKind = UNSET - hashicorp_vault_mount: None | Unset | str = "secret" - hashicorp_vault_path: None | Unset | str = UNSET - hashicorp_vault_version: None | Unset | str = "0" + kind: NewSecretDataAttributesKind | Unset = UNSET + hashicorp_vault_mount: None | str | Unset = "secret" + hashicorp_vault_path: None | str | Unset = UNSET + hashicorp_vault_version: None | str | Unset = "0" def to_dict(self) -> dict[str, Any]: name = self.name secret = self.secret - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - hashicorp_vault_mount: None | Unset | str + hashicorp_vault_mount: None | str | Unset if isinstance(self.hashicorp_vault_mount, Unset): hashicorp_vault_mount = UNSET else: hashicorp_vault_mount = self.hashicorp_vault_mount - hashicorp_vault_path: None | Unset | str + hashicorp_vault_path: None | str | Unset if isinstance(self.hashicorp_vault_path, Unset): hashicorp_vault_path = UNSET else: hashicorp_vault_path = self.hashicorp_vault_path - hashicorp_vault_version: None | Unset | str + hashicorp_vault_version: None | str | Unset if isinstance(self.hashicorp_vault_version, Unset): hashicorp_vault_version = UNSET else: @@ -82,36 +84,36 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: secret = d.pop("secret") _kind = d.pop("kind", UNSET) - kind: Unset | NewSecretDataAttributesKind + kind: NewSecretDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_new_secret_data_attributes_kind(_kind) - def _parse_hashicorp_vault_mount(data: object) -> None | Unset | str: + def _parse_hashicorp_vault_mount(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) hashicorp_vault_mount = _parse_hashicorp_vault_mount(d.pop("hashicorp_vault_mount", UNSET)) - def _parse_hashicorp_vault_path(data: object) -> None | Unset | str: + def _parse_hashicorp_vault_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) hashicorp_vault_path = _parse_hashicorp_vault_path(d.pop("hashicorp_vault_path", UNSET)) - def _parse_hashicorp_vault_version(data: object) -> None | Unset | str: + def _parse_hashicorp_vault_version(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) hashicorp_vault_version = _parse_hashicorp_vault_version(d.pop("hashicorp_vault_version", UNSET)) diff --git a/rootly_sdk/models/new_service.py b/rootly_sdk/models/new_service.py index 6f97932c..87867ede 100644 --- a/rootly_sdk/models/new_service.py +++ b/rootly_sdk/models/new_service.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewService: data (NewServiceData): """ - data: "NewServiceData" + data: NewServiceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_service_data.py b/rootly_sdk/models/new_service_data.py index 2e7856bd..c38a2dc7 100644 --- a/rootly_sdk/models/new_service_data.py +++ b/rootly_sdk/models/new_service_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewServiceData: """ type_: NewServiceDataType - attributes: "NewServiceDataAttributes" + attributes: NewServiceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_service_data_attributes.py b/rootly_sdk/models/new_service_data_attributes.py index c7cb13bd..2420ad46 100644 --- a/rootly_sdk/models/new_service_data_attributes.py +++ b/rootly_sdk/models/new_service_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -13,10 +15,10 @@ from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( NewServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.new_service_data_attributes_fields_item import NewServiceDataAttributesFieldsItem from ..models.new_service_data_attributes_incident_broadcast_channel_type_0 import ( NewServiceDataAttributesIncidentBroadcastChannelType0, ) + from ..models.new_service_data_attributes_properties_item import NewServiceDataAttributesPropertiesItem from ..models.new_service_data_attributes_slack_aliases_type_0_item import ( NewServiceDataAttributesSlackAliasesType0Item, ) @@ -33,86 +35,83 @@ class NewServiceDataAttributes: """ Attributes: name (str): The name of the service - description (Union[None, Unset, str]): The description of the service - public_description (Union[None, Unset, str]): The public description of the service - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the service - color (Union[None, Unset, str]): The hex color of the service - position (Union[None, Unset, int]): Position of the service - show_uptime (Union[None, Unset, bool]): Show uptime - show_uptime_last_days (Union[Unset, NewServiceDataAttributesShowUptimeLastDays]): Show uptime over x days - Default: 60. - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this service. eg: + description (None | str | Unset): The description of the service + public_description (None | str | Unset): The public description of the service + notify_emails (list[str] | None | Unset): Emails to attach to the service + color (None | str | Unset): The hex color of the service + position (int | None | Unset): Position of the service + show_uptime (bool | None | Unset): Show uptime + show_uptime_last_days (NewServiceDataAttributesShowUptimeLastDays | Unset): Show uptime over x days Default: 60. + backstage_id (None | str | Unset): The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name - pagerduty_id (Union[None, Unset, str]): The PagerDuty service id associated to this service - external_id (Union[None, Unset, str]): The external id associated to this service - opsgenie_id (Union[None, Unset, str]): The Opsgenie service id associated to this service - opsgenie_team_id (Union[None, Unset, str]): The Opsgenie team id associated to this service - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this service - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this service - github_repository_name (Union[None, Unset, str]): The GitHub repository name associated to this service. eg: + pagerduty_id (None | str | Unset): The PagerDuty service id associated to this service + external_id (None | str | Unset): The external id associated to this service + opsgenie_id (None | str | Unset): The Opsgenie service id associated to this service + opsgenie_team_id (None | str | Unset): The Opsgenie team id associated to this service + cortex_id (None | str | Unset): The Cortex group id associated to this service + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this service + github_repository_name (None | str | Unset): The GitHub repository name associated to this service. eg: rootlyhq/my-service - github_repository_branch (Union[None, Unset, str]): The GitHub repository branch associated to this service. eg: - main - gitlab_repository_name (Union[None, Unset, str]): The GitLab repository name associated to this service. eg: + github_repository_branch (None | str | Unset): The GitHub repository branch associated to this service. eg: main + gitlab_repository_name (None | str | Unset): The GitLab repository name associated to this service. eg: rootlyhq/my-service - gitlab_repository_branch (Union[None, Unset, str]): The GitLab repository branch associated to this service. eg: - main - environment_ids (Union[None, Unset, list[str]]): Environments associated with this service - service_ids (Union[None, Unset, list[str]]): Services dependent on this service - owner_group_ids (Union[None, Unset, list[str]]): Owner Teams associated with this service - owner_user_ids (Union[None, Unset, list[int]]): Owner Users associated with this service - kubernetes_deployment_name (Union[None, Unset, str]): The Kubernetes deployment name associated to this service. - eg: namespace/deployment-name - alerts_email_enabled (Union[None, Unset, bool]): Enable alerts through email - alert_urgency_id (Union[None, Unset, str]): The alert urgency id of the service - escalation_policy_id (Union[None, Unset, str]): The escalation policy id of the service - slack_channels (Union[None, Unset, list['NewServiceDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this service - slack_aliases (Union[None, Unset, list['NewServiceDataAttributesSlackAliasesType0Item']]): Slack Aliases - associated with this service - alert_broadcast_enabled (Union[None, Unset, bool]): Enable alerts to be broadcasted to a specific channel - alert_broadcast_channel (Union['NewServiceDataAttributesAlertBroadcastChannelType0', None, Unset]): Slack - channel to broadcast alerts to - incident_broadcast_enabled (Union[None, Unset, bool]): Enable incidents to be broadcasted to a specific channel - incident_broadcast_channel (Union['NewServiceDataAttributesIncidentBroadcastChannelType0', None, Unset]): Slack - channel to broadcast incidents to - fields (Union[Unset, list['NewServiceDataAttributesFieldsItem']]): Array of field values for this service. + gitlab_repository_branch (None | str | Unset): The GitLab repository branch associated to this service. eg: main + environment_ids (list[str] | None | Unset): Environments associated with this service + service_ids (list[str] | None | Unset): Services dependent on this service + owner_group_ids (list[str] | None | Unset): Owner Teams associated with this service + owner_user_ids (list[int] | None | Unset): Owner Users associated with this service + kubernetes_deployment_name (None | str | Unset): The Kubernetes deployment name associated to this service. eg: + namespace/deployment-name + alerts_email_enabled (bool | None | Unset): Enable alerts through email + alert_urgency_id (None | str | Unset): The alert urgency id of the service + escalation_policy_id (None | str | Unset): The escalation policy id of the service + slack_channels (list[NewServiceDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated + with this service + slack_aliases (list[NewServiceDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated + with this service + alert_broadcast_enabled (bool | None | Unset): Enable alerts to be broadcasted to a specific channel + alert_broadcast_channel (NewServiceDataAttributesAlertBroadcastChannelType0 | None | Unset): Slack channel to + broadcast alerts to + incident_broadcast_enabled (bool | None | Unset): Enable incidents to be broadcasted to a specific channel + incident_broadcast_channel (NewServiceDataAttributesIncidentBroadcastChannelType0 | None | Unset): Slack channel + to broadcast incidents to + properties (list[NewServiceDataAttributesPropertiesItem] | Unset): Array of property values for this service. """ name: str - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - show_uptime: None | Unset | bool = UNSET - show_uptime_last_days: Unset | NewServiceDataAttributesShowUptimeLastDays = 60 - backstage_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - opsgenie_team_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - github_repository_name: None | Unset | str = UNSET - github_repository_branch: None | Unset | str = UNSET - gitlab_repository_name: None | Unset | str = UNSET - gitlab_repository_branch: None | Unset | str = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - owner_group_ids: None | Unset | list[str] = UNSET - owner_user_ids: None | Unset | list[int] = UNSET - kubernetes_deployment_name: None | Unset | str = UNSET - alerts_email_enabled: None | Unset | bool = UNSET - alert_urgency_id: None | Unset | str = UNSET - escalation_policy_id: None | Unset | str = UNSET - slack_channels: None | Unset | list["NewServiceDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["NewServiceDataAttributesSlackAliasesType0Item"] = UNSET - alert_broadcast_enabled: None | Unset | bool = UNSET - alert_broadcast_channel: Union["NewServiceDataAttributesAlertBroadcastChannelType0", None, Unset] = UNSET - incident_broadcast_enabled: None | Unset | bool = UNSET - incident_broadcast_channel: Union["NewServiceDataAttributesIncidentBroadcastChannelType0", None, Unset] = UNSET - fields: Unset | list["NewServiceDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: NewServiceDataAttributesShowUptimeLastDays | Unset = 60 + backstage_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + github_repository_name: None | str | Unset = UNSET + github_repository_branch: None | str | Unset = UNSET + gitlab_repository_name: None | str | Unset = UNSET + gitlab_repository_branch: None | str | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + owner_group_ids: list[str] | None | Unset = UNSET + owner_user_ids: list[int] | None | Unset = UNSET + kubernetes_deployment_name: None | str | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + escalation_policy_id: None | str | Unset = UNSET + slack_channels: list[NewServiceDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[NewServiceDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + alert_broadcast_enabled: bool | None | Unset = UNSET + alert_broadcast_channel: NewServiceDataAttributesAlertBroadcastChannelType0 | None | Unset = UNSET + incident_broadcast_enabled: bool | None | Unset = UNSET + incident_broadcast_channel: NewServiceDataAttributesIncidentBroadcastChannelType0 | None | Unset = UNSET + properties: list[NewServiceDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( @@ -124,19 +123,19 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -145,95 +144,95 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - show_uptime: None | Unset | bool + show_uptime: bool | None | Unset if isinstance(self.show_uptime, Unset): show_uptime = UNSET else: show_uptime = self.show_uptime - show_uptime_last_days: Unset | int = UNSET + show_uptime_last_days: int | Unset = UNSET if not isinstance(self.show_uptime_last_days, Unset): show_uptime_last_days = self.show_uptime_last_days - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - opsgenie_team_id: None | Unset | str + opsgenie_team_id: None | str | Unset if isinstance(self.opsgenie_team_id, Unset): opsgenie_team_id = UNSET else: opsgenie_team_id = self.opsgenie_team_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - github_repository_name: None | Unset | str + github_repository_name: None | str | Unset if isinstance(self.github_repository_name, Unset): github_repository_name = UNSET else: github_repository_name = self.github_repository_name - github_repository_branch: None | Unset | str + github_repository_branch: None | str | Unset if isinstance(self.github_repository_branch, Unset): github_repository_branch = UNSET else: github_repository_branch = self.github_repository_branch - gitlab_repository_name: None | Unset | str + gitlab_repository_name: None | str | Unset if isinstance(self.gitlab_repository_name, Unset): gitlab_repository_name = UNSET else: gitlab_repository_name = self.gitlab_repository_name - gitlab_repository_branch: None | Unset | str + gitlab_repository_branch: None | str | Unset if isinstance(self.gitlab_repository_branch, Unset): gitlab_repository_branch = UNSET else: gitlab_repository_branch = self.gitlab_repository_branch - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -242,7 +241,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -251,7 +250,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - owner_group_ids: None | Unset | list[str] + owner_group_ids: list[str] | None | Unset if isinstance(self.owner_group_ids, Unset): owner_group_ids = UNSET elif isinstance(self.owner_group_ids, list): @@ -260,7 +259,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_group_ids = self.owner_group_ids - owner_user_ids: None | Unset | list[int] + owner_user_ids: list[int] | None | Unset if isinstance(self.owner_user_ids, Unset): owner_user_ids = UNSET elif isinstance(self.owner_user_ids, list): @@ -269,31 +268,31 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids - kubernetes_deployment_name: None | Unset | str + kubernetes_deployment_name: None | str | Unset if isinstance(self.kubernetes_deployment_name, Unset): kubernetes_deployment_name = UNSET else: kubernetes_deployment_name = self.kubernetes_deployment_name - alerts_email_enabled: None | Unset | bool + alerts_email_enabled: bool | None | Unset if isinstance(self.alerts_email_enabled, Unset): alerts_email_enabled = UNSET else: alerts_email_enabled = self.alerts_email_enabled - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - escalation_policy_id: None | Unset | str + escalation_policy_id: None | str | Unset if isinstance(self.escalation_policy_id, Unset): escalation_policy_id = UNSET else: escalation_policy_id = self.escalation_policy_id - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -305,7 +304,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -317,13 +316,13 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - alert_broadcast_enabled: None | Unset | bool + alert_broadcast_enabled: bool | None | Unset if isinstance(self.alert_broadcast_enabled, Unset): alert_broadcast_enabled = UNSET else: alert_broadcast_enabled = self.alert_broadcast_enabled - alert_broadcast_channel: None | Unset | dict[str, Any] + alert_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.alert_broadcast_channel, Unset): alert_broadcast_channel = UNSET elif isinstance(self.alert_broadcast_channel, NewServiceDataAttributesAlertBroadcastChannelType0): @@ -331,13 +330,13 @@ def to_dict(self) -> dict[str, Any]: else: alert_broadcast_channel = self.alert_broadcast_channel - incident_broadcast_enabled: None | Unset | bool + incident_broadcast_enabled: bool | None | Unset if isinstance(self.incident_broadcast_enabled, Unset): incident_broadcast_enabled = UNSET else: incident_broadcast_enabled = self.incident_broadcast_enabled - incident_broadcast_channel: None | Unset | dict[str, Any] + incident_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.incident_broadcast_channel, Unset): incident_broadcast_channel = UNSET elif isinstance(self.incident_broadcast_channel, NewServiceDataAttributesIncidentBroadcastChannelType0): @@ -345,12 +344,12 @@ def to_dict(self) -> dict[str, Any]: else: incident_broadcast_channel = self.incident_broadcast_channel - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -423,8 +422,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_enabled"] = incident_broadcast_enabled if incident_broadcast_channel is not UNSET: field_dict["incident_broadcast_channel"] = incident_broadcast_channel - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @@ -433,10 +432,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( NewServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.new_service_data_attributes_fields_item import NewServiceDataAttributesFieldsItem from ..models.new_service_data_attributes_incident_broadcast_channel_type_0 import ( NewServiceDataAttributesIncidentBroadcastChannelType0, ) + from ..models.new_service_data_attributes_properties_item import NewServiceDataAttributesPropertiesItem from ..models.new_service_data_attributes_slack_aliases_type_0_item import ( NewServiceDataAttributesSlackAliasesType0Item, ) @@ -447,25 +446,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -476,146 +475,146 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_show_uptime(data: object) -> None | Unset | bool: + def _parse_show_uptime(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) _show_uptime_last_days = d.pop("show_uptime_last_days", UNSET) - show_uptime_last_days: Unset | NewServiceDataAttributesShowUptimeLastDays + show_uptime_last_days: NewServiceDataAttributesShowUptimeLastDays | Unset if isinstance(_show_uptime_last_days, Unset): show_uptime_last_days = UNSET else: show_uptime_last_days = check_new_service_data_attributes_show_uptime_last_days(_show_uptime_last_days) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_opsgenie_team_id(data: object) -> None | Unset | str: + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_github_repository_name(data: object) -> None | Unset | str: + def _parse_github_repository_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_repository_name = _parse_github_repository_name(d.pop("github_repository_name", UNSET)) - def _parse_github_repository_branch(data: object) -> None | Unset | str: + def _parse_github_repository_branch(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_repository_branch = _parse_github_repository_branch(d.pop("github_repository_branch", UNSET)) - def _parse_gitlab_repository_name(data: object) -> None | Unset | str: + def _parse_gitlab_repository_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_repository_name = _parse_gitlab_repository_name(d.pop("gitlab_repository_name", UNSET)) - def _parse_gitlab_repository_branch(data: object) -> None | Unset | str: + def _parse_gitlab_repository_branch(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_repository_branch = _parse_gitlab_repository_branch(d.pop("gitlab_repository_branch", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -626,13 +625,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -643,13 +642,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: + def _parse_owner_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -660,13 +659,13 @@ def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: owner_group_ids_type_0 = cast(list[str], data) return owner_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) owner_group_ids = _parse_owner_group_ids(d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: + def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -677,51 +676,49 @@ def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: owner_user_ids_type_0 = cast(list[int], data) return owner_user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) - def _parse_kubernetes_deployment_name(data: object) -> None | Unset | str: + def _parse_kubernetes_deployment_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kubernetes_deployment_name = _parse_kubernetes_deployment_name(d.pop("kubernetes_deployment_name", UNSET)) - def _parse_alerts_email_enabled(data: object) -> None | Unset | bool: + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_escalation_policy_id(data: object) -> None | Unset | str: + def _parse_escalation_policy_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) - def _parse_slack_channels( - data: object, - ) -> None | Unset | list["NewServiceDataAttributesSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[NewServiceDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -739,15 +736,13 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewServiceDataAttributesSlackChannelsType0Item"], data) + return cast(list[NewServiceDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases( - data: object, - ) -> None | Unset | list["NewServiceDataAttributesSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[NewServiceDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -765,24 +760,24 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewServiceDataAttributesSlackAliasesType0Item"], data) + return cast(list[NewServiceDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_alert_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_alert_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alert_broadcast_enabled = _parse_alert_broadcast_enabled(d.pop("alert_broadcast_enabled", UNSET)) def _parse_alert_broadcast_channel( data: object, - ) -> Union["NewServiceDataAttributesAlertBroadcastChannelType0", None, Unset]: + ) -> NewServiceDataAttributesAlertBroadcastChannelType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -793,24 +788,24 @@ def _parse_alert_broadcast_channel( alert_broadcast_channel_type_0 = NewServiceDataAttributesAlertBroadcastChannelType0.from_dict(data) return alert_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewServiceDataAttributesAlertBroadcastChannelType0", None, Unset], data) + return cast(NewServiceDataAttributesAlertBroadcastChannelType0 | None | Unset, data) alert_broadcast_channel = _parse_alert_broadcast_channel(d.pop("alert_broadcast_channel", UNSET)) - def _parse_incident_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_incident_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) incident_broadcast_enabled = _parse_incident_broadcast_enabled(d.pop("incident_broadcast_enabled", UNSET)) def _parse_incident_broadcast_channel( data: object, - ) -> Union["NewServiceDataAttributesIncidentBroadcastChannelType0", None, Unset]: + ) -> NewServiceDataAttributesIncidentBroadcastChannelType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -823,18 +818,20 @@ def _parse_incident_broadcast_channel( ) return incident_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewServiceDataAttributesIncidentBroadcastChannelType0", None, Unset], data) + return cast(NewServiceDataAttributesIncidentBroadcastChannelType0 | None | Unset, data) incident_broadcast_channel = _parse_incident_broadcast_channel(d.pop("incident_broadcast_channel", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewServiceDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewServiceDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewServiceDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_service_data_attributes = cls( name=name, @@ -870,7 +867,7 @@ def _parse_incident_broadcast_channel( alert_broadcast_channel=alert_broadcast_channel, incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, - fields=fields, + properties=properties, ) return new_service_data_attributes diff --git a/rootly_sdk/models/new_service_data_attributes_alert_broadcast_channel_type_0.py b/rootly_sdk/models/new_service_data_attributes_alert_broadcast_channel_type_0.py index f7eeb8cc..43dd3797 100644 --- a/rootly_sdk/models/new_service_data_attributes_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/new_service_data_attributes_alert_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class NewServiceDataAttributesAlertBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_service_data_attributes_fields_item.py b/rootly_sdk/models/new_service_data_attributes_fields_item.py deleted file mode 100644 index a74442e1..00000000 --- a/rootly_sdk/models/new_service_data_attributes_fields_item.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="NewServiceDataAttributesFieldsItem") - - -@_attrs_define -class NewServiceDataAttributesFieldsItem: - """Set a value for a catalog field - - Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value - """ - - catalog_field_id: str - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "catalog_field_id": catalog_field_id, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") - - value = d.pop("value") - - new_service_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, - value=value, - ) - - new_service_data_attributes_fields_item.additional_properties = d - return new_service_data_attributes_fields_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/new_service_data_attributes_incident_broadcast_channel_type_0.py b/rootly_sdk/models/new_service_data_attributes_incident_broadcast_channel_type_0.py index e28f2d61..52b0f470 100644 --- a/rootly_sdk/models/new_service_data_attributes_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/new_service_data_attributes_incident_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class NewServiceDataAttributesIncidentBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_service_data_attributes_properties_item.py b/rootly_sdk/models/new_service_data_attributes_properties_item.py new file mode 100644 index 00000000..3110be0d --- /dev/null +++ b/rootly_sdk/models/new_service_data_attributes_properties_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="NewServiceDataAttributesPropertiesItem") + + +@_attrs_define +class NewServiceDataAttributesPropertiesItem: + """Set a value for a catalog property + + Attributes: + catalog_property_id (str): Catalog property ID + value (str): The property value + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + new_service_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + new_service_data_attributes_properties_item.additional_properties = d + return new_service_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_service_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/new_service_data_attributes_slack_aliases_type_0_item.py index 02f2f04f..279bbaa6 100644 --- a/rootly_sdk/models/new_service_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/new_service_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_service_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/new_service_data_attributes_slack_channels_type_0_item.py index b5522a5b..f7b9709a 100644 --- a/rootly_sdk/models/new_service_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/new_service_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_severity.py b/rootly_sdk/models/new_severity.py index 8d22df8c..bf2f358f 100644 --- a/rootly_sdk/models/new_severity.py +++ b/rootly_sdk/models/new_severity.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewSeverity: data (NewSeverityData): """ - data: "NewSeverityData" + data: NewSeverityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_severity_data.py b/rootly_sdk/models/new_severity_data.py index 6e2b73b3..288d9c37 100644 --- a/rootly_sdk/models/new_severity_data.py +++ b/rootly_sdk/models/new_severity_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewSeverityData: """ type_: NewSeverityDataType - attributes: "NewSeverityDataAttributes" + attributes: NewSeverityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_severity_data_attributes.py b/rootly_sdk/models/new_severity_data_attributes.py index 3bf0f4cc..d13b25ac 100644 --- a/rootly_sdk/models/new_severity_data_attributes.py +++ b/rootly_sdk/models/new_severity_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -26,52 +28,52 @@ class NewSeverityDataAttributes: """ Attributes: name (str): The name of the severity - description (Union[None, Unset, str]): The description of the severity - severity (Union[Unset, NewSeverityDataAttributesSeverity]): The severity of the severity - color (Union[None, Unset, str]): The hex color of the severity - position (Union[None, Unset, int]): Position of the severity - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the severity - slack_channels (Union[None, Unset, list['NewSeverityDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this severity - slack_aliases (Union[None, Unset, list['NewSeverityDataAttributesSlackAliasesType0Item']]): Slack Aliases - associated with this severity + description (None | str | Unset): The description of the severity + severity (NewSeverityDataAttributesSeverity | Unset): The severity of the severity + color (None | str | Unset): The hex color of the severity + position (int | None | Unset): Position of the severity + notify_emails (list[str] | None | Unset): Emails to attach to the severity + slack_channels (list[NewSeverityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated + with this severity + slack_aliases (list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated + with this severity """ name: str - description: None | Unset | str = UNSET - severity: Unset | NewSeverityDataAttributesSeverity = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["NewSeverityDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["NewSeverityDataAttributesSlackAliasesType0Item"] = UNSET + description: None | str | Unset = UNSET + severity: NewSeverityDataAttributesSeverity | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[NewSeverityDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - severity: Unset | str = UNSET + severity: str | Unset = UNSET if not isinstance(self.severity, Unset): severity = self.severity - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -80,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -92,7 +94,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -140,41 +142,41 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _severity = d.pop("severity", UNSET) - severity: Unset | NewSeverityDataAttributesSeverity + severity: NewSeverityDataAttributesSeverity | Unset if isinstance(_severity, Unset): severity = UNSET else: severity = check_new_severity_data_attributes_severity(_severity) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -185,15 +187,13 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_slack_channels( - data: object, - ) -> None | Unset | list["NewSeverityDataAttributesSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[NewSeverityDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -211,15 +211,13 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewSeverityDataAttributesSlackChannelsType0Item"], data) + return cast(list[NewSeverityDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases( - data: object, - ) -> None | Unset | list["NewSeverityDataAttributesSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -237,9 +235,9 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewSeverityDataAttributesSlackAliasesType0Item"], data) + return cast(list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) diff --git a/rootly_sdk/models/new_severity_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/new_severity_data_attributes_slack_aliases_type_0_item.py index 67bd7916..67bf462e 100644 --- a/rootly_sdk/models/new_severity_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/new_severity_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_severity_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/new_severity_data_attributes_slack_channels_type_0_item.py index 430f8c3e..eed8d124 100644 --- a/rootly_sdk/models/new_severity_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/new_severity_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_sla.py b/rootly_sdk/models/new_sla.py new file mode 100644 index 00000000..22576867 --- /dev/null +++ b/rootly_sdk/models/new_sla.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_sla_data import NewSlaData + + +T = TypeVar("T", bound="NewSla") + + +@_attrs_define +class NewSla: + """ + Attributes: + data (NewSlaData): + """ + + data: NewSlaData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_sla_data import NewSlaData + + d = dict(src_dict) + data = NewSlaData.from_dict(d.pop("data")) + + new_sla = cls( + data=data, + ) + + new_sla.additional_properties = d + return new_sla + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_sla_data.py b/rootly_sdk/models/new_sla_data.py new file mode 100644 index 00000000..e309aa9b --- /dev/null +++ b/rootly_sdk/models/new_sla_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_sla_data_type import NewSlaDataType, check_new_sla_data_type + +if TYPE_CHECKING: + from ..models.new_sla_data_attributes import NewSlaDataAttributes + + +T = TypeVar("T", bound="NewSlaData") + + +@_attrs_define +class NewSlaData: + """ + Attributes: + type_ (NewSlaDataType): + attributes (NewSlaDataAttributes): + """ + + type_: NewSlaDataType + attributes: NewSlaDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_sla_data_attributes import NewSlaDataAttributes + + d = dict(src_dict) + type_ = check_new_sla_data_type(d.pop("type")) + + attributes = NewSlaDataAttributes.from_dict(d.pop("attributes")) + + new_sla_data = cls( + type_=type_, + attributes=attributes, + ) + + new_sla_data.additional_properties = d + return new_sla_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_sla_data_attributes.py b/rootly_sdk/models/new_sla_data_attributes.py new file mode 100644 index 00000000..c146b692 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes.py @@ -0,0 +1,357 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define + +from ..models.new_sla_data_attributes_assignment_deadline_days import ( + NewSlaDataAttributesAssignmentDeadlineDays, + check_new_sla_data_attributes_assignment_deadline_days, +) +from ..models.new_sla_data_attributes_assignment_deadline_parent_status import ( + NewSlaDataAttributesAssignmentDeadlineParentStatus, + check_new_sla_data_attributes_assignment_deadline_parent_status, +) +from ..models.new_sla_data_attributes_completion_deadline_days import ( + NewSlaDataAttributesCompletionDeadlineDays, + check_new_sla_data_attributes_completion_deadline_days, +) +from ..models.new_sla_data_attributes_completion_deadline_parent_status import ( + NewSlaDataAttributesCompletionDeadlineParentStatus, + check_new_sla_data_attributes_completion_deadline_parent_status, +) +from ..models.new_sla_data_attributes_condition_match_type import ( + NewSlaDataAttributesConditionMatchType, + check_new_sla_data_attributes_condition_match_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem + from ..models.new_sla_data_attributes_notification_configurations_item import ( + NewSlaDataAttributesNotificationConfigurationsItem, + ) + + +T = TypeVar("T", bound="NewSlaDataAttributes") + + +@_attrs_define +class NewSlaDataAttributes: + """ + Attributes: + name (str): The name of the SLA + assignment_deadline_days (NewSlaDataAttributesAssignmentDeadlineDays): Number of days for the assignment + deadline + assignment_deadline_parent_status (NewSlaDataAttributesAssignmentDeadlineParentStatus): The incident parent + status that triggers the assignment deadline + completion_deadline_days (NewSlaDataAttributesCompletionDeadlineDays): Number of days for the completion + deadline + completion_deadline_parent_status (NewSlaDataAttributesCompletionDeadlineParentStatus): The incident parent + status that triggers the completion deadline + description (None | str | Unset): A description of the SLA + position (int | None | Unset): Position of the SLA for ordering + condition_match_type (NewSlaDataAttributesConditionMatchType | Unset): Whether all or any conditions must match + manager_role_id (None | Unset | UUID): The ID of the incident role responsible for this SLA. Must provide either + manager_role_id or manager_user_id. + manager_user_id (int | None | Unset): The ID of the user responsible for this SLA. Must provide either + manager_role_id or manager_user_id. + assignment_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the assignment deadline + assignment_skip_weekends (bool | Unset): Whether to skip weekends when calculating the assignment deadline + completion_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the completion deadline + completion_skip_weekends (bool | Unset): Whether to skip weekends when calculating the completion deadline + conditions (list[NewSlaDataAttributesConditionsItem] | Unset): Conditions that determine which incidents this + SLA applies to. Maximum 20. + notification_configurations (list[NewSlaDataAttributesNotificationConfigurationsItem] | Unset): Notification + timing configurations. Maximum 20. + """ + + name: str + assignment_deadline_days: NewSlaDataAttributesAssignmentDeadlineDays + assignment_deadline_parent_status: NewSlaDataAttributesAssignmentDeadlineParentStatus + completion_deadline_days: NewSlaDataAttributesCompletionDeadlineDays + completion_deadline_parent_status: NewSlaDataAttributesCompletionDeadlineParentStatus + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + condition_match_type: NewSlaDataAttributesConditionMatchType | Unset = UNSET + manager_role_id: None | Unset | UUID = UNSET + manager_user_id: int | None | Unset = UNSET + assignment_deadline_sub_status_id: None | Unset | UUID = UNSET + assignment_skip_weekends: bool | Unset = UNSET + completion_deadline_sub_status_id: None | Unset | UUID = UNSET + completion_skip_weekends: bool | Unset = UNSET + conditions: list[NewSlaDataAttributesConditionsItem] | Unset = UNSET + notification_configurations: list[NewSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + name = self.name + + assignment_deadline_days: int = self.assignment_deadline_days + + assignment_deadline_parent_status: str = self.assignment_deadline_parent_status + + completion_deadline_days: int = self.completion_deadline_days + + completion_deadline_parent_status: str = self.completion_deadline_parent_status + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + condition_match_type: str | Unset = UNSET + if not isinstance(self.condition_match_type, Unset): + condition_match_type = self.condition_match_type + + manager_role_id: None | str | Unset + if isinstance(self.manager_role_id, Unset): + manager_role_id = UNSET + elif isinstance(self.manager_role_id, UUID): + manager_role_id = str(self.manager_role_id) + else: + manager_role_id = self.manager_role_id + + manager_user_id: int | None | Unset + if isinstance(self.manager_user_id, Unset): + manager_user_id = UNSET + else: + manager_user_id = self.manager_user_id + + assignment_deadline_sub_status_id: None | str | Unset + if isinstance(self.assignment_deadline_sub_status_id, Unset): + assignment_deadline_sub_status_id = UNSET + elif isinstance(self.assignment_deadline_sub_status_id, UUID): + assignment_deadline_sub_status_id = str(self.assignment_deadline_sub_status_id) + else: + assignment_deadline_sub_status_id = self.assignment_deadline_sub_status_id + + assignment_skip_weekends = self.assignment_skip_weekends + + completion_deadline_sub_status_id: None | str | Unset + if isinstance(self.completion_deadline_sub_status_id, Unset): + completion_deadline_sub_status_id = UNSET + elif isinstance(self.completion_deadline_sub_status_id, UUID): + completion_deadline_sub_status_id = str(self.completion_deadline_sub_status_id) + else: + completion_deadline_sub_status_id = self.completion_deadline_sub_status_id + + completion_skip_weekends = self.completion_skip_weekends + + conditions: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + conditions.append(conditions_item) + + notification_configurations: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.notification_configurations, Unset): + notification_configurations = [] + for notification_configurations_item_data in self.notification_configurations: + notification_configurations_item = notification_configurations_item_data.to_dict() + notification_configurations.append(notification_configurations_item) + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "assignment_deadline_days": assignment_deadline_days, + "assignment_deadline_parent_status": assignment_deadline_parent_status, + "completion_deadline_days": completion_deadline_days, + "completion_deadline_parent_status": completion_deadline_parent_status, + } + ) + if description is not UNSET: + field_dict["description"] = description + if position is not UNSET: + field_dict["position"] = position + if condition_match_type is not UNSET: + field_dict["condition_match_type"] = condition_match_type + if manager_role_id is not UNSET: + field_dict["manager_role_id"] = manager_role_id + if manager_user_id is not UNSET: + field_dict["manager_user_id"] = manager_user_id + if assignment_deadline_sub_status_id is not UNSET: + field_dict["assignment_deadline_sub_status_id"] = assignment_deadline_sub_status_id + if assignment_skip_weekends is not UNSET: + field_dict["assignment_skip_weekends"] = assignment_skip_weekends + if completion_deadline_sub_status_id is not UNSET: + field_dict["completion_deadline_sub_status_id"] = completion_deadline_sub_status_id + if completion_skip_weekends is not UNSET: + field_dict["completion_skip_weekends"] = completion_skip_weekends + if conditions is not UNSET: + field_dict["conditions"] = conditions + if notification_configurations is not UNSET: + field_dict["notification_configurations"] = notification_configurations + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem + from ..models.new_sla_data_attributes_notification_configurations_item import ( + NewSlaDataAttributesNotificationConfigurationsItem, + ) + + d = dict(src_dict) + name = d.pop("name") + + assignment_deadline_days = check_new_sla_data_attributes_assignment_deadline_days( + d.pop("assignment_deadline_days") + ) + + assignment_deadline_parent_status = check_new_sla_data_attributes_assignment_deadline_parent_status( + d.pop("assignment_deadline_parent_status") + ) + + completion_deadline_days = check_new_sla_data_attributes_completion_deadline_days( + d.pop("completion_deadline_days") + ) + + completion_deadline_parent_status = check_new_sla_data_attributes_completion_deadline_parent_status( + d.pop("completion_deadline_parent_status") + ) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + _condition_match_type = d.pop("condition_match_type", UNSET) + condition_match_type: NewSlaDataAttributesConditionMatchType | Unset + if isinstance(_condition_match_type, Unset): + condition_match_type = UNSET + else: + condition_match_type = check_new_sla_data_attributes_condition_match_type(_condition_match_type) + + def _parse_manager_role_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + manager_role_id_type_0 = UUID(data) + + return manager_role_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + manager_role_id = _parse_manager_role_id(d.pop("manager_role_id", UNSET)) + + def _parse_manager_user_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + manager_user_id = _parse_manager_user_id(d.pop("manager_user_id", UNSET)) + + def _parse_assignment_deadline_sub_status_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + assignment_deadline_sub_status_id_type_0 = UUID(data) + + return assignment_deadline_sub_status_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + assignment_deadline_sub_status_id = _parse_assignment_deadline_sub_status_id( + d.pop("assignment_deadline_sub_status_id", UNSET) + ) + + assignment_skip_weekends = d.pop("assignment_skip_weekends", UNSET) + + def _parse_completion_deadline_sub_status_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completion_deadline_sub_status_id_type_0 = UUID(data) + + return completion_deadline_sub_status_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + completion_deadline_sub_status_id = _parse_completion_deadline_sub_status_id( + d.pop("completion_deadline_sub_status_id", UNSET) + ) + + completion_skip_weekends = d.pop("completion_skip_weekends", UNSET) + + _conditions = d.pop("conditions", UNSET) + conditions: list[NewSlaDataAttributesConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = NewSlaDataAttributesConditionsItem.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _notification_configurations = d.pop("notification_configurations", UNSET) + notification_configurations: list[NewSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET + if _notification_configurations is not UNSET: + notification_configurations = [] + for notification_configurations_item_data in _notification_configurations: + notification_configurations_item = NewSlaDataAttributesNotificationConfigurationsItem.from_dict( + notification_configurations_item_data + ) + + notification_configurations.append(notification_configurations_item) + + new_sla_data_attributes = cls( + name=name, + assignment_deadline_days=assignment_deadline_days, + assignment_deadline_parent_status=assignment_deadline_parent_status, + completion_deadline_days=completion_deadline_days, + completion_deadline_parent_status=completion_deadline_parent_status, + description=description, + position=position, + condition_match_type=condition_match_type, + manager_role_id=manager_role_id, + manager_user_id=manager_user_id, + assignment_deadline_sub_status_id=assignment_deadline_sub_status_id, + assignment_skip_weekends=assignment_skip_weekends, + completion_deadline_sub_status_id=completion_deadline_sub_status_id, + completion_skip_weekends=completion_skip_weekends, + conditions=conditions, + notification_configurations=notification_configurations, + ) + + return new_sla_data_attributes diff --git a/rootly_sdk/models/new_sla_data_attributes_assignment_deadline_days.py b/rootly_sdk/models/new_sla_data_attributes_assignment_deadline_days.py new file mode 100644 index 00000000..327bd6a1 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_assignment_deadline_days.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewSlaDataAttributesAssignmentDeadlineDays = Literal[1, 2, 3, 4, 5, 6, 7, 14, 21, 30] + +NEW_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_DAYS_VALUES: set[NewSlaDataAttributesAssignmentDeadlineDays] = { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 14, + 21, + 30, +} + + +def check_new_sla_data_attributes_assignment_deadline_days(value: int) -> NewSlaDataAttributesAssignmentDeadlineDays: + if value in NEW_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_DAYS_VALUES: + return cast(NewSlaDataAttributesAssignmentDeadlineDays, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_DAYS_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_assignment_deadline_parent_status.py b/rootly_sdk/models/new_sla_data_attributes_assignment_deadline_parent_status.py new file mode 100644 index 00000000..3ee4a251 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_assignment_deadline_parent_status.py @@ -0,0 +1,28 @@ +from typing import Literal, cast + +NewSlaDataAttributesAssignmentDeadlineParentStatus = Literal[ + "cancelled", "closed", "in_triage", "mitigated", "resolved", "started" +] + +NEW_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_PARENT_STATUS_VALUES: set[ + NewSlaDataAttributesAssignmentDeadlineParentStatus +] = { + "cancelled", + "closed", + "in_triage", + "mitigated", + "resolved", + "started", +} + + +def check_new_sla_data_attributes_assignment_deadline_parent_status( + value: str | None, +) -> NewSlaDataAttributesAssignmentDeadlineParentStatus | None: + if value is None: + return None + if value in NEW_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_PARENT_STATUS_VALUES: + return cast(NewSlaDataAttributesAssignmentDeadlineParentStatus, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_PARENT_STATUS_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_completion_deadline_days.py b/rootly_sdk/models/new_sla_data_attributes_completion_deadline_days.py new file mode 100644 index 00000000..e569a8aa --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_completion_deadline_days.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewSlaDataAttributesCompletionDeadlineDays = Literal[1, 2, 3, 4, 5, 6, 7, 14, 21, 30] + +NEW_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_DAYS_VALUES: set[NewSlaDataAttributesCompletionDeadlineDays] = { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 14, + 21, + 30, +} + + +def check_new_sla_data_attributes_completion_deadline_days(value: int) -> NewSlaDataAttributesCompletionDeadlineDays: + if value in NEW_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_DAYS_VALUES: + return cast(NewSlaDataAttributesCompletionDeadlineDays, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_DAYS_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_completion_deadline_parent_status.py b/rootly_sdk/models/new_sla_data_attributes_completion_deadline_parent_status.py new file mode 100644 index 00000000..aaeabd2b --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_completion_deadline_parent_status.py @@ -0,0 +1,28 @@ +from typing import Literal, cast + +NewSlaDataAttributesCompletionDeadlineParentStatus = Literal[ + "cancelled", "closed", "in_triage", "mitigated", "resolved", "started" +] + +NEW_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_PARENT_STATUS_VALUES: set[ + NewSlaDataAttributesCompletionDeadlineParentStatus +] = { + "cancelled", + "closed", + "in_triage", + "mitigated", + "resolved", + "started", +} + + +def check_new_sla_data_attributes_completion_deadline_parent_status( + value: str | None, +) -> NewSlaDataAttributesCompletionDeadlineParentStatus | None: + if value is None: + return None + if value in NEW_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_PARENT_STATUS_VALUES: + return cast(NewSlaDataAttributesCompletionDeadlineParentStatus, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_PARENT_STATUS_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_condition_match_type.py b/rootly_sdk/models/new_sla_data_attributes_condition_match_type.py new file mode 100644 index 00000000..14611058 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_condition_match_type.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +NewSlaDataAttributesConditionMatchType = Literal["ALL", "ANY"] + +NEW_SLA_DATA_ATTRIBUTES_CONDITION_MATCH_TYPE_VALUES: set[NewSlaDataAttributesConditionMatchType] = { + "ALL", + "ANY", +} + + +def check_new_sla_data_attributes_condition_match_type( + value: str | None, +) -> NewSlaDataAttributesConditionMatchType | None: + if value is None: + return None + if value in NEW_SLA_DATA_ATTRIBUTES_CONDITION_MATCH_TYPE_VALUES: + return cast(NewSlaDataAttributesConditionMatchType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_CONDITION_MATCH_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py new file mode 100644 index 00000000..c46c27c4 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py @@ -0,0 +1,169 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_sla_data_attributes_conditions_item_conditionable_type import ( + NewSlaDataAttributesConditionsItemConditionableType, + check_new_sla_data_attributes_conditions_item_conditionable_type, +) +from ..models.new_sla_data_attributes_conditions_item_property import ( + NewSlaDataAttributesConditionsItemProperty, + check_new_sla_data_attributes_conditions_item_property, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NewSlaDataAttributesConditionsItem") + + +@_attrs_define +class NewSlaDataAttributesConditionsItem: + """ + Attributes: + conditionable_type (NewSlaDataAttributesConditionsItemConditionableType): The type of condition + operator (str): The comparison operator + property_ (NewSlaDataAttributesConditionsItemProperty | Unset): The property to evaluate (for built-in field + conditions) + values (list[str] | None | Unset): The values to compare against + form_field_id (None | Unset | UUID): The ID of the form field (for custom field conditions) + position (int | Unset): The position of the condition for ordering + """ + + conditionable_type: NewSlaDataAttributesConditionsItemConditionableType + operator: str + property_: NewSlaDataAttributesConditionsItemProperty | Unset = UNSET + values: list[str] | None | Unset = UNSET + form_field_id: None | Unset | UUID = UNSET + position: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + conditionable_type: str = self.conditionable_type + + operator = self.operator + + property_: str | Unset = UNSET + if not isinstance(self.property_, Unset): + property_ = self.property_ + + values: list[str] | None | Unset + if isinstance(self.values, Unset): + values = UNSET + elif isinstance(self.values, list): + values = self.values + + else: + values = self.values + + form_field_id: None | str | Unset + if isinstance(self.form_field_id, Unset): + form_field_id = UNSET + elif isinstance(self.form_field_id, UUID): + form_field_id = str(self.form_field_id) + else: + form_field_id = self.form_field_id + + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conditionable_type": conditionable_type, + "operator": operator, + } + ) + if property_ is not UNSET: + field_dict["property"] = property_ + if values is not UNSET: + field_dict["values"] = values + if form_field_id is not UNSET: + field_dict["form_field_id"] = form_field_id + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + conditionable_type = check_new_sla_data_attributes_conditions_item_conditionable_type( + d.pop("conditionable_type") + ) + + operator = d.pop("operator") + + _property_ = d.pop("property", UNSET) + property_: NewSlaDataAttributesConditionsItemProperty | Unset + if isinstance(_property_, Unset): + property_ = UNSET + else: + property_ = check_new_sla_data_attributes_conditions_item_property(_property_) + + def _parse_values(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + values_type_0 = cast(list[str], data) + + return values_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + values = _parse_values(d.pop("values", UNSET)) + + def _parse_form_field_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + form_field_id_type_0 = UUID(data) + + return form_field_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + form_field_id = _parse_form_field_id(d.pop("form_field_id", UNSET)) + + position = d.pop("position", UNSET) + + new_sla_data_attributes_conditions_item = cls( + conditionable_type=conditionable_type, + operator=operator, + property_=property_, + values=values, + form_field_id=form_field_id, + position=position, + ) + + new_sla_data_attributes_conditions_item.additional_properties = d + return new_sla_data_attributes_conditions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_sla_data_attributes_conditions_item_conditionable_type.py b/rootly_sdk/models/new_sla_data_attributes_conditions_item_conditionable_type.py new file mode 100644 index 00000000..9e6f37db --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_conditions_item_conditionable_type.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewSlaDataAttributesConditionsItemConditionableType = Literal[ + "SLAs::BuiltInFieldCondition", "SLAs::CustomFieldCondition" +] + +NEW_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES: set[ + NewSlaDataAttributesConditionsItemConditionableType +] = { + "SLAs::BuiltInFieldCondition", + "SLAs::CustomFieldCondition", +} + + +def check_new_sla_data_attributes_conditions_item_conditionable_type( + value: str | None, +) -> NewSlaDataAttributesConditionsItemConditionableType | None: + if value is None: + return None + if value in NEW_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES: + return cast(NewSlaDataAttributesConditionsItemConditionableType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_conditions_item_property.py b/rootly_sdk/models/new_sla_data_attributes_conditions_item_property.py new file mode 100644 index 00000000..2842aefd --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_conditions_item_property.py @@ -0,0 +1,55 @@ +from typing import Literal, cast + +NewSlaDataAttributesConditionsItemProperty = Literal[ + "acknowledged_at", + "cause", + "detected_at", + "environment", + "functionality", + "group", + "incident_role", + "incident_type", + "kind", + "mitigated_at", + "resolved_at", + "service", + "severity", + "started_at", + "status", + "sub_status", + "summary", + "visibility", +] + +NEW_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_PROPERTY_VALUES: set[NewSlaDataAttributesConditionsItemProperty] = { + "acknowledged_at", + "cause", + "detected_at", + "environment", + "functionality", + "group", + "incident_role", + "incident_type", + "kind", + "mitigated_at", + "resolved_at", + "service", + "severity", + "started_at", + "status", + "sub_status", + "summary", + "visibility", +} + + +def check_new_sla_data_attributes_conditions_item_property( + value: str | None, +) -> NewSlaDataAttributesConditionsItemProperty | None: + if value is None: + return None + if value in NEW_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_PROPERTY_VALUES: + return cast(NewSlaDataAttributesConditionsItemProperty, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_PROPERTY_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py b/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py new file mode 100644 index 00000000..33589513 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_sla_data_attributes_notification_configurations_item_offset_type import ( + NewSlaDataAttributesNotificationConfigurationsItemOffsetType, + check_new_sla_data_attributes_notification_configurations_item_offset_type, +) + +T = TypeVar("T", bound="NewSlaDataAttributesNotificationConfigurationsItem") + + +@_attrs_define +class NewSlaDataAttributesNotificationConfigurationsItem: + """ + Attributes: + offset_type (NewSlaDataAttributesNotificationConfigurationsItemOffsetType): When to send the notification + relative to the deadline + offset_days (int): Number of days before or after the deadline. Must be 0 for when_due. + """ + + offset_type: NewSlaDataAttributesNotificationConfigurationsItemOffsetType + offset_days: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + offset_type: str = self.offset_type + + offset_days = self.offset_days + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "offset_type": offset_type, + "offset_days": offset_days, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + offset_type = check_new_sla_data_attributes_notification_configurations_item_offset_type(d.pop("offset_type")) + + offset_days = d.pop("offset_days") + + new_sla_data_attributes_notification_configurations_item = cls( + offset_type=offset_type, + offset_days=offset_days, + ) + + new_sla_data_attributes_notification_configurations_item.additional_properties = d + return new_sla_data_attributes_notification_configurations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item_offset_type.py b/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item_offset_type.py new file mode 100644 index 00000000..189c5d57 --- /dev/null +++ b/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item_offset_type.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +NewSlaDataAttributesNotificationConfigurationsItemOffsetType = Literal["after_due", "before_due", "when_due"] + +NEW_SLA_DATA_ATTRIBUTES_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES: set[ + NewSlaDataAttributesNotificationConfigurationsItemOffsetType +] = { + "after_due", + "before_due", + "when_due", +} + + +def check_new_sla_data_attributes_notification_configurations_item_offset_type( + value: str | None, +) -> NewSlaDataAttributesNotificationConfigurationsItemOffsetType | None: + if value is None: + return None + if value in NEW_SLA_DATA_ATTRIBUTES_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES: + return cast(NewSlaDataAttributesNotificationConfigurationsItemOffsetType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_ATTRIBUTES_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_sla_data_type.py b/rootly_sdk/models/new_sla_data_type.py new file mode 100644 index 00000000..dc3ce83d --- /dev/null +++ b/rootly_sdk/models/new_sla_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewSlaDataType = Literal["slas"] + +NEW_SLA_DATA_TYPE_VALUES: set[NewSlaDataType] = { + "slas", +} + + +def check_new_sla_data_type(value: str | None) -> NewSlaDataType | None: + if value is None: + return None + if value in NEW_SLA_DATA_TYPE_VALUES: + return cast(NewSlaDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_SLA_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_status_page.py b/rootly_sdk/models/new_status_page.py index 330e306b..61ef3293 100644 --- a/rootly_sdk/models/new_status_page.py +++ b/rootly_sdk/models/new_status_page.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewStatusPage: data (NewStatusPageData): """ - data: "NewStatusPageData" + data: NewStatusPageData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_status_page_data.py b/rootly_sdk/models/new_status_page_data.py index 42e919f0..5ea4944d 100644 --- a/rootly_sdk/models/new_status_page_data.py +++ b/rootly_sdk/models/new_status_page_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewStatusPageData: """ type_: NewStatusPageDataType - attributes: "NewStatusPageDataAttributes" + attributes: NewStatusPageDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_status_page_data_attributes.py b/rootly_sdk/models/new_status_page_data_attributes.py index e529dc6e..a19825e4 100644 --- a/rootly_sdk/models/new_status_page_data_attributes.py +++ b/rootly_sdk/models/new_status_page_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -11,6 +13,10 @@ NewStatusPageDataAttributesSamlNameIdentifierFormat, check_new_status_page_data_attributes_saml_name_identifier_format, ) +from ..models.new_status_page_data_attributes_section_order_type_0_item import ( + NewStatusPageDataAttributesSectionOrderType0Item, + check_new_status_page_data_attributes_section_order_type_0_item, +) from ..models.new_status_page_data_attributes_show_uptime_last_days import ( NewStatusPageDataAttributesShowUptimeLastDays, check_new_status_page_data_attributes_show_uptime_last_days, @@ -25,210 +31,236 @@ class NewStatusPageDataAttributes: """ Attributes: title (str): The title of the status page - public_title (Union[None, Unset, str]): The public title of the status page - description (Union[None, Unset, str]): The description of the status page - public_description (Union[None, Unset, str]): The public description of the status page - header_color (Union[None, Unset, str]): The color of the header. Eg. "#0061F2" - footer_color (Union[None, Unset, str]): The color of the footer. Eg. "#1F2F41" - allow_search_engine_index (Union[None, Unset, bool]): Allow search engines to include your public status page in + public_title (None | str | Unset): The public title of the status page + description (None | str | Unset): The description of the status page + public_description (None | str | Unset): The public description of the status page + header_color (None | str | Unset): The color of the header. Eg. "#0061F2" + footer_color (None | str | Unset): The color of the footer. Eg. "#1F2F41" + allow_search_engine_index (bool | None | Unset): Allow search engines to include your public status page in search results - show_uptime (Union[None, Unset, bool]): Show uptime - show_uptime_last_days (Union[Unset, NewStatusPageDataAttributesShowUptimeLastDays]): Show uptime over x days - success_message (Union[None, Unset, str]): Message showing when all components are operational - failure_message (Union[None, Unset, str]): Message showing when at least one component is not operational - authentication_method (Union[Unset, NewStatusPageDataAttributesAuthenticationMethod]): Authentication method - Default: 'none'. - authentication_enabled (Union[None, Unset, bool]): Enable authentication (deprecated - use authentication_method + show_uptime (bool | None | Unset): Show uptime + show_uptime_last_days (NewStatusPageDataAttributesShowUptimeLastDays | Unset): Show uptime over x days + success_message (None | str | Unset): Message showing when all components are operational + failure_message (None | str | Unset): Message showing when at least one component is not operational + authentication_method (NewStatusPageDataAttributesAuthenticationMethod | Unset): Authentication method Default: + 'none'. + authentication_enabled (bool | None | Unset): Enable authentication (deprecated - use authentication_method instead) Default: False. - authentication_password (Union[None, Unset, str]): Authentication password - saml_idp_sso_service_url (Union[None, Unset, str]): SAML IdP SSO service URL - saml_idp_slo_service_url (Union[None, Unset, str]): SAML IdP SLO service URL - saml_idp_cert (Union[None, Unset, str]): SAML IdP certificate - saml_name_identifier_format (Union[Unset, NewStatusPageDataAttributesSamlNameIdentifierFormat]): SAML name - identifier format - website_url (Union[None, Unset, str]): Website URL - website_privacy_url (Union[None, Unset, str]): Website Privacy URL - website_support_url (Union[None, Unset, str]): Website Support URL - ga_tracking_id (Union[None, Unset, str]): Google Analytics tracking ID - time_zone (Union[None, Unset, str]): A valid IANA time zone name. Default: 'Etc/UTC'. - public (Union[None, Unset, bool]): Make the status page accessible to the public - service_ids (Union[Unset, list[str]]): Services attached to the status page - functionality_ids (Union[Unset, list[str]]): Functionalities attached to the status page - enabled (Union[None, Unset, bool]): Enabled / Disable the status page + authentication_password (None | str | Unset): Authentication password + saml_idp_sso_service_url (None | str | Unset): SAML IdP SSO service URL + saml_idp_slo_service_url (None | str | Unset): SAML IdP SLO service URL + saml_idp_cert (None | str | Unset): SAML IdP certificate + saml_name_identifier_format (NewStatusPageDataAttributesSamlNameIdentifierFormat | Unset): SAML name identifier + format + section_order (list[NewStatusPageDataAttributesSectionOrderType0Item] | None | Unset): Order of sections on the + status page + external_domain_names (list[str] | None | Unset): External domain names attached to the status page + website_url (None | str | Unset): Website URL + website_privacy_url (None | str | Unset): Website Privacy URL + website_support_url (None | str | Unset): Website Support URL + ga_tracking_id (None | str | Unset): Google Analytics tracking ID + time_zone (None | str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. + public (bool | None | Unset): Make the status page accessible to the public + service_ids (list[str] | Unset): Services attached to the status page + functionality_ids (list[str] | Unset): Functionalities attached to the status page + enabled (bool | None | Unset): Enabled / Disable the status page """ title: str - public_title: None | Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - header_color: None | Unset | str = UNSET - footer_color: None | Unset | str = UNSET - allow_search_engine_index: None | Unset | bool = UNSET - show_uptime: None | Unset | bool = UNSET - show_uptime_last_days: Unset | NewStatusPageDataAttributesShowUptimeLastDays = UNSET - success_message: None | Unset | str = UNSET - failure_message: None | Unset | str = UNSET - authentication_method: Unset | NewStatusPageDataAttributesAuthenticationMethod = "none" - authentication_enabled: None | Unset | bool = False - authentication_password: None | Unset | str = UNSET - saml_idp_sso_service_url: None | Unset | str = UNSET - saml_idp_slo_service_url: None | Unset | str = UNSET - saml_idp_cert: None | Unset | str = UNSET - saml_name_identifier_format: Unset | NewStatusPageDataAttributesSamlNameIdentifierFormat = UNSET - website_url: None | Unset | str = UNSET - website_privacy_url: None | Unset | str = UNSET - website_support_url: None | Unset | str = UNSET - ga_tracking_id: None | Unset | str = UNSET - time_zone: None | Unset | str = "Etc/UTC" - public: None | Unset | bool = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - enabled: None | Unset | bool = UNSET + public_title: None | str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + header_color: None | str | Unset = UNSET + footer_color: None | str | Unset = UNSET + allow_search_engine_index: bool | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: NewStatusPageDataAttributesShowUptimeLastDays | Unset = UNSET + success_message: None | str | Unset = UNSET + failure_message: None | str | Unset = UNSET + authentication_method: NewStatusPageDataAttributesAuthenticationMethod | Unset = "none" + authentication_enabled: bool | None | Unset = False + authentication_password: None | str | Unset = UNSET + saml_idp_sso_service_url: None | str | Unset = UNSET + saml_idp_slo_service_url: None | str | Unset = UNSET + saml_idp_cert: None | str | Unset = UNSET + saml_name_identifier_format: NewStatusPageDataAttributesSamlNameIdentifierFormat | Unset = UNSET + section_order: list[NewStatusPageDataAttributesSectionOrderType0Item] | None | Unset = UNSET + external_domain_names: list[str] | None | Unset = UNSET + website_url: None | str | Unset = UNSET + website_privacy_url: None | str | Unset = UNSET + website_support_url: None | str | Unset = UNSET + ga_tracking_id: None | str | Unset = UNSET + time_zone: None | str | Unset = "Etc/UTC" + public: bool | None | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + enabled: bool | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - public_title: None | Unset | str + public_title: None | str | Unset if isinstance(self.public_title, Unset): public_title = UNSET else: public_title = self.public_title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - header_color: None | Unset | str + header_color: None | str | Unset if isinstance(self.header_color, Unset): header_color = UNSET else: header_color = self.header_color - footer_color: None | Unset | str + footer_color: None | str | Unset if isinstance(self.footer_color, Unset): footer_color = UNSET else: footer_color = self.footer_color - allow_search_engine_index: None | Unset | bool + allow_search_engine_index: bool | None | Unset if isinstance(self.allow_search_engine_index, Unset): allow_search_engine_index = UNSET else: allow_search_engine_index = self.allow_search_engine_index - show_uptime: None | Unset | bool + show_uptime: bool | None | Unset if isinstance(self.show_uptime, Unset): show_uptime = UNSET else: show_uptime = self.show_uptime - show_uptime_last_days: Unset | int = UNSET + show_uptime_last_days: int | Unset = UNSET if not isinstance(self.show_uptime_last_days, Unset): show_uptime_last_days = self.show_uptime_last_days - success_message: None | Unset | str + success_message: None | str | Unset if isinstance(self.success_message, Unset): success_message = UNSET else: success_message = self.success_message - failure_message: None | Unset | str + failure_message: None | str | Unset if isinstance(self.failure_message, Unset): failure_message = UNSET else: failure_message = self.failure_message - authentication_method: Unset | str = UNSET + authentication_method: str | Unset = UNSET if not isinstance(self.authentication_method, Unset): authentication_method = self.authentication_method - authentication_enabled: None | Unset | bool + authentication_enabled: bool | None | Unset if isinstance(self.authentication_enabled, Unset): authentication_enabled = UNSET else: authentication_enabled = self.authentication_enabled - authentication_password: None | Unset | str + authentication_password: None | str | Unset if isinstance(self.authentication_password, Unset): authentication_password = UNSET else: authentication_password = self.authentication_password - saml_idp_sso_service_url: None | Unset | str + saml_idp_sso_service_url: None | str | Unset if isinstance(self.saml_idp_sso_service_url, Unset): saml_idp_sso_service_url = UNSET else: saml_idp_sso_service_url = self.saml_idp_sso_service_url - saml_idp_slo_service_url: None | Unset | str + saml_idp_slo_service_url: None | str | Unset if isinstance(self.saml_idp_slo_service_url, Unset): saml_idp_slo_service_url = UNSET else: saml_idp_slo_service_url = self.saml_idp_slo_service_url - saml_idp_cert: None | Unset | str + saml_idp_cert: None | str | Unset if isinstance(self.saml_idp_cert, Unset): saml_idp_cert = UNSET else: saml_idp_cert = self.saml_idp_cert - saml_name_identifier_format: Unset | str = UNSET + saml_name_identifier_format: str | Unset = UNSET if not isinstance(self.saml_name_identifier_format, Unset): saml_name_identifier_format = self.saml_name_identifier_format - website_url: None | Unset | str + section_order: list[str] | None | Unset + if isinstance(self.section_order, Unset): + section_order = UNSET + elif isinstance(self.section_order, list): + section_order = [] + for section_order_type_0_item_data in self.section_order: + section_order_type_0_item: str = section_order_type_0_item_data + section_order.append(section_order_type_0_item) + + else: + section_order = self.section_order + + external_domain_names: list[str] | None | Unset + if isinstance(self.external_domain_names, Unset): + external_domain_names = UNSET + elif isinstance(self.external_domain_names, list): + external_domain_names = self.external_domain_names + + else: + external_domain_names = self.external_domain_names + + website_url: None | str | Unset if isinstance(self.website_url, Unset): website_url = UNSET else: website_url = self.website_url - website_privacy_url: None | Unset | str + website_privacy_url: None | str | Unset if isinstance(self.website_privacy_url, Unset): website_privacy_url = UNSET else: website_privacy_url = self.website_privacy_url - website_support_url: None | Unset | str + website_support_url: None | str | Unset if isinstance(self.website_support_url, Unset): website_support_url = UNSET else: website_support_url = self.website_support_url - ga_tracking_id: None | Unset | str + ga_tracking_id: None | str | Unset if isinstance(self.ga_tracking_id, Unset): ga_tracking_id = UNSET else: ga_tracking_id = self.ga_tracking_id - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: time_zone = self.time_zone - public: None | Unset | bool + public: bool | None | Unset if isinstance(self.public, Unset): public = UNSET else: public = self.public - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - enabled: None | Unset | bool + enabled: bool | None | Unset if isinstance(self.enabled, Unset): enabled = UNSET else: @@ -275,6 +307,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["saml_idp_cert"] = saml_idp_cert if saml_name_identifier_format is not UNSET: field_dict["saml_name_identifier_format"] = saml_name_identifier_format + if section_order is not UNSET: + field_dict["section_order"] = section_order + if external_domain_names is not UNSET: + field_dict["external_domain_names"] = external_domain_names if website_url is not UNSET: field_dict["website_url"] = website_url if website_privacy_url is not UNSET: @@ -301,148 +337,148 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title") - def _parse_public_title(data: object) -> None | Unset | str: + def _parse_public_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_title = _parse_public_title(d.pop("public_title", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_header_color(data: object) -> None | Unset | str: + def _parse_header_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) header_color = _parse_header_color(d.pop("header_color", UNSET)) - def _parse_footer_color(data: object) -> None | Unset | str: + def _parse_footer_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) footer_color = _parse_footer_color(d.pop("footer_color", UNSET)) - def _parse_allow_search_engine_index(data: object) -> None | Unset | bool: + def _parse_allow_search_engine_index(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) allow_search_engine_index = _parse_allow_search_engine_index(d.pop("allow_search_engine_index", UNSET)) - def _parse_show_uptime(data: object) -> None | Unset | bool: + def _parse_show_uptime(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) _show_uptime_last_days = d.pop("show_uptime_last_days", UNSET) - show_uptime_last_days: Unset | NewStatusPageDataAttributesShowUptimeLastDays + show_uptime_last_days: NewStatusPageDataAttributesShowUptimeLastDays | Unset if isinstance(_show_uptime_last_days, Unset): show_uptime_last_days = UNSET else: show_uptime_last_days = check_new_status_page_data_attributes_show_uptime_last_days(_show_uptime_last_days) - def _parse_success_message(data: object) -> None | Unset | str: + def _parse_success_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) success_message = _parse_success_message(d.pop("success_message", UNSET)) - def _parse_failure_message(data: object) -> None | Unset | str: + def _parse_failure_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) failure_message = _parse_failure_message(d.pop("failure_message", UNSET)) _authentication_method = d.pop("authentication_method", UNSET) - authentication_method: Unset | NewStatusPageDataAttributesAuthenticationMethod + authentication_method: NewStatusPageDataAttributesAuthenticationMethod | Unset if isinstance(_authentication_method, Unset): authentication_method = UNSET else: authentication_method = check_new_status_page_data_attributes_authentication_method(_authentication_method) - def _parse_authentication_enabled(data: object) -> None | Unset | bool: + def _parse_authentication_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) authentication_enabled = _parse_authentication_enabled(d.pop("authentication_enabled", UNSET)) - def _parse_authentication_password(data: object) -> None | Unset | str: + def _parse_authentication_password(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) authentication_password = _parse_authentication_password(d.pop("authentication_password", UNSET)) - def _parse_saml_idp_sso_service_url(data: object) -> None | Unset | str: + def _parse_saml_idp_sso_service_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_sso_service_url = _parse_saml_idp_sso_service_url(d.pop("saml_idp_sso_service_url", UNSET)) - def _parse_saml_idp_slo_service_url(data: object) -> None | Unset | str: + def _parse_saml_idp_slo_service_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_slo_service_url = _parse_saml_idp_slo_service_url(d.pop("saml_idp_slo_service_url", UNSET)) - def _parse_saml_idp_cert(data: object) -> None | Unset | str: + def _parse_saml_idp_cert(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_cert = _parse_saml_idp_cert(d.pop("saml_idp_cert", UNSET)) _saml_name_identifier_format = d.pop("saml_name_identifier_format", UNSET) - saml_name_identifier_format: Unset | NewStatusPageDataAttributesSamlNameIdentifierFormat + saml_name_identifier_format: NewStatusPageDataAttributesSamlNameIdentifierFormat | Unset if isinstance(_saml_name_identifier_format, Unset): saml_name_identifier_format = UNSET else: @@ -450,57 +486,98 @@ def _parse_saml_idp_cert(data: object) -> None | Unset | str: _saml_name_identifier_format ) - def _parse_website_url(data: object) -> None | Unset | str: + def _parse_section_order(data: object) -> list[NewStatusPageDataAttributesSectionOrderType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + section_order_type_0 = [] + _section_order_type_0 = data + for section_order_type_0_item_data in _section_order_type_0: + section_order_type_0_item = check_new_status_page_data_attributes_section_order_type_0_item( + section_order_type_0_item_data + ) + + section_order_type_0.append(section_order_type_0_item) + + return section_order_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[NewStatusPageDataAttributesSectionOrderType0Item] | None | Unset, data) + + section_order = _parse_section_order(d.pop("section_order", UNSET)) + + def _parse_external_domain_names(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + external_domain_names_type_0 = cast(list[str], data) + + return external_domain_names_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + external_domain_names = _parse_external_domain_names(d.pop("external_domain_names", UNSET)) + + def _parse_website_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_url = _parse_website_url(d.pop("website_url", UNSET)) - def _parse_website_privacy_url(data: object) -> None | Unset | str: + def _parse_website_privacy_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_privacy_url = _parse_website_privacy_url(d.pop("website_privacy_url", UNSET)) - def _parse_website_support_url(data: object) -> None | Unset | str: + def _parse_website_support_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_support_url = _parse_website_support_url(d.pop("website_support_url", UNSET)) - def _parse_ga_tracking_id(data: object) -> None | Unset | str: + def _parse_ga_tracking_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) ga_tracking_id = _parse_ga_tracking_id(d.pop("ga_tracking_id", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) - def _parse_public(data: object) -> None | Unset | bool: + def _parse_public(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) public = _parse_public(d.pop("public", UNSET)) @@ -508,12 +585,12 @@ def _parse_public(data: object) -> None | Unset | bool: functionality_ids = cast(list[str], d.pop("functionality_ids", UNSET)) - def _parse_enabled(data: object) -> None | Unset | bool: + def _parse_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) enabled = _parse_enabled(d.pop("enabled", UNSET)) @@ -536,6 +613,8 @@ def _parse_enabled(data: object) -> None | Unset | bool: saml_idp_slo_service_url=saml_idp_slo_service_url, saml_idp_cert=saml_idp_cert, saml_name_identifier_format=saml_name_identifier_format, + section_order=section_order, + external_domain_names=external_domain_names, website_url=website_url, website_privacy_url=website_privacy_url, website_support_url=website_support_url, diff --git a/rootly_sdk/models/new_status_page_data_attributes_section_order_type_0_item.py b/rootly_sdk/models/new_status_page_data_attributes_section_order_type_0_item.py new file mode 100644 index 00000000..a7caa5df --- /dev/null +++ b/rootly_sdk/models/new_status_page_data_attributes_section_order_type_0_item.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +NewStatusPageDataAttributesSectionOrderType0Item = Literal["incidents", "maintenance", "system_status"] + +NEW_STATUS_PAGE_DATA_ATTRIBUTES_SECTION_ORDER_TYPE_0_ITEM_VALUES: set[ + NewStatusPageDataAttributesSectionOrderType0Item +] = { + "incidents", + "maintenance", + "system_status", +} + + +def check_new_status_page_data_attributes_section_order_type_0_item( + value: str | None, +) -> NewStatusPageDataAttributesSectionOrderType0Item | None: + if value is None: + return None + if value in NEW_STATUS_PAGE_DATA_ATTRIBUTES_SECTION_ORDER_TYPE_0_ITEM_VALUES: + return cast(NewStatusPageDataAttributesSectionOrderType0Item, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_STATUS_PAGE_DATA_ATTRIBUTES_SECTION_ORDER_TYPE_0_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_status_page_template.py b/rootly_sdk/models/new_status_page_template.py index 2a888f80..38d7f145 100644 --- a/rootly_sdk/models/new_status_page_template.py +++ b/rootly_sdk/models/new_status_page_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewStatusPageTemplate: data (NewStatusPageTemplateData): """ - data: "NewStatusPageTemplateData" + data: NewStatusPageTemplateData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_status_page_template_data.py b/rootly_sdk/models/new_status_page_template_data.py index fc999006..0ab02f3e 100644 --- a/rootly_sdk/models/new_status_page_template_data.py +++ b/rootly_sdk/models/new_status_page_template_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewStatusPageTemplateData: """ type_: NewStatusPageTemplateDataType - attributes: "NewStatusPageTemplateDataAttributes" + attributes: NewStatusPageTemplateDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_status_page_template_data_attributes.py b/rootly_sdk/models/new_status_page_template_data_attributes.py index b1927d4e..c6d188d0 100644 --- a/rootly_sdk/models/new_status_page_template_data_attributes.py +++ b/rootly_sdk/models/new_status_page_template_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -22,25 +24,25 @@ class NewStatusPageTemplateDataAttributes: Attributes: title (str): Title of the template body (str): Description of the event the template will populate - status_page_id (Union[Unset, str]): - update_title (Union[None, Unset, str]): Title that will be used for the status page update - update_status (Union[Unset, NewStatusPageTemplateDataAttributesUpdateStatus]): Status of the event the template - will populate - kind (Union[Unset, NewStatusPageTemplateDataAttributesKind]): The kind of the status page template - should_notify_subscribers (Union[None, Unset, bool]): Controls if incident subscribers should be notified - position (Union[Unset, int]): Position of the status page template - enabled (Union[None, Unset, bool]): Enable / Disable the status page template + status_page_id (str | Unset): + update_title (None | str | Unset): Title that will be used for the status page update + update_status (NewStatusPageTemplateDataAttributesUpdateStatus | Unset): Status of the event the template will + populate + kind (NewStatusPageTemplateDataAttributesKind | Unset): The kind of the status page template + should_notify_subscribers (bool | None | Unset): Controls if incident subscribers should be notified + position (int | Unset): Position of the status page template + enabled (bool | None | Unset): Enable / Disable the status page template """ title: str body: str - status_page_id: Unset | str = UNSET - update_title: None | Unset | str = UNSET - update_status: Unset | NewStatusPageTemplateDataAttributesUpdateStatus = UNSET - kind: Unset | NewStatusPageTemplateDataAttributesKind = UNSET - should_notify_subscribers: None | Unset | bool = UNSET - position: Unset | int = UNSET - enabled: None | Unset | bool = UNSET + status_page_id: str | Unset = UNSET + update_title: None | str | Unset = UNSET + update_status: NewStatusPageTemplateDataAttributesUpdateStatus | Unset = UNSET + kind: NewStatusPageTemplateDataAttributesKind | Unset = UNSET + should_notify_subscribers: bool | None | Unset = UNSET + position: int | Unset = UNSET + enabled: bool | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title @@ -49,21 +51,21 @@ def to_dict(self) -> dict[str, Any]: status_page_id = self.status_page_id - update_title: None | Unset | str + update_title: None | str | Unset if isinstance(self.update_title, Unset): update_title = UNSET else: update_title = self.update_title - update_status: Unset | str = UNSET + update_status: str | Unset = UNSET if not isinstance(self.update_status, Unset): update_status = self.update_status - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - should_notify_subscribers: None | Unset | bool + should_notify_subscribers: bool | None | Unset if isinstance(self.should_notify_subscribers, Unset): should_notify_subscribers = UNSET else: @@ -71,7 +73,7 @@ def to_dict(self) -> dict[str, Any]: position = self.position - enabled: None | Unset | bool + enabled: bool | None | Unset if isinstance(self.enabled, Unset): enabled = UNSET else: @@ -111,46 +113,46 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_page_id = d.pop("status_page_id", UNSET) - def _parse_update_title(data: object) -> None | Unset | str: + def _parse_update_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_title = _parse_update_title(d.pop("update_title", UNSET)) _update_status = d.pop("update_status", UNSET) - update_status: Unset | NewStatusPageTemplateDataAttributesUpdateStatus + update_status: NewStatusPageTemplateDataAttributesUpdateStatus | Unset if isinstance(_update_status, Unset): update_status = UNSET else: update_status = check_new_status_page_template_data_attributes_update_status(_update_status) _kind = d.pop("kind", UNSET) - kind: Unset | NewStatusPageTemplateDataAttributesKind + kind: NewStatusPageTemplateDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_new_status_page_template_data_attributes_kind(_kind) - def _parse_should_notify_subscribers(data: object) -> None | Unset | bool: + def _parse_should_notify_subscribers(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) should_notify_subscribers = _parse_should_notify_subscribers(d.pop("should_notify_subscribers", UNSET)) position = d.pop("position", UNSET) - def _parse_enabled(data: object) -> None | Unset | bool: + def _parse_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) enabled = _parse_enabled(d.pop("enabled", UNSET)) diff --git a/rootly_sdk/models/new_sub_status.py b/rootly_sdk/models/new_sub_status.py index 6baa6d72..290c756f 100644 --- a/rootly_sdk/models/new_sub_status.py +++ b/rootly_sdk/models/new_sub_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewSubStatus: data (NewSubStatusData): """ - data: "NewSubStatusData" + data: NewSubStatusData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_sub_status_data.py b/rootly_sdk/models/new_sub_status_data.py index b987a434..7c29942c 100644 --- a/rootly_sdk/models/new_sub_status_data.py +++ b/rootly_sdk/models/new_sub_status_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewSubStatusData: """ type_: NewSubStatusDataType - attributes: "NewSubStatusDataAttributes" + attributes: NewSubStatusDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_sub_status_data_attributes.py b/rootly_sdk/models/new_sub_status_data_attributes.py index efbd7274..c228516b 100644 --- a/rootly_sdk/models/new_sub_status_data_attributes.py +++ b/rootly_sdk/models/new_sub_status_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,27 +20,27 @@ class NewSubStatusDataAttributes: Attributes: name (str): parent_status (NewSubStatusDataAttributesParentStatus): - description (Union[None, Unset, str]): - position (Union[None, Unset, int]): + description (None | str | Unset): + position (int | None | Unset): """ name: str parent_status: NewSubStatusDataAttributesParentStatus - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name parent_status: str = self.parent_status - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -66,21 +68,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: parent_status = check_new_sub_status_data_attributes_parent_status(d.pop("parent_status")) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/new_team.py b/rootly_sdk/models/new_team.py index 5035166c..fb3a16a2 100644 --- a/rootly_sdk/models/new_team.py +++ b/rootly_sdk/models/new_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewTeam: data (NewTeamData): """ - data: "NewTeamData" + data: NewTeamData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_team_data.py b/rootly_sdk/models/new_team_data.py index 1d6c1900..4aecd241 100644 --- a/rootly_sdk/models/new_team_data.py +++ b/rootly_sdk/models/new_team_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewTeamData: """ type_: NewTeamDataType - attributes: "NewTeamDataAttributes" + attributes: NewTeamDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_team_data_attributes.py b/rootly_sdk/models/new_team_data_attributes.py index 23c71def..9ab22d75 100644 --- a/rootly_sdk/models/new_team_data_attributes.py +++ b/rootly_sdk/models/new_team_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -9,10 +11,10 @@ from ..models.new_team_data_attributes_alert_broadcast_channel_type_0 import ( NewTeamDataAttributesAlertBroadcastChannelType0, ) - from ..models.new_team_data_attributes_fields_item import NewTeamDataAttributesFieldsItem from ..models.new_team_data_attributes_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) + from ..models.new_team_data_attributes_properties_item import NewTeamDataAttributesPropertiesItem from ..models.new_team_data_attributes_slack_aliases_type_0_item import NewTeamDataAttributesSlackAliasesType0Item from ..models.new_team_data_attributes_slack_channels_type_0_item import NewTeamDataAttributesSlackChannelsType0Item @@ -25,68 +27,67 @@ class NewTeamDataAttributes: """ Attributes: name (str): The name of the team - description (Union[None, Unset, str]): The description of the team - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the team - color (Union[None, Unset, str]): The hex color of the team - position (Union[None, Unset, int]): Position of the team - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this team. eg: + description (None | str | Unset): The description of the team + notify_emails (list[str] | None | Unset): Emails to attach to the team + color (None | str | Unset): The hex color of the team + position (int | None | Unset): Position of the team + backstage_id (None | str | Unset): The Backstage entity id associated to this team. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this team - pagerduty_id (Union[None, Unset, str]): The PagerDuty group id associated to this team - pagerduty_service_id (Union[None, Unset, str]): The PagerDuty service id associated to this team - opsgenie_id (Union[None, Unset, str]): The Opsgenie group id associated to this team - opsgenie_team_id (Union[None, Unset, str]): The Opsgenie team id associated to this team - victor_ops_id (Union[None, Unset, str]): The VictorOps group id associated to this team - pagertree_id (Union[None, Unset, str]): The PagerTree group id associated to this team - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this team - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this team - user_ids (Union[None, Unset, list[int]]): The user ids of the members of this team. - admin_ids (Union[None, Unset, list[int]]): The user ids of the admins of this team. These users must also be - present in user_ids attribute. - alerts_email_enabled (Union[None, Unset, bool]): Enable alerts through email - alert_urgency_id (Union[None, Unset, str]): The alert urgency id of the team - slack_channels (Union[None, Unset, list['NewTeamDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this team - slack_aliases (Union[None, Unset, list['NewTeamDataAttributesSlackAliasesType0Item']]): Slack Aliases associated + external_id (None | str | Unset): The external id associated to this team + pagerduty_id (None | str | Unset): The PagerDuty group id associated to this team + pagerduty_service_id (None | str | Unset): The PagerDuty service id associated to this team + opsgenie_id (None | str | Unset): The Opsgenie group id associated to this team + opsgenie_team_id (None | str | Unset): The Opsgenie team id associated to this team + victor_ops_id (None | str | Unset): The VictorOps group id associated to this team + pagertree_id (None | str | Unset): The PagerTree group id associated to this team + cortex_id (None | str | Unset): The Cortex group id associated to this team + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this team + user_ids (list[int] | None | Unset): The user ids of the members of this team. + admin_ids (list[int] | None | Unset): The user ids of the admins of this team. These users must also be present + in user_ids attribute. + alerts_email_enabled (bool | None | Unset): Enable alerts through email + alert_urgency_id (None | str | Unset): The alert urgency id of the team + slack_channels (list[NewTeamDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this team - alert_broadcast_enabled (Union[None, Unset, bool]): Enable alerts to be broadcasted to a specific channel - alert_broadcast_channel (Union['NewTeamDataAttributesAlertBroadcastChannelType0', None, Unset]): Slack channel - to broadcast alerts to - incident_broadcast_enabled (Union[None, Unset, bool]): Enable incidents to be broadcasted to a specific channel - incident_broadcast_channel (Union['NewTeamDataAttributesIncidentBroadcastChannelType0', None, Unset]): Slack - channel to broadcast incidents to - auto_add_members_when_attached (Union[None, Unset, bool]): Auto add members to incident channel when team is - attached - fields (Union[Unset, list['NewTeamDataAttributesFieldsItem']]): Array of field values for this team. + slack_aliases (list[NewTeamDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated with + this team + alert_broadcast_enabled (bool | None | Unset): Enable alerts to be broadcasted to a specific channel + alert_broadcast_channel (NewTeamDataAttributesAlertBroadcastChannelType0 | None | Unset): Slack channel to + broadcast alerts to + incident_broadcast_enabled (bool | None | Unset): Enable incidents to be broadcasted to a specific channel + incident_broadcast_channel (NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset): Slack channel to + broadcast incidents to + auto_add_members_when_attached (bool | None | Unset): Auto add members to incident channel when team is attached + properties (list[NewTeamDataAttributesPropertiesItem] | Unset): Array of property values for this team. """ name: str - description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - pagerduty_service_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - opsgenie_team_id: None | Unset | str = UNSET - victor_ops_id: None | Unset | str = UNSET - pagertree_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - user_ids: None | Unset | list[int] = UNSET - admin_ids: None | Unset | list[int] = UNSET - alerts_email_enabled: None | Unset | bool = UNSET - alert_urgency_id: None | Unset | str = UNSET - slack_channels: None | Unset | list["NewTeamDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["NewTeamDataAttributesSlackAliasesType0Item"] = UNSET - alert_broadcast_enabled: None | Unset | bool = UNSET - alert_broadcast_channel: Union["NewTeamDataAttributesAlertBroadcastChannelType0", None, Unset] = UNSET - incident_broadcast_enabled: None | Unset | bool = UNSET - incident_broadcast_channel: Union["NewTeamDataAttributesIncidentBroadcastChannelType0", None, Unset] = UNSET - auto_add_members_when_attached: None | Unset | bool = UNSET - fields: Unset | list["NewTeamDataAttributesFieldsItem"] = UNSET + description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + pagerduty_service_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + victor_ops_id: None | str | Unset = UNSET + pagertree_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + user_ids: list[int] | None | Unset = UNSET + admin_ids: list[int] | None | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + slack_channels: list[NewTeamDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[NewTeamDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + alert_broadcast_enabled: bool | None | Unset = UNSET + alert_broadcast_channel: NewTeamDataAttributesAlertBroadcastChannelType0 | None | Unset = UNSET + incident_broadcast_enabled: bool | None | Unset = UNSET + incident_broadcast_channel: NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset = UNSET + auto_add_members_when_attached: bool | None | Unset = UNSET + properties: list[NewTeamDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.new_team_data_attributes_alert_broadcast_channel_type_0 import ( @@ -98,13 +99,13 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -113,79 +114,79 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - pagerduty_service_id: None | Unset | str + pagerduty_service_id: None | str | Unset if isinstance(self.pagerduty_service_id, Unset): pagerduty_service_id = UNSET else: pagerduty_service_id = self.pagerduty_service_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - opsgenie_team_id: None | Unset | str + opsgenie_team_id: None | str | Unset if isinstance(self.opsgenie_team_id, Unset): opsgenie_team_id = UNSET else: opsgenie_team_id = self.opsgenie_team_id - victor_ops_id: None | Unset | str + victor_ops_id: None | str | Unset if isinstance(self.victor_ops_id, Unset): victor_ops_id = UNSET else: victor_ops_id = self.victor_ops_id - pagertree_id: None | Unset | str + pagertree_id: None | str | Unset if isinstance(self.pagertree_id, Unset): pagertree_id = UNSET else: pagertree_id = self.pagertree_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - user_ids: None | Unset | list[int] + user_ids: list[int] | None | Unset if isinstance(self.user_ids, Unset): user_ids = UNSET elif isinstance(self.user_ids, list): @@ -194,7 +195,7 @@ def to_dict(self) -> dict[str, Any]: else: user_ids = self.user_ids - admin_ids: None | Unset | list[int] + admin_ids: list[int] | None | Unset if isinstance(self.admin_ids, Unset): admin_ids = UNSET elif isinstance(self.admin_ids, list): @@ -203,19 +204,19 @@ def to_dict(self) -> dict[str, Any]: else: admin_ids = self.admin_ids - alerts_email_enabled: None | Unset | bool + alerts_email_enabled: bool | None | Unset if isinstance(self.alerts_email_enabled, Unset): alerts_email_enabled = UNSET else: alerts_email_enabled = self.alerts_email_enabled - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -227,7 +228,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -239,13 +240,13 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - alert_broadcast_enabled: None | Unset | bool + alert_broadcast_enabled: bool | None | Unset if isinstance(self.alert_broadcast_enabled, Unset): alert_broadcast_enabled = UNSET else: alert_broadcast_enabled = self.alert_broadcast_enabled - alert_broadcast_channel: None | Unset | dict[str, Any] + alert_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.alert_broadcast_channel, Unset): alert_broadcast_channel = UNSET elif isinstance(self.alert_broadcast_channel, NewTeamDataAttributesAlertBroadcastChannelType0): @@ -253,13 +254,13 @@ def to_dict(self) -> dict[str, Any]: else: alert_broadcast_channel = self.alert_broadcast_channel - incident_broadcast_enabled: None | Unset | bool + incident_broadcast_enabled: bool | None | Unset if isinstance(self.incident_broadcast_enabled, Unset): incident_broadcast_enabled = UNSET else: incident_broadcast_enabled = self.incident_broadcast_enabled - incident_broadcast_channel: None | Unset | dict[str, Any] + incident_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.incident_broadcast_channel, Unset): incident_broadcast_channel = UNSET elif isinstance(self.incident_broadcast_channel, NewTeamDataAttributesIncidentBroadcastChannelType0): @@ -267,18 +268,18 @@ def to_dict(self) -> dict[str, Any]: else: incident_broadcast_channel = self.incident_broadcast_channel - auto_add_members_when_attached: None | Unset | bool + auto_add_members_when_attached: bool | None | Unset if isinstance(self.auto_add_members_when_attached, Unset): auto_add_members_when_attached = UNSET else: auto_add_members_when_attached = self.auto_add_members_when_attached - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -337,8 +338,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_channel"] = incident_broadcast_channel if auto_add_members_when_attached is not UNSET: field_dict["auto_add_members_when_attached"] = auto_add_members_when_attached - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @@ -347,10 +348,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.new_team_data_attributes_alert_broadcast_channel_type_0 import ( NewTeamDataAttributesAlertBroadcastChannelType0, ) - from ..models.new_team_data_attributes_fields_item import NewTeamDataAttributesFieldsItem from ..models.new_team_data_attributes_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) + from ..models.new_team_data_attributes_properties_item import NewTeamDataAttributesPropertiesItem from ..models.new_team_data_attributes_slack_aliases_type_0_item import ( NewTeamDataAttributesSlackAliasesType0Item, ) @@ -361,16 +362,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -381,121 +382,121 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_pagerduty_service_id(data: object) -> None | Unset | str: + def _parse_pagerduty_service_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_service_id = _parse_pagerduty_service_id(d.pop("pagerduty_service_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_opsgenie_team_id(data: object) -> None | Unset | str: + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) - def _parse_victor_ops_id(data: object) -> None | Unset | str: + def _parse_victor_ops_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) victor_ops_id = _parse_victor_ops_id(d.pop("victor_ops_id", UNSET)) - def _parse_pagertree_id(data: object) -> None | Unset | str: + def _parse_pagertree_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagertree_id = _parse_pagertree_id(d.pop("pagertree_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_user_ids(data: object) -> None | Unset | list[int]: + def _parse_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -506,13 +507,13 @@ def _parse_user_ids(data: object) -> None | Unset | list[int]: user_ids_type_0 = cast(list[int], data) return user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) user_ids = _parse_user_ids(d.pop("user_ids", UNSET)) - def _parse_admin_ids(data: object) -> None | Unset | list[int]: + def _parse_admin_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -523,33 +524,31 @@ def _parse_admin_ids(data: object) -> None | Unset | list[int]: admin_ids_type_0 = cast(list[int], data) return admin_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) admin_ids = _parse_admin_ids(d.pop("admin_ids", UNSET)) - def _parse_alerts_email_enabled(data: object) -> None | Unset | bool: + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_slack_channels( - data: object, - ) -> None | Unset | list["NewTeamDataAttributesSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[NewTeamDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -567,15 +566,13 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewTeamDataAttributesSlackChannelsType0Item"], data) + return cast(list[NewTeamDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases( - data: object, - ) -> None | Unset | list["NewTeamDataAttributesSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[NewTeamDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -593,24 +590,24 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["NewTeamDataAttributesSlackAliasesType0Item"], data) + return cast(list[NewTeamDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_alert_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_alert_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alert_broadcast_enabled = _parse_alert_broadcast_enabled(d.pop("alert_broadcast_enabled", UNSET)) def _parse_alert_broadcast_channel( data: object, - ) -> Union["NewTeamDataAttributesAlertBroadcastChannelType0", None, Unset]: + ) -> NewTeamDataAttributesAlertBroadcastChannelType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -621,24 +618,24 @@ def _parse_alert_broadcast_channel( alert_broadcast_channel_type_0 = NewTeamDataAttributesAlertBroadcastChannelType0.from_dict(data) return alert_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewTeamDataAttributesAlertBroadcastChannelType0", None, Unset], data) + return cast(NewTeamDataAttributesAlertBroadcastChannelType0 | None | Unset, data) alert_broadcast_channel = _parse_alert_broadcast_channel(d.pop("alert_broadcast_channel", UNSET)) - def _parse_incident_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_incident_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) incident_broadcast_enabled = _parse_incident_broadcast_enabled(d.pop("incident_broadcast_enabled", UNSET)) def _parse_incident_broadcast_channel( data: object, - ) -> Union["NewTeamDataAttributesIncidentBroadcastChannelType0", None, Unset]: + ) -> NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -649,29 +646,31 @@ def _parse_incident_broadcast_channel( incident_broadcast_channel_type_0 = NewTeamDataAttributesIncidentBroadcastChannelType0.from_dict(data) return incident_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["NewTeamDataAttributesIncidentBroadcastChannelType0", None, Unset], data) + return cast(NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset, data) incident_broadcast_channel = _parse_incident_broadcast_channel(d.pop("incident_broadcast_channel", UNSET)) - def _parse_auto_add_members_when_attached(data: object) -> None | Unset | bool: + def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) auto_add_members_when_attached = _parse_auto_add_members_when_attached( d.pop("auto_add_members_when_attached", UNSET) ) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = NewTeamDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[NewTeamDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = NewTeamDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) new_team_data_attributes = cls( name=name, @@ -700,7 +699,7 @@ def _parse_auto_add_members_when_attached(data: object) -> None | Unset | bool: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, - fields=fields, + properties=properties, ) return new_team_data_attributes diff --git a/rootly_sdk/models/new_team_data_attributes_alert_broadcast_channel_type_0.py b/rootly_sdk/models/new_team_data_attributes_alert_broadcast_channel_type_0.py index d896ddc6..1450dc9d 100644 --- a/rootly_sdk/models/new_team_data_attributes_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/new_team_data_attributes_alert_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class NewTeamDataAttributesAlertBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_team_data_attributes_incident_broadcast_channel_type_0.py b/rootly_sdk/models/new_team_data_attributes_incident_broadcast_channel_type_0.py index 5ed832f1..6521da45 100644 --- a/rootly_sdk/models/new_team_data_attributes_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/new_team_data_attributes_incident_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class NewTeamDataAttributesIncidentBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_cause_data_attributes_fields_item.py b/rootly_sdk/models/new_team_data_attributes_properties_item.py similarity index 64% rename from rootly_sdk/models/update_cause_data_attributes_fields_item.py rename to rootly_sdk/models/new_team_data_attributes_properties_item.py index 1e34a643..ec6700ba 100644 --- a/rootly_sdk/models/update_cause_data_attributes_fields_item.py +++ b/rootly_sdk/models/new_team_data_attributes_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="UpdateCauseDataAttributesFieldsItem") +T = TypeVar("T", bound="NewTeamDataAttributesPropertiesItem") @_attrs_define -class UpdateCauseDataAttributesFieldsItem: - """Set a value for a catalog field +class NewTeamDataAttributesPropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - update_cause_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + new_team_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - update_cause_data_attributes_fields_item.additional_properties = d - return update_cause_data_attributes_fields_item + new_team_data_attributes_properties_item.additional_properties = d + return new_team_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/new_team_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/new_team_data_attributes_slack_aliases_type_0_item.py index 7ed25ecd..716b07cb 100644 --- a/rootly_sdk/models/new_team_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/new_team_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_team_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/new_team_data_attributes_slack_channels_type_0_item.py index 0560b467..4d03a45f 100644 --- a/rootly_sdk/models/new_team_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/new_team_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_user_email_address.py b/rootly_sdk/models/new_user_email_address.py index 4b1dfcd4..3a0e04da 100644 --- a/rootly_sdk/models/new_user_email_address.py +++ b/rootly_sdk/models/new_user_email_address.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewUserEmailAddress: data (NewUserEmailAddressData): """ - data: "NewUserEmailAddressData" + data: NewUserEmailAddressData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_user_email_address_data.py b/rootly_sdk/models/new_user_email_address_data.py index a05d8ba5..dc5e0749 100644 --- a/rootly_sdk/models/new_user_email_address_data.py +++ b/rootly_sdk/models/new_user_email_address_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewUserEmailAddressData: """ type_: NewUserEmailAddressDataType - attributes: "NewUserEmailAddressDataAttributes" + attributes: NewUserEmailAddressDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_user_email_address_data_attributes.py b/rootly_sdk/models/new_user_email_address_data_attributes.py index 7e191759..8ff3d016 100644 --- a/rootly_sdk/models/new_user_email_address_data_attributes.py +++ b/rootly_sdk/models/new_user_email_address_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_user_notification_rule.py b/rootly_sdk/models/new_user_notification_rule.py index 4e14b5ae..bbab1368 100644 --- a/rootly_sdk/models/new_user_notification_rule.py +++ b/rootly_sdk/models/new_user_notification_rule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewUserNotificationRule: data (NewUserNotificationRuleData): """ - data: "NewUserNotificationRuleData" + data: NewUserNotificationRuleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_user_notification_rule_data.py b/rootly_sdk/models/new_user_notification_rule_data.py index 67502591..a620e47c 100644 --- a/rootly_sdk/models/new_user_notification_rule_data.py +++ b/rootly_sdk/models/new_user_notification_rule_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewUserNotificationRuleData: """ type_: NewUserNotificationRuleDataType - attributes: "NewUserNotificationRuleDataAttributes" + attributes: NewUserNotificationRuleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_user_notification_rule_data_attributes.py b/rootly_sdk/models/new_user_notification_rule_data_attributes.py index b5846f02..1139cb20 100644 --- a/rootly_sdk/models/new_user_notification_rule_data_attributes.py +++ b/rootly_sdk/models/new_user_notification_rule_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,21 +20,21 @@ class NewUserNotificationRuleDataAttributes: Attributes: enabled_contact_types (list[NewUserNotificationRuleDataAttributesEnabledContactTypesItem]): Contact types for which notification needs to be enabled - delay (Union[None, Unset, int]): Delay after which rule gets triggered - position (Union[None, Unset, int]): Position of the rule - user_email_address_id (Union[None, Unset, str]): User email address to which notification to be sent - user_call_number_id (Union[None, Unset, str]): User phone number to which notification to be sent - user_sms_number_id (Union[None, Unset, str]): User sms number to which notification to be sent - user_device_id (Union[None, Unset, str]): User device to which notification to be sent + delay (int | None | Unset): Delay after which rule gets triggered + position (int | None | Unset): Position of the rule + user_email_address_id (None | str | Unset): User email address to which notification to be sent + user_call_number_id (None | str | Unset): User phone number to which notification to be sent + user_sms_number_id (None | str | Unset): User sms number to which notification to be sent + user_device_id (None | str | Unset): User device to which notification to be sent """ enabled_contact_types: list[NewUserNotificationRuleDataAttributesEnabledContactTypesItem] - delay: None | Unset | int = UNSET - position: None | Unset | int = UNSET - user_email_address_id: None | Unset | str = UNSET - user_call_number_id: None | Unset | str = UNSET - user_sms_number_id: None | Unset | str = UNSET - user_device_id: None | Unset | str = UNSET + delay: int | None | Unset = UNSET + position: int | None | Unset = UNSET + user_email_address_id: None | str | Unset = UNSET + user_call_number_id: None | str | Unset = UNSET + user_sms_number_id: None | str | Unset = UNSET + user_device_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: enabled_contact_types = [] @@ -40,37 +42,37 @@ def to_dict(self) -> dict[str, Any]: enabled_contact_types_item: str = enabled_contact_types_item_data enabled_contact_types.append(enabled_contact_types_item) - delay: None | Unset | int + delay: int | None | Unset if isinstance(self.delay, Unset): delay = UNSET else: delay = self.delay - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - user_email_address_id: None | Unset | str + user_email_address_id: None | str | Unset if isinstance(self.user_email_address_id, Unset): user_email_address_id = UNSET else: user_email_address_id = self.user_email_address_id - user_call_number_id: None | Unset | str + user_call_number_id: None | str | Unset if isinstance(self.user_call_number_id, Unset): user_call_number_id = UNSET else: user_call_number_id = self.user_call_number_id - user_sms_number_id: None | Unset | str + user_sms_number_id: None | str | Unset if isinstance(self.user_sms_number_id, Unset): user_sms_number_id = UNSET else: user_sms_number_id = self.user_sms_number_id - user_device_id: None | Unset | str + user_device_id: None | str | Unset if isinstance(self.user_device_id, Unset): user_device_id = UNSET else: @@ -110,57 +112,57 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled_contact_types.append(enabled_contact_types_item) - def _parse_delay(data: object) -> None | Unset | int: + def _parse_delay(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) delay = _parse_delay(d.pop("delay", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_user_email_address_id(data: object) -> None | Unset | str: + def _parse_user_email_address_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_email_address_id = _parse_user_email_address_id(d.pop("user_email_address_id", UNSET)) - def _parse_user_call_number_id(data: object) -> None | Unset | str: + def _parse_user_call_number_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_call_number_id = _parse_user_call_number_id(d.pop("user_call_number_id", UNSET)) - def _parse_user_sms_number_id(data: object) -> None | Unset | str: + def _parse_user_sms_number_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_sms_number_id = _parse_user_sms_number_id(d.pop("user_sms_number_id", UNSET)) - def _parse_user_device_id(data: object) -> None | Unset | str: + def _parse_user_device_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_device_id = _parse_user_device_id(d.pop("user_device_id", UNSET)) diff --git a/rootly_sdk/models/new_user_phone_number.py b/rootly_sdk/models/new_user_phone_number.py index 807f540a..619a9bc9 100644 --- a/rootly_sdk/models/new_user_phone_number.py +++ b/rootly_sdk/models/new_user_phone_number.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewUserPhoneNumber: data (NewUserPhoneNumberData): """ - data: "NewUserPhoneNumberData" + data: NewUserPhoneNumberData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_user_phone_number_data.py b/rootly_sdk/models/new_user_phone_number_data.py index 84f944ed..f8594381 100644 --- a/rootly_sdk/models/new_user_phone_number_data.py +++ b/rootly_sdk/models/new_user_phone_number_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewUserPhoneNumberData: """ type_: NewUserPhoneNumberDataType - attributes: "NewUserPhoneNumberDataAttributes" + attributes: NewUserPhoneNumberDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_user_phone_number_data_attributes.py b/rootly_sdk/models/new_user_phone_number_data_attributes.py index b2c4f4c0..6e977204 100644 --- a/rootly_sdk/models/new_user_phone_number_data_attributes.py +++ b/rootly_sdk/models/new_user_phone_number_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/new_webhooks_endpoint.py b/rootly_sdk/models/new_webhooks_endpoint.py index 8be7c839..3c2e4976 100644 --- a/rootly_sdk/models/new_webhooks_endpoint.py +++ b/rootly_sdk/models/new_webhooks_endpoint.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWebhooksEndpoint: data (NewWebhooksEndpointData): """ - data: "NewWebhooksEndpointData" + data: NewWebhooksEndpointData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_webhooks_endpoint_data.py b/rootly_sdk/models/new_webhooks_endpoint_data.py index 8022924d..63c5b888 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewWebhooksEndpointData: """ type_: NewWebhooksEndpointDataType - attributes: "NewWebhooksEndpointDataAttributes" + attributes: NewWebhooksEndpointDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py index 02197461..d4e0e058 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,16 +20,16 @@ class NewWebhooksEndpointDataAttributes: Attributes: name (str): The name of the endpoint url (str): The URL of the endpoint. - secret (Union[Unset, str]): The webhook signing secret used to verify webhook requests. - event_types (Union[Unset, list[NewWebhooksEndpointDataAttributesEventTypesItem]]): - enabled (Union[Unset, bool]): + secret (str | Unset): The webhook signing secret used to verify webhook requests. + event_types (list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset): + enabled (bool | Unset): """ name: str url: str - secret: Unset | str = UNSET - event_types: Unset | list[NewWebhooksEndpointDataAttributesEventTypesItem] = UNSET - enabled: Unset | bool = UNSET + secret: str | Unset = UNSET + event_types: list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET + enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: secret = self.secret - event_types: Unset | list[str] = UNSET + event_types: list[str] | Unset = UNSET if not isinstance(self.event_types, Unset): event_types = [] for event_types_item_data in self.event_types: @@ -71,12 +73,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: secret = d.pop("secret", UNSET) - event_types = [] _event_types = d.pop("event_types", UNSET) - for event_types_item_data in _event_types or []: - event_types_item = check_new_webhooks_endpoint_data_attributes_event_types_item(event_types_item_data) + event_types: list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET + if _event_types is not UNSET: + event_types = [] + for event_types_item_data in _event_types: + event_types_item = check_new_webhooks_endpoint_data_attributes_event_types_item(event_types_item_data) - event_types.append(event_types_item) + event_types.append(event_types_item) enabled = d.pop("enabled", UNSET) diff --git a/rootly_sdk/models/new_workflow.py b/rootly_sdk/models/new_workflow.py index a81bad47..b425b0f9 100644 --- a/rootly_sdk/models/new_workflow.py +++ b/rootly_sdk/models/new_workflow.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWorkflow: data (NewWorkflowData): """ - data: "NewWorkflowData" + data: NewWorkflowData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_custom_field_selection.py b/rootly_sdk/models/new_workflow_custom_field_selection.py index cd9250c3..72ba1344 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWorkflowCustomFieldSelection: data (NewWorkflowCustomFieldSelectionData): """ - data: "NewWorkflowCustomFieldSelectionData" + data: NewWorkflowCustomFieldSelectionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_custom_field_selection_data.py b/rootly_sdk/models/new_workflow_custom_field_selection_data.py index 6c4e4d0b..170d0090 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class NewWorkflowCustomFieldSelectionData: """ type_: NewWorkflowCustomFieldSelectionDataType - attributes: "NewWorkflowCustomFieldSelectionDataAttributes" + attributes: NewWorkflowCustomFieldSelectionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_custom_field_selection_data_attributes.py b/rootly_sdk/models/new_workflow_custom_field_selection_data_attributes.py index 00110ee1..fecb492e 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection_data_attributes.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,16 +21,16 @@ class NewWorkflowCustomFieldSelectionDataAttributes: custom_field_id (int): The custom field for this selection incident_condition (NewWorkflowCustomFieldSelectionDataAttributesIncidentCondition): The trigger condition Default: 'ANY'. - workflow_id (Union[Unset, str]): The workflow for this selection - values (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[int]]): + workflow_id (str | Unset): The workflow for this selection + values (list[str] | Unset): + selected_option_ids (list[int] | Unset): """ custom_field_id: int incident_condition: NewWorkflowCustomFieldSelectionDataAttributesIncidentCondition = "ANY" - workflow_id: Unset | str = UNSET - values: Unset | list[str] = UNSET - selected_option_ids: Unset | list[int] = UNSET + workflow_id: str | Unset = UNSET + values: list[str] | Unset = UNSET + selected_option_ids: list[int] | Unset = UNSET def to_dict(self) -> dict[str, Any]: custom_field_id = self.custom_field_id @@ -37,11 +39,11 @@ def to_dict(self) -> dict[str, Any]: workflow_id = self.workflow_id - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values - selected_option_ids: Unset | list[int] = UNSET + selected_option_ids: list[int] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids diff --git a/rootly_sdk/models/new_workflow_data.py b/rootly_sdk/models/new_workflow_data.py index a9a027ed..6ba3ef1b 100644 --- a/rootly_sdk/models/new_workflow_data.py +++ b/rootly_sdk/models/new_workflow_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewWorkflowData: """ type_: NewWorkflowDataType - attributes: "NewWorkflowDataAttributes" + attributes: NewWorkflowDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_data_attributes.py b/rootly_sdk/models/new_workflow_data_attributes.py index e9048fa5..8badb4d0 100644 --- a/rootly_sdk/models/new_workflow_data_attributes.py +++ b/rootly_sdk/models/new_workflow_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -29,69 +31,69 @@ class NewWorkflowDataAttributes: """ Attributes: name (str): The title of the workflow - description (Union[None, Unset, str]): The description of the workflow - command (Union[None, Unset, str]): Workflow command - command_feedback_enabled (Union[None, Unset, bool]): This will notify you back when the workflow is starting - wait (Union[None, Unset, str]): Wait this duration before executing - priority (Union[Unset, NewWorkflowDataAttributesPriority]): Priority - repeat_every_duration (Union[None, Unset, str]): Repeat workflow every duration - repeat_condition_duration_since_first_run (Union[None, Unset, str]): The workflow will stop repeating if its - runtime since it's first workflow run exceeds the duration set in this field - repeat_condition_number_of_repeats (Union[Unset, int]): The workflow will stop repeating if the number of - repeats exceeds the value set in this field - continuously_repeat (Union[Unset, bool]): When continuously repeat is true, repeat workflows aren't - automatically stopped when conditions aren't met. This setting won't override your conditions set by + description (None | str | Unset): The description of the workflow + command (None | str | Unset): Workflow command + command_feedback_enabled (bool | None | Unset): This will notify you back when the workflow is starting + wait (None | str | Unset): Wait this duration before executing + priority (NewWorkflowDataAttributesPriority | Unset): Priority + repeat_every_duration (None | str | Unset): Repeat workflow every duration + repeat_condition_duration_since_first_run (None | str | Unset): The workflow will stop repeating if its runtime + since it's first workflow run exceeds the duration set in this field + repeat_condition_number_of_repeats (int | Unset): The workflow will stop repeating if the number of repeats + exceeds the value set in this field + continuously_repeat (bool | Unset): When continuously repeat is true, repeat workflows aren't automatically + stopped when conditions aren't met. This setting won't override your conditions set by repeat_condition_duration_since_first_run and repeat_condition_number_of_repeats parameters. - repeat_on (Union[Unset, list[NewWorkflowDataAttributesRepeatOnItem]]): - enabled (Union[Unset, bool]): - locked (Union[Unset, bool]): Restricts workflow edits to admins when turned on. Only admins can set this field. - position (Union[Unset, int]): The order which the workflow should run with other workflows. - workflow_group_id (Union[None, Unset, str]): The group this workflow belongs to. - trigger_params (Union['ActionItemTriggerParams', 'AlertTriggerParams', 'IncidentTriggerParams', - 'PulseTriggerParams', 'SimpleTriggerParams', Unset]): - environment_ids (Union[Unset, list[str]]): - severity_ids (Union[Unset, list[str]]): - incident_type_ids (Union[Unset, list[str]]): - incident_role_ids (Union[Unset, list[str]]): - service_ids (Union[Unset, list[str]]): - functionality_ids (Union[Unset, list[str]]): - group_ids (Union[Unset, list[str]]): - cause_ids (Union[Unset, list[str]]): - sub_status_ids (Union[Unset, list[str]]): + repeat_on (list[NewWorkflowDataAttributesRepeatOnItem] | Unset): + enabled (bool | Unset): + locked (bool | Unset): Restricts workflow edits to admins when turned on. Only admins can set this field. + position (int | Unset): The order which the workflow should run with other workflows. + workflow_group_id (None | str | Unset): The group this workflow belongs to. + trigger_params (ActionItemTriggerParams | AlertTriggerParams | IncidentTriggerParams | PulseTriggerParams | + SimpleTriggerParams | Unset): + environment_ids (list[str] | Unset): + severity_ids (list[str] | Unset): + incident_type_ids (list[str] | Unset): + incident_role_ids (list[str] | Unset): + service_ids (list[str] | Unset): + functionality_ids (list[str] | Unset): + group_ids (list[str] | Unset): + cause_ids (list[str] | Unset): + sub_status_ids (list[str] | Unset): """ name: str - description: None | Unset | str = UNSET - command: None | Unset | str = UNSET - command_feedback_enabled: None | Unset | bool = UNSET - wait: None | Unset | str = UNSET - priority: Unset | NewWorkflowDataAttributesPriority = UNSET - repeat_every_duration: None | Unset | str = UNSET - repeat_condition_duration_since_first_run: None | Unset | str = UNSET - repeat_condition_number_of_repeats: Unset | int = UNSET - continuously_repeat: Unset | bool = UNSET - repeat_on: Unset | list[NewWorkflowDataAttributesRepeatOnItem] = UNSET - enabled: Unset | bool = UNSET - locked: Unset | bool = UNSET - position: Unset | int = UNSET - workflow_group_id: None | Unset | str = UNSET - trigger_params: Union[ - "ActionItemTriggerParams", - "AlertTriggerParams", - "IncidentTriggerParams", - "PulseTriggerParams", - "SimpleTriggerParams", - Unset, - ] = UNSET - environment_ids: Unset | list[str] = UNSET - severity_ids: Unset | list[str] = UNSET - incident_type_ids: Unset | list[str] = UNSET - incident_role_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - group_ids: Unset | list[str] = UNSET - cause_ids: Unset | list[str] = UNSET - sub_status_ids: Unset | list[str] = UNSET + description: None | str | Unset = UNSET + command: None | str | Unset = UNSET + command_feedback_enabled: bool | None | Unset = UNSET + wait: None | str | Unset = UNSET + priority: NewWorkflowDataAttributesPriority | Unset = UNSET + repeat_every_duration: None | str | Unset = UNSET + repeat_condition_duration_since_first_run: None | str | Unset = UNSET + repeat_condition_number_of_repeats: int | Unset = UNSET + continuously_repeat: bool | Unset = UNSET + repeat_on: list[NewWorkflowDataAttributesRepeatOnItem] | Unset = UNSET + enabled: bool | Unset = UNSET + locked: bool | Unset = UNSET + position: int | Unset = UNSET + workflow_group_id: None | str | Unset = UNSET + trigger_params: ( + ActionItemTriggerParams + | AlertTriggerParams + | IncidentTriggerParams + | PulseTriggerParams + | SimpleTriggerParams + | Unset + ) = UNSET + environment_ids: list[str] | Unset = UNSET + severity_ids: list[str] | Unset = UNSET + incident_type_ids: list[str] | Unset = UNSET + incident_role_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + group_ids: list[str] | Unset = UNSET + cause_ids: list[str] | Unset = UNSET + sub_status_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.action_item_trigger_params import ActionItemTriggerParams @@ -101,41 +103,41 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - command: None | Unset | str + command: None | str | Unset if isinstance(self.command, Unset): command = UNSET else: command = self.command - command_feedback_enabled: None | Unset | bool + command_feedback_enabled: bool | None | Unset if isinstance(self.command_feedback_enabled, Unset): command_feedback_enabled = UNSET else: command_feedback_enabled = self.command_feedback_enabled - wait: None | Unset | str + wait: None | str | Unset if isinstance(self.wait, Unset): wait = UNSET else: wait = self.wait - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority - repeat_every_duration: None | Unset | str + repeat_every_duration: None | str | Unset if isinstance(self.repeat_every_duration, Unset): repeat_every_duration = UNSET else: repeat_every_duration = self.repeat_every_duration - repeat_condition_duration_since_first_run: None | Unset | str + repeat_condition_duration_since_first_run: None | str | Unset if isinstance(self.repeat_condition_duration_since_first_run, Unset): repeat_condition_duration_since_first_run = UNSET else: @@ -145,7 +147,7 @@ def to_dict(self) -> dict[str, Any]: continuously_repeat = self.continuously_repeat - repeat_on: Unset | list[str] = UNSET + repeat_on: list[str] | Unset = UNSET if not isinstance(self.repeat_on, Unset): repeat_on = [] for repeat_on_item_data in self.repeat_on: @@ -158,13 +160,13 @@ def to_dict(self) -> dict[str, Any]: position = self.position - workflow_group_id: None | Unset | str + workflow_group_id: None | str | Unset if isinstance(self.workflow_group_id, Unset): workflow_group_id = UNSET else: workflow_group_id = self.workflow_group_id - trigger_params: Unset | dict[str, Any] + trigger_params: dict[str, Any] | Unset if isinstance(self.trigger_params, Unset): trigger_params = UNSET elif isinstance(self.trigger_params, IncidentTriggerParams): @@ -178,39 +180,39 @@ def to_dict(self) -> dict[str, Any]: else: trigger_params = self.trigger_params.to_dict() - environment_ids: Unset | list[str] = UNSET + environment_ids: list[str] | Unset = UNSET if not isinstance(self.environment_ids, Unset): environment_ids = self.environment_ids - severity_ids: Unset | list[str] = UNSET + severity_ids: list[str] | Unset = UNSET if not isinstance(self.severity_ids, Unset): severity_ids = self.severity_ids - incident_type_ids: Unset | list[str] = UNSET + incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.incident_type_ids, Unset): incident_type_ids = self.incident_type_ids - incident_role_ids: Unset | list[str] = UNSET + incident_role_ids: list[str] | Unset = UNSET if not isinstance(self.incident_role_ids, Unset): incident_role_ids = self.incident_role_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids - cause_ids: Unset | list[str] = UNSET + cause_ids: list[str] | Unset = UNSET if not isinstance(self.cause_ids, Unset): cause_ids = self.cause_ids - sub_status_ids: Unset | list[str] = UNSET + sub_status_ids: list[str] | Unset = UNSET if not isinstance(self.sub_status_ids, Unset): sub_status_ids = self.sub_status_ids @@ -283,64 +285,64 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_command(data: object) -> None | Unset | str: + def _parse_command(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) command = _parse_command(d.pop("command", UNSET)) - def _parse_command_feedback_enabled(data: object) -> None | Unset | bool: + def _parse_command_feedback_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) command_feedback_enabled = _parse_command_feedback_enabled(d.pop("command_feedback_enabled", UNSET)) - def _parse_wait(data: object) -> None | Unset | str: + def _parse_wait(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) wait = _parse_wait(d.pop("wait", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | NewWorkflowDataAttributesPriority + priority: NewWorkflowDataAttributesPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = check_new_workflow_data_attributes_priority(_priority) - def _parse_repeat_every_duration(data: object) -> None | Unset | str: + def _parse_repeat_every_duration(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) repeat_every_duration = _parse_repeat_every_duration(d.pop("repeat_every_duration", UNSET)) - def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Unset | str: + def _parse_repeat_condition_duration_since_first_run(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) repeat_condition_duration_since_first_run = _parse_repeat_condition_duration_since_first_run( d.pop("repeat_condition_duration_since_first_run", UNSET) @@ -350,12 +352,14 @@ def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Uns continuously_repeat = d.pop("continuously_repeat", UNSET) - repeat_on = [] _repeat_on = d.pop("repeat_on", UNSET) - for repeat_on_item_data in _repeat_on or []: - repeat_on_item = check_new_workflow_data_attributes_repeat_on_item(repeat_on_item_data) + repeat_on: list[NewWorkflowDataAttributesRepeatOnItem] | Unset = UNSET + if _repeat_on is not UNSET: + repeat_on = [] + for repeat_on_item_data in _repeat_on: + repeat_on_item = check_new_workflow_data_attributes_repeat_on_item(repeat_on_item_data) - repeat_on.append(repeat_on_item) + repeat_on.append(repeat_on_item) enabled = d.pop("enabled", UNSET) @@ -363,25 +367,25 @@ def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Uns position = d.pop("position", UNSET) - def _parse_workflow_group_id(data: object) -> None | Unset | str: + def _parse_workflow_group_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) workflow_group_id = _parse_workflow_group_id(d.pop("workflow_group_id", UNSET)) def _parse_trigger_params( data: object, - ) -> Union[ - "ActionItemTriggerParams", - "AlertTriggerParams", - "IncidentTriggerParams", - "PulseTriggerParams", - "SimpleTriggerParams", - Unset, - ]: + ) -> ( + ActionItemTriggerParams + | AlertTriggerParams + | IncidentTriggerParams + | PulseTriggerParams + | SimpleTriggerParams + | Unset + ): if isinstance(data, Unset): return data try: @@ -390,7 +394,7 @@ def _parse_trigger_params( trigger_params_type_0 = IncidentTriggerParams.from_dict(data) return trigger_params_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -398,7 +402,7 @@ def _parse_trigger_params( trigger_params_type_1 = ActionItemTriggerParams.from_dict(data) return trigger_params_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -406,7 +410,7 @@ def _parse_trigger_params( trigger_params_type_2 = AlertTriggerParams.from_dict(data) return trigger_params_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -414,7 +418,7 @@ def _parse_trigger_params( trigger_params_type_3 = PulseTriggerParams.from_dict(data) return trigger_params_type_3 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/new_workflow_form_field_condition.py b/rootly_sdk/models/new_workflow_form_field_condition.py index 37f162dc..774c79b3 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition.py +++ b/rootly_sdk/models/new_workflow_form_field_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWorkflowFormFieldCondition: data (NewWorkflowFormFieldConditionData): """ - data: "NewWorkflowFormFieldConditionData" + data: NewWorkflowFormFieldConditionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_form_field_condition_data.py b/rootly_sdk/models/new_workflow_form_field_condition_data.py index f5fef4a1..3e2578eb 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/new_workflow_form_field_condition_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class NewWorkflowFormFieldConditionData: """ type_: NewWorkflowFormFieldConditionDataType - attributes: "NewWorkflowFormFieldConditionDataAttributes" + attributes: NewWorkflowFormFieldConditionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_form_field_condition_data_attributes.py b/rootly_sdk/models/new_workflow_form_field_condition_data_attributes.py index b07a145f..5c662698 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition_data_attributes.py +++ b/rootly_sdk/models/new_workflow_form_field_condition_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,32 +21,32 @@ class NewWorkflowFormFieldConditionDataAttributes: form_field_id (str): The custom field for this condition incident_condition (NewWorkflowFormFieldConditionDataAttributesIncidentCondition): The trigger condition Default: 'ANY'. - workflow_id (Union[Unset, str]): The workflow for this condition - values (Union[Unset, list[str]]): - selected_catalog_entity_ids (Union[Unset, list[str]]): - selected_functionality_ids (Union[Unset, list[str]]): - selected_group_ids (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[str]]): - selected_service_ids (Union[Unset, list[str]]): - selected_user_ids (Union[Unset, list[int]]): - selected_cause_ids (Union[Unset, list[str]]): - selected_environment_ids (Union[Unset, list[str]]): - selected_incident_type_ids (Union[Unset, list[str]]): + workflow_id (str | Unset): The workflow for this condition + values (list[str] | Unset): + selected_catalog_entity_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_cause_ids (list[str] | Unset): + selected_environment_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): """ form_field_id: str incident_condition: NewWorkflowFormFieldConditionDataAttributesIncidentCondition = "ANY" - workflow_id: Unset | str = UNSET - values: Unset | list[str] = UNSET - selected_catalog_entity_ids: Unset | list[str] = UNSET - selected_functionality_ids: Unset | list[str] = UNSET - selected_group_ids: Unset | list[str] = UNSET - selected_option_ids: Unset | list[str] = UNSET - selected_service_ids: Unset | list[str] = UNSET - selected_user_ids: Unset | list[int] = UNSET - selected_cause_ids: Unset | list[str] = UNSET - selected_environment_ids: Unset | list[str] = UNSET - selected_incident_type_ids: Unset | list[str] = UNSET + workflow_id: str | Unset = UNSET + values: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: form_field_id = self.form_field_id @@ -53,43 +55,43 @@ def to_dict(self) -> dict[str, Any]: workflow_id = self.workflow_id - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values - selected_catalog_entity_ids: Unset | list[str] = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET if not isinstance(self.selected_catalog_entity_ids, Unset): selected_catalog_entity_ids = self.selected_catalog_entity_ids - selected_functionality_ids: Unset | list[str] = UNSET + selected_functionality_ids: list[str] | Unset = UNSET if not isinstance(self.selected_functionality_ids, Unset): selected_functionality_ids = self.selected_functionality_ids - selected_group_ids: Unset | list[str] = UNSET + selected_group_ids: list[str] | Unset = UNSET if not isinstance(self.selected_group_ids, Unset): selected_group_ids = self.selected_group_ids - selected_option_ids: Unset | list[str] = UNSET + selected_option_ids: list[str] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids - selected_service_ids: Unset | list[str] = UNSET + selected_service_ids: list[str] | Unset = UNSET if not isinstance(self.selected_service_ids, Unset): selected_service_ids = self.selected_service_ids - selected_user_ids: Unset | list[int] = UNSET + selected_user_ids: list[int] | Unset = UNSET if not isinstance(self.selected_user_ids, Unset): selected_user_ids = self.selected_user_ids - selected_cause_ids: Unset | list[str] = UNSET + selected_cause_ids: list[str] | Unset = UNSET if not isinstance(self.selected_cause_ids, Unset): selected_cause_ids = self.selected_cause_ids - selected_environment_ids: Unset | list[str] = UNSET + selected_environment_ids: list[str] | Unset = UNSET if not isinstance(self.selected_environment_ids, Unset): selected_environment_ids = self.selected_environment_ids - selected_incident_type_ids: Unset | list[str] = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.selected_incident_type_ids, Unset): selected_incident_type_ids = self.selected_incident_type_ids diff --git a/rootly_sdk/models/new_workflow_group.py b/rootly_sdk/models/new_workflow_group.py index bbfbb047..bb41aa39 100644 --- a/rootly_sdk/models/new_workflow_group.py +++ b/rootly_sdk/models/new_workflow_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWorkflowGroup: data (NewWorkflowGroupData): """ - data: "NewWorkflowGroupData" + data: NewWorkflowGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_group_data.py b/rootly_sdk/models/new_workflow_group_data.py index 5f6b9600..9325f311 100644 --- a/rootly_sdk/models/new_workflow_group_data.py +++ b/rootly_sdk/models/new_workflow_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewWorkflowGroupData: """ type_: NewWorkflowGroupDataType - attributes: "NewWorkflowGroupDataAttributes" + attributes: NewWorkflowGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_group_data_attributes.py b/rootly_sdk/models/new_workflow_group_data_attributes.py index 4b56d6cf..29d5a22d 100644 --- a/rootly_sdk/models/new_workflow_group_data_attributes.py +++ b/rootly_sdk/models/new_workflow_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,29 +20,29 @@ class NewWorkflowGroupDataAttributes: """ Attributes: name (str): The name of the workflow group. - kind (Union[Unset, NewWorkflowGroupDataAttributesKind]): The kind of the workflow group - description (Union[None, Unset, str]): A description of the workflow group. - icon (Union[Unset, str]): An emoji icon displayed next to the workflow group. - expanded (Union[Unset, bool]): Whether the group is expanded or collapsed. - position (Union[Unset, int]): The position of the workflow group + kind (NewWorkflowGroupDataAttributesKind | Unset): The kind of the workflow group + description (None | str | Unset): A description of the workflow group. + icon (str | Unset): An emoji icon displayed next to the workflow group. + expanded (bool | Unset): Whether the group is expanded or collapsed. + position (int | Unset): The position of the workflow group """ name: str - kind: Unset | NewWorkflowGroupDataAttributesKind = UNSET - description: None | Unset | str = UNSET - icon: Unset | str = UNSET - expanded: Unset | bool = UNSET - position: Unset | int = UNSET + kind: NewWorkflowGroupDataAttributesKind | Unset = UNSET + description: None | str | Unset = UNSET + icon: str | Unset = UNSET + expanded: bool | Unset = UNSET + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -78,18 +80,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") _kind = d.pop("kind", UNSET) - kind: Unset | NewWorkflowGroupDataAttributesKind + kind: NewWorkflowGroupDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_new_workflow_group_data_attributes_kind(_kind) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/new_workflow_run.py b/rootly_sdk/models/new_workflow_run.py index 877a070c..86601dd8 100644 --- a/rootly_sdk/models/new_workflow_run.py +++ b/rootly_sdk/models/new_workflow_run.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWorkflowRun: data (NewWorkflowRunData): """ - data: "NewWorkflowRunData" + data: NewWorkflowRunData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_run_data.py b/rootly_sdk/models/new_workflow_run_data.py index 3d35b9ab..6f30cb5c 100644 --- a/rootly_sdk/models/new_workflow_run_data.py +++ b/rootly_sdk/models/new_workflow_run_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,20 +25,20 @@ class NewWorkflowRunData: """ Attributes: type_ (NewWorkflowRunDataType): - attributes (Union['NewWorkflowRunDataAttributesType0', 'NewWorkflowRunDataAttributesType1', - 'NewWorkflowRunDataAttributesType2', 'NewWorkflowRunDataAttributesType3', 'NewWorkflowRunDataAttributesType4', - 'NewWorkflowRunDataAttributesType5']): + attributes (NewWorkflowRunDataAttributesType0 | NewWorkflowRunDataAttributesType1 | + NewWorkflowRunDataAttributesType2 | NewWorkflowRunDataAttributesType3 | NewWorkflowRunDataAttributesType4 | + NewWorkflowRunDataAttributesType5): """ type_: NewWorkflowRunDataType - attributes: Union[ - "NewWorkflowRunDataAttributesType0", - "NewWorkflowRunDataAttributesType1", - "NewWorkflowRunDataAttributesType2", - "NewWorkflowRunDataAttributesType3", - "NewWorkflowRunDataAttributesType4", - "NewWorkflowRunDataAttributesType5", - ] + attributes: ( + NewWorkflowRunDataAttributesType0 + | NewWorkflowRunDataAttributesType1 + | NewWorkflowRunDataAttributesType2 + | NewWorkflowRunDataAttributesType3 + | NewWorkflowRunDataAttributesType4 + | NewWorkflowRunDataAttributesType5 + ) additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -87,21 +89,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_attributes( data: object, - ) -> Union[ - "NewWorkflowRunDataAttributesType0", - "NewWorkflowRunDataAttributesType1", - "NewWorkflowRunDataAttributesType2", - "NewWorkflowRunDataAttributesType3", - "NewWorkflowRunDataAttributesType4", - "NewWorkflowRunDataAttributesType5", - ]: + ) -> ( + NewWorkflowRunDataAttributesType0 + | NewWorkflowRunDataAttributesType1 + | NewWorkflowRunDataAttributesType2 + | NewWorkflowRunDataAttributesType3 + | NewWorkflowRunDataAttributesType4 + | NewWorkflowRunDataAttributesType5 + ): try: if not isinstance(data, dict): raise TypeError() attributes_type_0 = NewWorkflowRunDataAttributesType0.from_dict(data) return attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -109,7 +111,7 @@ def _parse_attributes( attributes_type_1 = NewWorkflowRunDataAttributesType1.from_dict(data) return attributes_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -117,7 +119,7 @@ def _parse_attributes( attributes_type_2 = NewWorkflowRunDataAttributesType2.from_dict(data) return attributes_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -125,7 +127,7 @@ def _parse_attributes( attributes_type_3 = NewWorkflowRunDataAttributesType3.from_dict(data) return attributes_type_3 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -133,7 +135,7 @@ def _parse_attributes( attributes_type_4 = NewWorkflowRunDataAttributesType4.from_dict(data) return attributes_type_4 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py index ae4f183a..08d05bd7 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_0.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,32 +19,32 @@ class NewWorkflowRunDataAttributesType0: """ Attributes: - immediate (Union[None, Unset, bool]): If false, this will respect wait time configured on the workflow. Default: + immediate (bool | None | Unset): If false, this will respect wait time configured on the workflow. Default: True. - check_conditions (Union[None, Unset, bool]): If true, this will check conditions. If conditions are not - satisfied the run will not be created. Default: False. - context (Union[Unset, NewWorkflowRunDataAttributesType0Context]): + check_conditions (bool | None | Unset): If true, this will check conditions. If conditions are not satisfied the + run will not be created. Default: False. + context (NewWorkflowRunDataAttributesType0Context | Unset): """ - immediate: None | Unset | bool = True - check_conditions: None | Unset | bool = False - context: Union[Unset, "NewWorkflowRunDataAttributesType0Context"] = UNSET + immediate: bool | None | Unset = True + check_conditions: bool | None | Unset = False + context: NewWorkflowRunDataAttributesType0Context | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - immediate: None | Unset | bool + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET else: immediate = self.immediate - check_conditions: None | Unset | bool + check_conditions: bool | None | Unset if isinstance(self.check_conditions, Unset): check_conditions = UNSET else: check_conditions = self.check_conditions - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -64,26 +66,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_immediate(data: object) -> None | Unset | bool: + def _parse_immediate(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) immediate = _parse_immediate(d.pop("immediate", UNSET)) - def _parse_check_conditions(data: object) -> None | Unset | bool: + def _parse_check_conditions(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) check_conditions = _parse_check_conditions(d.pop("check_conditions", UNSET)) _context = d.pop("context", UNSET) - context: Unset | NewWorkflowRunDataAttributesType0Context + context: NewWorkflowRunDataAttributesType0Context | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_0_context.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_0_context.py index 14da9532..9bce16b4 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_0_context.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_0_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewWorkflowRunDataAttributesType0Context: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py index 6c0a8724..6111792e 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_1.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,35 +20,34 @@ class NewWorkflowRunDataAttributesType1: """ Attributes: incident_id (str): - immediate (Union[None, Unset, bool]): If false, this will respect wait time configured on the workflow Default: - True. - check_conditions (Union[None, Unset, bool]): If true, this will check conditions. If conditions are not - satisfied the run will not be created Default: False. - context (Union[Unset, NewWorkflowRunDataAttributesType1Context]): + immediate (bool | None | Unset): If false, this will respect wait time configured on the workflow Default: True. + check_conditions (bool | None | Unset): If true, this will check conditions. If conditions are not satisfied the + run will not be created Default: False. + context (NewWorkflowRunDataAttributesType1Context | Unset): """ incident_id: str - immediate: None | Unset | bool = True - check_conditions: None | Unset | bool = False - context: Union[Unset, "NewWorkflowRunDataAttributesType1Context"] = UNSET + immediate: bool | None | Unset = True + check_conditions: bool | None | Unset = False + context: NewWorkflowRunDataAttributesType1Context | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: incident_id = self.incident_id - immediate: None | Unset | bool + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET else: immediate = self.immediate - check_conditions: None | Unset | bool + check_conditions: bool | None | Unset if isinstance(self.check_conditions, Unset): check_conditions = UNSET else: check_conditions = self.check_conditions - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -73,26 +74,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) incident_id = d.pop("incident_id") - def _parse_immediate(data: object) -> None | Unset | bool: + def _parse_immediate(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) immediate = _parse_immediate(d.pop("immediate", UNSET)) - def _parse_check_conditions(data: object) -> None | Unset | bool: + def _parse_check_conditions(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) check_conditions = _parse_check_conditions(d.pop("check_conditions", UNSET)) _context = d.pop("context", UNSET) - context: Unset | NewWorkflowRunDataAttributesType1Context + context: NewWorkflowRunDataAttributesType1Context | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_1_context.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_1_context.py index eaaac054..20304b26 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_1_context.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_1_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewWorkflowRunDataAttributesType1Context: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py index eaefbd9c..7344a64d 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_2.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,35 +20,34 @@ class NewWorkflowRunDataAttributesType2: """ Attributes: post_mortem_id (str): - immediate (Union[None, Unset, bool]): If false, this will respect wait time configured on the workflow Default: - True. - check_conditions (Union[None, Unset, bool]): If true, this will check conditions. If conditions are not - satisfied the run will not be created Default: False. - context (Union[Unset, NewWorkflowRunDataAttributesType2Context]): + immediate (bool | None | Unset): If false, this will respect wait time configured on the workflow Default: True. + check_conditions (bool | None | Unset): If true, this will check conditions. If conditions are not satisfied the + run will not be created Default: False. + context (NewWorkflowRunDataAttributesType2Context | Unset): """ post_mortem_id: str - immediate: None | Unset | bool = True - check_conditions: None | Unset | bool = False - context: Union[Unset, "NewWorkflowRunDataAttributesType2Context"] = UNSET + immediate: bool | None | Unset = True + check_conditions: bool | None | Unset = False + context: NewWorkflowRunDataAttributesType2Context | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: post_mortem_id = self.post_mortem_id - immediate: None | Unset | bool + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET else: immediate = self.immediate - check_conditions: None | Unset | bool + check_conditions: bool | None | Unset if isinstance(self.check_conditions, Unset): check_conditions = UNSET else: check_conditions = self.check_conditions - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -73,26 +74,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) post_mortem_id = d.pop("post_mortem_id") - def _parse_immediate(data: object) -> None | Unset | bool: + def _parse_immediate(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) immediate = _parse_immediate(d.pop("immediate", UNSET)) - def _parse_check_conditions(data: object) -> None | Unset | bool: + def _parse_check_conditions(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) check_conditions = _parse_check_conditions(d.pop("check_conditions", UNSET)) _context = d.pop("context", UNSET) - context: Unset | NewWorkflowRunDataAttributesType2Context + context: NewWorkflowRunDataAttributesType2Context | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_2_context.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_2_context.py index 70834bdd..739fa7bc 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_2_context.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_2_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewWorkflowRunDataAttributesType2Context: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py index 42aa6168..9b25708a 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_3.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,35 +20,34 @@ class NewWorkflowRunDataAttributesType3: """ Attributes: action_item_id (str): - immediate (Union[None, Unset, bool]): If false, this will respect wait time configured on the workflow Default: - True. - check_conditions (Union[None, Unset, bool]): If true, this will check conditions. If conditions are not - satisfied the run will not be created Default: False. - context (Union[Unset, NewWorkflowRunDataAttributesType3Context]): + immediate (bool | None | Unset): If false, this will respect wait time configured on the workflow Default: True. + check_conditions (bool | None | Unset): If true, this will check conditions. If conditions are not satisfied the + run will not be created Default: False. + context (NewWorkflowRunDataAttributesType3Context | Unset): """ action_item_id: str - immediate: None | Unset | bool = True - check_conditions: None | Unset | bool = False - context: Union[Unset, "NewWorkflowRunDataAttributesType3Context"] = UNSET + immediate: bool | None | Unset = True + check_conditions: bool | None | Unset = False + context: NewWorkflowRunDataAttributesType3Context | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: action_item_id = self.action_item_id - immediate: None | Unset | bool + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET else: immediate = self.immediate - check_conditions: None | Unset | bool + check_conditions: bool | None | Unset if isinstance(self.check_conditions, Unset): check_conditions = UNSET else: check_conditions = self.check_conditions - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -73,26 +74,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) action_item_id = d.pop("action_item_id") - def _parse_immediate(data: object) -> None | Unset | bool: + def _parse_immediate(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) immediate = _parse_immediate(d.pop("immediate", UNSET)) - def _parse_check_conditions(data: object) -> None | Unset | bool: + def _parse_check_conditions(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) check_conditions = _parse_check_conditions(d.pop("check_conditions", UNSET)) _context = d.pop("context", UNSET) - context: Unset | NewWorkflowRunDataAttributesType3Context + context: NewWorkflowRunDataAttributesType3Context | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_3_context.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_3_context.py index dd12425a..25eabc0f 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_3_context.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_3_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewWorkflowRunDataAttributesType3Context: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py index 7fecfc0a..a01ead3d 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_4.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,35 +20,34 @@ class NewWorkflowRunDataAttributesType4: """ Attributes: alert_id (str): - immediate (Union[None, Unset, bool]): If false, this will respect wait time configured on the workflow Default: - True. - check_conditions (Union[None, Unset, bool]): If true, this will check conditions. If conditions are not - satisfied the run will not be created Default: False. - context (Union[Unset, NewWorkflowRunDataAttributesType4Context]): + immediate (bool | None | Unset): If false, this will respect wait time configured on the workflow Default: True. + check_conditions (bool | None | Unset): If true, this will check conditions. If conditions are not satisfied the + run will not be created Default: False. + context (NewWorkflowRunDataAttributesType4Context | Unset): """ alert_id: str - immediate: None | Unset | bool = True - check_conditions: None | Unset | bool = False - context: Union[Unset, "NewWorkflowRunDataAttributesType4Context"] = UNSET + immediate: bool | None | Unset = True + check_conditions: bool | None | Unset = False + context: NewWorkflowRunDataAttributesType4Context | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: alert_id = self.alert_id - immediate: None | Unset | bool + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET else: immediate = self.immediate - check_conditions: None | Unset | bool + check_conditions: bool | None | Unset if isinstance(self.check_conditions, Unset): check_conditions = UNSET else: check_conditions = self.check_conditions - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -73,26 +74,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) alert_id = d.pop("alert_id") - def _parse_immediate(data: object) -> None | Unset | bool: + def _parse_immediate(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) immediate = _parse_immediate(d.pop("immediate", UNSET)) - def _parse_check_conditions(data: object) -> None | Unset | bool: + def _parse_check_conditions(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) check_conditions = _parse_check_conditions(d.pop("check_conditions", UNSET)) _context = d.pop("context", UNSET) - context: Unset | NewWorkflowRunDataAttributesType4Context + context: NewWorkflowRunDataAttributesType4Context | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_4_context.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_4_context.py index c29a13ef..8c969b82 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_4_context.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_4_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewWorkflowRunDataAttributesType4Context: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py index 047f5885..678f16da 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_5.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,35 +20,34 @@ class NewWorkflowRunDataAttributesType5: """ Attributes: pulse_id (str): - immediate (Union[None, Unset, bool]): If false, this will respect wait time configured on the workflow Default: - True. - check_conditions (Union[None, Unset, bool]): If true, this will check conditions. If conditions are not - satisfied the run will not be created Default: False. - context (Union[Unset, NewWorkflowRunDataAttributesType5Context]): + immediate (bool | None | Unset): If false, this will respect wait time configured on the workflow Default: True. + check_conditions (bool | None | Unset): If true, this will check conditions. If conditions are not satisfied the + run will not be created Default: False. + context (NewWorkflowRunDataAttributesType5Context | Unset): """ pulse_id: str - immediate: None | Unset | bool = True - check_conditions: None | Unset | bool = False - context: Union[Unset, "NewWorkflowRunDataAttributesType5Context"] = UNSET + immediate: bool | None | Unset = True + check_conditions: bool | None | Unset = False + context: NewWorkflowRunDataAttributesType5Context | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: pulse_id = self.pulse_id - immediate: None | Unset | bool + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET else: immediate = self.immediate - check_conditions: None | Unset | bool + check_conditions: bool | None | Unset if isinstance(self.check_conditions, Unset): check_conditions = UNSET else: check_conditions = self.check_conditions - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -73,26 +74,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) pulse_id = d.pop("pulse_id") - def _parse_immediate(data: object) -> None | Unset | bool: + def _parse_immediate(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) immediate = _parse_immediate(d.pop("immediate", UNSET)) - def _parse_check_conditions(data: object) -> None | Unset | bool: + def _parse_check_conditions(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) check_conditions = _parse_check_conditions(d.pop("check_conditions", UNSET)) _context = d.pop("context", UNSET) - context: Unset | NewWorkflowRunDataAttributesType5Context + context: NewWorkflowRunDataAttributesType5Context | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/new_workflow_run_data_attributes_type_5_context.py b/rootly_sdk/models/new_workflow_run_data_attributes_type_5_context.py index d0be7a1e..02e65077 100644 --- a/rootly_sdk/models/new_workflow_run_data_attributes_type_5_context.py +++ b/rootly_sdk/models/new_workflow_run_data_attributes_type_5_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class NewWorkflowRunDataAttributesType5Context: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/new_workflow_task.py b/rootly_sdk/models/new_workflow_task.py index 0d7f4bf9..d32d2579 100644 --- a/rootly_sdk/models/new_workflow_task.py +++ b/rootly_sdk/models/new_workflow_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class NewWorkflowTask: data (NewWorkflowTaskData): """ - data: "NewWorkflowTaskData" + data: NewWorkflowTaskData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_task_data.py b/rootly_sdk/models/new_workflow_task_data.py index ac4a7123..7888ac5a 100644 --- a/rootly_sdk/models/new_workflow_task_data.py +++ b/rootly_sdk/models/new_workflow_task_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class NewWorkflowTaskData: """ type_: NewWorkflowTaskDataType - attributes: "NewWorkflowTaskDataAttributes" + attributes: NewWorkflowTaskDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/new_workflow_task_data_attributes.py b/rootly_sdk/models/new_workflow_task_data_attributes.py index 0f8ae212..58fa6ade 100644 --- a/rootly_sdk/models/new_workflow_task_data_attributes.py +++ b/rootly_sdk/models/new_workflow_task_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -40,6 +42,7 @@ from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -73,6 +76,7 @@ from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -137,184 +141,185 @@ class NewWorkflowTaskDataAttributes: """ Attributes: - task_params (Union['AddActionItemTaskParams', 'AddMicrosoftTeamsChatTabTaskParams', 'AddRoleTaskParams', - 'AddTeamTaskParams', 'AddToTimelineTaskParams', 'ArchiveMicrosoftTeamsChannelsTaskParams', - 'ArchiveSlackChannelsTaskParams', 'AttachDatadogDashboardsTaskParams', 'AutoAssignRoleOpsgenieTaskParams', - 'AutoAssignRoleRootlyTaskParams', 'AutoAssignRoleVictorOpsTaskParams', 'CallPeopleTaskParams', - 'ChangeSlackChannelPrivacyTaskParams', 'CreateAirtableTableRecordTaskParams', - 'CreateAnthropicChatCompletionTaskParams', 'CreateAsanaSubtaskTaskParams', 'CreateAsanaTaskTaskParams', - 'CreateClickupTaskTaskParams', 'CreateCodaPageTaskParams', 'CreateConfluencePageTaskParams', - 'CreateDatadogNotebookTaskParams', 'CreateDropboxPaperPageTaskParams', 'CreateGithubIssueTaskParams', - 'CreateGitlabIssueTaskParams', 'CreateGoToMeetingTaskParams', 'CreateGoogleCalendarEventTaskParams', - 'CreateGoogleDocsPageTaskParams', 'CreateGoogleDocsPermissionsTaskParams', - 'CreateGoogleGeminiChatCompletionTaskParams', 'CreateGoogleMeetingTaskParams', - 'CreateIncidentPostmortemTaskParams', 'CreateIncidentTaskParams', 'CreateJiraIssueTaskParams', - 'CreateJiraSubtaskTaskParams', 'CreateLinearIssueCommentTaskParams', 'CreateLinearIssueTaskParams', - 'CreateLinearSubtaskIssueTaskParams', 'CreateMicrosoftTeamsChannelTaskParams', - 'CreateMicrosoftTeamsChatTaskParams', 'CreateMicrosoftTeamsMeetingTaskParams', - 'CreateMistralChatCompletionTaskParams', 'CreateMotionTaskTaskParams', 'CreateNotionPageTaskParams', - 'CreateOpenaiChatCompletionTaskParams', 'CreateOpsgenieAlertTaskParams', 'CreateOutlookEventTaskParams', - 'CreatePagerdutyStatusUpdateTaskParams', 'CreatePagertreeAlertTaskParams', 'CreateQuipPageTaskParams', - 'CreateServiceNowIncidentTaskParams', 'CreateSharepointPageTaskParams', 'CreateShortcutTaskTaskParams', - 'CreateSlackChannelTaskParams', 'CreateSubIncidentTaskParams', 'CreateTrelloCardTaskParams', - 'CreateWatsonxChatCompletionTaskParams', 'CreateWebexMeetingTaskParams', 'CreateZendeskJiraLinkTaskParams', - 'CreateZendeskTicketTaskParams', 'CreateZoomMeetingTaskParams', 'GetAlertsTaskParams', 'GetPulsesTaskParams', - 'HttpClientTaskParams', 'InviteToMicrosoftTeamsChannelTaskParams', 'InviteToSlackChannelOpsgenieTaskParams', - 'InviteToSlackChannelRootlyTaskParams', 'InviteToSlackChannelVictorOpsTaskParams', - 'PageOpsgenieOnCallRespondersTaskParams', 'PagePagerdutyOnCallRespondersTaskParams', - 'PageRootlyOnCallRespondersTaskParams', 'PrintTaskParams', 'PublishIncidentTaskParams', 'RedisClientTaskParams', - 'RemoveGoogleDocsPermissionsTaskParams', 'RenameMicrosoftTeamsChannelTaskParams', - 'RenameSlackChannelTaskParams', 'RunCommandHerokuTaskParams', 'SendDashboardReportTaskParams', - 'SendEmailTaskParams', 'SendMicrosoftTeamsChatMessageTaskParams', 'SendSmsTaskParams', - 'SendWhatsappMessageTaskParams', 'SnapshotDatadogGraphTaskParams', 'SnapshotGrafanaDashboardTaskParams', - 'SnapshotLookerLookTaskParams', 'SnapshotNewRelicGraphTaskParams', 'TriggerWorkflowTaskParams', - 'TweetTwitterMessageTaskParams', 'UpdateActionItemTaskParams', 'UpdateAirtableTableRecordTaskParams', - 'UpdateAsanaTaskTaskParams', 'UpdateAttachedAlertsTaskParams', 'UpdateClickupTaskTaskParams', - 'UpdateCodaPageTaskParams', 'UpdateConfluencePageTaskParams', 'UpdateDatadogNotebookTaskParams', - 'UpdateDropboxPaperPageTaskParams', 'UpdateGithubIssueTaskParams', 'UpdateGitlabIssueTaskParams', - 'UpdateGoogleCalendarEventTaskParams', 'UpdateGoogleDocsPageTaskParams', 'UpdateIncidentPostmortemTaskParams', - 'UpdateIncidentStatusTimestampTaskParams', 'UpdateIncidentTaskParams', 'UpdateJiraIssueTaskParams', - 'UpdateLinearIssueTaskParams', 'UpdateMotionTaskTaskParams', 'UpdateNotionPageTaskParams', - 'UpdateOpsgenieAlertTaskParams', 'UpdateOpsgenieIncidentTaskParams', 'UpdatePagerdutyIncidentTaskParams', - 'UpdatePagertreeAlertTaskParams', 'UpdateQuipPageTaskParams', 'UpdateServiceNowIncidentTaskParams', - 'UpdateSharepointPageTaskParams', 'UpdateShortcutStoryTaskParams', 'UpdateShortcutTaskTaskParams', - 'UpdateSlackChannelTopicTaskParams', 'UpdateStatusTaskParams', 'UpdateTrelloCardTaskParams', - 'UpdateVictorOpsIncidentTaskParams', 'UpdateZendeskTicketTaskParams', Any]): - name (Union[Unset, str]): Name of the workflow task - position (Union[Unset, int]): The position of the workflow task - skip_on_failure (Union[Unset, bool]): Skip workflow task if any failures - enabled (Union[Unset, bool]): Enable/disable workflow task Default: True. + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddRoleTaskParams | + AddTeamTaskParams | AddToTimelineTaskParams | Any | ArchiveMicrosoftTeamsChannelsTaskParams | + ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams | AutoAssignRoleOpsgenieTaskParams | + AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams | + ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | + CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | CreateAsanaTaskTaskParams | + CreateClickupTaskTaskParams | CreateCodaPageTaskParams | CreateConfluencePageTaskParams | + CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | CreateGithubIssueTaskParams | + CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | CreateGoogleDocsPageTaskParams | + CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams | + CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | CreateIncidentPostmortemTaskParams | + CreateIncidentTaskParams | CreateJiraIssueTaskParams | CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams | CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | + CreateMicrosoftTeamsChannelTaskParams | CreateMicrosoftTeamsChatTaskParams | + CreateMicrosoftTeamsMeetingTaskParams | CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | + CreateNotionPageTaskParams | CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | + CreateOutlookEventTaskParams | CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | + CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | + CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams | + CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | CreateWebexMeetingTaskParams | + CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | + GetAlertsTaskParams | GetPulsesTaskParams | HttpClientTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | + PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | + PageRootlyOnCallRespondersTaskParams | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | + RemoveGoogleDocsPermissionsTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | + RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams | + SendMicrosoftTeamsChatMessageTaskParams | SendSmsTaskParams | SendWhatsappMessageTaskParams | + SnapshotDatadogGraphTaskParams | SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | + SnapshotNewRelicGraphTaskParams | TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | + UpdateActionItemTaskParams | UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | + UpdateAttachedAlertsTaskParams | UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | + UpdateConfluencePageTaskParams | UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | + UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | + UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | + UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | + UpdatePagerdutyIncidentTaskParams | UpdatePagertreeAlertTaskParams | UpdateQuipPageTaskParams | + UpdateServiceNowIncidentTaskParams | UpdateSharepointPageTaskParams | UpdateShortcutStoryTaskParams | + UpdateShortcutTaskTaskParams | UpdateSlackChannelTopicTaskParams | UpdateStatusTaskParams | + UpdateTrelloCardTaskParams | UpdateVictorOpsIncidentTaskParams | UpdateZendeskTicketTaskParams): + name (str | Unset): Name of the workflow task + position (int | Unset): The position of the workflow task + skip_on_failure (bool | Unset): Skip workflow task if any failures + enabled (bool | Unset): Enable/disable workflow task Default: True. """ - task_params: Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - ] - name: Unset | str = UNSET - position: Unset | int = UNSET - skip_on_failure: Unset | bool = UNSET - enabled: Unset | bool = True + task_params: ( + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams + ) + name: str | Unset = UNSET + position: int | Unset = UNSET + skip_on_failure: bool | Unset = UNSET + enabled: bool | Unset = True def to_dict(self) -> dict[str, Any]: from ..models.add_action_item_task_params import AddActionItemTaskParams @@ -351,6 +356,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -384,6 +390,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -593,6 +600,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpsgenieAlertTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateJsmopsAlertTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageJsmopsOnCallRespondersTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateOpsgenieAlertTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateOpsgenieIncidentTaskParams): @@ -750,6 +761,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -783,6 +795,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -843,138 +856,140 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_task_params( data: object, - ) -> Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - ]: + ) -> ( + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams + ): try: if not isinstance(data, dict): raise TypeError() task_params_type_0 = AddActionItemTaskParams.from_dict(data) return task_params_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -982,7 +997,7 @@ def _parse_task_params( task_params_type_1 = UpdateActionItemTaskParams.from_dict(data) return task_params_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -990,7 +1005,7 @@ def _parse_task_params( task_params_type_2 = AddRoleTaskParams.from_dict(data) return task_params_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -998,7 +1013,7 @@ def _parse_task_params( task_params_type_4 = AddTeamTaskParams.from_dict(data) return task_params_type_4 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1006,7 +1021,7 @@ def _parse_task_params( task_params_type_5 = AddToTimelineTaskParams.from_dict(data) return task_params_type_5 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1014,7 +1029,7 @@ def _parse_task_params( task_params_type_6 = ArchiveSlackChannelsTaskParams.from_dict(data) return task_params_type_6 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1022,7 +1037,7 @@ def _parse_task_params( task_params_type_7 = AttachDatadogDashboardsTaskParams.from_dict(data) return task_params_type_7 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1030,7 +1045,7 @@ def _parse_task_params( task_params_type_8 = AutoAssignRoleOpsgenieTaskParams.from_dict(data) return task_params_type_8 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1038,7 +1053,7 @@ def _parse_task_params( task_params_type_9 = AutoAssignRoleRootlyTaskParams.from_dict(data) return task_params_type_9 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1046,7 +1061,7 @@ def _parse_task_params( task_params_type_11 = UpdatePagerdutyIncidentTaskParams.from_dict(data) return task_params_type_11 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1054,7 +1069,7 @@ def _parse_task_params( task_params_type_12 = CreatePagerdutyStatusUpdateTaskParams.from_dict(data) return task_params_type_12 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1062,7 +1077,7 @@ def _parse_task_params( task_params_type_13 = CreatePagertreeAlertTaskParams.from_dict(data) return task_params_type_13 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1070,7 +1085,7 @@ def _parse_task_params( task_params_type_14 = UpdatePagertreeAlertTaskParams.from_dict(data) return task_params_type_14 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1078,7 +1093,7 @@ def _parse_task_params( task_params_type_15 = AutoAssignRoleVictorOpsTaskParams.from_dict(data) return task_params_type_15 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1086,7 +1101,7 @@ def _parse_task_params( task_params_type_16 = CallPeopleTaskParams.from_dict(data) return task_params_type_16 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1094,7 +1109,7 @@ def _parse_task_params( task_params_type_17 = CreateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_17 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1102,7 +1117,7 @@ def _parse_task_params( task_params_type_18 = CreateAsanaSubtaskTaskParams.from_dict(data) return task_params_type_18 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1110,7 +1125,7 @@ def _parse_task_params( task_params_type_19 = CreateAsanaTaskTaskParams.from_dict(data) return task_params_type_19 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1118,7 +1133,7 @@ def _parse_task_params( task_params_type_20 = CreateConfluencePageTaskParams.from_dict(data) return task_params_type_20 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1126,7 +1141,7 @@ def _parse_task_params( task_params_type_21 = CreateDatadogNotebookTaskParams.from_dict(data) return task_params_type_21 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1134,7 +1149,7 @@ def _parse_task_params( task_params_type_22 = CreateCodaPageTaskParams.from_dict(data) return task_params_type_22 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1142,7 +1157,7 @@ def _parse_task_params( task_params_type_23 = CreateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_23 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1150,7 +1165,7 @@ def _parse_task_params( task_params_type_24 = CreateGithubIssueTaskParams.from_dict(data) return task_params_type_24 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1158,7 +1173,7 @@ def _parse_task_params( task_params_type_25 = CreateGitlabIssueTaskParams.from_dict(data) return task_params_type_25 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1166,7 +1181,7 @@ def _parse_task_params( task_params_type_26 = CreateOutlookEventTaskParams.from_dict(data) return task_params_type_26 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1174,7 +1189,7 @@ def _parse_task_params( task_params_type_27 = CreateGoogleCalendarEventTaskParams.from_dict(data) return task_params_type_27 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1182,7 +1197,7 @@ def _parse_task_params( task_params_type_28 = UpdateGoogleDocsPageTaskParams.from_dict(data) return task_params_type_28 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1190,7 +1205,7 @@ def _parse_task_params( task_params_type_29 = UpdateCodaPageTaskParams.from_dict(data) return task_params_type_29 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1198,7 +1213,7 @@ def _parse_task_params( task_params_type_30 = UpdateGoogleCalendarEventTaskParams.from_dict(data) return task_params_type_30 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1206,7 +1221,7 @@ def _parse_task_params( task_params_type_31 = CreateSharepointPageTaskParams.from_dict(data) return task_params_type_31 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1214,7 +1229,7 @@ def _parse_task_params( task_params_type_32 = CreateGoogleDocsPageTaskParams.from_dict(data) return task_params_type_32 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1222,7 +1237,7 @@ def _parse_task_params( task_params_type_33 = CreateGoogleDocsPermissionsTaskParams.from_dict(data) return task_params_type_33 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1230,7 +1245,7 @@ def _parse_task_params( task_params_type_34 = RemoveGoogleDocsPermissionsTaskParams.from_dict(data) return task_params_type_34 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1238,7 +1253,7 @@ def _parse_task_params( task_params_type_35 = CreateQuipPageTaskParams.from_dict(data) return task_params_type_35 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1246,7 +1261,7 @@ def _parse_task_params( task_params_type_36 = CreateGoogleMeetingTaskParams.from_dict(data) return task_params_type_36 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1254,7 +1269,7 @@ def _parse_task_params( task_params_type_37 = CreateGoToMeetingTaskParams.from_dict(data) return task_params_type_37 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1262,7 +1277,7 @@ def _parse_task_params( task_params_type_38 = CreateIncidentTaskParams.from_dict(data) return task_params_type_38 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1270,7 +1285,7 @@ def _parse_task_params( task_params_type_39 = CreateSubIncidentTaskParams.from_dict(data) return task_params_type_39 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1278,7 +1293,7 @@ def _parse_task_params( task_params_type_40 = CreateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_40 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1286,7 +1301,7 @@ def _parse_task_params( task_params_type_41 = CreateJiraIssueTaskParams.from_dict(data) return task_params_type_41 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1294,7 +1309,7 @@ def _parse_task_params( task_params_type_42 = CreateJiraSubtaskTaskParams.from_dict(data) return task_params_type_42 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1302,7 +1317,7 @@ def _parse_task_params( task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_43 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1310,7 +1325,7 @@ def _parse_task_params( task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_44 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1318,7 +1333,7 @@ def _parse_task_params( task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_45 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1326,7 +1341,7 @@ def _parse_task_params( task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_46 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1334,7 +1349,7 @@ def _parse_task_params( task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_47 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1342,7 +1357,7 @@ def _parse_task_params( task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) return task_params_type_48 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1350,7 +1365,7 @@ def _parse_task_params( task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_50 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1358,7 +1373,7 @@ def _parse_task_params( task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_51 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1366,7 +1381,7 @@ def _parse_task_params( task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_52 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1374,7 +1389,7 @@ def _parse_task_params( task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_53 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1382,7 +1397,7 @@ def _parse_task_params( task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_54 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1390,7 +1405,7 @@ def _parse_task_params( task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) return task_params_type_56 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1398,7 +1413,7 @@ def _parse_task_params( task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_58 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1406,7 +1421,7 @@ def _parse_task_params( task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_59 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1414,7 +1429,7 @@ def _parse_task_params( task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_60 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1422,7 +1437,7 @@ def _parse_task_params( task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_61 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1430,7 +1445,7 @@ def _parse_task_params( task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_62 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1438,7 +1453,7 @@ def _parse_task_params( task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_63 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1446,7 +1461,7 @@ def _parse_task_params( task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_64 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1454,7 +1469,7 @@ def _parse_task_params( task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) return task_params_type_66 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1462,7 +1477,7 @@ def _parse_task_params( task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_67 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1470,7 +1485,7 @@ def _parse_task_params( task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_68 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1478,7 +1493,7 @@ def _parse_task_params( task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_69 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1486,7 +1501,7 @@ def _parse_task_params( task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_70 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1494,7 +1509,7 @@ def _parse_task_params( task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_71 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1502,7 +1517,7 @@ def _parse_task_params( task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) return task_params_type_72 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1510,7 +1525,7 @@ def _parse_task_params( task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) return task_params_type_73 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1518,7 +1533,7 @@ def _parse_task_params( task_params_type_76 = GetPulsesTaskParams.from_dict(data) return task_params_type_76 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1526,7 +1541,7 @@ def _parse_task_params( task_params_type_77 = GetAlertsTaskParams.from_dict(data) return task_params_type_77 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1534,7 +1549,7 @@ def _parse_task_params( task_params_type_78 = HttpClientTaskParams.from_dict(data) return task_params_type_78 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1542,7 +1557,7 @@ def _parse_task_params( task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_79 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1550,7 +1565,7 @@ def _parse_task_params( task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_80 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1558,7 +1573,7 @@ def _parse_task_params( task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_83 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1566,7 +1581,7 @@ def _parse_task_params( task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_84 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1574,502 +1589,518 @@ def _parse_task_params( task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_85 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_86 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_87 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_88 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_89 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) - return task_params_type_91 - except: # noqa: E722 + return task_params_type_90 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_92 = PrintTaskParams.from_dict(data) + task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) - return task_params_type_92 - except: # noqa: E722 + return task_params_type_91 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = PublishIncidentTaskParams.from_dict(data) + task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) return task_params_type_93 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = RedisClientTaskParams.from_dict(data) + task_params_type_94 = PrintTaskParams.from_dict(data) return task_params_type_94 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_95 = PublishIncidentTaskParams.from_dict(data) return task_params_type_95 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_96 = RedisClientTaskParams.from_dict(data) return task_params_type_96 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_97 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = SendEmailTaskParams.from_dict(data) + task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_98 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_99 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = CreateSlackChannelTaskParams.from_dict(data) + task_params_type_100 = SendEmailTaskParams.from_dict(data) return task_params_type_100 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = SendSmsTaskParams.from_dict(data) + task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) - return task_params_type_102 - except: # noqa: E722 + return task_params_type_101 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_103 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) - return task_params_type_103 - except: # noqa: E722 + return task_params_type_102 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_104 = SendSmsTaskParams.from_dict(data) return task_params_type_104 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_105 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_106 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_107 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_108 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_109 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_110 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateGithubIssueTaskParams.from_dict(data) + task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_111 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateGitlabIssueTaskParams.from_dict(data) + task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_112 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_113 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_114 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_115 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_116 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_117 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_118 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_119 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_120 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateStatusTaskParams.from_dict(data) + task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) return task_params_type_121 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_122 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_123 = UpdateStatusTaskParams.from_dict(data) return task_params_type_123 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_124 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_125 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_126 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) return task_params_type_127 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) return task_params_type_128 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) - return task_params_type_130 - except: # noqa: E722 + return task_params_type_129 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_131 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) - return task_params_type_131 - except: # noqa: E722 + return task_params_type_130 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) return task_params_type_132 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) return task_params_type_133 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) return task_params_type_134 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_135 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_136 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - ], + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams, data, ) diff --git a/rootly_sdk/models/on_call_pay_report.py b/rootly_sdk/models/on_call_pay_report.py new file mode 100644 index 00000000..3d87a85f --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report.py @@ -0,0 +1,235 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.on_call_pay_report_pay_type import OnCallPayReportPayType, check_on_call_pay_report_pay_type +from ..models.on_call_pay_report_status import OnCallPayReportStatus, check_on_call_pay_report_status +from ..types import UNSET, Unset + +T = TypeVar("T", bound="OnCallPayReport") + + +@_attrs_define +class OnCallPayReport: + """ + Attributes: + status (OnCallPayReportStatus): The current status of the report. + start_date (datetime.date): The start date of the report period. + end_date (datetime.date): The end date of the report period. + created_at (datetime.datetime): + updated_at (datetime.datetime): + total_duration (int | Unset): Total on-call duration in seconds. + users_count (int | Unset): Number of users included in the report. + currency (str | Unset): The currency code for monetary values. + pay_type (OnCallPayReportPayType | Unset): The pay calculation type. + hourly_rate_cents (int | Unset): Hourly pay rate in cents. + daily_rate_cents (int | Unset): Daily pay rate in cents. + total_pay_cents (int | Unset): Total pay amount in cents. + include_shadow (bool | Unset): Whether shadow shifts are included. + show_individual_shift_data (bool | Unset): Whether individual shift data is shown. + has_single_rate (bool | Unset): Whether a single rate is applied to all users. + enabled_granular_time_breakdown (bool | Unset): Whether granular time breakdown is enabled. + last_generated_at (datetime.datetime | None | Unset): When the report was last generated. + """ + + status: OnCallPayReportStatus + start_date: datetime.date + end_date: datetime.date + created_at: datetime.datetime + updated_at: datetime.datetime + total_duration: int | Unset = UNSET + users_count: int | Unset = UNSET + currency: str | Unset = UNSET + pay_type: OnCallPayReportPayType | Unset = UNSET + hourly_rate_cents: int | Unset = UNSET + daily_rate_cents: int | Unset = UNSET + total_pay_cents: int | Unset = UNSET + include_shadow: bool | Unset = UNSET + show_individual_shift_data: bool | Unset = UNSET + has_single_rate: bool | Unset = UNSET + enabled_granular_time_breakdown: bool | Unset = UNSET + last_generated_at: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status: str = self.status + + start_date = self.start_date.isoformat() + + end_date = self.end_date.isoformat() + + created_at = self.created_at.isoformat() + + updated_at = self.updated_at.isoformat() + + total_duration = self.total_duration + + users_count = self.users_count + + currency = self.currency + + pay_type: str | Unset = UNSET + if not isinstance(self.pay_type, Unset): + pay_type = self.pay_type + + hourly_rate_cents = self.hourly_rate_cents + + daily_rate_cents = self.daily_rate_cents + + total_pay_cents = self.total_pay_cents + + include_shadow = self.include_shadow + + show_individual_shift_data = self.show_individual_shift_data + + has_single_rate = self.has_single_rate + + enabled_granular_time_breakdown = self.enabled_granular_time_breakdown + + last_generated_at: None | str | Unset + if isinstance(self.last_generated_at, Unset): + last_generated_at = UNSET + elif isinstance(self.last_generated_at, datetime.datetime): + last_generated_at = self.last_generated_at.isoformat() + else: + last_generated_at = self.last_generated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "status": status, + "start_date": start_date, + "end_date": end_date, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if total_duration is not UNSET: + field_dict["total_duration"] = total_duration + if users_count is not UNSET: + field_dict["users_count"] = users_count + if currency is not UNSET: + field_dict["currency"] = currency + if pay_type is not UNSET: + field_dict["pay_type"] = pay_type + if hourly_rate_cents is not UNSET: + field_dict["hourly_rate_cents"] = hourly_rate_cents + if daily_rate_cents is not UNSET: + field_dict["daily_rate_cents"] = daily_rate_cents + if total_pay_cents is not UNSET: + field_dict["total_pay_cents"] = total_pay_cents + if include_shadow is not UNSET: + field_dict["include_shadow"] = include_shadow + if show_individual_shift_data is not UNSET: + field_dict["show_individual_shift_data"] = show_individual_shift_data + if has_single_rate is not UNSET: + field_dict["has_single_rate"] = has_single_rate + if enabled_granular_time_breakdown is not UNSET: + field_dict["enabled_granular_time_breakdown"] = enabled_granular_time_breakdown + if last_generated_at is not UNSET: + field_dict["last_generated_at"] = last_generated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status = check_on_call_pay_report_status(d.pop("status")) + + start_date = isoparse(d.pop("start_date")).date() + + end_date = isoparse(d.pop("end_date")).date() + + created_at = isoparse(d.pop("created_at")) + + updated_at = isoparse(d.pop("updated_at")) + + total_duration = d.pop("total_duration", UNSET) + + users_count = d.pop("users_count", UNSET) + + currency = d.pop("currency", UNSET) + + _pay_type = d.pop("pay_type", UNSET) + pay_type: OnCallPayReportPayType | Unset + if isinstance(_pay_type, Unset): + pay_type = UNSET + else: + pay_type = check_on_call_pay_report_pay_type(_pay_type) + + hourly_rate_cents = d.pop("hourly_rate_cents", UNSET) + + daily_rate_cents = d.pop("daily_rate_cents", UNSET) + + total_pay_cents = d.pop("total_pay_cents", UNSET) + + include_shadow = d.pop("include_shadow", UNSET) + + show_individual_shift_data = d.pop("show_individual_shift_data", UNSET) + + has_single_rate = d.pop("has_single_rate", UNSET) + + enabled_granular_time_breakdown = d.pop("enabled_granular_time_breakdown", UNSET) + + def _parse_last_generated_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_generated_at_type_0 = isoparse(data) + + return last_generated_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_generated_at = _parse_last_generated_at(d.pop("last_generated_at", UNSET)) + + on_call_pay_report = cls( + status=status, + start_date=start_date, + end_date=end_date, + created_at=created_at, + updated_at=updated_at, + total_duration=total_duration, + users_count=users_count, + currency=currency, + pay_type=pay_type, + hourly_rate_cents=hourly_rate_cents, + daily_rate_cents=daily_rate_cents, + total_pay_cents=total_pay_cents, + include_shadow=include_shadow, + show_individual_shift_data=show_individual_shift_data, + has_single_rate=has_single_rate, + enabled_granular_time_breakdown=enabled_granular_time_breakdown, + last_generated_at=last_generated_at, + ) + + on_call_pay_report.additional_properties = d + return on_call_pay_report + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/on_call_pay_report_list.py b/rootly_sdk/models/on_call_pay_report_list.py new file mode 100644 index 00000000..57e63961 --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_list.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.links import Links + from ..models.meta import Meta + from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem + + +T = TypeVar("T", bound="OnCallPayReportList") + + +@_attrs_define +class OnCallPayReportList: + """ + Attributes: + data (list[OnCallPayReportListDataItem]): + links (Links): + meta (Meta): + """ + + data: list[OnCallPayReportListDataItem] + links: Links + meta: Meta + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links = self.links.to_dict() + + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "links": links, + "meta": meta, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.links import Links + from ..models.meta import Meta + from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = OnCallPayReportListDataItem.from_dict(data_item_data) + + data.append(data_item) + + links = Links.from_dict(d.pop("links")) + + meta = Meta.from_dict(d.pop("meta")) + + on_call_pay_report_list = cls( + data=data, + links=links, + meta=meta, + ) + + on_call_pay_report_list.additional_properties = d + return on_call_pay_report_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/on_call_pay_report_list_data_item.py b/rootly_sdk/models/on_call_pay_report_list_data_item.py new file mode 100644 index 00000000..19d63be2 --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_list_data_item.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.on_call_pay_report_list_data_item_type import ( + OnCallPayReportListDataItemType, + check_on_call_pay_report_list_data_item_type, +) + +if TYPE_CHECKING: + from ..models.on_call_pay_report import OnCallPayReport + + +T = TypeVar("T", bound="OnCallPayReportListDataItem") + + +@_attrs_define +class OnCallPayReportListDataItem: + """ + Attributes: + id (str): Unique ID of the on_call_pay_report + type_ (OnCallPayReportListDataItemType): + attributes (OnCallPayReport): + """ + + id: str + type_: OnCallPayReportListDataItemType + attributes: OnCallPayReport + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.on_call_pay_report import OnCallPayReport + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_on_call_pay_report_list_data_item_type(d.pop("type")) + + attributes = OnCallPayReport.from_dict(d.pop("attributes")) + + on_call_pay_report_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + on_call_pay_report_list_data_item.additional_properties = d + return on_call_pay_report_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/on_call_pay_report_list_data_item_type.py b/rootly_sdk/models/on_call_pay_report_list_data_item_type.py new file mode 100644 index 00000000..b2de1003 --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +OnCallPayReportListDataItemType = Literal["on_call_pay_reports"] + +ON_CALL_PAY_REPORT_LIST_DATA_ITEM_TYPE_VALUES: set[OnCallPayReportListDataItemType] = { + "on_call_pay_reports", +} + + +def check_on_call_pay_report_list_data_item_type(value: str | None) -> OnCallPayReportListDataItemType | None: + if value is None: + return None + if value in ON_CALL_PAY_REPORT_LIST_DATA_ITEM_TYPE_VALUES: + return cast(OnCallPayReportListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ON_CALL_PAY_REPORT_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/on_call_pay_report_pay_type.py b/rootly_sdk/models/on_call_pay_report_pay_type.py new file mode 100644 index 00000000..1133a438 --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_pay_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +OnCallPayReportPayType = Literal["daily", "hourly"] + +ON_CALL_PAY_REPORT_PAY_TYPE_VALUES: set[OnCallPayReportPayType] = { + "daily", + "hourly", +} + + +def check_on_call_pay_report_pay_type(value: str | None) -> OnCallPayReportPayType | None: + if value is None: + return None + if value in ON_CALL_PAY_REPORT_PAY_TYPE_VALUES: + return cast(OnCallPayReportPayType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ON_CALL_PAY_REPORT_PAY_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/on_call_pay_report_response.py b/rootly_sdk/models/on_call_pay_report_response.py new file mode 100644 index 00000000..28700909 --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_response.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData + + +T = TypeVar("T", bound="OnCallPayReportResponse") + + +@_attrs_define +class OnCallPayReportResponse: + """ + Attributes: + data (OnCallPayReportResponseData): + """ + + data: OnCallPayReportResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData + + d = dict(src_dict) + data = OnCallPayReportResponseData.from_dict(d.pop("data")) + + on_call_pay_report_response = cls( + data=data, + ) + + on_call_pay_report_response.additional_properties = d + return on_call_pay_report_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/on_call_pay_report_response_data.py b/rootly_sdk/models/on_call_pay_report_response_data.py new file mode 100644 index 00000000..b783bdaa --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_response_data.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.on_call_pay_report_response_data_type import ( + OnCallPayReportResponseDataType, + check_on_call_pay_report_response_data_type, +) + +if TYPE_CHECKING: + from ..models.on_call_pay_report import OnCallPayReport + + +T = TypeVar("T", bound="OnCallPayReportResponseData") + + +@_attrs_define +class OnCallPayReportResponseData: + """ + Attributes: + id (str): Unique ID of the on_call_pay_report + type_ (OnCallPayReportResponseDataType): + attributes (OnCallPayReport): + """ + + id: str + type_: OnCallPayReportResponseDataType + attributes: OnCallPayReport + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.on_call_pay_report import OnCallPayReport + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_on_call_pay_report_response_data_type(d.pop("type")) + + attributes = OnCallPayReport.from_dict(d.pop("attributes")) + + on_call_pay_report_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + on_call_pay_report_response_data.additional_properties = d + return on_call_pay_report_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/on_call_pay_report_response_data_type.py b/rootly_sdk/models/on_call_pay_report_response_data_type.py new file mode 100644 index 00000000..acf812f6 --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +OnCallPayReportResponseDataType = Literal["on_call_pay_reports"] + +ON_CALL_PAY_REPORT_RESPONSE_DATA_TYPE_VALUES: set[OnCallPayReportResponseDataType] = { + "on_call_pay_reports", +} + + +def check_on_call_pay_report_response_data_type(value: str | None) -> OnCallPayReportResponseDataType | None: + if value is None: + return None + if value in ON_CALL_PAY_REPORT_RESPONSE_DATA_TYPE_VALUES: + return cast(OnCallPayReportResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ON_CALL_PAY_REPORT_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/on_call_pay_report_status.py b/rootly_sdk/models/on_call_pay_report_status.py new file mode 100644 index 00000000..52f27e1f --- /dev/null +++ b/rootly_sdk/models/on_call_pay_report_status.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +OnCallPayReportStatus = Literal["downloaded", "generated", "processing"] + +ON_CALL_PAY_REPORT_STATUS_VALUES: set[OnCallPayReportStatus] = { + "downloaded", + "generated", + "processing", +} + + +def check_on_call_pay_report_status(value: str | None) -> OnCallPayReportStatus | None: + if value is None: + return None + if value in ON_CALL_PAY_REPORT_STATUS_VALUES: + return cast(OnCallPayReportStatus, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ON_CALL_PAY_REPORT_STATUS_VALUES!r}") diff --git a/rootly_sdk/models/on_call_role.py b/rootly_sdk/models/on_call_role.py index e90bd297..b948aaca 100644 --- a/rootly_sdk/models/on_call_role.py +++ b/rootly_sdk/models/on_call_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -104,59 +106,59 @@ class OnCallRole: name (str): The role name. created_at (str): updated_at (str): - slug (Union[Unset, str]): The role slug. - system_role (Union[Unset, str]): The kind of role Default: 'custom'. - alert_sources_permissions (Union[Unset, list[OnCallRoleAlertSourcesPermissionsItem]]): - alert_urgency_permissions (Union[Unset, list[OnCallRoleAlertUrgencyPermissionsItem]]): - alert_fields_permissions (Union[Unset, list[OnCallRoleAlertFieldsPermissionsItem]]): - alert_groups_permissions (Union[Unset, list[OnCallRoleAlertGroupsPermissionsItem]]): - alert_routing_rules_permissions (Union[Unset, list[OnCallRoleAlertRoutingRulesPermissionsItem]]): - on_call_readiness_report_permissions (Union[Unset, list[OnCallRoleOnCallReadinessReportPermissionsItem]]): - on_call_roles_permissions (Union[Unset, list[OnCallRoleOnCallRolesPermissionsItem]]): - alerts_permissions (Union[Unset, list[OnCallRoleAlertsPermissionsItem]]): - api_keys_permissions (Union[Unset, list[OnCallRoleApiKeysPermissionsItem]]): - audits_permissions (Union[Unset, list[OnCallRoleAuditsPermissionsItem]]): - contacts_permissions (Union[Unset, list[OnCallRoleContactsPermissionsItem]]): - escalation_policies_permissions (Union[Unset, list[OnCallRoleEscalationPoliciesPermissionsItem]]): - groups_permissions (Union[Unset, list[OnCallRoleGroupsPermissionsItem]]): - heartbeats_permissions (Union[Unset, list[OnCallRoleHeartbeatsPermissionsItem]]): - integrations_permissions (Union[Unset, list[OnCallRoleIntegrationsPermissionsItem]]): - invitations_permissions (Union[Unset, list[OnCallRoleInvitationsPermissionsItem]]): - live_call_routing_permissions (Union[Unset, list[OnCallRoleLiveCallRoutingPermissionsItem]]): - schedule_override_permissions (Union[Unset, list[OnCallRoleScheduleOverridePermissionsItem]]): - schedules_permissions (Union[Unset, list[OnCallRoleSchedulesPermissionsItem]]): - services_permissions (Union[Unset, list[OnCallRoleServicesPermissionsItem]]): - webhooks_permissions (Union[Unset, list[OnCallRoleWebhooksPermissionsItem]]): - workflows_permissions (Union[Unset, list[OnCallRoleWorkflowsPermissionsItem]]): + slug (str | Unset): The role slug. + system_role (str | Unset): The kind of role Default: 'custom'. + alert_sources_permissions (list[OnCallRoleAlertSourcesPermissionsItem] | Unset): + alert_urgency_permissions (list[OnCallRoleAlertUrgencyPermissionsItem] | Unset): + alert_fields_permissions (list[OnCallRoleAlertFieldsPermissionsItem] | Unset): + alert_groups_permissions (list[OnCallRoleAlertGroupsPermissionsItem] | Unset): + alert_routing_rules_permissions (list[OnCallRoleAlertRoutingRulesPermissionsItem] | Unset): + on_call_readiness_report_permissions (list[OnCallRoleOnCallReadinessReportPermissionsItem] | Unset): + on_call_roles_permissions (list[OnCallRoleOnCallRolesPermissionsItem] | Unset): + alerts_permissions (list[OnCallRoleAlertsPermissionsItem] | Unset): + api_keys_permissions (list[OnCallRoleApiKeysPermissionsItem] | Unset): + audits_permissions (list[OnCallRoleAuditsPermissionsItem] | Unset): + contacts_permissions (list[OnCallRoleContactsPermissionsItem] | Unset): + escalation_policies_permissions (list[OnCallRoleEscalationPoliciesPermissionsItem] | Unset): + groups_permissions (list[OnCallRoleGroupsPermissionsItem] | Unset): + heartbeats_permissions (list[OnCallRoleHeartbeatsPermissionsItem] | Unset): + integrations_permissions (list[OnCallRoleIntegrationsPermissionsItem] | Unset): + invitations_permissions (list[OnCallRoleInvitationsPermissionsItem] | Unset): + live_call_routing_permissions (list[OnCallRoleLiveCallRoutingPermissionsItem] | Unset): + schedule_override_permissions (list[OnCallRoleScheduleOverridePermissionsItem] | Unset): + schedules_permissions (list[OnCallRoleSchedulesPermissionsItem] | Unset): + services_permissions (list[OnCallRoleServicesPermissionsItem] | Unset): + webhooks_permissions (list[OnCallRoleWebhooksPermissionsItem] | Unset): + workflows_permissions (list[OnCallRoleWorkflowsPermissionsItem] | Unset): """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - system_role: Unset | str = "custom" - alert_sources_permissions: Unset | list[OnCallRoleAlertSourcesPermissionsItem] = UNSET - alert_urgency_permissions: Unset | list[OnCallRoleAlertUrgencyPermissionsItem] = UNSET - alert_fields_permissions: Unset | list[OnCallRoleAlertFieldsPermissionsItem] = UNSET - alert_groups_permissions: Unset | list[OnCallRoleAlertGroupsPermissionsItem] = UNSET - alert_routing_rules_permissions: Unset | list[OnCallRoleAlertRoutingRulesPermissionsItem] = UNSET - on_call_readiness_report_permissions: Unset | list[OnCallRoleOnCallReadinessReportPermissionsItem] = UNSET - on_call_roles_permissions: Unset | list[OnCallRoleOnCallRolesPermissionsItem] = UNSET - alerts_permissions: Unset | list[OnCallRoleAlertsPermissionsItem] = UNSET - api_keys_permissions: Unset | list[OnCallRoleApiKeysPermissionsItem] = UNSET - audits_permissions: Unset | list[OnCallRoleAuditsPermissionsItem] = UNSET - contacts_permissions: Unset | list[OnCallRoleContactsPermissionsItem] = UNSET - escalation_policies_permissions: Unset | list[OnCallRoleEscalationPoliciesPermissionsItem] = UNSET - groups_permissions: Unset | list[OnCallRoleGroupsPermissionsItem] = UNSET - heartbeats_permissions: Unset | list[OnCallRoleHeartbeatsPermissionsItem] = UNSET - integrations_permissions: Unset | list[OnCallRoleIntegrationsPermissionsItem] = UNSET - invitations_permissions: Unset | list[OnCallRoleInvitationsPermissionsItem] = UNSET - live_call_routing_permissions: Unset | list[OnCallRoleLiveCallRoutingPermissionsItem] = UNSET - schedule_override_permissions: Unset | list[OnCallRoleScheduleOverridePermissionsItem] = UNSET - schedules_permissions: Unset | list[OnCallRoleSchedulesPermissionsItem] = UNSET - services_permissions: Unset | list[OnCallRoleServicesPermissionsItem] = UNSET - webhooks_permissions: Unset | list[OnCallRoleWebhooksPermissionsItem] = UNSET - workflows_permissions: Unset | list[OnCallRoleWorkflowsPermissionsItem] = UNSET + slug: str | Unset = UNSET + system_role: str | Unset = "custom" + alert_sources_permissions: list[OnCallRoleAlertSourcesPermissionsItem] | Unset = UNSET + alert_urgency_permissions: list[OnCallRoleAlertUrgencyPermissionsItem] | Unset = UNSET + alert_fields_permissions: list[OnCallRoleAlertFieldsPermissionsItem] | Unset = UNSET + alert_groups_permissions: list[OnCallRoleAlertGroupsPermissionsItem] | Unset = UNSET + alert_routing_rules_permissions: list[OnCallRoleAlertRoutingRulesPermissionsItem] | Unset = UNSET + on_call_readiness_report_permissions: list[OnCallRoleOnCallReadinessReportPermissionsItem] | Unset = UNSET + on_call_roles_permissions: list[OnCallRoleOnCallRolesPermissionsItem] | Unset = UNSET + alerts_permissions: list[OnCallRoleAlertsPermissionsItem] | Unset = UNSET + api_keys_permissions: list[OnCallRoleApiKeysPermissionsItem] | Unset = UNSET + audits_permissions: list[OnCallRoleAuditsPermissionsItem] | Unset = UNSET + contacts_permissions: list[OnCallRoleContactsPermissionsItem] | Unset = UNSET + escalation_policies_permissions: list[OnCallRoleEscalationPoliciesPermissionsItem] | Unset = UNSET + groups_permissions: list[OnCallRoleGroupsPermissionsItem] | Unset = UNSET + heartbeats_permissions: list[OnCallRoleHeartbeatsPermissionsItem] | Unset = UNSET + integrations_permissions: list[OnCallRoleIntegrationsPermissionsItem] | Unset = UNSET + invitations_permissions: list[OnCallRoleInvitationsPermissionsItem] | Unset = UNSET + live_call_routing_permissions: list[OnCallRoleLiveCallRoutingPermissionsItem] | Unset = UNSET + schedule_override_permissions: list[OnCallRoleScheduleOverridePermissionsItem] | Unset = UNSET + schedules_permissions: list[OnCallRoleSchedulesPermissionsItem] | Unset = UNSET + services_permissions: list[OnCallRoleServicesPermissionsItem] | Unset = UNSET + webhooks_permissions: list[OnCallRoleWebhooksPermissionsItem] | Unset = UNSET + workflows_permissions: list[OnCallRoleWorkflowsPermissionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -170,154 +172,154 @@ def to_dict(self) -> dict[str, Any]: system_role = self.system_role - alert_sources_permissions: Unset | list[str] = UNSET + alert_sources_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_sources_permissions, Unset): alert_sources_permissions = [] for alert_sources_permissions_item_data in self.alert_sources_permissions: alert_sources_permissions_item: str = alert_sources_permissions_item_data alert_sources_permissions.append(alert_sources_permissions_item) - alert_urgency_permissions: Unset | list[str] = UNSET + alert_urgency_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_urgency_permissions, Unset): alert_urgency_permissions = [] for alert_urgency_permissions_item_data in self.alert_urgency_permissions: alert_urgency_permissions_item: str = alert_urgency_permissions_item_data alert_urgency_permissions.append(alert_urgency_permissions_item) - alert_fields_permissions: Unset | list[str] = UNSET + alert_fields_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_fields_permissions, Unset): alert_fields_permissions = [] for alert_fields_permissions_item_data in self.alert_fields_permissions: alert_fields_permissions_item: str = alert_fields_permissions_item_data alert_fields_permissions.append(alert_fields_permissions_item) - alert_groups_permissions: Unset | list[str] = UNSET + alert_groups_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_groups_permissions, Unset): alert_groups_permissions = [] for alert_groups_permissions_item_data in self.alert_groups_permissions: alert_groups_permissions_item: str = alert_groups_permissions_item_data alert_groups_permissions.append(alert_groups_permissions_item) - alert_routing_rules_permissions: Unset | list[str] = UNSET + alert_routing_rules_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_routing_rules_permissions, Unset): alert_routing_rules_permissions = [] for alert_routing_rules_permissions_item_data in self.alert_routing_rules_permissions: alert_routing_rules_permissions_item: str = alert_routing_rules_permissions_item_data alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) - on_call_readiness_report_permissions: Unset | list[str] = UNSET + on_call_readiness_report_permissions: list[str] | Unset = UNSET if not isinstance(self.on_call_readiness_report_permissions, Unset): on_call_readiness_report_permissions = [] for on_call_readiness_report_permissions_item_data in self.on_call_readiness_report_permissions: on_call_readiness_report_permissions_item: str = on_call_readiness_report_permissions_item_data on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) - on_call_roles_permissions: Unset | list[str] = UNSET + on_call_roles_permissions: list[str] | Unset = UNSET if not isinstance(self.on_call_roles_permissions, Unset): on_call_roles_permissions = [] for on_call_roles_permissions_item_data in self.on_call_roles_permissions: on_call_roles_permissions_item: str = on_call_roles_permissions_item_data on_call_roles_permissions.append(on_call_roles_permissions_item) - alerts_permissions: Unset | list[str] = UNSET + alerts_permissions: list[str] | Unset = UNSET if not isinstance(self.alerts_permissions, Unset): alerts_permissions = [] for alerts_permissions_item_data in self.alerts_permissions: alerts_permissions_item: str = alerts_permissions_item_data alerts_permissions.append(alerts_permissions_item) - api_keys_permissions: Unset | list[str] = UNSET + api_keys_permissions: list[str] | Unset = UNSET if not isinstance(self.api_keys_permissions, Unset): api_keys_permissions = [] for api_keys_permissions_item_data in self.api_keys_permissions: api_keys_permissions_item: str = api_keys_permissions_item_data api_keys_permissions.append(api_keys_permissions_item) - audits_permissions: Unset | list[str] = UNSET + audits_permissions: list[str] | Unset = UNSET if not isinstance(self.audits_permissions, Unset): audits_permissions = [] for audits_permissions_item_data in self.audits_permissions: audits_permissions_item: str = audits_permissions_item_data audits_permissions.append(audits_permissions_item) - contacts_permissions: Unset | list[str] = UNSET + contacts_permissions: list[str] | Unset = UNSET if not isinstance(self.contacts_permissions, Unset): contacts_permissions = [] for contacts_permissions_item_data in self.contacts_permissions: contacts_permissions_item: str = contacts_permissions_item_data contacts_permissions.append(contacts_permissions_item) - escalation_policies_permissions: Unset | list[str] = UNSET + escalation_policies_permissions: list[str] | Unset = UNSET if not isinstance(self.escalation_policies_permissions, Unset): escalation_policies_permissions = [] for escalation_policies_permissions_item_data in self.escalation_policies_permissions: escalation_policies_permissions_item: str = escalation_policies_permissions_item_data escalation_policies_permissions.append(escalation_policies_permissions_item) - groups_permissions: Unset | list[str] = UNSET + groups_permissions: list[str] | Unset = UNSET if not isinstance(self.groups_permissions, Unset): groups_permissions = [] for groups_permissions_item_data in self.groups_permissions: groups_permissions_item: str = groups_permissions_item_data groups_permissions.append(groups_permissions_item) - heartbeats_permissions: Unset | list[str] = UNSET + heartbeats_permissions: list[str] | Unset = UNSET if not isinstance(self.heartbeats_permissions, Unset): heartbeats_permissions = [] for heartbeats_permissions_item_data in self.heartbeats_permissions: heartbeats_permissions_item: str = heartbeats_permissions_item_data heartbeats_permissions.append(heartbeats_permissions_item) - integrations_permissions: Unset | list[str] = UNSET + integrations_permissions: list[str] | Unset = UNSET if not isinstance(self.integrations_permissions, Unset): integrations_permissions = [] for integrations_permissions_item_data in self.integrations_permissions: integrations_permissions_item: str = integrations_permissions_item_data integrations_permissions.append(integrations_permissions_item) - invitations_permissions: Unset | list[str] = UNSET + invitations_permissions: list[str] | Unset = UNSET if not isinstance(self.invitations_permissions, Unset): invitations_permissions = [] for invitations_permissions_item_data in self.invitations_permissions: invitations_permissions_item: str = invitations_permissions_item_data invitations_permissions.append(invitations_permissions_item) - live_call_routing_permissions: Unset | list[str] = UNSET + live_call_routing_permissions: list[str] | Unset = UNSET if not isinstance(self.live_call_routing_permissions, Unset): live_call_routing_permissions = [] for live_call_routing_permissions_item_data in self.live_call_routing_permissions: live_call_routing_permissions_item: str = live_call_routing_permissions_item_data live_call_routing_permissions.append(live_call_routing_permissions_item) - schedule_override_permissions: Unset | list[str] = UNSET + schedule_override_permissions: list[str] | Unset = UNSET if not isinstance(self.schedule_override_permissions, Unset): schedule_override_permissions = [] for schedule_override_permissions_item_data in self.schedule_override_permissions: schedule_override_permissions_item: str = schedule_override_permissions_item_data schedule_override_permissions.append(schedule_override_permissions_item) - schedules_permissions: Unset | list[str] = UNSET + schedules_permissions: list[str] | Unset = UNSET if not isinstance(self.schedules_permissions, Unset): schedules_permissions = [] for schedules_permissions_item_data in self.schedules_permissions: schedules_permissions_item: str = schedules_permissions_item_data schedules_permissions.append(schedules_permissions_item) - services_permissions: Unset | list[str] = UNSET + services_permissions: list[str] | Unset = UNSET if not isinstance(self.services_permissions, Unset): services_permissions = [] for services_permissions_item_data in self.services_permissions: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) - webhooks_permissions: Unset | list[str] = UNSET + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] for webhooks_permissions_item_data in self.webhooks_permissions: webhooks_permissions_item: str = webhooks_permissions_item_data webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions: Unset | list[str] = UNSET + workflows_permissions: list[str] | Unset = UNSET if not isinstance(self.workflows_permissions, Unset): workflows_permissions = [] for workflows_permissions_item_data in self.workflows_permissions: @@ -397,185 +399,235 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: system_role = d.pop("system_role", UNSET) - alert_sources_permissions = [] _alert_sources_permissions = d.pop("alert_sources_permissions", UNSET) - for alert_sources_permissions_item_data in _alert_sources_permissions or []: - alert_sources_permissions_item = check_on_call_role_alert_sources_permissions_item( - alert_sources_permissions_item_data - ) + alert_sources_permissions: list[OnCallRoleAlertSourcesPermissionsItem] | Unset = UNSET + if _alert_sources_permissions is not UNSET: + alert_sources_permissions = [] + for alert_sources_permissions_item_data in _alert_sources_permissions: + alert_sources_permissions_item = check_on_call_role_alert_sources_permissions_item( + alert_sources_permissions_item_data + ) - alert_sources_permissions.append(alert_sources_permissions_item) + alert_sources_permissions.append(alert_sources_permissions_item) - alert_urgency_permissions = [] _alert_urgency_permissions = d.pop("alert_urgency_permissions", UNSET) - for alert_urgency_permissions_item_data in _alert_urgency_permissions or []: - alert_urgency_permissions_item = check_on_call_role_alert_urgency_permissions_item( - alert_urgency_permissions_item_data - ) + alert_urgency_permissions: list[OnCallRoleAlertUrgencyPermissionsItem] | Unset = UNSET + if _alert_urgency_permissions is not UNSET: + alert_urgency_permissions = [] + for alert_urgency_permissions_item_data in _alert_urgency_permissions: + alert_urgency_permissions_item = check_on_call_role_alert_urgency_permissions_item( + alert_urgency_permissions_item_data + ) - alert_urgency_permissions.append(alert_urgency_permissions_item) + alert_urgency_permissions.append(alert_urgency_permissions_item) - alert_fields_permissions = [] _alert_fields_permissions = d.pop("alert_fields_permissions", UNSET) - for alert_fields_permissions_item_data in _alert_fields_permissions or []: - alert_fields_permissions_item = check_on_call_role_alert_fields_permissions_item( - alert_fields_permissions_item_data - ) + alert_fields_permissions: list[OnCallRoleAlertFieldsPermissionsItem] | Unset = UNSET + if _alert_fields_permissions is not UNSET: + alert_fields_permissions = [] + for alert_fields_permissions_item_data in _alert_fields_permissions: + alert_fields_permissions_item = check_on_call_role_alert_fields_permissions_item( + alert_fields_permissions_item_data + ) - alert_fields_permissions.append(alert_fields_permissions_item) + alert_fields_permissions.append(alert_fields_permissions_item) - alert_groups_permissions = [] _alert_groups_permissions = d.pop("alert_groups_permissions", UNSET) - for alert_groups_permissions_item_data in _alert_groups_permissions or []: - alert_groups_permissions_item = check_on_call_role_alert_groups_permissions_item( - alert_groups_permissions_item_data - ) + alert_groups_permissions: list[OnCallRoleAlertGroupsPermissionsItem] | Unset = UNSET + if _alert_groups_permissions is not UNSET: + alert_groups_permissions = [] + for alert_groups_permissions_item_data in _alert_groups_permissions: + alert_groups_permissions_item = check_on_call_role_alert_groups_permissions_item( + alert_groups_permissions_item_data + ) - alert_groups_permissions.append(alert_groups_permissions_item) + alert_groups_permissions.append(alert_groups_permissions_item) - alert_routing_rules_permissions = [] _alert_routing_rules_permissions = d.pop("alert_routing_rules_permissions", UNSET) - for alert_routing_rules_permissions_item_data in _alert_routing_rules_permissions or []: - alert_routing_rules_permissions_item = check_on_call_role_alert_routing_rules_permissions_item( - alert_routing_rules_permissions_item_data - ) + alert_routing_rules_permissions: list[OnCallRoleAlertRoutingRulesPermissionsItem] | Unset = UNSET + if _alert_routing_rules_permissions is not UNSET: + alert_routing_rules_permissions = [] + for alert_routing_rules_permissions_item_data in _alert_routing_rules_permissions: + alert_routing_rules_permissions_item = check_on_call_role_alert_routing_rules_permissions_item( + alert_routing_rules_permissions_item_data + ) - alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) + alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) - on_call_readiness_report_permissions = [] _on_call_readiness_report_permissions = d.pop("on_call_readiness_report_permissions", UNSET) - for on_call_readiness_report_permissions_item_data in _on_call_readiness_report_permissions or []: - on_call_readiness_report_permissions_item = check_on_call_role_on_call_readiness_report_permissions_item( - on_call_readiness_report_permissions_item_data - ) + on_call_readiness_report_permissions: list[OnCallRoleOnCallReadinessReportPermissionsItem] | Unset = UNSET + if _on_call_readiness_report_permissions is not UNSET: + on_call_readiness_report_permissions = [] + for on_call_readiness_report_permissions_item_data in _on_call_readiness_report_permissions: + on_call_readiness_report_permissions_item = ( + check_on_call_role_on_call_readiness_report_permissions_item( + on_call_readiness_report_permissions_item_data + ) + ) - on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) + on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) - on_call_roles_permissions = [] _on_call_roles_permissions = d.pop("on_call_roles_permissions", UNSET) - for on_call_roles_permissions_item_data in _on_call_roles_permissions or []: - on_call_roles_permissions_item = check_on_call_role_on_call_roles_permissions_item( - on_call_roles_permissions_item_data - ) + on_call_roles_permissions: list[OnCallRoleOnCallRolesPermissionsItem] | Unset = UNSET + if _on_call_roles_permissions is not UNSET: + on_call_roles_permissions = [] + for on_call_roles_permissions_item_data in _on_call_roles_permissions: + on_call_roles_permissions_item = check_on_call_role_on_call_roles_permissions_item( + on_call_roles_permissions_item_data + ) - on_call_roles_permissions.append(on_call_roles_permissions_item) + on_call_roles_permissions.append(on_call_roles_permissions_item) - alerts_permissions = [] _alerts_permissions = d.pop("alerts_permissions", UNSET) - for alerts_permissions_item_data in _alerts_permissions or []: - alerts_permissions_item = check_on_call_role_alerts_permissions_item(alerts_permissions_item_data) + alerts_permissions: list[OnCallRoleAlertsPermissionsItem] | Unset = UNSET + if _alerts_permissions is not UNSET: + alerts_permissions = [] + for alerts_permissions_item_data in _alerts_permissions: + alerts_permissions_item = check_on_call_role_alerts_permissions_item(alerts_permissions_item_data) - alerts_permissions.append(alerts_permissions_item) + alerts_permissions.append(alerts_permissions_item) - api_keys_permissions = [] _api_keys_permissions = d.pop("api_keys_permissions", UNSET) - for api_keys_permissions_item_data in _api_keys_permissions or []: - api_keys_permissions_item = check_on_call_role_api_keys_permissions_item(api_keys_permissions_item_data) + api_keys_permissions: list[OnCallRoleApiKeysPermissionsItem] | Unset = UNSET + if _api_keys_permissions is not UNSET: + api_keys_permissions = [] + for api_keys_permissions_item_data in _api_keys_permissions: + api_keys_permissions_item = check_on_call_role_api_keys_permissions_item(api_keys_permissions_item_data) - api_keys_permissions.append(api_keys_permissions_item) + api_keys_permissions.append(api_keys_permissions_item) - audits_permissions = [] _audits_permissions = d.pop("audits_permissions", UNSET) - for audits_permissions_item_data in _audits_permissions or []: - audits_permissions_item = check_on_call_role_audits_permissions_item(audits_permissions_item_data) + audits_permissions: list[OnCallRoleAuditsPermissionsItem] | Unset = UNSET + if _audits_permissions is not UNSET: + audits_permissions = [] + for audits_permissions_item_data in _audits_permissions: + audits_permissions_item = check_on_call_role_audits_permissions_item(audits_permissions_item_data) - audits_permissions.append(audits_permissions_item) + audits_permissions.append(audits_permissions_item) - contacts_permissions = [] _contacts_permissions = d.pop("contacts_permissions", UNSET) - for contacts_permissions_item_data in _contacts_permissions or []: - contacts_permissions_item = check_on_call_role_contacts_permissions_item(contacts_permissions_item_data) + contacts_permissions: list[OnCallRoleContactsPermissionsItem] | Unset = UNSET + if _contacts_permissions is not UNSET: + contacts_permissions = [] + for contacts_permissions_item_data in _contacts_permissions: + contacts_permissions_item = check_on_call_role_contacts_permissions_item(contacts_permissions_item_data) - contacts_permissions.append(contacts_permissions_item) + contacts_permissions.append(contacts_permissions_item) - escalation_policies_permissions = [] _escalation_policies_permissions = d.pop("escalation_policies_permissions", UNSET) - for escalation_policies_permissions_item_data in _escalation_policies_permissions or []: - escalation_policies_permissions_item = check_on_call_role_escalation_policies_permissions_item( - escalation_policies_permissions_item_data - ) + escalation_policies_permissions: list[OnCallRoleEscalationPoliciesPermissionsItem] | Unset = UNSET + if _escalation_policies_permissions is not UNSET: + escalation_policies_permissions = [] + for escalation_policies_permissions_item_data in _escalation_policies_permissions: + escalation_policies_permissions_item = check_on_call_role_escalation_policies_permissions_item( + escalation_policies_permissions_item_data + ) - escalation_policies_permissions.append(escalation_policies_permissions_item) + escalation_policies_permissions.append(escalation_policies_permissions_item) - groups_permissions = [] _groups_permissions = d.pop("groups_permissions", UNSET) - for groups_permissions_item_data in _groups_permissions or []: - groups_permissions_item = check_on_call_role_groups_permissions_item(groups_permissions_item_data) + groups_permissions: list[OnCallRoleGroupsPermissionsItem] | Unset = UNSET + if _groups_permissions is not UNSET: + groups_permissions = [] + for groups_permissions_item_data in _groups_permissions: + groups_permissions_item = check_on_call_role_groups_permissions_item(groups_permissions_item_data) - groups_permissions.append(groups_permissions_item) + groups_permissions.append(groups_permissions_item) - heartbeats_permissions = [] _heartbeats_permissions = d.pop("heartbeats_permissions", UNSET) - for heartbeats_permissions_item_data in _heartbeats_permissions or []: - heartbeats_permissions_item = check_on_call_role_heartbeats_permissions_item( - heartbeats_permissions_item_data - ) + heartbeats_permissions: list[OnCallRoleHeartbeatsPermissionsItem] | Unset = UNSET + if _heartbeats_permissions is not UNSET: + heartbeats_permissions = [] + for heartbeats_permissions_item_data in _heartbeats_permissions: + heartbeats_permissions_item = check_on_call_role_heartbeats_permissions_item( + heartbeats_permissions_item_data + ) - heartbeats_permissions.append(heartbeats_permissions_item) + heartbeats_permissions.append(heartbeats_permissions_item) - integrations_permissions = [] _integrations_permissions = d.pop("integrations_permissions", UNSET) - for integrations_permissions_item_data in _integrations_permissions or []: - integrations_permissions_item = check_on_call_role_integrations_permissions_item( - integrations_permissions_item_data - ) + integrations_permissions: list[OnCallRoleIntegrationsPermissionsItem] | Unset = UNSET + if _integrations_permissions is not UNSET: + integrations_permissions = [] + for integrations_permissions_item_data in _integrations_permissions: + integrations_permissions_item = check_on_call_role_integrations_permissions_item( + integrations_permissions_item_data + ) - integrations_permissions.append(integrations_permissions_item) + integrations_permissions.append(integrations_permissions_item) - invitations_permissions = [] _invitations_permissions = d.pop("invitations_permissions", UNSET) - for invitations_permissions_item_data in _invitations_permissions or []: - invitations_permissions_item = check_on_call_role_invitations_permissions_item( - invitations_permissions_item_data - ) + invitations_permissions: list[OnCallRoleInvitationsPermissionsItem] | Unset = UNSET + if _invitations_permissions is not UNSET: + invitations_permissions = [] + for invitations_permissions_item_data in _invitations_permissions: + invitations_permissions_item = check_on_call_role_invitations_permissions_item( + invitations_permissions_item_data + ) - invitations_permissions.append(invitations_permissions_item) + invitations_permissions.append(invitations_permissions_item) - live_call_routing_permissions = [] _live_call_routing_permissions = d.pop("live_call_routing_permissions", UNSET) - for live_call_routing_permissions_item_data in _live_call_routing_permissions or []: - live_call_routing_permissions_item = check_on_call_role_live_call_routing_permissions_item( - live_call_routing_permissions_item_data - ) + live_call_routing_permissions: list[OnCallRoleLiveCallRoutingPermissionsItem] | Unset = UNSET + if _live_call_routing_permissions is not UNSET: + live_call_routing_permissions = [] + for live_call_routing_permissions_item_data in _live_call_routing_permissions: + live_call_routing_permissions_item = check_on_call_role_live_call_routing_permissions_item( + live_call_routing_permissions_item_data + ) - live_call_routing_permissions.append(live_call_routing_permissions_item) + live_call_routing_permissions.append(live_call_routing_permissions_item) - schedule_override_permissions = [] _schedule_override_permissions = d.pop("schedule_override_permissions", UNSET) - for schedule_override_permissions_item_data in _schedule_override_permissions or []: - schedule_override_permissions_item = check_on_call_role_schedule_override_permissions_item( - schedule_override_permissions_item_data - ) + schedule_override_permissions: list[OnCallRoleScheduleOverridePermissionsItem] | Unset = UNSET + if _schedule_override_permissions is not UNSET: + schedule_override_permissions = [] + for schedule_override_permissions_item_data in _schedule_override_permissions: + schedule_override_permissions_item = check_on_call_role_schedule_override_permissions_item( + schedule_override_permissions_item_data + ) - schedule_override_permissions.append(schedule_override_permissions_item) + schedule_override_permissions.append(schedule_override_permissions_item) - schedules_permissions = [] _schedules_permissions = d.pop("schedules_permissions", UNSET) - for schedules_permissions_item_data in _schedules_permissions or []: - schedules_permissions_item = check_on_call_role_schedules_permissions_item(schedules_permissions_item_data) + schedules_permissions: list[OnCallRoleSchedulesPermissionsItem] | Unset = UNSET + if _schedules_permissions is not UNSET: + schedules_permissions = [] + for schedules_permissions_item_data in _schedules_permissions: + schedules_permissions_item = check_on_call_role_schedules_permissions_item( + schedules_permissions_item_data + ) - schedules_permissions.append(schedules_permissions_item) + schedules_permissions.append(schedules_permissions_item) - services_permissions = [] _services_permissions = d.pop("services_permissions", UNSET) - for services_permissions_item_data in _services_permissions or []: - services_permissions_item = check_on_call_role_services_permissions_item(services_permissions_item_data) + services_permissions: list[OnCallRoleServicesPermissionsItem] | Unset = UNSET + if _services_permissions is not UNSET: + services_permissions = [] + for services_permissions_item_data in _services_permissions: + services_permissions_item = check_on_call_role_services_permissions_item(services_permissions_item_data) - services_permissions.append(services_permissions_item) + services_permissions.append(services_permissions_item) - webhooks_permissions = [] _webhooks_permissions = d.pop("webhooks_permissions", UNSET) - for webhooks_permissions_item_data in _webhooks_permissions or []: - webhooks_permissions_item = check_on_call_role_webhooks_permissions_item(webhooks_permissions_item_data) + webhooks_permissions: list[OnCallRoleWebhooksPermissionsItem] | Unset = UNSET + if _webhooks_permissions is not UNSET: + webhooks_permissions = [] + for webhooks_permissions_item_data in _webhooks_permissions: + webhooks_permissions_item = check_on_call_role_webhooks_permissions_item(webhooks_permissions_item_data) - webhooks_permissions.append(webhooks_permissions_item) + webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions = [] _workflows_permissions = d.pop("workflows_permissions", UNSET) - for workflows_permissions_item_data in _workflows_permissions or []: - workflows_permissions_item = check_on_call_role_workflows_permissions_item(workflows_permissions_item_data) + workflows_permissions: list[OnCallRoleWorkflowsPermissionsItem] | Unset = UNSET + if _workflows_permissions is not UNSET: + workflows_permissions = [] + for workflows_permissions_item_data in _workflows_permissions: + workflows_permissions_item = check_on_call_role_workflows_permissions_item( + workflows_permissions_item_data + ) - workflows_permissions.append(workflows_permissions_item) + workflows_permissions.append(workflows_permissions_item) on_call_role = cls( name=name, diff --git a/rootly_sdk/models/on_call_role_list.py b/rootly_sdk/models/on_call_role_list.py index 2dedcfb1..18aeada7 100644 --- a/rootly_sdk/models/on_call_role_list.py +++ b/rootly_sdk/models/on_call_role_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class OnCallRoleList: """ Attributes: - data (list['OnCallRoleListDataItem']): + data (list[OnCallRoleListDataItem]): links (Links): meta (Meta): """ - data: list["OnCallRoleListDataItem"] - links: "Links" - meta: "Meta" + data: list[OnCallRoleListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_role_list_data_item.py b/rootly_sdk/models/on_call_role_list_data_item.py index 615a062e..bd50500c 100644 --- a/rootly_sdk/models/on_call_role_list_data_item.py +++ b/rootly_sdk/models/on_call_role_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class OnCallRoleListDataItem: id: str type_: OnCallRoleListDataItemType - attributes: "OnCallRole" + attributes: OnCallRole additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_role_relationship.py b/rootly_sdk/models/on_call_role_relationship.py index 8e9f610d..b1385f6f 100644 --- a/rootly_sdk/models/on_call_role_relationship.py +++ b/rootly_sdk/models/on_call_role_relationship.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class OnCallRoleRelationship: """ Attributes: - data (Union['OnCallRoleRelationshipDataType0', None, Unset]): + data (None | OnCallRoleRelationshipDataType0 | Unset): """ - data: Union["OnCallRoleRelationshipDataType0", None, Unset] = UNSET + data: None | OnCallRoleRelationshipDataType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.on_call_role_relationship_data_type_0 import OnCallRoleRelationshipDataType0 - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, OnCallRoleRelationshipDataType0): @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_data(data: object) -> Union["OnCallRoleRelationshipDataType0", None, Unset]: + def _parse_data(data: object) -> None | OnCallRoleRelationshipDataType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -59,9 +61,9 @@ def _parse_data(data: object) -> Union["OnCallRoleRelationshipDataType0", None, data_type_0 = OnCallRoleRelationshipDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["OnCallRoleRelationshipDataType0", None, Unset], data) + return cast(None | OnCallRoleRelationshipDataType0 | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/on_call_role_relationship_data_type_0.py b/rootly_sdk/models/on_call_role_relationship_data_type_0.py index 16815aea..20a1e8a6 100644 --- a/rootly_sdk/models/on_call_role_relationship_data_type_0.py +++ b/rootly_sdk/models/on_call_role_relationship_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class OnCallRoleRelationshipDataType0: """ Attributes: - id (Union[Unset, str]): - type_ (Union[Unset, OnCallRoleRelationshipDataType0Type]): + id (str | Unset): + type_ (OnCallRoleRelationshipDataType0Type | Unset): """ - id: Unset | str = UNSET - type_: Unset | OnCallRoleRelationshipDataType0Type = UNSET + id: str | Unset = UNSET + type_: OnCallRoleRelationshipDataType0Type | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | OnCallRoleRelationshipDataType0Type + type_: OnCallRoleRelationshipDataType0Type | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/on_call_role_response.py b/rootly_sdk/models/on_call_role_response.py index 06047fb3..b574095c 100644 --- a/rootly_sdk/models/on_call_role_response.py +++ b/rootly_sdk/models/on_call_role_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class OnCallRoleResponse: data (OnCallRoleResponseData): """ - data: "OnCallRoleResponseData" + data: OnCallRoleResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_role_response_data.py b/rootly_sdk/models/on_call_role_response_data.py index 805a5a45..2a33ab10 100644 --- a/rootly_sdk/models/on_call_role_response_data.py +++ b/rootly_sdk/models/on_call_role_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class OnCallRoleResponseData: id: str type_: OnCallRoleResponseDataType - attributes: "OnCallRole" + attributes: OnCallRole additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_shadow.py b/rootly_sdk/models/on_call_shadow.py index 372d29f8..c04b4ed3 100644 --- a/rootly_sdk/models/on_call_shadow.py +++ b/rootly_sdk/models/on_call_shadow.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import Any, TypeVar @@ -22,8 +24,8 @@ class OnCallShadow: shadow_user_id (int): Which user the shadow shift belongs to. starts_at (datetime.datetime): Start datetime of shadow shift ends_at (datetime.datetime): End datetime for shadow shift - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ schedule_id: str @@ -32,8 +34,8 @@ class OnCallShadow: shadow_user_id: int starts_at: datetime.datetime ends_at: datetime.datetime - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_shadow_response.py b/rootly_sdk/models/on_call_shadow_response.py index 7073404c..1aff7e81 100644 --- a/rootly_sdk/models/on_call_shadow_response.py +++ b/rootly_sdk/models/on_call_shadow_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class OnCallShadowResponse: data (OnCallShadowResponseData): """ - data: "OnCallShadowResponseData" + data: OnCallShadowResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_shadow_response_data.py b/rootly_sdk/models/on_call_shadow_response_data.py index 8306a936..021f310f 100644 --- a/rootly_sdk/models/on_call_shadow_response_data.py +++ b/rootly_sdk/models/on_call_shadow_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class OnCallShadowResponseData: id: str type_: OnCallShadowResponseDataType - attributes: "OnCallShadow" + attributes: OnCallShadow additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_shadows_list.py b/rootly_sdk/models/on_call_shadows_list.py index 9abb6428..1a0e65b1 100644 --- a/rootly_sdk/models/on_call_shadows_list.py +++ b/rootly_sdk/models/on_call_shadows_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class OnCallShadowsList: """ Attributes: - data (list['OnCallShadowsListDataItem']): + data (list[OnCallShadowsListDataItem]): links (Links): meta (Meta): """ - data: list["OnCallShadowsListDataItem"] - links: "Links" - meta: "Meta" + data: list[OnCallShadowsListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/on_call_shadows_list_data_item.py b/rootly_sdk/models/on_call_shadows_list_data_item.py index 57322935..5709fc25 100644 --- a/rootly_sdk/models/on_call_shadows_list_data_item.py +++ b/rootly_sdk/models/on_call_shadows_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class OnCallShadowsListDataItem: id: str type_: OnCallShadowsListDataItemType - attributes: "OnCallShadow" + attributes: OnCallShadow additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/override_shift.py b/rootly_sdk/models/override_shift.py index b37efd61..5e3e9dd1 100644 --- a/rootly_sdk/models/override_shift.py +++ b/rootly_sdk/models/override_shift.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,15 +21,15 @@ class OverrideShift: """ Attributes: schedule_id (str): ID of schedule - rotation_id (Union[None, str]): ID of rotation + rotation_id (None | str): ID of rotation starts_at (str): Start datetime of shift ends_at (str): End datetime of shift is_override (bool): Denotes shift is an override shift - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update - shift_override (Union[Unset, ShiftOverrideResponse]): - user_id (Union[Unset, int]): Override shift user - user (Union[Unset, UserResponse]): + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + shift_override (ShiftOverrideResponse | Unset): + user_id (int | Unset): Override shift user + user (UserResponse | Unset): """ schedule_id: str @@ -35,11 +37,11 @@ class OverrideShift: starts_at: str ends_at: str is_override: bool - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET - shift_override: Union[Unset, "ShiftOverrideResponse"] = UNSET - user_id: Unset | int = UNSET - user: Union[Unset, "UserResponse"] = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + shift_override: ShiftOverrideResponse | Unset = UNSET + user_id: int | Unset = UNSET + user: UserResponse | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -58,13 +60,13 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - shift_override: Unset | dict[str, Any] = UNSET + shift_override: dict[str, Any] | Unset = UNSET if not isinstance(self.shift_override, Unset): shift_override = self.shift_override.to_dict() user_id = self.user_id - user: Unset | dict[str, Any] = UNSET + user: dict[str, Any] | Unset = UNSET if not isinstance(self.user, Unset): user = self.user.to_dict() @@ -118,7 +120,7 @@ def _parse_rotation_id(data: object) -> None | str: updated_at = d.pop("updated_at", UNSET) _shift_override = d.pop("shift_override", UNSET) - shift_override: Unset | ShiftOverrideResponse + shift_override: ShiftOverrideResponse | Unset if isinstance(_shift_override, Unset): shift_override = UNSET else: @@ -127,7 +129,7 @@ def _parse_rotation_id(data: object) -> None | str: user_id = d.pop("user_id", UNSET) _user = d.pop("user", UNSET) - user: Unset | UserResponse + user: UserResponse | Unset if isinstance(_user, Unset): user = UNSET else: diff --git a/rootly_sdk/models/override_shift_list.py b/rootly_sdk/models/override_shift_list.py index 1a2d7556..70a96a4b 100644 --- a/rootly_sdk/models/override_shift_list.py +++ b/rootly_sdk/models/override_shift_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class OverrideShiftList: """ Attributes: - data (list['OverrideShiftListDataItem']): + data (list[OverrideShiftListDataItem]): links (Links): meta (Meta): """ - data: list["OverrideShiftListDataItem"] - links: "Links" - meta: "Meta" + data: list[OverrideShiftListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/override_shift_list_data_item.py b/rootly_sdk/models/override_shift_list_data_item.py index 6549f203..512ffce1 100644 --- a/rootly_sdk/models/override_shift_list_data_item.py +++ b/rootly_sdk/models/override_shift_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class OverrideShiftListDataItem: id: str type_: OverrideShiftListDataItemType - attributes: "OverrideShift" + attributes: OverrideShift additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/override_shift_response.py b/rootly_sdk/models/override_shift_response.py index 13d14e19..e216bac1 100644 --- a/rootly_sdk/models/override_shift_response.py +++ b/rootly_sdk/models/override_shift_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class OverrideShiftResponse: data (OverrideShiftResponseData): """ - data: "OverrideShiftResponseData" + data: OverrideShiftResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/override_shift_response_data.py b/rootly_sdk/models/override_shift_response_data.py index 751fe8ca..ee954420 100644 --- a/rootly_sdk/models/override_shift_response_data.py +++ b/rootly_sdk/models/override_shift_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class OverrideShiftResponseData: id: str type_: OverrideShiftResponseDataType - attributes: "OverrideShift" + attributes: OverrideShift additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py b/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py new file mode 100644 index 00000000..23fc21d3 --- /dev/null +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py @@ -0,0 +1,189 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.page_jsmops_on_call_responders_task_params_priority import ( + PageJsmopsOnCallRespondersTaskParamsPriority, + check_page_jsmops_on_call_responders_task_params_priority, +) +from ..models.page_jsmops_on_call_responders_task_params_task_type import ( + PageJsmopsOnCallRespondersTaskParamsTaskType, + check_page_jsmops_on_call_responders_task_params_task_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.page_jsmops_on_call_responders_task_params_teams_item import ( + PageJsmopsOnCallRespondersTaskParamsTeamsItem, + ) + from ..models.page_jsmops_on_call_responders_task_params_users_item import ( + PageJsmopsOnCallRespondersTaskParamsUsersItem, + ) + + +T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParams") + + +@_attrs_define +class PageJsmopsOnCallRespondersTaskParams: + """ + Attributes: + task_type (PageJsmopsOnCallRespondersTaskParamsTaskType | Unset): + title (None | str | Unset): Incident title. + message (str | Unset): Message of the incident + description (str | Unset): Description field of the incident that is generally used to provide a detailed + information about the incident + teams (list[PageJsmopsOnCallRespondersTaskParamsTeamsItem] | Unset): + users (list[PageJsmopsOnCallRespondersTaskParamsUsersItem] | Unset): + priority (PageJsmopsOnCallRespondersTaskParamsPriority | Unset): Default: 'P3'. + """ + + task_type: PageJsmopsOnCallRespondersTaskParamsTaskType | Unset = UNSET + title: None | str | Unset = UNSET + message: str | Unset = UNSET + description: str | Unset = UNSET + teams: list[PageJsmopsOnCallRespondersTaskParamsTeamsItem] | Unset = UNSET + users: list[PageJsmopsOnCallRespondersTaskParamsUsersItem] | Unset = UNSET + priority: PageJsmopsOnCallRespondersTaskParamsPriority | Unset = "P3" + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + message = self.message + + description = self.description + + teams: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.teams, Unset): + teams = [] + for teams_item_data in self.teams: + teams_item = teams_item_data.to_dict() + teams.append(teams_item) + + users: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.users, Unset): + users = [] + for users_item_data in self.users: + users_item = users_item_data.to_dict() + users.append(users_item) + + priority: str | Unset = UNSET + if not isinstance(self.priority, Unset): + priority = self.priority + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if title is not UNSET: + field_dict["title"] = title + if message is not UNSET: + field_dict["message"] = message + if description is not UNSET: + field_dict["description"] = description + if teams is not UNSET: + field_dict["teams"] = teams + if users is not UNSET: + field_dict["users"] = users + if priority is not UNSET: + field_dict["priority"] = priority + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.page_jsmops_on_call_responders_task_params_teams_item import ( + PageJsmopsOnCallRespondersTaskParamsTeamsItem, + ) + from ..models.page_jsmops_on_call_responders_task_params_users_item import ( + PageJsmopsOnCallRespondersTaskParamsUsersItem, + ) + + d = dict(src_dict) + _task_type = d.pop("task_type", UNSET) + task_type: PageJsmopsOnCallRespondersTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_page_jsmops_on_call_responders_task_params_task_type(_task_type) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + message = d.pop("message", UNSET) + + description = d.pop("description", UNSET) + + _teams = d.pop("teams", UNSET) + teams: list[PageJsmopsOnCallRespondersTaskParamsTeamsItem] | Unset = UNSET + if _teams is not UNSET: + teams = [] + for teams_item_data in _teams: + teams_item = PageJsmopsOnCallRespondersTaskParamsTeamsItem.from_dict(teams_item_data) + + teams.append(teams_item) + + _users = d.pop("users", UNSET) + users: list[PageJsmopsOnCallRespondersTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = PageJsmopsOnCallRespondersTaskParamsUsersItem.from_dict(users_item_data) + + users.append(users_item) + + _priority = d.pop("priority", UNSET) + priority: PageJsmopsOnCallRespondersTaskParamsPriority | Unset + if isinstance(_priority, Unset): + priority = UNSET + else: + priority = check_page_jsmops_on_call_responders_task_params_priority(_priority) + + page_jsmops_on_call_responders_task_params = cls( + task_type=task_type, + title=title, + message=message, + description=description, + teams=teams, + users=users, + priority=priority, + ) + + page_jsmops_on_call_responders_task_params.additional_properties = d + return page_jsmops_on_call_responders_task_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/page_jsmops_on_call_responders_task_params_priority.py b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_priority.py new file mode 100644 index 00000000..ad4a610d --- /dev/null +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_priority.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +PageJsmopsOnCallRespondersTaskParamsPriority = Literal["auto", "P1", "P2", "P3", "P4", "P5"] + +PAGE_JSMOPS_ON_CALL_RESPONDERS_TASK_PARAMS_PRIORITY_VALUES: set[PageJsmopsOnCallRespondersTaskParamsPriority] = { + "auto", + "P1", + "P2", + "P3", + "P4", + "P5", +} + + +def check_page_jsmops_on_call_responders_task_params_priority( + value: str | None, +) -> PageJsmopsOnCallRespondersTaskParamsPriority | None: + if value is None: + return None + if value in PAGE_JSMOPS_ON_CALL_RESPONDERS_TASK_PARAMS_PRIORITY_VALUES: + return cast(PageJsmopsOnCallRespondersTaskParamsPriority, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {PAGE_JSMOPS_ON_CALL_RESPONDERS_TASK_PARAMS_PRIORITY_VALUES!r}" + ) diff --git a/rootly_sdk/models/page_jsmops_on_call_responders_task_params_task_type.py b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_task_type.py new file mode 100644 index 00000000..a5d5ef6c --- /dev/null +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +PageJsmopsOnCallRespondersTaskParamsTaskType = Literal["page_jsmops_on_call_responders"] + +PAGE_JSMOPS_ON_CALL_RESPONDERS_TASK_PARAMS_TASK_TYPE_VALUES: set[PageJsmopsOnCallRespondersTaskParamsTaskType] = { + "page_jsmops_on_call_responders", +} + + +def check_page_jsmops_on_call_responders_task_params_task_type( + value: str | None, +) -> PageJsmopsOnCallRespondersTaskParamsTaskType | None: + if value is None: + return None + if value in PAGE_JSMOPS_ON_CALL_RESPONDERS_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(PageJsmopsOnCallRespondersTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {PAGE_JSMOPS_ON_CALL_RESPONDERS_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/page_jsmops_on_call_responders_task_params_teams_item.py b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_teams_item.py new file mode 100644 index 00000000..9dee4774 --- /dev/null +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_teams_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParamsTeamsItem") + + +@_attrs_define +class PageJsmopsOnCallRespondersTaskParamsTeamsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + page_jsmops_on_call_responders_task_params_teams_item = cls( + id=id, + name=name, + ) + + page_jsmops_on_call_responders_task_params_teams_item.additional_properties = d + return page_jsmops_on_call_responders_task_params_teams_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/page_jsmops_on_call_responders_task_params_users_item.py b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_users_item.py new file mode 100644 index 00000000..24aa7ba3 --- /dev/null +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params_users_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParamsUsersItem") + + +@_attrs_define +class PageJsmopsOnCallRespondersTaskParamsUsersItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + page_jsmops_on_call_responders_task_params_users_item = cls( + id=id, + name=name, + ) + + page_jsmops_on_call_responders_task_params_users_item.additional_properties = d + return page_jsmops_on_call_responders_task_params_users_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py index ad72c711..635e4069 100644 --- a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -30,31 +32,31 @@ class PageOpsgenieOnCallRespondersTaskParams: """ Attributes: - task_type (Union[Unset, PageOpsgenieOnCallRespondersTaskParamsTaskType]): - title (Union[None, Unset, str]): Incident title. - message (Union[Unset, str]): Message of the incident - description (Union[Unset, str]): Description field of the incident that is generally used to provide a detailed + task_type (PageOpsgenieOnCallRespondersTaskParamsTaskType | Unset): + title (None | str | Unset): Incident title. + message (str | Unset): Message of the incident + description (str | Unset): Description field of the incident that is generally used to provide a detailed information about the incident - teams (Union[Unset, list['PageOpsgenieOnCallRespondersTaskParamsTeamsItem']]): - users (Union[Unset, list['PageOpsgenieOnCallRespondersTaskParamsUsersItem']]): - priority (Union[Unset, PageOpsgenieOnCallRespondersTaskParamsPriority]): Default: 'P1'. + teams (list[PageOpsgenieOnCallRespondersTaskParamsTeamsItem] | Unset): + users (list[PageOpsgenieOnCallRespondersTaskParamsUsersItem] | Unset): + priority (PageOpsgenieOnCallRespondersTaskParamsPriority | Unset): Default: 'P1'. """ - task_type: Unset | PageOpsgenieOnCallRespondersTaskParamsTaskType = UNSET - title: None | Unset | str = UNSET - message: Unset | str = UNSET - description: Unset | str = UNSET - teams: Unset | list["PageOpsgenieOnCallRespondersTaskParamsTeamsItem"] = UNSET - users: Unset | list["PageOpsgenieOnCallRespondersTaskParamsUsersItem"] = UNSET - priority: Unset | PageOpsgenieOnCallRespondersTaskParamsPriority = "P1" + task_type: PageOpsgenieOnCallRespondersTaskParamsTaskType | Unset = UNSET + title: None | str | Unset = UNSET + message: str | Unset = UNSET + description: str | Unset = UNSET + teams: list[PageOpsgenieOnCallRespondersTaskParamsTeamsItem] | Unset = UNSET + users: list[PageOpsgenieOnCallRespondersTaskParamsUsersItem] | Unset = UNSET + priority: PageOpsgenieOnCallRespondersTaskParamsPriority | Unset = "P1" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: @@ -64,21 +66,21 @@ def to_dict(self) -> dict[str, Any]: description = self.description - teams: Unset | list[dict[str, Any]] = UNSET + teams: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.teams, Unset): teams = [] for teams_item_data in self.teams: teams_item = teams_item_data.to_dict() teams.append(teams_item) - users: Unset | list[dict[str, Any]] = UNSET + users: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.users, Unset): users = [] for users_item_data in self.users: users_item = users_item_data.to_dict() users.append(users_item) - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority @@ -113,18 +115,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _task_type = d.pop("task_type", UNSET) - task_type: Unset | PageOpsgenieOnCallRespondersTaskParamsTaskType + task_type: PageOpsgenieOnCallRespondersTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_page_opsgenie_on_call_responders_task_params_task_type(_task_type) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) @@ -132,22 +134,26 @@ def _parse_title(data: object) -> None | Unset | str: description = d.pop("description", UNSET) - teams = [] _teams = d.pop("teams", UNSET) - for teams_item_data in _teams or []: - teams_item = PageOpsgenieOnCallRespondersTaskParamsTeamsItem.from_dict(teams_item_data) + teams: list[PageOpsgenieOnCallRespondersTaskParamsTeamsItem] | Unset = UNSET + if _teams is not UNSET: + teams = [] + for teams_item_data in _teams: + teams_item = PageOpsgenieOnCallRespondersTaskParamsTeamsItem.from_dict(teams_item_data) - teams.append(teams_item) + teams.append(teams_item) - users = [] _users = d.pop("users", UNSET) - for users_item_data in _users or []: - users_item = PageOpsgenieOnCallRespondersTaskParamsUsersItem.from_dict(users_item_data) + users: list[PageOpsgenieOnCallRespondersTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = PageOpsgenieOnCallRespondersTaskParamsUsersItem.from_dict(users_item_data) - users.append(users_item) + users.append(users_item) _priority = d.pop("priority", UNSET) - priority: Unset | PageOpsgenieOnCallRespondersTaskParamsPriority + priority: PageOpsgenieOnCallRespondersTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_teams_item.py b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_teams_item.py index d60d0421..50c3593a 100644 --- a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_teams_item.py +++ b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_teams_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PageOpsgenieOnCallRespondersTaskParamsTeamsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_users_item.py b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_users_item.py index 7eeaf177..9c55df3e 100644 --- a/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_users_item.py +++ b/rootly_sdk/models/page_opsgenie_on_call_responders_task_params_users_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PageOpsgenieOnCallRespondersTaskParamsUsersItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py index 69db5e99..07ecfd04 100644 --- a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -34,53 +36,53 @@ class PagePagerdutyOnCallRespondersTaskParams: """ Attributes: service (PagePagerdutyOnCallRespondersTaskParamsService): - task_type (Union[Unset, PagePagerdutyOnCallRespondersTaskParamsTaskType]): - escalation_policies (Union[Unset, list['PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem']]): - users (Union[Unset, list['PagePagerdutyOnCallRespondersTaskParamsUsersItem']]): - title (Union[None, Unset, str]): Incident title. - message (Union[Unset, str]): - urgency (Union[Unset, PagePagerdutyOnCallRespondersTaskParamsUrgency]): Default: 'high'. - priority (Union[Unset, str]): PagerDuty incident priority, selecting auto will let Rootly auto map our incident + task_type (PagePagerdutyOnCallRespondersTaskParamsTaskType | Unset): + escalation_policies (list[PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem] | Unset): + users (list[PagePagerdutyOnCallRespondersTaskParamsUsersItem] | Unset): + title (None | str | Unset): Incident title. + message (str | Unset): + urgency (PagePagerdutyOnCallRespondersTaskParamsUrgency | Unset): Default: 'high'. + priority (str | Unset): PagerDuty incident priority, selecting auto will let Rootly auto map our incident severity - create_new_incident_on_conflict (Union[Unset, bool]): Rootly only supports linking to a single PagerDuty - incident. If this feature is disabled Rootly will add responders from any additional pages to the existing - PagerDuty incident that is linked to the Rootly incident. If enabled, Rootly will create a new PagerDuty - incident that is not linked to any Rootly incidents Default: False. + create_new_incident_on_conflict (bool | Unset): Rootly only supports linking to a single PagerDuty incident. If + this feature is disabled Rootly will add responders from any additional pages to the existing PagerDuty incident + that is linked to the Rootly incident. If enabled, Rootly will create a new PagerDuty incident that is not + linked to any Rootly incidents Default: False. """ - service: "PagePagerdutyOnCallRespondersTaskParamsService" - task_type: Unset | PagePagerdutyOnCallRespondersTaskParamsTaskType = UNSET - escalation_policies: Unset | list["PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem"] = UNSET - users: Unset | list["PagePagerdutyOnCallRespondersTaskParamsUsersItem"] = UNSET - title: None | Unset | str = UNSET - message: Unset | str = UNSET - urgency: Unset | PagePagerdutyOnCallRespondersTaskParamsUrgency = "high" - priority: Unset | str = UNSET - create_new_incident_on_conflict: Unset | bool = False + service: PagePagerdutyOnCallRespondersTaskParamsService + task_type: PagePagerdutyOnCallRespondersTaskParamsTaskType | Unset = UNSET + escalation_policies: list[PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem] | Unset = UNSET + users: list[PagePagerdutyOnCallRespondersTaskParamsUsersItem] | Unset = UNSET + title: None | str | Unset = UNSET + message: str | Unset = UNSET + urgency: PagePagerdutyOnCallRespondersTaskParamsUrgency | Unset = "high" + priority: str | Unset = UNSET + create_new_incident_on_conflict: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: service = self.service.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - escalation_policies: Unset | list[dict[str, Any]] = UNSET + escalation_policies: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.escalation_policies, Unset): escalation_policies = [] for escalation_policies_item_data in self.escalation_policies: escalation_policies_item = escalation_policies_item_data.to_dict() escalation_policies.append(escalation_policies_item) - users: Unset | list[dict[str, Any]] = UNSET + users: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.users, Unset): users = [] for users_item_data in self.users: users_item = users_item_data.to_dict() users.append(users_item) - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: @@ -88,7 +90,7 @@ def to_dict(self) -> dict[str, Any]: message = self.message - urgency: Unset | str = UNSET + urgency: str | Unset = UNSET if not isinstance(self.urgency, Unset): urgency = self.urgency @@ -138,41 +140,45 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: service = PagePagerdutyOnCallRespondersTaskParamsService.from_dict(d.pop("service")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | PagePagerdutyOnCallRespondersTaskParamsTaskType + task_type: PagePagerdutyOnCallRespondersTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_page_pagerduty_on_call_responders_task_params_task_type(_task_type) - escalation_policies = [] _escalation_policies = d.pop("escalation_policies", UNSET) - for escalation_policies_item_data in _escalation_policies or []: - escalation_policies_item = PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem.from_dict( - escalation_policies_item_data - ) + escalation_policies: list[PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem] | Unset = UNSET + if _escalation_policies is not UNSET: + escalation_policies = [] + for escalation_policies_item_data in _escalation_policies: + escalation_policies_item = PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem.from_dict( + escalation_policies_item_data + ) - escalation_policies.append(escalation_policies_item) + escalation_policies.append(escalation_policies_item) - users = [] _users = d.pop("users", UNSET) - for users_item_data in _users or []: - users_item = PagePagerdutyOnCallRespondersTaskParamsUsersItem.from_dict(users_item_data) + users: list[PagePagerdutyOnCallRespondersTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = PagePagerdutyOnCallRespondersTaskParamsUsersItem.from_dict(users_item_data) - users.append(users_item) + users.append(users_item) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) message = d.pop("message", UNSET) _urgency = d.pop("urgency", UNSET) - urgency: Unset | PagePagerdutyOnCallRespondersTaskParamsUrgency + urgency: PagePagerdutyOnCallRespondersTaskParamsUrgency | Unset if isinstance(_urgency, Unset): urgency = UNSET else: diff --git a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_escalation_policies_item.py b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_escalation_policies_item.py index 4384233c..2d743482 100644 --- a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_escalation_policies_item.py +++ b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_escalation_policies_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_service.py b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_service.py index 2e52e7c6..5d7c2c8e 100644 --- a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_service.py +++ b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_service.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PagePagerdutyOnCallRespondersTaskParamsService: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_users_item.py b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_users_item.py index 1ce3b023..bd0237ac 100644 --- a/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_users_item.py +++ b/rootly_sdk/models/page_pagerduty_on_call_responders_task_params_users_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PagePagerdutyOnCallRespondersTaskParamsUsersItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params.py index 304ceada..9fff57f9 100644 --- a/rootly_sdk/models/page_rootly_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,6 +16,9 @@ from ..models.page_rootly_on_call_responders_task_params_escalation_policy_target import ( PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget, ) + from ..models.page_rootly_on_call_responders_task_params_functionality_target import ( + PageRootlyOnCallRespondersTaskParamsFunctionalityTarget, + ) from ..models.page_rootly_on_call_responders_task_params_group_target import ( PageRootlyOnCallRespondersTaskParamsGroupTarget, ) @@ -34,24 +39,26 @@ class PageRootlyOnCallRespondersTaskParams: Attributes: alert_urgency_id (str): Alert urgency ID summary (str): Alert title - task_type (Union[Unset, PageRootlyOnCallRespondersTaskParamsTaskType]): - escalation_policy_target (Union[Unset, PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget]): - service_target (Union[Unset, PageRootlyOnCallRespondersTaskParamsServiceTarget]): - user_target (Union[Unset, PageRootlyOnCallRespondersTaskParamsUserTarget]): - group_target (Union[Unset, PageRootlyOnCallRespondersTaskParamsGroupTarget]): - description (Union[Unset, str]): Alert description - escalation_note (Union[Unset, str]): + task_type (PageRootlyOnCallRespondersTaskParamsTaskType | Unset): + escalation_policy_target (PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget | Unset): + service_target (PageRootlyOnCallRespondersTaskParamsServiceTarget | Unset): + user_target (PageRootlyOnCallRespondersTaskParamsUserTarget | Unset): + group_target (PageRootlyOnCallRespondersTaskParamsGroupTarget | Unset): + functionality_target (PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset): + description (str | Unset): Alert description + escalation_note (str | Unset): """ alert_urgency_id: str summary: str - task_type: Unset | PageRootlyOnCallRespondersTaskParamsTaskType = UNSET - escalation_policy_target: Union[Unset, "PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget"] = UNSET - service_target: Union[Unset, "PageRootlyOnCallRespondersTaskParamsServiceTarget"] = UNSET - user_target: Union[Unset, "PageRootlyOnCallRespondersTaskParamsUserTarget"] = UNSET - group_target: Union[Unset, "PageRootlyOnCallRespondersTaskParamsGroupTarget"] = UNSET - description: Unset | str = UNSET - escalation_note: Unset | str = UNSET + task_type: PageRootlyOnCallRespondersTaskParamsTaskType | Unset = UNSET + escalation_policy_target: PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget | Unset = UNSET + service_target: PageRootlyOnCallRespondersTaskParamsServiceTarget | Unset = UNSET + user_target: PageRootlyOnCallRespondersTaskParamsUserTarget | Unset = UNSET + group_target: PageRootlyOnCallRespondersTaskParamsGroupTarget | Unset = UNSET + functionality_target: PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset = UNSET + description: str | Unset = UNSET + escalation_note: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -59,26 +66,30 @@ def to_dict(self) -> dict[str, Any]: summary = self.summary - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - escalation_policy_target: Unset | dict[str, Any] = UNSET + escalation_policy_target: dict[str, Any] | Unset = UNSET if not isinstance(self.escalation_policy_target, Unset): escalation_policy_target = self.escalation_policy_target.to_dict() - service_target: Unset | dict[str, Any] = UNSET + service_target: dict[str, Any] | Unset = UNSET if not isinstance(self.service_target, Unset): service_target = self.service_target.to_dict() - user_target: Unset | dict[str, Any] = UNSET + user_target: dict[str, Any] | Unset = UNSET if not isinstance(self.user_target, Unset): user_target = self.user_target.to_dict() - group_target: Unset | dict[str, Any] = UNSET + group_target: dict[str, Any] | Unset = UNSET if not isinstance(self.group_target, Unset): group_target = self.group_target.to_dict() + functionality_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.functionality_target, Unset): + functionality_target = self.functionality_target.to_dict() + description = self.description escalation_note = self.escalation_note @@ -101,6 +112,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["user_target"] = user_target if group_target is not UNSET: field_dict["group_target"] = group_target + if functionality_target is not UNSET: + field_dict["functionality_target"] = functionality_target if description is not UNSET: field_dict["description"] = description if escalation_note is not UNSET: @@ -113,6 +126,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.page_rootly_on_call_responders_task_params_escalation_policy_target import ( PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget, ) + from ..models.page_rootly_on_call_responders_task_params_functionality_target import ( + PageRootlyOnCallRespondersTaskParamsFunctionalityTarget, + ) from ..models.page_rootly_on_call_responders_task_params_group_target import ( PageRootlyOnCallRespondersTaskParamsGroupTarget, ) @@ -129,14 +145,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: summary = d.pop("summary") _task_type = d.pop("task_type", UNSET) - task_type: Unset | PageRootlyOnCallRespondersTaskParamsTaskType + task_type: PageRootlyOnCallRespondersTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_page_rootly_on_call_responders_task_params_task_type(_task_type) _escalation_policy_target = d.pop("escalation_policy_target", UNSET) - escalation_policy_target: Unset | PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget + escalation_policy_target: PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget | Unset if isinstance(_escalation_policy_target, Unset): escalation_policy_target = UNSET else: @@ -145,26 +161,35 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _service_target = d.pop("service_target", UNSET) - service_target: Unset | PageRootlyOnCallRespondersTaskParamsServiceTarget + service_target: PageRootlyOnCallRespondersTaskParamsServiceTarget | Unset if isinstance(_service_target, Unset): service_target = UNSET else: service_target = PageRootlyOnCallRespondersTaskParamsServiceTarget.from_dict(_service_target) _user_target = d.pop("user_target", UNSET) - user_target: Unset | PageRootlyOnCallRespondersTaskParamsUserTarget + user_target: PageRootlyOnCallRespondersTaskParamsUserTarget | Unset if isinstance(_user_target, Unset): user_target = UNSET else: user_target = PageRootlyOnCallRespondersTaskParamsUserTarget.from_dict(_user_target) _group_target = d.pop("group_target", UNSET) - group_target: Unset | PageRootlyOnCallRespondersTaskParamsGroupTarget + group_target: PageRootlyOnCallRespondersTaskParamsGroupTarget | Unset if isinstance(_group_target, Unset): group_target = UNSET else: group_target = PageRootlyOnCallRespondersTaskParamsGroupTarget.from_dict(_group_target) + _functionality_target = d.pop("functionality_target", UNSET) + functionality_target: PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset + if isinstance(_functionality_target, Unset): + functionality_target = UNSET + else: + functionality_target = PageRootlyOnCallRespondersTaskParamsFunctionalityTarget.from_dict( + _functionality_target + ) + description = d.pop("description", UNSET) escalation_note = d.pop("escalation_note", UNSET) @@ -177,6 +202,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: service_target=service_target, user_target=user_target, group_target=group_target, + functionality_target=functionality_target, description=description, escalation_note=escalation_note, ) diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params_escalation_policy_target.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params_escalation_policy_target.py index 8eb10f74..3120e18c 100644 --- a/rootly_sdk/models/page_rootly_on_call_responders_task_params_escalation_policy_target.py +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params_escalation_policy_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params_functionality_target.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params_functionality_target.py new file mode 100644 index 00000000..9d0b0fcf --- /dev/null +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params_functionality_target.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsFunctionalityTarget") + + +@_attrs_define +class PageRootlyOnCallRespondersTaskParamsFunctionalityTarget: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + page_rootly_on_call_responders_task_params_functionality_target = cls( + id=id, + name=name, + ) + + page_rootly_on_call_responders_task_params_functionality_target.additional_properties = d + return page_rootly_on_call_responders_task_params_functionality_target + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params_group_target.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params_group_target.py index 491fc701..e66c01e4 100644 --- a/rootly_sdk/models/page_rootly_on_call_responders_task_params_group_target.py +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params_group_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PageRootlyOnCallRespondersTaskParamsGroupTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params_service_target.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params_service_target.py index c7f7fdc3..8bdb97c4 100644 --- a/rootly_sdk/models/page_rootly_on_call_responders_task_params_service_target.py +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params_service_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PageRootlyOnCallRespondersTaskParamsServiceTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/page_rootly_on_call_responders_task_params_user_target.py b/rootly_sdk/models/page_rootly_on_call_responders_task_params_user_target.py index e66fae34..5dd0f4fe 100644 --- a/rootly_sdk/models/page_rootly_on_call_responders_task_params_user_target.py +++ b/rootly_sdk/models/page_rootly_on_call_responders_task_params_user_target.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PageRootlyOnCallRespondersTaskParamsUserTarget: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/patch_alert_route.py b/rootly_sdk/models/patch_alert_route.py index 2c80e136..3de7ca00 100644 --- a/rootly_sdk/models/patch_alert_route.py +++ b/rootly_sdk/models/patch_alert_route.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class PatchAlertRoute: data (PatchAlertRouteData): """ - data: "PatchAlertRouteData" + data: PatchAlertRouteData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/patch_alert_route_data.py b/rootly_sdk/models/patch_alert_route_data.py index 78df219c..7bfa311f 100644 --- a/rootly_sdk/models/patch_alert_route_data.py +++ b/rootly_sdk/models/patch_alert_route_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class PatchAlertRouteData: """ type_: PatchAlertRouteDataType - attributes: "PatchAlertRouteDataAttributes" + attributes: PatchAlertRouteDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/patch_alert_route_data_attributes.py b/rootly_sdk/models/patch_alert_route_data_attributes.py index 7ce0b72e..b6dde929 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -17,39 +19,39 @@ class PatchAlertRouteDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert route - enabled (Union[Unset, bool]): Whether the alert route is enabled - alerts_source_ids (Union[Unset, list[UUID]]): - owning_team_ids (Union[Unset, list[UUID]]): - rules (Union[Unset, list['PatchAlertRouteDataAttributesRulesItem']]): + name (str | Unset): The name of the alert route + enabled (bool | Unset): Whether the alert route is enabled + alerts_source_ids (list[UUID] | Unset): + owning_team_ids (list[UUID] | Unset): + rules (list[PatchAlertRouteDataAttributesRulesItem] | Unset): """ - name: Unset | str = UNSET - enabled: Unset | bool = UNSET - alerts_source_ids: Unset | list[UUID] = UNSET - owning_team_ids: Unset | list[UUID] = UNSET - rules: Unset | list["PatchAlertRouteDataAttributesRulesItem"] = UNSET + name: str | Unset = UNSET + enabled: bool | Unset = UNSET + alerts_source_ids: list[UUID] | Unset = UNSET + owning_team_ids: list[UUID] | Unset = UNSET + rules: list[PatchAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name enabled = self.enabled - alerts_source_ids: Unset | list[str] = UNSET + alerts_source_ids: list[str] | Unset = UNSET if not isinstance(self.alerts_source_ids, Unset): alerts_source_ids = [] for alerts_source_ids_item_data in self.alerts_source_ids: alerts_source_ids_item = str(alerts_source_ids_item_data) alerts_source_ids.append(alerts_source_ids_item) - owning_team_ids: Unset | list[str] = UNSET + owning_team_ids: list[str] | Unset = UNSET if not isinstance(self.owning_team_ids, Unset): owning_team_ids = [] for owning_team_ids_item_data in self.owning_team_ids: owning_team_ids_item = str(owning_team_ids_item_data) owning_team_ids.append(owning_team_ids_item) - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -81,26 +83,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) - alerts_source_ids = [] _alerts_source_ids = d.pop("alerts_source_ids", UNSET) - for alerts_source_ids_item_data in _alerts_source_ids or []: - alerts_source_ids_item = UUID(alerts_source_ids_item_data) + alerts_source_ids: list[UUID] | Unset = UNSET + if _alerts_source_ids is not UNSET: + alerts_source_ids = [] + for alerts_source_ids_item_data in _alerts_source_ids: + alerts_source_ids_item = UUID(alerts_source_ids_item_data) - alerts_source_ids.append(alerts_source_ids_item) + alerts_source_ids.append(alerts_source_ids_item) - owning_team_ids = [] _owning_team_ids = d.pop("owning_team_ids", UNSET) - for owning_team_ids_item_data in _owning_team_ids or []: - owning_team_ids_item = UUID(owning_team_ids_item_data) + owning_team_ids: list[UUID] | Unset = UNSET + if _owning_team_ids is not UNSET: + owning_team_ids = [] + for owning_team_ids_item_data in _owning_team_ids: + owning_team_ids_item = UUID(owning_team_ids_item_data) - owning_team_ids.append(owning_team_ids_item) + owning_team_ids.append(owning_team_ids_item) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = PatchAlertRouteDataAttributesRulesItem.from_dict(rules_item_data) + rules: list[PatchAlertRouteDataAttributesRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = PatchAlertRouteDataAttributesRulesItem.from_dict(rules_item_data) - rules.append(rules_item) + rules.append(rules_item) patch_alert_route_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py index ebdba9f5..28b135b6 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -23,26 +25,26 @@ class PatchAlertRouteDataAttributesRulesItem: """ Attributes: - id (Union[Unset, UUID]): The ID of the alert routing rule. Required for updating or deleting existing rules. - field_destroy (Union[Unset, bool]): Set to true to delete this rule. When true, only the id field is required. - name (Union[Unset, str]): The name of the alert routing rule - position (Union[Unset, int]): The position of the alert routing rule for ordering evaluation - fallback_rule (Union[Unset, bool]): Whether this is a fallback rule - destinations (Union[Unset, list['PatchAlertRouteDataAttributesRulesItemDestinationsItem']]): - condition_groups (Union[Unset, list['PatchAlertRouteDataAttributesRulesItemConditionGroupsItem']]): + id (UUID | Unset): The ID of the alert routing rule. Required for updating or deleting existing rules. + field_destroy (bool | Unset): Set to true to delete this rule. When true, only the id field is required. + name (str | Unset): The name of the alert routing rule + position (int | Unset): The position of the alert routing rule for ordering evaluation + fallback_rule (bool | Unset): Whether this is a fallback rule Default: False. + destinations (list[PatchAlertRouteDataAttributesRulesItemDestinationsItem] | Unset): + condition_groups (list[PatchAlertRouteDataAttributesRulesItemConditionGroupsItem] | Unset): """ - id: Unset | UUID = UNSET - field_destroy: Unset | bool = UNSET - name: Unset | str = UNSET - position: Unset | int = UNSET - fallback_rule: Unset | bool = UNSET - destinations: Unset | list["PatchAlertRouteDataAttributesRulesItemDestinationsItem"] = UNSET - condition_groups: Unset | list["PatchAlertRouteDataAttributesRulesItemConditionGroupsItem"] = UNSET + id: UUID | Unset = UNSET + field_destroy: bool | Unset = UNSET + name: str | Unset = UNSET + position: int | Unset = UNSET + fallback_rule: bool | Unset = False + destinations: list[PatchAlertRouteDataAttributesRulesItemDestinationsItem] | Unset = UNSET + condition_groups: list[PatchAlertRouteDataAttributesRulesItemConditionGroupsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) @@ -54,14 +56,14 @@ def to_dict(self) -> dict[str, Any]: fallback_rule = self.fallback_rule - destinations: Unset | list[dict[str, Any]] = UNSET + destinations: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.destinations, Unset): destinations = [] for destinations_item_data in self.destinations: destinations_item = destinations_item_data.to_dict() destinations.append(destinations_item) - condition_groups: Unset | list[dict[str, Any]] = UNSET + condition_groups: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.condition_groups, Unset): condition_groups = [] for condition_groups_item_data in self.condition_groups: @@ -99,7 +101,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: @@ -113,21 +115,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: fallback_rule = d.pop("fallback_rule", UNSET) - destinations = [] _destinations = d.pop("destinations", UNSET) - for destinations_item_data in _destinations or []: - destinations_item = PatchAlertRouteDataAttributesRulesItemDestinationsItem.from_dict(destinations_item_data) + destinations: list[PatchAlertRouteDataAttributesRulesItemDestinationsItem] | Unset = UNSET + if _destinations is not UNSET: + destinations = [] + for destinations_item_data in _destinations: + destinations_item = PatchAlertRouteDataAttributesRulesItemDestinationsItem.from_dict( + destinations_item_data + ) - destinations.append(destinations_item) + destinations.append(destinations_item) - condition_groups = [] _condition_groups = d.pop("condition_groups", UNSET) - for condition_groups_item_data in _condition_groups or []: - condition_groups_item = PatchAlertRouteDataAttributesRulesItemConditionGroupsItem.from_dict( - condition_groups_item_data - ) + condition_groups: list[PatchAlertRouteDataAttributesRulesItemConditionGroupsItem] | Unset = UNSET + if _condition_groups is not UNSET: + condition_groups = [] + for condition_groups_item_data in _condition_groups: + condition_groups_item = PatchAlertRouteDataAttributesRulesItemConditionGroupsItem.from_dict( + condition_groups_item_data + ) - condition_groups.append(condition_groups_item) + condition_groups.append(condition_groups_item) patch_alert_route_data_attributes_rules_item = cls( id=id, diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py index e7c6bfbb..763e8dd0 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -20,21 +22,20 @@ class PatchAlertRouteDataAttributesRulesItemConditionGroupsItem: """ Attributes: - id (Union[Unset, UUID]): The ID of the condition group. Required for updating or deleting existing condition - groups. - field_destroy (Union[Unset, bool]): Set to true to delete this condition group - position (Union[Unset, int]): The position of the condition group - conditions (Union[Unset, list['PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem']]): + id (UUID | Unset): The ID of the condition group. Required for updating or deleting existing condition groups. + field_destroy (bool | Unset): Set to true to delete this condition group + position (int | Unset): The position of the condition group + conditions (list[PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem] | Unset): """ - id: Unset | UUID = UNSET - field_destroy: Unset | bool = UNSET - position: Unset | int = UNSET - conditions: Unset | list["PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem"] = UNSET + id: UUID | Unset = UNSET + field_destroy: bool | Unset = UNSET + position: int | Unset = UNSET + conditions: list[PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) @@ -42,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: position = self.position - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -71,7 +72,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: @@ -81,14 +82,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: position = d.pop("position", UNSET) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem.from_dict( - conditions_item_data - ) + conditions: list[PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem.from_dict( + conditions_item_data + ) - conditions.append(conditions_item) + conditions.append(conditions_item) patch_alert_route_data_attributes_rules_item_condition_groups_item = cls( id=id, diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py index 0c6a94c1..d9b6fcc0 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -26,64 +28,63 @@ class PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem: """ Attributes: - id (Union[Unset, UUID]): The ID of the condition. Required for updating or deleting existing conditions. - field_destroy (Union[Unset, bool]): Set to true to delete this condition - property_field_condition_type (Union[Unset, - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType]): - property_field_name (Union[Unset, str]): The name of the property field - property_field_type (Union[Unset, - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType]): - property_field_value (Union[None, Unset, str]): The value of the property field - property_field_values (Union[None, Unset, list[str]]): - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition - conditionable_type (Union[Unset, - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType]): The type of the - conditionable - conditionable_id (Union[None, UUID, Unset]): The ID of the conditionable + id (UUID | Unset): The ID of the condition. Required for updating or deleting existing conditions. + field_destroy (bool | Unset): Set to true to delete this condition + property_field_condition_type + (PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType | Unset): + property_field_name (str | Unset): The name of the property field + property_field_type (PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType | + Unset): + property_field_value (None | str | Unset): The value of the property field + property_field_values (list[str] | None | Unset): + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition + conditionable_type (PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | + Unset): The type of the conditionable + conditionable_id (None | Unset | UUID): The ID of the conditionable """ - id: Unset | UUID = UNSET - field_destroy: Unset | bool = UNSET + id: UUID | Unset = UNSET + field_destroy: bool | Unset = UNSET property_field_condition_type: ( - Unset | PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType | Unset ) = UNSET - property_field_name: Unset | str = UNSET + property_field_name: str | Unset = UNSET property_field_type: ( - Unset | PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType | Unset ) = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: None | Unset | list[str] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | None | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET conditionable_type: ( - Unset | PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | Unset ) = UNSET - conditionable_id: None | UUID | Unset = UNSET + conditionable_id: None | Unset | UUID = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) field_destroy = self.field_destroy - property_field_condition_type: Unset | str = UNSET + property_field_condition_type: str | Unset = UNSET if not isinstance(self.property_field_condition_type, Unset): property_field_condition_type = self.property_field_condition_type property_field_name = self.property_field_name - property_field_type: Unset | str = UNSET + property_field_type: str | Unset = UNSET if not isinstance(self.property_field_type, Unset): property_field_type = self.property_field_type - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: None | Unset | list[str] + property_field_values: list[str] | None | Unset if isinstance(self.property_field_values, Unset): property_field_values = UNSET elif isinstance(self.property_field_values, list): @@ -92,7 +93,7 @@ def to_dict(self) -> dict[str, Any]: else: property_field_values = self.property_field_values - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -101,11 +102,11 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET elif isinstance(self.conditionable_id, UUID): @@ -143,7 +144,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: @@ -153,7 +154,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _property_field_condition_type = d.pop("property_field_condition_type", UNSET) property_field_condition_type: ( - Unset | PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType | Unset ) if isinstance(_property_field_condition_type, Unset): property_field_condition_type = UNSET @@ -166,7 +167,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _property_field_type = d.pop("property_field_type", UNSET) property_field_type: ( - Unset | PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType | Unset ) if isinstance(_property_field_type, Unset): property_field_type = UNSET @@ -175,16 +176,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _property_field_type ) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) - def _parse_property_field_values(data: object) -> None | Unset | list[str]: + def _parse_property_field_values(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -195,13 +196,13 @@ def _parse_property_field_values(data: object) -> None | Unset | list[str]: property_field_values_type_0 = cast(list[str], data) return property_field_values_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) property_field_values = _parse_property_field_values(d.pop("property_field_values", UNSET)) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -212,15 +213,15 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) conditionable_type: ( - Unset | PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | Unset ) if isinstance(_conditionable_type, Unset): conditionable_type = UNSET @@ -229,7 +230,7 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | UUID | Unset: + def _parse_conditionable_id(data: object) -> None | Unset | UUID: if data is None: return data if isinstance(data, Unset): @@ -240,9 +241,9 @@ def _parse_conditionable_id(data: object) -> None | UUID | Unset: conditionable_id_type_0 = UUID(data) return conditionable_id_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | UUID | Unset, data) + return cast(None | Unset | UUID, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item.py index 74e51711..237f4198 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -18,31 +20,31 @@ class PatchAlertRouteDataAttributesRulesItemDestinationsItem: """ Attributes: - id (Union[Unset, UUID]): The ID of the destination. Required for updating or deleting existing destinations. - field_destroy (Union[Unset, bool]): Set to true to delete this destination - target_type (Union[Unset, PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType]): The type of the - target - target_id (Union[Unset, UUID]): The ID of the target + id (UUID | Unset): The ID of the destination. Required for updating or deleting existing destinations. + field_destroy (bool | Unset): Set to true to delete this destination + target_type (PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType | Unset): The type of the target. + Please contact support if you encounter issues using `Functionality` as a target type. + target_id (UUID | Unset): The ID of the target """ - id: Unset | UUID = UNSET - field_destroy: Unset | bool = UNSET - target_type: Unset | PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType = UNSET - target_id: Unset | UUID = UNSET + id: UUID | Unset = UNSET + field_destroy: bool | Unset = UNSET + target_type: PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType | Unset = UNSET + target_id: UUID | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) field_destroy = self.field_destroy - target_type: Unset | str = UNSET + target_type: str | Unset = UNSET if not isinstance(self.target_type, Unset): target_type = self.target_type - target_id: Unset | str = UNSET + target_id: str | Unset = UNSET if not isinstance(self.target_id, Unset): target_id = str(self.target_id) @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: @@ -73,14 +75,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: field_destroy = d.pop("_destroy", UNSET) _target_type = d.pop("target_type", UNSET) - target_type: Unset | PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType + target_type: PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType | Unset if isinstance(_target_type, Unset): target_type = UNSET else: target_type = check_patch_alert_route_data_attributes_rules_item_destinations_item_target_type(_target_type) _target_id = d.pop("target_id", UNSET) - target_id: Unset | UUID + target_id: UUID | Unset if isinstance(_target_id, Unset): target_id = UNSET else: diff --git a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item_target_type.py b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item_target_type.py index 6b574bb5..92792abd 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item_target_type.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes_rules_item_destinations_item_target_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service" +] PATCH_ALERT_ROUTE_DATA_ATTRIBUTES_RULES_ITEM_DESTINATIONS_ITEM_TARGET_TYPE_VALUES: set[ PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/phone_verification_response.py b/rootly_sdk/models/phone_verification_response.py index f04e1cf3..636cfa5a 100644 --- a/rootly_sdk/models/phone_verification_response.py +++ b/rootly_sdk/models/phone_verification_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PhoneVerificationResponse: """ Attributes: - message (Union[Unset, str]): Success message - error (Union[Unset, str]): Error message + message (str | Unset): Success message + error (str | Unset): Error message """ - message: Unset | str = UNSET - error: Unset | str = UNSET + message: str | Unset = UNSET + error: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook.py b/rootly_sdk/models/playbook.py index a2d1dac4..cc9126ef 100644 --- a/rootly_sdk/models/playbook.py +++ b/rootly_sdk/models/playbook.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,27 +18,27 @@ class Playbook: title (str): The title of the playbook created_at (str): Date of creation updated_at (str): Date of last update - summary (Union[None, Unset, str]): The summary of the playbook - external_url (Union[None, Unset, str]): The external url of the playbook - severity_ids (Union[None, Unset, list[str]]): The Severity IDs to attach to the incident - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the incident - functionality_ids (Union[None, Unset, list[str]]): The Functionality IDs to attach to the incident - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the incident - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the incident - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the incident + summary (None | str | Unset): The summary of the playbook + external_url (None | str | Unset): The external url of the playbook + severity_ids (list[str] | None | Unset): The Severity IDs to attach to the incident + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the incident + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the incident + service_ids (list[str] | None | Unset): The Service IDs to attach to the incident + group_ids (list[str] | None | Unset): The Team IDs to attach to the incident + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the incident """ title: str created_at: str updated_at: str - summary: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET - severity_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + summary: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,19 +48,19 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -67,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -76,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -85,7 +87,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -94,7 +96,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -103,7 +105,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -149,25 +151,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -178,13 +180,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -195,13 +197,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -212,13 +214,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -229,13 +231,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -246,13 +248,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -263,9 +265,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/playbook_list.py b/rootly_sdk/models/playbook_list.py index 4381712e..02de0316 100644 --- a/rootly_sdk/models/playbook_list.py +++ b/rootly_sdk/models/playbook_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class PlaybookList: """ Attributes: - data (list['PlaybookListDataItem']): + data (list[PlaybookListDataItem]): links (Links): meta (Meta): """ - data: list["PlaybookListDataItem"] - links: "Links" - meta: "Meta" + data: list[PlaybookListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_list_data_item.py b/rootly_sdk/models/playbook_list_data_item.py index 049aef9b..598e3cdc 100644 --- a/rootly_sdk/models/playbook_list_data_item.py +++ b/rootly_sdk/models/playbook_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class PlaybookListDataItem: id: str type_: PlaybookListDataItemType - attributes: "Playbook" + attributes: Playbook additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_response.py b/rootly_sdk/models/playbook_response.py index a7503668..bbefb288 100644 --- a/rootly_sdk/models/playbook_response.py +++ b/rootly_sdk/models/playbook_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class PlaybookResponse: data (PlaybookResponseData): """ - data: "PlaybookResponseData" + data: PlaybookResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_response_data.py b/rootly_sdk/models/playbook_response_data.py index 4ef6997f..b559f9f7 100644 --- a/rootly_sdk/models/playbook_response_data.py +++ b/rootly_sdk/models/playbook_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class PlaybookResponseData: id: str type_: PlaybookResponseDataType - attributes: "Playbook" + attributes: Playbook additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_task.py b/rootly_sdk/models/playbook_task.py index 3aad84ad..401f39aa 100644 --- a/rootly_sdk/models/playbook_task.py +++ b/rootly_sdk/models/playbook_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,17 +18,17 @@ class PlaybookTask: task (str): The task of the task created_at (str): Date of creation updated_at (str): Date of last update - playbook_id (Union[Unset, str]): - description (Union[None, Unset, str]): The description of task - position (Union[None, Unset, int]): The position of the task + playbook_id (str | Unset): + description (None | str | Unset): The description of task + position (int | None | Unset): The position of the task """ task: str created_at: str updated_at: str - playbook_id: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + playbook_id: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,13 +40,13 @@ def to_dict(self) -> dict[str, Any]: playbook_id = self.playbook_id - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -79,21 +81,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: playbook_id = d.pop("playbook_id", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/playbook_task_list.py b/rootly_sdk/models/playbook_task_list.py index 91769232..128b3689 100644 --- a/rootly_sdk/models/playbook_task_list.py +++ b/rootly_sdk/models/playbook_task_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class PlaybookTaskList: """ Attributes: - data (list['PlaybookTaskListDataItem']): + data (list[PlaybookTaskListDataItem]): links (Links): meta (Meta): """ - data: list["PlaybookTaskListDataItem"] - links: "Links" - meta: "Meta" + data: list[PlaybookTaskListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_task_list_data_item.py b/rootly_sdk/models/playbook_task_list_data_item.py index 8a7fac55..9c529ab0 100644 --- a/rootly_sdk/models/playbook_task_list_data_item.py +++ b/rootly_sdk/models/playbook_task_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class PlaybookTaskListDataItem: id: str type_: PlaybookTaskListDataItemType - attributes: "PlaybookTask" + attributes: PlaybookTask additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_task_response.py b/rootly_sdk/models/playbook_task_response.py index ca6e89b8..0753e7a1 100644 --- a/rootly_sdk/models/playbook_task_response.py +++ b/rootly_sdk/models/playbook_task_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class PlaybookTaskResponse: data (PlaybookTaskResponseData): """ - data: "PlaybookTaskResponseData" + data: PlaybookTaskResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/playbook_task_response_data.py b/rootly_sdk/models/playbook_task_response_data.py index 7ec717a0..3cb5185c 100644 --- a/rootly_sdk/models/playbook_task_response_data.py +++ b/rootly_sdk/models/playbook_task_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class PlaybookTaskResponseData: id: str type_: PlaybookTaskResponseDataType - attributes: "PlaybookTask" + attributes: PlaybookTask additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/post_mortem_template.py b/rootly_sdk/models/post_mortem_template.py index 48bfd505..175b93d9 100644 --- a/rootly_sdk/models/post_mortem_template.py +++ b/rootly_sdk/models/post_mortem_template.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,25 +23,24 @@ class PostMortemTemplate: name (str): The name of the postmortem template created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slugified name of the postmortem template - default (Union[None, Unset, bool]): Default selected template when editing a postmortem - content (Union[Unset, str]): The postmortem template. Liquid syntax and markdown are supported - content_html (Union[None, Unset, str]): The postmortem template in HTML format with TipTap blocks support. - Supports followup and timeline components. Liquid syntax is supported. - content_json (Union['PostMortemTemplateContentJsonType0', None, Unset]): The postmortem template in TipTap JSON - format - format_ (Union[Unset, PostMortemTemplateFormat]): The format of the input + slug (str | Unset): The slugified name of the postmortem template + default (bool | None | Unset): Default selected template when editing a postmortem + content (str | Unset): The postmortem template. Liquid syntax and markdown are supported + content_html (None | str | Unset): The postmortem template in HTML format with TipTap blocks support. Supports + followup and timeline components. Liquid syntax is supported. + content_json (None | PostMortemTemplateContentJsonType0 | Unset): The postmortem template in TipTap JSON format + format_ (PostMortemTemplateFormat | Unset): The format of the input """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - default: None | Unset | bool = UNSET - content: Unset | str = UNSET - content_html: None | Unset | str = UNSET - content_json: Union["PostMortemTemplateContentJsonType0", None, Unset] = UNSET - format_: Unset | PostMortemTemplateFormat = UNSET + slug: str | Unset = UNSET + default: bool | None | Unset = UNSET + content: str | Unset = UNSET + content_html: None | str | Unset = UNSET + content_json: None | PostMortemTemplateContentJsonType0 | Unset = UNSET + format_: PostMortemTemplateFormat | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -53,7 +54,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - default: None | Unset | bool + default: bool | None | Unset if isinstance(self.default, Unset): default = UNSET else: @@ -61,13 +62,13 @@ def to_dict(self) -> dict[str, Any]: content = self.content - content_html: None | Unset | str + content_html: None | str | Unset if isinstance(self.content_html, Unset): content_html = UNSET else: content_html = self.content_html - content_json: None | Unset | dict[str, Any] + content_json: dict[str, Any] | None | Unset if isinstance(self.content_json, Unset): content_json = UNSET elif isinstance(self.content_json, PostMortemTemplateContentJsonType0): @@ -75,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: content_json = self.content_json - format_: Unset | str = UNSET + format_: str | Unset = UNSET if not isinstance(self.format_, Unset): format_ = self.format_ @@ -116,27 +117,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_default(data: object) -> None | Unset | bool: + def _parse_default(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) default = _parse_default(d.pop("default", UNSET)) content = d.pop("content", UNSET) - def _parse_content_html(data: object) -> None | Unset | str: + def _parse_content_html(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) content_html = _parse_content_html(d.pop("content_html", UNSET)) - def _parse_content_json(data: object) -> Union["PostMortemTemplateContentJsonType0", None, Unset]: + def _parse_content_json(data: object) -> None | PostMortemTemplateContentJsonType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -147,14 +148,14 @@ def _parse_content_json(data: object) -> Union["PostMortemTemplateContentJsonTyp content_json_type_0 = PostMortemTemplateContentJsonType0.from_dict(data) return content_json_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["PostMortemTemplateContentJsonType0", None, Unset], data) + return cast(None | PostMortemTemplateContentJsonType0 | Unset, data) content_json = _parse_content_json(d.pop("content_json", UNSET)) _format_ = d.pop("format", UNSET) - format_: Unset | PostMortemTemplateFormat + format_: PostMortemTemplateFormat | Unset if isinstance(_format_, Unset): format_ = UNSET else: diff --git a/rootly_sdk/models/post_mortem_template_content_json_type_0.py b/rootly_sdk/models/post_mortem_template_content_json_type_0.py index 0670aad3..0375e77a 100644 --- a/rootly_sdk/models/post_mortem_template_content_json_type_0.py +++ b/rootly_sdk/models/post_mortem_template_content_json_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class PostMortemTemplateContentJsonType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/post_mortem_template_list.py b/rootly_sdk/models/post_mortem_template_list.py index 919ced2a..83676bfc 100644 --- a/rootly_sdk/models/post_mortem_template_list.py +++ b/rootly_sdk/models/post_mortem_template_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class PostMortemTemplateList: """ Attributes: - data (list['PostMortemTemplateListDataItem']): + data (list[PostMortemTemplateListDataItem]): links (Links): meta (Meta): """ - data: list["PostMortemTemplateListDataItem"] - links: "Links" - meta: "Meta" + data: list[PostMortemTemplateListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/post_mortem_template_list_data_item.py b/rootly_sdk/models/post_mortem_template_list_data_item.py index 7bd5a785..e3823d0d 100644 --- a/rootly_sdk/models/post_mortem_template_list_data_item.py +++ b/rootly_sdk/models/post_mortem_template_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class PostMortemTemplateListDataItem: id: str type_: PostMortemTemplateListDataItemType - attributes: "PostMortemTemplate" + attributes: PostMortemTemplate additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/post_mortem_template_response.py b/rootly_sdk/models/post_mortem_template_response.py index 95f15aa2..cb8516aa 100644 --- a/rootly_sdk/models/post_mortem_template_response.py +++ b/rootly_sdk/models/post_mortem_template_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class PostMortemTemplateResponse: data (PostMortemTemplateResponseData): """ - data: "PostMortemTemplateResponseData" + data: PostMortemTemplateResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/post_mortem_template_response_data.py b/rootly_sdk/models/post_mortem_template_response_data.py index c9c97e69..4e622ebb 100644 --- a/rootly_sdk/models/post_mortem_template_response_data.py +++ b/rootly_sdk/models/post_mortem_template_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class PostMortemTemplateResponseData: id: str type_: PostMortemTemplateResponseDataType - attributes: "PostMortemTemplate" + attributes: PostMortemTemplate additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/post_mortem_trigger_params.py b/rootly_sdk/models/post_mortem_trigger_params.py index 58ec5cf9..0f6c8673 100644 --- a/rootly_sdk/models/post_mortem_trigger_params.py +++ b/rootly_sdk/models/post_mortem_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -122,66 +124,62 @@ class PostMortemTriggerParams: """ Attributes: trigger_type (PostMortemTriggerParamsTriggerType): - triggers (Union[Unset, list[str]]): - incident_visibilities (Union[Unset, list[bool]]): - incident_kinds (Union[Unset, list[PostMortemTriggerParamsIncidentKindsItem]]): - incident_statuses (Union[Unset, list[PostMortemTriggerParamsIncidentStatusesItem]]): - incident_inactivity_duration (Union[None, Unset, str]): - incident_condition (Union[Unset, PostMortemTriggerParamsIncidentCondition]): Default: 'ALL'. - incident_condition_visibility (Union[Unset, PostMortemTriggerParamsIncidentConditionVisibility]): Default: - 'ANY'. - incident_condition_kind (Union[Unset, PostMortemTriggerParamsIncidentConditionKind]): Default: 'IS'. - incident_condition_status (Union[Unset, PostMortemTriggerParamsIncidentConditionStatus]): Default: 'ANY'. - incident_condition_sub_status (Union[Unset, PostMortemTriggerParamsIncidentConditionSubStatus]): Default: + triggers (list[str] | Unset): + incident_visibilities (list[bool] | Unset): + incident_kinds (list[PostMortemTriggerParamsIncidentKindsItem] | Unset): + incident_statuses (list[PostMortemTriggerParamsIncidentStatusesItem] | Unset): + incident_inactivity_duration (None | str | Unset): + incident_condition (PostMortemTriggerParamsIncidentCondition | Unset): Default: 'ALL'. + incident_condition_visibility (PostMortemTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. + incident_condition_kind (PostMortemTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. + incident_condition_status (PostMortemTriggerParamsIncidentConditionStatus | Unset): Default: 'ANY'. + incident_condition_sub_status (PostMortemTriggerParamsIncidentConditionSubStatus | Unset): Default: 'ANY'. + incident_condition_environment (PostMortemTriggerParamsIncidentConditionEnvironment | Unset): Default: 'ANY'. + incident_condition_severity (PostMortemTriggerParamsIncidentConditionSeverity | Unset): Default: 'ANY'. + incident_condition_incident_type (PostMortemTriggerParamsIncidentConditionIncidentType | Unset): Default: 'ANY'. - incident_condition_environment (Union[Unset, PostMortemTriggerParamsIncidentConditionEnvironment]): Default: + incident_condition_incident_roles (PostMortemTriggerParamsIncidentConditionIncidentRoles | Unset): Default: 'ANY'. - incident_condition_severity (Union[Unset, PostMortemTriggerParamsIncidentConditionSeverity]): Default: 'ANY'. - incident_condition_incident_type (Union[Unset, PostMortemTriggerParamsIncidentConditionIncidentType]): Default: + incident_condition_service (PostMortemTriggerParamsIncidentConditionService | Unset): Default: 'ANY'. + incident_condition_functionality (PostMortemTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. - incident_condition_incident_roles (Union[Unset, PostMortemTriggerParamsIncidentConditionIncidentRoles]): - Default: 'ANY'. - incident_condition_service (Union[Unset, PostMortemTriggerParamsIncidentConditionService]): Default: 'ANY'. - incident_condition_functionality (Union[Unset, PostMortemTriggerParamsIncidentConditionFunctionality]): - Default: 'ANY'. - incident_condition_group (Union[Unset, PostMortemTriggerParamsIncidentConditionGroup]): Default: 'ANY'. - incident_condition_cause (Union[Unset, PostMortemTriggerParamsIncidentConditionCause]): Default: 'ANY'. - incident_post_mortem_condition_cause (Union[Unset, PostMortemTriggerParamsIncidentPostMortemConditionCause]): + incident_condition_group (PostMortemTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. + incident_condition_cause (PostMortemTriggerParamsIncidentConditionCause | Unset): Default: 'ANY'. + incident_post_mortem_condition_cause (PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset): [DEPRECATED] Use incident_condition_cause instead Default: 'ANY'. - incident_condition_summary (Union[None, PostMortemTriggerParamsIncidentConditionSummaryType1, Unset]): - incident_condition_started_at (Union[None, PostMortemTriggerParamsIncidentConditionStartedAtType1, Unset]): - incident_condition_detected_at (Union[None, PostMortemTriggerParamsIncidentConditionDetectedAtType1, Unset]): - incident_condition_acknowledged_at (Union[None, PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, - Unset]): - incident_condition_mitigated_at (Union[None, PostMortemTriggerParamsIncidentConditionMitigatedAtType1, Unset]): - incident_condition_resolved_at (Union[None, PostMortemTriggerParamsIncidentConditionResolvedAtType1, Unset]): - incident_conditional_inactivity (Union[None, PostMortemTriggerParamsIncidentConditionalInactivityType1, Unset]): - incident_post_mortem_condition (Union[Unset, PostMortemTriggerParamsIncidentPostMortemCondition]): - incident_post_mortem_condition_status (Union[Unset, PostMortemTriggerParamsIncidentPostMortemConditionStatus]): + incident_condition_summary (None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset): + incident_condition_started_at (None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset): + incident_condition_detected_at (None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset): + incident_condition_acknowledged_at (None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset): + incident_condition_mitigated_at (None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset): + incident_condition_resolved_at (None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset): + incident_conditional_inactivity (None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset): + incident_post_mortem_condition (PostMortemTriggerParamsIncidentPostMortemCondition | Unset): + incident_post_mortem_condition_status (PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset): Default: 'ANY'. - incident_post_mortem_statuses (Union[Unset, list[PostMortemTriggerParamsIncidentPostMortemStatusesItem]]): + incident_post_mortem_statuses (list[PostMortemTriggerParamsIncidentPostMortemStatusesItem] | Unset): """ trigger_type: PostMortemTriggerParamsTriggerType - triggers: Unset | list[str] = UNSET - incident_visibilities: Unset | list[bool] = UNSET - incident_kinds: Unset | list[PostMortemTriggerParamsIncidentKindsItem] = UNSET - incident_statuses: Unset | list[PostMortemTriggerParamsIncidentStatusesItem] = UNSET - incident_inactivity_duration: None | Unset | str = UNSET - incident_condition: Unset | PostMortemTriggerParamsIncidentCondition = "ALL" - incident_condition_visibility: Unset | PostMortemTriggerParamsIncidentConditionVisibility = "ANY" - incident_condition_kind: Unset | PostMortemTriggerParamsIncidentConditionKind = "IS" - incident_condition_status: Unset | PostMortemTriggerParamsIncidentConditionStatus = "ANY" - incident_condition_sub_status: Unset | PostMortemTriggerParamsIncidentConditionSubStatus = "ANY" - incident_condition_environment: Unset | PostMortemTriggerParamsIncidentConditionEnvironment = "ANY" - incident_condition_severity: Unset | PostMortemTriggerParamsIncidentConditionSeverity = "ANY" - incident_condition_incident_type: Unset | PostMortemTriggerParamsIncidentConditionIncidentType = "ANY" - incident_condition_incident_roles: Unset | PostMortemTriggerParamsIncidentConditionIncidentRoles = "ANY" - incident_condition_service: Unset | PostMortemTriggerParamsIncidentConditionService = "ANY" - incident_condition_functionality: Unset | PostMortemTriggerParamsIncidentConditionFunctionality = "ANY" - incident_condition_group: Unset | PostMortemTriggerParamsIncidentConditionGroup = "ANY" - incident_condition_cause: Unset | PostMortemTriggerParamsIncidentConditionCause = "ANY" - incident_post_mortem_condition_cause: Unset | PostMortemTriggerParamsIncidentPostMortemConditionCause = "ANY" + triggers: list[str] | Unset = UNSET + incident_visibilities: list[bool] | Unset = UNSET + incident_kinds: list[PostMortemTriggerParamsIncidentKindsItem] | Unset = UNSET + incident_statuses: list[PostMortemTriggerParamsIncidentStatusesItem] | Unset = UNSET + incident_inactivity_duration: None | str | Unset = UNSET + incident_condition: PostMortemTriggerParamsIncidentCondition | Unset = "ALL" + incident_condition_visibility: PostMortemTriggerParamsIncidentConditionVisibility | Unset = "ANY" + incident_condition_kind: PostMortemTriggerParamsIncidentConditionKind | Unset = "IS" + incident_condition_status: PostMortemTriggerParamsIncidentConditionStatus | Unset = "ANY" + incident_condition_sub_status: PostMortemTriggerParamsIncidentConditionSubStatus | Unset = "ANY" + incident_condition_environment: PostMortemTriggerParamsIncidentConditionEnvironment | Unset = "ANY" + incident_condition_severity: PostMortemTriggerParamsIncidentConditionSeverity | Unset = "ANY" + incident_condition_incident_type: PostMortemTriggerParamsIncidentConditionIncidentType | Unset = "ANY" + incident_condition_incident_roles: PostMortemTriggerParamsIncidentConditionIncidentRoles | Unset = "ANY" + incident_condition_service: PostMortemTriggerParamsIncidentConditionService | Unset = "ANY" + incident_condition_functionality: PostMortemTriggerParamsIncidentConditionFunctionality | Unset = "ANY" + incident_condition_group: PostMortemTriggerParamsIncidentConditionGroup | Unset = "ANY" + incident_condition_cause: PostMortemTriggerParamsIncidentConditionCause | Unset = "ANY" + incident_post_mortem_condition_cause: PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset = "ANY" incident_condition_summary: None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset = UNSET incident_condition_started_at: None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset = UNSET incident_condition_detected_at: None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset = UNSET @@ -191,99 +189,99 @@ class PostMortemTriggerParams: incident_condition_mitigated_at: None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset = UNSET incident_condition_resolved_at: None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset = UNSET incident_conditional_inactivity: None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset = UNSET - incident_post_mortem_condition: Unset | PostMortemTriggerParamsIncidentPostMortemCondition = UNSET - incident_post_mortem_condition_status: Unset | PostMortemTriggerParamsIncidentPostMortemConditionStatus = "ANY" - incident_post_mortem_statuses: Unset | list[PostMortemTriggerParamsIncidentPostMortemStatusesItem] = UNSET + incident_post_mortem_condition: PostMortemTriggerParamsIncidentPostMortemCondition | Unset = UNSET + incident_post_mortem_condition_status: PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset = "ANY" + incident_post_mortem_statuses: list[PostMortemTriggerParamsIncidentPostMortemStatusesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: trigger_type: str = self.trigger_type - triggers: Unset | list[str] = UNSET + triggers: list[str] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = self.triggers - incident_visibilities: Unset | list[bool] = UNSET + incident_visibilities: list[bool] | Unset = UNSET if not isinstance(self.incident_visibilities, Unset): incident_visibilities = self.incident_visibilities - incident_kinds: Unset | list[str] = UNSET + incident_kinds: list[str] | Unset = UNSET if not isinstance(self.incident_kinds, Unset): incident_kinds = [] for incident_kinds_item_data in self.incident_kinds: incident_kinds_item: str = incident_kinds_item_data incident_kinds.append(incident_kinds_item) - incident_statuses: Unset | list[str] = UNSET + incident_statuses: list[str] | Unset = UNSET if not isinstance(self.incident_statuses, Unset): incident_statuses = [] for incident_statuses_item_data in self.incident_statuses: incident_statuses_item: str = incident_statuses_item_data incident_statuses.append(incident_statuses_item) - incident_inactivity_duration: None | Unset | str + incident_inactivity_duration: None | str | Unset if isinstance(self.incident_inactivity_duration, Unset): incident_inactivity_duration = UNSET else: incident_inactivity_duration = self.incident_inactivity_duration - incident_condition: Unset | str = UNSET + incident_condition: str | Unset = UNSET if not isinstance(self.incident_condition, Unset): incident_condition = self.incident_condition - incident_condition_visibility: Unset | str = UNSET + incident_condition_visibility: str | Unset = UNSET if not isinstance(self.incident_condition_visibility, Unset): incident_condition_visibility = self.incident_condition_visibility - incident_condition_kind: Unset | str = UNSET + incident_condition_kind: str | Unset = UNSET if not isinstance(self.incident_condition_kind, Unset): incident_condition_kind = self.incident_condition_kind - incident_condition_status: Unset | str = UNSET + incident_condition_status: str | Unset = UNSET if not isinstance(self.incident_condition_status, Unset): incident_condition_status = self.incident_condition_status - incident_condition_sub_status: Unset | str = UNSET + incident_condition_sub_status: str | Unset = UNSET if not isinstance(self.incident_condition_sub_status, Unset): incident_condition_sub_status = self.incident_condition_sub_status - incident_condition_environment: Unset | str = UNSET + incident_condition_environment: str | Unset = UNSET if not isinstance(self.incident_condition_environment, Unset): incident_condition_environment = self.incident_condition_environment - incident_condition_severity: Unset | str = UNSET + incident_condition_severity: str | Unset = UNSET if not isinstance(self.incident_condition_severity, Unset): incident_condition_severity = self.incident_condition_severity - incident_condition_incident_type: Unset | str = UNSET + incident_condition_incident_type: str | Unset = UNSET if not isinstance(self.incident_condition_incident_type, Unset): incident_condition_incident_type = self.incident_condition_incident_type - incident_condition_incident_roles: Unset | str = UNSET + incident_condition_incident_roles: str | Unset = UNSET if not isinstance(self.incident_condition_incident_roles, Unset): incident_condition_incident_roles = self.incident_condition_incident_roles - incident_condition_service: Unset | str = UNSET + incident_condition_service: str | Unset = UNSET if not isinstance(self.incident_condition_service, Unset): incident_condition_service = self.incident_condition_service - incident_condition_functionality: Unset | str = UNSET + incident_condition_functionality: str | Unset = UNSET if not isinstance(self.incident_condition_functionality, Unset): incident_condition_functionality = self.incident_condition_functionality - incident_condition_group: Unset | str = UNSET + incident_condition_group: str | Unset = UNSET if not isinstance(self.incident_condition_group, Unset): incident_condition_group = self.incident_condition_group - incident_condition_cause: Unset | str = UNSET + incident_condition_cause: str | Unset = UNSET if not isinstance(self.incident_condition_cause, Unset): incident_condition_cause = self.incident_condition_cause - incident_post_mortem_condition_cause: Unset | str = UNSET + incident_post_mortem_condition_cause: str | Unset = UNSET if not isinstance(self.incident_post_mortem_condition_cause, Unset): incident_post_mortem_condition_cause = self.incident_post_mortem_condition_cause - incident_condition_summary: None | Unset | str + incident_condition_summary: None | str | Unset if isinstance(self.incident_condition_summary, Unset): incident_condition_summary = UNSET elif isinstance(self.incident_condition_summary, str): @@ -291,7 +289,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_summary = self.incident_condition_summary - incident_condition_started_at: None | Unset | str + incident_condition_started_at: None | str | Unset if isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = UNSET elif isinstance(self.incident_condition_started_at, str): @@ -299,7 +297,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_started_at = self.incident_condition_started_at - incident_condition_detected_at: None | Unset | str + incident_condition_detected_at: None | str | Unset if isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = UNSET elif isinstance(self.incident_condition_detected_at, str): @@ -307,7 +305,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_detected_at = self.incident_condition_detected_at - incident_condition_acknowledged_at: None | Unset | str + incident_condition_acknowledged_at: None | str | Unset if isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = UNSET elif isinstance(self.incident_condition_acknowledged_at, str): @@ -315,7 +313,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - incident_condition_mitigated_at: None | Unset | str + incident_condition_mitigated_at: None | str | Unset if isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = UNSET elif isinstance(self.incident_condition_mitigated_at, str): @@ -323,7 +321,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_mitigated_at = self.incident_condition_mitigated_at - incident_condition_resolved_at: None | Unset | str + incident_condition_resolved_at: None | str | Unset if isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = UNSET elif isinstance(self.incident_condition_resolved_at, str): @@ -331,7 +329,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | Unset | str + incident_conditional_inactivity: None | str | Unset if isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = UNSET elif isinstance(self.incident_conditional_inactivity, str): @@ -339,15 +337,15 @@ def to_dict(self) -> dict[str, Any]: else: incident_conditional_inactivity = self.incident_conditional_inactivity - incident_post_mortem_condition: Unset | str = UNSET + incident_post_mortem_condition: str | Unset = UNSET if not isinstance(self.incident_post_mortem_condition, Unset): incident_post_mortem_condition = self.incident_post_mortem_condition - incident_post_mortem_condition_status: Unset | str = UNSET + incident_post_mortem_condition_status: str | Unset = UNSET if not isinstance(self.incident_post_mortem_condition_status, Unset): incident_post_mortem_condition_status = self.incident_post_mortem_condition_status - incident_post_mortem_statuses: Unset | list[str] = UNSET + incident_post_mortem_statuses: list[str] | Unset = UNSET if not isinstance(self.incident_post_mortem_statuses, Unset): incident_post_mortem_statuses = [] for incident_post_mortem_statuses_item_data in self.incident_post_mortem_statuses: @@ -431,40 +429,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_visibilities = cast(list[bool], d.pop("incident_visibilities", UNSET)) - incident_kinds = [] _incident_kinds = d.pop("incident_kinds", UNSET) - for incident_kinds_item_data in _incident_kinds or []: - incident_kinds_item = check_post_mortem_trigger_params_incident_kinds_item(incident_kinds_item_data) + incident_kinds: list[PostMortemTriggerParamsIncidentKindsItem] | Unset = UNSET + if _incident_kinds is not UNSET: + incident_kinds = [] + for incident_kinds_item_data in _incident_kinds: + incident_kinds_item = check_post_mortem_trigger_params_incident_kinds_item(incident_kinds_item_data) - incident_kinds.append(incident_kinds_item) + incident_kinds.append(incident_kinds_item) - incident_statuses = [] _incident_statuses = d.pop("incident_statuses", UNSET) - for incident_statuses_item_data in _incident_statuses or []: - incident_statuses_item = check_post_mortem_trigger_params_incident_statuses_item( - incident_statuses_item_data - ) + incident_statuses: list[PostMortemTriggerParamsIncidentStatusesItem] | Unset = UNSET + if _incident_statuses is not UNSET: + incident_statuses = [] + for incident_statuses_item_data in _incident_statuses: + incident_statuses_item = check_post_mortem_trigger_params_incident_statuses_item( + incident_statuses_item_data + ) - incident_statuses.append(incident_statuses_item) + incident_statuses.append(incident_statuses_item) - def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: + def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_inactivity_duration = _parse_incident_inactivity_duration(d.pop("incident_inactivity_duration", UNSET)) _incident_condition = d.pop("incident_condition", UNSET) - incident_condition: Unset | PostMortemTriggerParamsIncidentCondition + incident_condition: PostMortemTriggerParamsIncidentCondition | Unset if isinstance(_incident_condition, Unset): incident_condition = UNSET else: incident_condition = check_post_mortem_trigger_params_incident_condition(_incident_condition) _incident_condition_visibility = d.pop("incident_condition_visibility", UNSET) - incident_condition_visibility: Unset | PostMortemTriggerParamsIncidentConditionVisibility + incident_condition_visibility: PostMortemTriggerParamsIncidentConditionVisibility | Unset if isinstance(_incident_condition_visibility, Unset): incident_condition_visibility = UNSET else: @@ -473,14 +475,14 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_kind = d.pop("incident_condition_kind", UNSET) - incident_condition_kind: Unset | PostMortemTriggerParamsIncidentConditionKind + incident_condition_kind: PostMortemTriggerParamsIncidentConditionKind | Unset if isinstance(_incident_condition_kind, Unset): incident_condition_kind = UNSET else: incident_condition_kind = check_post_mortem_trigger_params_incident_condition_kind(_incident_condition_kind) _incident_condition_status = d.pop("incident_condition_status", UNSET) - incident_condition_status: Unset | PostMortemTriggerParamsIncidentConditionStatus + incident_condition_status: PostMortemTriggerParamsIncidentConditionStatus | Unset if isinstance(_incident_condition_status, Unset): incident_condition_status = UNSET else: @@ -489,7 +491,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_sub_status = d.pop("incident_condition_sub_status", UNSET) - incident_condition_sub_status: Unset | PostMortemTriggerParamsIncidentConditionSubStatus + incident_condition_sub_status: PostMortemTriggerParamsIncidentConditionSubStatus | Unset if isinstance(_incident_condition_sub_status, Unset): incident_condition_sub_status = UNSET else: @@ -498,7 +500,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_environment = d.pop("incident_condition_environment", UNSET) - incident_condition_environment: Unset | PostMortemTriggerParamsIncidentConditionEnvironment + incident_condition_environment: PostMortemTriggerParamsIncidentConditionEnvironment | Unset if isinstance(_incident_condition_environment, Unset): incident_condition_environment = UNSET else: @@ -507,7 +509,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_severity = d.pop("incident_condition_severity", UNSET) - incident_condition_severity: Unset | PostMortemTriggerParamsIncidentConditionSeverity + incident_condition_severity: PostMortemTriggerParamsIncidentConditionSeverity | Unset if isinstance(_incident_condition_severity, Unset): incident_condition_severity = UNSET else: @@ -516,7 +518,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_incident_type = d.pop("incident_condition_incident_type", UNSET) - incident_condition_incident_type: Unset | PostMortemTriggerParamsIncidentConditionIncidentType + incident_condition_incident_type: PostMortemTriggerParamsIncidentConditionIncidentType | Unset if isinstance(_incident_condition_incident_type, Unset): incident_condition_incident_type = UNSET else: @@ -525,7 +527,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_incident_roles = d.pop("incident_condition_incident_roles", UNSET) - incident_condition_incident_roles: Unset | PostMortemTriggerParamsIncidentConditionIncidentRoles + incident_condition_incident_roles: PostMortemTriggerParamsIncidentConditionIncidentRoles | Unset if isinstance(_incident_condition_incident_roles, Unset): incident_condition_incident_roles = UNSET else: @@ -534,7 +536,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_service = d.pop("incident_condition_service", UNSET) - incident_condition_service: Unset | PostMortemTriggerParamsIncidentConditionService + incident_condition_service: PostMortemTriggerParamsIncidentConditionService | Unset if isinstance(_incident_condition_service, Unset): incident_condition_service = UNSET else: @@ -543,7 +545,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_functionality = d.pop("incident_condition_functionality", UNSET) - incident_condition_functionality: Unset | PostMortemTriggerParamsIncidentConditionFunctionality + incident_condition_functionality: PostMortemTriggerParamsIncidentConditionFunctionality | Unset if isinstance(_incident_condition_functionality, Unset): incident_condition_functionality = UNSET else: @@ -552,7 +554,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_group = d.pop("incident_condition_group", UNSET) - incident_condition_group: Unset | PostMortemTriggerParamsIncidentConditionGroup + incident_condition_group: PostMortemTriggerParamsIncidentConditionGroup | Unset if isinstance(_incident_condition_group, Unset): incident_condition_group = UNSET else: @@ -561,7 +563,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_condition_cause = d.pop("incident_condition_cause", UNSET) - incident_condition_cause: Unset | PostMortemTriggerParamsIncidentConditionCause + incident_condition_cause: PostMortemTriggerParamsIncidentConditionCause | Unset if isinstance(_incident_condition_cause, Unset): incident_condition_cause = UNSET else: @@ -570,7 +572,7 @@ def _parse_incident_inactivity_duration(data: object) -> None | Unset | str: ) _incident_post_mortem_condition_cause = d.pop("incident_post_mortem_condition_cause", UNSET) - incident_post_mortem_condition_cause: Unset | PostMortemTriggerParamsIncidentPostMortemConditionCause + incident_post_mortem_condition_cause: PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset if isinstance(_incident_post_mortem_condition_cause, Unset): incident_post_mortem_condition_cause = UNSET else: @@ -595,7 +597,7 @@ def _parse_incident_condition_summary( ) return incident_condition_summary_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset, data) @@ -616,7 +618,7 @@ def _parse_incident_condition_started_at( ) return incident_condition_started_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset, data) @@ -639,7 +641,7 @@ def _parse_incident_condition_detected_at( ) return incident_condition_detected_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset, data) @@ -662,7 +664,7 @@ def _parse_incident_condition_acknowledged_at( ) return incident_condition_acknowledged_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset, data) @@ -685,7 +687,7 @@ def _parse_incident_condition_mitigated_at( ) return incident_condition_mitigated_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset, data) @@ -708,7 +710,7 @@ def _parse_incident_condition_resolved_at( ) return incident_condition_resolved_at_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset, data) @@ -731,7 +733,7 @@ def _parse_incident_conditional_inactivity( ) return incident_conditional_inactivity_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast(None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset, data) @@ -740,7 +742,7 @@ def _parse_incident_conditional_inactivity( ) _incident_post_mortem_condition = d.pop("incident_post_mortem_condition", UNSET) - incident_post_mortem_condition: Unset | PostMortemTriggerParamsIncidentPostMortemCondition + incident_post_mortem_condition: PostMortemTriggerParamsIncidentPostMortemCondition | Unset if isinstance(_incident_post_mortem_condition, Unset): incident_post_mortem_condition = UNSET else: @@ -749,7 +751,7 @@ def _parse_incident_conditional_inactivity( ) _incident_post_mortem_condition_status = d.pop("incident_post_mortem_condition_status", UNSET) - incident_post_mortem_condition_status: Unset | PostMortemTriggerParamsIncidentPostMortemConditionStatus + incident_post_mortem_condition_status: PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset if isinstance(_incident_post_mortem_condition_status, Unset): incident_post_mortem_condition_status = UNSET else: @@ -759,14 +761,18 @@ def _parse_incident_conditional_inactivity( ) ) - incident_post_mortem_statuses = [] _incident_post_mortem_statuses = d.pop("incident_post_mortem_statuses", UNSET) - for incident_post_mortem_statuses_item_data in _incident_post_mortem_statuses or []: - incident_post_mortem_statuses_item = check_post_mortem_trigger_params_incident_post_mortem_statuses_item( - incident_post_mortem_statuses_item_data - ) + incident_post_mortem_statuses: list[PostMortemTriggerParamsIncidentPostMortemStatusesItem] | Unset = UNSET + if _incident_post_mortem_statuses is not UNSET: + incident_post_mortem_statuses = [] + for incident_post_mortem_statuses_item_data in _incident_post_mortem_statuses: + incident_post_mortem_statuses_item = ( + check_post_mortem_trigger_params_incident_post_mortem_statuses_item( + incident_post_mortem_statuses_item_data + ) + ) - incident_post_mortem_statuses.append(incident_post_mortem_statuses_item) + incident_post_mortem_statuses.append(incident_post_mortem_statuses_item) post_mortem_trigger_params = cls( trigger_type=trigger_type, diff --git a/rootly_sdk/models/print_task_params.py b/rootly_sdk/models/print_task_params.py index c781290e..caf8f707 100644 --- a/rootly_sdk/models/print_task_params.py +++ b/rootly_sdk/models/print_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,17 +17,17 @@ class PrintTaskParams: """ Attributes: message (str): The message to print - task_type (Union[Unset, PrintTaskParamsTaskType]): + task_type (PrintTaskParamsTaskType | Unset): """ message: str - task_type: Unset | PrintTaskParamsTaskType = UNSET + task_type: PrintTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: message = self.message - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -47,7 +49,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: message = d.pop("message") _task_type = d.pop("task_type", UNSET) - task_type: Unset | PrintTaskParamsTaskType + task_type: PrintTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/publish_incident_task_params.py b/rootly_sdk/models/publish_incident_task_params.py index 6241b16e..f5600ce0 100644 --- a/rootly_sdk/models/publish_incident_task_params.py +++ b/rootly_sdk/models/publish_incident_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,27 +32,27 @@ class PublishIncidentTaskParams: public_title (str): status (PublishIncidentTaskParamsStatus): Default: 'resolved'. status_page_id (str): - task_type (Union[Unset, PublishIncidentTaskParamsTaskType]): - event (Union[Unset, str]): Incident event description - notify_subscribers (Union[Unset, bool]): When true notifies subscribers of the status page by email/text - Default: False. - should_tweet (Union[Unset, bool]): For Statuspage.io integrated pages auto publishes a tweet for your update - Default: False. - status_page_template (Union[Unset, PublishIncidentTaskParamsStatusPageTemplate]): - integration_payload (Union[None, Unset, str]): Additional API Payload you can pass to statuspage.io for example. - Can contain liquid markup and need to be valid JSON + task_type (PublishIncidentTaskParamsTaskType | Unset): + event (str | Unset): Incident event description + notify_subscribers (bool | Unset): When true notifies subscribers of the status page by email/text Default: + False. + should_tweet (bool | Unset): For Statuspage.io integrated pages auto publishes a tweet for your update Default: + False. + status_page_template (PublishIncidentTaskParamsStatusPageTemplate | Unset): + integration_payload (None | str | Unset): Additional API Payload you can pass to statuspage.io for example. Can + contain liquid markup and need to be valid JSON """ - incident: "PublishIncidentTaskParamsIncident" + incident: PublishIncidentTaskParamsIncident public_title: str status_page_id: str status: PublishIncidentTaskParamsStatus = "resolved" - task_type: Unset | PublishIncidentTaskParamsTaskType = UNSET - event: Unset | str = UNSET - notify_subscribers: Unset | bool = False - should_tweet: Unset | bool = False - status_page_template: Union[Unset, "PublishIncidentTaskParamsStatusPageTemplate"] = UNSET - integration_payload: None | Unset | str = UNSET + task_type: PublishIncidentTaskParamsTaskType | Unset = UNSET + event: str | Unset = UNSET + notify_subscribers: bool | Unset = False + should_tweet: bool | Unset = False + status_page_template: PublishIncidentTaskParamsStatusPageTemplate | Unset = UNSET + integration_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -62,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: status_page_id = self.status_page_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -72,11 +74,11 @@ def to_dict(self) -> dict[str, Any]: should_tweet = self.should_tweet - status_page_template: Unset | dict[str, Any] = UNSET + status_page_template: dict[str, Any] | Unset = UNSET if not isinstance(self.status_page_template, Unset): status_page_template = self.status_page_template.to_dict() - integration_payload: None | Unset | str + integration_payload: None | str | Unset if isinstance(self.integration_payload, Unset): integration_payload = UNSET else: @@ -124,7 +126,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_page_id = d.pop("status_page_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | PublishIncidentTaskParamsTaskType + task_type: PublishIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -137,18 +139,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_tweet = d.pop("should_tweet", UNSET) _status_page_template = d.pop("status_page_template", UNSET) - status_page_template: Unset | PublishIncidentTaskParamsStatusPageTemplate + status_page_template: PublishIncidentTaskParamsStatusPageTemplate | Unset if isinstance(_status_page_template, Unset): status_page_template = UNSET else: status_page_template = PublishIncidentTaskParamsStatusPageTemplate.from_dict(_status_page_template) - def _parse_integration_payload(data: object) -> None | Unset | str: + def _parse_integration_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) integration_payload = _parse_integration_payload(d.pop("integration_payload", UNSET)) diff --git a/rootly_sdk/models/publish_incident_task_params_incident.py b/rootly_sdk/models/publish_incident_task_params_incident.py index 01e13aec..2b20e7ca 100644 --- a/rootly_sdk/models/publish_incident_task_params_incident.py +++ b/rootly_sdk/models/publish_incident_task_params_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PublishIncidentTaskParamsIncident: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/publish_incident_task_params_status_page_template.py b/rootly_sdk/models/publish_incident_task_params_status_page_template.py index fb64cc16..05bd965f 100644 --- a/rootly_sdk/models/publish_incident_task_params_status_page_template.py +++ b/rootly_sdk/models/publish_incident_task_params_status_page_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class PublishIncidentTaskParamsStatusPageTemplate: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/pulse.py b/rootly_sdk/models/pulse.py index f2638491..d5f9b38b 100644 --- a/rootly_sdk/models/pulse.py +++ b/rootly_sdk/models/pulse.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,25 +26,25 @@ class Pulse: summary (str): The summary of the pulse created_at (str): Date of creation updated_at (str): Date of last update - source (Union[None, Unset, str]): The source of the pulse (eg: k8s) - services (Union[Unset, list['Service']]): Services attached to the pulse - environments (Union[Unset, list['Environment']]): Environments attached to the pulse - external_url (Union[None, Unset, str]): The external url of the pulse - labels (Union[Unset, list[Union['PulseLabelsItemType0', None]]]): - refs (Union[Unset, list[Union['PulseRefsItemType0', None]]]): - data (Union['PulseDataType0', None, Unset]): Additional data + source (None | str | Unset): The source of the pulse (eg: k8s) + services (list[Service] | Unset): Services attached to the pulse + environments (list[Environment] | Unset): Environments attached to the pulse + external_url (None | str | Unset): The external url of the pulse + labels (list[None | PulseLabelsItemType0] | Unset): + refs (list[None | PulseRefsItemType0] | Unset): + data (None | PulseDataType0 | Unset): Additional data """ summary: str created_at: str updated_at: str - source: None | Unset | str = UNSET - services: Unset | list["Service"] = UNSET - environments: Unset | list["Environment"] = UNSET - external_url: None | Unset | str = UNSET - labels: Unset | list[Union["PulseLabelsItemType0", None]] = UNSET - refs: Unset | list[Union["PulseRefsItemType0", None]] = UNSET - data: Union["PulseDataType0", None, Unset] = UNSET + source: None | str | Unset = UNSET + services: list[Service] | Unset = UNSET + environments: list[Environment] | Unset = UNSET + external_url: None | str | Unset = UNSET + labels: list[None | PulseLabelsItemType0] | Unset = UNSET + refs: list[None | PulseRefsItemType0] | Unset = UNSET + data: None | PulseDataType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,55 +58,55 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - source: None | Unset | str + source: None | str | Unset if isinstance(self.source, Unset): source = UNSET else: source = self.source - services: Unset | list[dict[str, Any]] = UNSET + services: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.services, Unset): services = [] for services_item_data in self.services: services_item = services_item_data.to_dict() services.append(services_item) - environments: Unset | list[dict[str, Any]] = UNSET + environments: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.environments, Unset): environments = [] for environments_item_data in self.environments: environments_item = environments_item_data.to_dict() environments.append(environments_item) - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - labels: Unset | list[None | dict[str, Any]] = UNSET + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: - labels_item: None | dict[str, Any] + labels_item: dict[str, Any] | None if isinstance(labels_item_data, PulseLabelsItemType0): labels_item = labels_item_data.to_dict() else: labels_item = labels_item_data labels.append(labels_item) - refs: Unset | list[None | dict[str, Any]] = UNSET + refs: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.refs, Unset): refs = [] for refs_item_data in self.refs: - refs_item: None | dict[str, Any] + refs_item: dict[str, Any] | None if isinstance(refs_item_data, PulseRefsItemType0): refs_item = refs_item_data.to_dict() else: refs_item = refs_item_data refs.append(refs_item) - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, PulseDataType0): @@ -153,81 +155,89 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_source(data: object) -> None | Unset | str: + def _parse_source(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) source = _parse_source(d.pop("source", UNSET)) - services = [] _services = d.pop("services", UNSET) - for services_item_data in _services or []: - services_item = Service.from_dict(services_item_data) + services: list[Service] | Unset = UNSET + if _services is not UNSET: + services = [] + for services_item_data in _services: + services_item = Service.from_dict(services_item_data) - services.append(services_item) + services.append(services_item) - environments = [] _environments = d.pop("environments", UNSET) - for environments_item_data in _environments or []: - environments_item = Environment.from_dict(environments_item_data) + environments: list[Environment] | Unset = UNSET + if _environments is not UNSET: + environments = [] + for environments_item_data in _environments: + environments_item = Environment.from_dict(environments_item_data) - environments.append(environments_item) + environments.append(environments_item) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: + labels: list[None | PulseLabelsItemType0] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: - def _parse_labels_item(data: object) -> Union["PulseLabelsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - labels_item_type_0 = PulseLabelsItemType0.from_dict(data) + def _parse_labels_item(data: object) -> None | PulseLabelsItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + labels_item_type_0 = PulseLabelsItemType0.from_dict(data) - return labels_item_type_0 - except: # noqa: E722 - pass - return cast(Union["PulseLabelsItemType0", None], data) + return labels_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PulseLabelsItemType0, data) - labels_item = _parse_labels_item(labels_item_data) + labels_item = _parse_labels_item(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) - refs = [] _refs = d.pop("refs", UNSET) - for refs_item_data in _refs or []: + refs: list[None | PulseRefsItemType0] | Unset = UNSET + if _refs is not UNSET: + refs = [] + for refs_item_data in _refs: - def _parse_refs_item(data: object) -> Union["PulseRefsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - refs_item_type_0 = PulseRefsItemType0.from_dict(data) + def _parse_refs_item(data: object) -> None | PulseRefsItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + refs_item_type_0 = PulseRefsItemType0.from_dict(data) - return refs_item_type_0 - except: # noqa: E722 - pass - return cast(Union["PulseRefsItemType0", None], data) + return refs_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PulseRefsItemType0, data) - refs_item = _parse_refs_item(refs_item_data) + refs_item = _parse_refs_item(refs_item_data) - refs.append(refs_item) + refs.append(refs_item) - def _parse_data(data: object) -> Union["PulseDataType0", None, Unset]: + def _parse_data(data: object) -> None | PulseDataType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -238,9 +248,9 @@ def _parse_data(data: object) -> Union["PulseDataType0", None, Unset]: data_type_0 = PulseDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["PulseDataType0", None, Unset], data) + return cast(None | PulseDataType0 | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/pulse_data_type_0.py b/rootly_sdk/models/pulse_data_type_0.py index 341057a8..afcb2bbc 100644 --- a/rootly_sdk/models/pulse_data_type_0.py +++ b/rootly_sdk/models/pulse_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class PulseDataType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/pulse_labels_item_type_0.py b/rootly_sdk/models/pulse_labels_item_type_0.py index 6636720d..ff7e4e81 100644 --- a/rootly_sdk/models/pulse_labels_item_type_0.py +++ b/rootly_sdk/models/pulse_labels_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/pulse_list.py b/rootly_sdk/models/pulse_list.py index eb2d5efa..ec980c37 100644 --- a/rootly_sdk/models/pulse_list.py +++ b/rootly_sdk/models/pulse_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class PulseList: """ Attributes: - data (list['PulseListDataItem']): + data (list[PulseListDataItem]): links (Links): meta (Meta): """ - data: list["PulseListDataItem"] - links: "Links" - meta: "Meta" + data: list[PulseListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/pulse_list_data_item.py b/rootly_sdk/models/pulse_list_data_item.py index 50c07fba..8a4f7e68 100644 --- a/rootly_sdk/models/pulse_list_data_item.py +++ b/rootly_sdk/models/pulse_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class PulseListDataItem: id: str type_: PulseListDataItemType - attributes: "Pulse" + attributes: Pulse additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/pulse_refs_item_type_0.py b/rootly_sdk/models/pulse_refs_item_type_0.py index 7a101f7f..c65c8b53 100644 --- a/rootly_sdk/models/pulse_refs_item_type_0.py +++ b/rootly_sdk/models/pulse_refs_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/pulse_response.py b/rootly_sdk/models/pulse_response.py index 2bee6dee..663d9fec 100644 --- a/rootly_sdk/models/pulse_response.py +++ b/rootly_sdk/models/pulse_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class PulseResponse: data (PulseResponseData): """ - data: "PulseResponseData" + data: PulseResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/pulse_response_data.py b/rootly_sdk/models/pulse_response_data.py index 7b7d58cc..f9fe8791 100644 --- a/rootly_sdk/models/pulse_response_data.py +++ b/rootly_sdk/models/pulse_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class PulseResponseData: id: str type_: PulseResponseDataType - attributes: "Pulse" + attributes: Pulse additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/pulse_trigger_params.py b/rootly_sdk/models/pulse_trigger_params.py index e96eb5f8..138e75d9 100644 --- a/rootly_sdk/models/pulse_trigger_params.py +++ b/rootly_sdk/models/pulse_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -38,80 +40,80 @@ class PulseTriggerParams: """ Attributes: trigger_type (PulseTriggerParamsTriggerType): - triggers (Union[Unset, list[PulseTriggerParamsTriggersItem]]): - pulse_condition (Union[Unset, PulseTriggerParamsPulseCondition]): - pulse_condition_source (Union[Unset, PulseTriggerParamsPulseConditionSource]): Default: 'ANY'. - pulse_condition_source_use_regexp (Union[Unset, bool]): Default: False. - pulse_sources (Union[Unset, list[str]]): - pulse_condition_label (Union[Unset, PulseTriggerParamsPulseConditionLabel]): Default: 'ANY'. - pulse_condition_label_use_regexp (Union[Unset, bool]): Default: False. - pulse_labels (Union[Unset, list[str]]): - pulse_condition_payload (Union[Unset, PulseTriggerParamsPulseConditionPayload]): Default: 'ANY'. - pulse_condition_payload_use_regexp (Union[Unset, bool]): Default: False. - pulse_payload (Union[Unset, list[str]]): - pulse_query_payload (Union[None, Unset, str]): You can use jsonpath syntax. eg: $.incident.teams[*] + triggers (list[PulseTriggerParamsTriggersItem] | Unset): + pulse_condition (PulseTriggerParamsPulseCondition | Unset): + pulse_condition_source (PulseTriggerParamsPulseConditionSource | Unset): Default: 'ANY'. + pulse_condition_source_use_regexp (bool | Unset): Default: False. + pulse_sources (list[str] | Unset): + pulse_condition_label (PulseTriggerParamsPulseConditionLabel | Unset): Default: 'ANY'. + pulse_condition_label_use_regexp (bool | Unset): Default: False. + pulse_labels (list[str] | Unset): + pulse_condition_payload (PulseTriggerParamsPulseConditionPayload | Unset): Default: 'ANY'. + pulse_condition_payload_use_regexp (bool | Unset): Default: False. + pulse_payload (list[str] | Unset): + pulse_query_payload (None | str | Unset): You can use jsonpath syntax. eg: $.incident.teams[*] """ trigger_type: PulseTriggerParamsTriggerType - triggers: Unset | list[PulseTriggerParamsTriggersItem] = UNSET - pulse_condition: Unset | PulseTriggerParamsPulseCondition = UNSET - pulse_condition_source: Unset | PulseTriggerParamsPulseConditionSource = "ANY" - pulse_condition_source_use_regexp: Unset | bool = False - pulse_sources: Unset | list[str] = UNSET - pulse_condition_label: Unset | PulseTriggerParamsPulseConditionLabel = "ANY" - pulse_condition_label_use_regexp: Unset | bool = False - pulse_labels: Unset | list[str] = UNSET - pulse_condition_payload: Unset | PulseTriggerParamsPulseConditionPayload = "ANY" - pulse_condition_payload_use_regexp: Unset | bool = False - pulse_payload: Unset | list[str] = UNSET - pulse_query_payload: None | Unset | str = UNSET + triggers: list[PulseTriggerParamsTriggersItem] | Unset = UNSET + pulse_condition: PulseTriggerParamsPulseCondition | Unset = UNSET + pulse_condition_source: PulseTriggerParamsPulseConditionSource | Unset = "ANY" + pulse_condition_source_use_regexp: bool | Unset = False + pulse_sources: list[str] | Unset = UNSET + pulse_condition_label: PulseTriggerParamsPulseConditionLabel | Unset = "ANY" + pulse_condition_label_use_regexp: bool | Unset = False + pulse_labels: list[str] | Unset = UNSET + pulse_condition_payload: PulseTriggerParamsPulseConditionPayload | Unset = "ANY" + pulse_condition_payload_use_regexp: bool | Unset = False + pulse_payload: list[str] | Unset = UNSET + pulse_query_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: trigger_type: str = self.trigger_type - triggers: Unset | list[str] = UNSET + triggers: list[str] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = [] for triggers_item_data in self.triggers: triggers_item: str = triggers_item_data triggers.append(triggers_item) - pulse_condition: Unset | str = UNSET + pulse_condition: str | Unset = UNSET if not isinstance(self.pulse_condition, Unset): pulse_condition = self.pulse_condition - pulse_condition_source: Unset | str = UNSET + pulse_condition_source: str | Unset = UNSET if not isinstance(self.pulse_condition_source, Unset): pulse_condition_source = self.pulse_condition_source pulse_condition_source_use_regexp = self.pulse_condition_source_use_regexp - pulse_sources: Unset | list[str] = UNSET + pulse_sources: list[str] | Unset = UNSET if not isinstance(self.pulse_sources, Unset): pulse_sources = self.pulse_sources - pulse_condition_label: Unset | str = UNSET + pulse_condition_label: str | Unset = UNSET if not isinstance(self.pulse_condition_label, Unset): pulse_condition_label = self.pulse_condition_label pulse_condition_label_use_regexp = self.pulse_condition_label_use_regexp - pulse_labels: Unset | list[str] = UNSET + pulse_labels: list[str] | Unset = UNSET if not isinstance(self.pulse_labels, Unset): pulse_labels = self.pulse_labels - pulse_condition_payload: Unset | str = UNSET + pulse_condition_payload: str | Unset = UNSET if not isinstance(self.pulse_condition_payload, Unset): pulse_condition_payload = self.pulse_condition_payload pulse_condition_payload_use_regexp = self.pulse_condition_payload_use_regexp - pulse_payload: Unset | list[str] = UNSET + pulse_payload: list[str] | Unset = UNSET if not isinstance(self.pulse_payload, Unset): pulse_payload = self.pulse_payload - pulse_query_payload: None | Unset | str + pulse_query_payload: None | str | Unset if isinstance(self.pulse_query_payload, Unset): pulse_query_payload = UNSET else: @@ -156,22 +158,24 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) trigger_type = check_pulse_trigger_params_trigger_type(d.pop("trigger_type")) - triggers = [] _triggers = d.pop("triggers", UNSET) - for triggers_item_data in _triggers or []: - triggers_item = check_pulse_trigger_params_triggers_item(triggers_item_data) + triggers: list[PulseTriggerParamsTriggersItem] | Unset = UNSET + if _triggers is not UNSET: + triggers = [] + for triggers_item_data in _triggers: + triggers_item = check_pulse_trigger_params_triggers_item(triggers_item_data) - triggers.append(triggers_item) + triggers.append(triggers_item) _pulse_condition = d.pop("pulse_condition", UNSET) - pulse_condition: Unset | PulseTriggerParamsPulseCondition + pulse_condition: PulseTriggerParamsPulseCondition | Unset if isinstance(_pulse_condition, Unset): pulse_condition = UNSET else: pulse_condition = check_pulse_trigger_params_pulse_condition(_pulse_condition) _pulse_condition_source = d.pop("pulse_condition_source", UNSET) - pulse_condition_source: Unset | PulseTriggerParamsPulseConditionSource + pulse_condition_source: PulseTriggerParamsPulseConditionSource | Unset if isinstance(_pulse_condition_source, Unset): pulse_condition_source = UNSET else: @@ -182,7 +186,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: pulse_sources = cast(list[str], d.pop("pulse_sources", UNSET)) _pulse_condition_label = d.pop("pulse_condition_label", UNSET) - pulse_condition_label: Unset | PulseTriggerParamsPulseConditionLabel + pulse_condition_label: PulseTriggerParamsPulseConditionLabel | Unset if isinstance(_pulse_condition_label, Unset): pulse_condition_label = UNSET else: @@ -193,7 +197,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: pulse_labels = cast(list[str], d.pop("pulse_labels", UNSET)) _pulse_condition_payload = d.pop("pulse_condition_payload", UNSET) - pulse_condition_payload: Unset | PulseTriggerParamsPulseConditionPayload + pulse_condition_payload: PulseTriggerParamsPulseConditionPayload | Unset if isinstance(_pulse_condition_payload, Unset): pulse_condition_payload = UNSET else: @@ -203,12 +207,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: pulse_payload = cast(list[str], d.pop("pulse_payload", UNSET)) - def _parse_pulse_query_payload(data: object) -> None | Unset | str: + def _parse_pulse_query_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pulse_query_payload = _parse_pulse_query_payload(d.pop("pulse_query_payload", UNSET)) diff --git a/rootly_sdk/models/redis_client_task_params.py b/rootly_sdk/models/redis_client_task_params.py index 6aa2959c..62446bca 100644 --- a/rootly_sdk/models/redis_client_task_params.py +++ b/rootly_sdk/models/redis_client_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,20 +27,20 @@ class RedisClientTaskParams: Attributes: url (str): Example: redis://redis-12345.c1.us-east-1-2.ec2.cloud.redislabs.com:12345. commands (str): - task_type (Union[Unset, RedisClientTaskParamsTaskType]): - event_url (Union[Unset, str]): - event_message (Union[Unset, str]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['RedisClientTaskParamsPostToSlackChannelsItem']]): + task_type (RedisClientTaskParamsTaskType | Unset): + event_url (str | Unset): + event_message (str | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[RedisClientTaskParamsPostToSlackChannelsItem] | Unset): """ url: str commands: str - task_type: Unset | RedisClientTaskParamsTaskType = UNSET - event_url: Unset | str = UNSET - event_message: Unset | str = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["RedisClientTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: RedisClientTaskParamsTaskType | Unset = UNSET + event_url: str | Unset = UNSET + event_message: str | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[RedisClientTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: commands = self.commands - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -56,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -96,7 +98,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: commands = d.pop("commands") _task_type = d.pop("task_type", UNSET) - task_type: Unset | RedisClientTaskParamsTaskType + task_type: RedisClientTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -108,14 +110,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = RedisClientTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[RedisClientTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = RedisClientTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) redis_client_task_params = cls( url=url, diff --git a/rootly_sdk/models/redis_client_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/redis_client_task_params_post_to_slack_channels_item.py index 43f76fd7..f9bb82cb 100644 --- a/rootly_sdk/models/redis_client_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/redis_client_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class RedisClientTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/remove_google_docs_permissions_task_params.py b/rootly_sdk/models/remove_google_docs_permissions_task_params.py index 6b299669..4caa857f 100644 --- a/rootly_sdk/models/remove_google_docs_permissions_task_params.py +++ b/rootly_sdk/models/remove_google_docs_permissions_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -24,13 +26,13 @@ class RemoveGoogleDocsPermissionsTaskParams: file_id (str): The Google Doc file ID attribute_to_query_by (RemoveGoogleDocsPermissionsTaskParamsAttributeToQueryBy): Default: 'email_address'. value (str): - task_type (Union[Unset, RemoveGoogleDocsPermissionsTaskParamsTaskType]): + task_type (RemoveGoogleDocsPermissionsTaskParamsTaskType | Unset): """ file_id: str value: str attribute_to_query_by: RemoveGoogleDocsPermissionsTaskParamsAttributeToQueryBy = "email_address" - task_type: Unset | RemoveGoogleDocsPermissionsTaskParamsTaskType = UNSET + task_type: RemoveGoogleDocsPermissionsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: value = self.value - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -70,7 +72,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: value = d.pop("value") _task_type = d.pop("task_type", UNSET) - task_type: Unset | RemoveGoogleDocsPermissionsTaskParamsTaskType + task_type: RemoveGoogleDocsPermissionsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/remove_subscribers.py b/rootly_sdk/models/remove_subscribers.py index 39d25586..7393a0e3 100644 --- a/rootly_sdk/models/remove_subscribers.py +++ b/rootly_sdk/models/remove_subscribers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RemoveSubscribers: data (RemoveSubscribersData): """ - data: "RemoveSubscribersData" + data: RemoveSubscribersData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/remove_subscribers_data.py b/rootly_sdk/models/remove_subscribers_data.py index 5f04e403..cc8fd21e 100644 --- a/rootly_sdk/models/remove_subscribers_data.py +++ b/rootly_sdk/models/remove_subscribers_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class RemoveSubscribersData: """ type_: RemoveSubscribersDataType - attributes: "RemoveSubscribersDataAttributes" + attributes: RemoveSubscribersDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/remove_subscribers_data_attributes.py b/rootly_sdk/models/remove_subscribers_data_attributes.py index c8933597..a2b72357 100644 --- a/rootly_sdk/models/remove_subscribers_data_attributes.py +++ b/rootly_sdk/models/remove_subscribers_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,17 +14,17 @@ class RemoveSubscribersDataAttributes: """ Attributes: - user_ids (Union[None, Unset, list[str]]): IDs of users you wish to remove from the list of subscribers for this + user_ids (list[str] | None | Unset): IDs of users you wish to remove from the list of subscribers for this incident - remove_users_with_no_private_incident_access (Union[None, Unset, bool]): Users without read permissions for - private incidents will be removed from the subscriber list of this incident Default: False. + remove_users_with_no_private_incident_access (bool | None | Unset): Users without read permissions for private + incidents will be removed from the subscriber list of this incident Default: False. """ - user_ids: None | Unset | list[str] = UNSET - remove_users_with_no_private_incident_access: None | Unset | bool = False + user_ids: list[str] | None | Unset = UNSET + remove_users_with_no_private_incident_access: bool | None | Unset = False def to_dict(self) -> dict[str, Any]: - user_ids: None | Unset | list[str] + user_ids: list[str] | None | Unset if isinstance(self.user_ids, Unset): user_ids = UNSET elif isinstance(self.user_ids, list): @@ -31,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: else: user_ids = self.user_ids - remove_users_with_no_private_incident_access: None | Unset | bool + remove_users_with_no_private_incident_access: bool | None | Unset if isinstance(self.remove_users_with_no_private_incident_access, Unset): remove_users_with_no_private_incident_access = UNSET else: @@ -51,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_user_ids(data: object) -> None | Unset | list[str]: + def _parse_user_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -62,18 +64,18 @@ def _parse_user_ids(data: object) -> None | Unset | list[str]: user_ids_type_0 = cast(list[str], data) return user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) user_ids = _parse_user_ids(d.pop("user_ids", UNSET)) - def _parse_remove_users_with_no_private_incident_access(data: object) -> None | Unset | bool: + def _parse_remove_users_with_no_private_incident_access(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) remove_users_with_no_private_incident_access = _parse_remove_users_with_no_private_incident_access( d.pop("remove_users_with_no_private_incident_access", UNSET) diff --git a/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py b/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py index 4e0c3dfe..c5ecded6 100644 --- a/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,13 +27,13 @@ class RenameMicrosoftTeamsChannelTaskParams: team (RenameMicrosoftTeamsChannelTaskParamsTeam): channel (RenameMicrosoftTeamsChannelTaskParamsChannel): title (str): - task_type (Union[Unset, RenameMicrosoftTeamsChannelTaskParamsTaskType]): + task_type (RenameMicrosoftTeamsChannelTaskParamsTaskType | Unset): """ - team: "RenameMicrosoftTeamsChannelTaskParamsTeam" - channel: "RenameMicrosoftTeamsChannelTaskParamsChannel" + team: RenameMicrosoftTeamsChannelTaskParamsTeam + channel: RenameMicrosoftTeamsChannelTaskParamsChannel title: str - task_type: Unset | RenameMicrosoftTeamsChannelTaskParamsTaskType = UNSET + task_type: RenameMicrosoftTeamsChannelTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -41,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -74,7 +76,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | RenameMicrosoftTeamsChannelTaskParamsTaskType + task_type: RenameMicrosoftTeamsChannelTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/rename_microsoft_teams_channel_task_params_channel.py b/rootly_sdk/models/rename_microsoft_teams_channel_task_params_channel.py index 40a6795c..adc80c16 100644 --- a/rootly_sdk/models/rename_microsoft_teams_channel_task_params_channel.py +++ b/rootly_sdk/models/rename_microsoft_teams_channel_task_params_channel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class RenameMicrosoftTeamsChannelTaskParamsChannel: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/rename_microsoft_teams_channel_task_params_team.py b/rootly_sdk/models/rename_microsoft_teams_channel_task_params_team.py index 40409c1b..45eda40c 100644 --- a/rootly_sdk/models/rename_microsoft_teams_channel_task_params_team.py +++ b/rootly_sdk/models/rename_microsoft_teams_channel_task_params_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class RenameMicrosoftTeamsChannelTaskParamsTeam: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/rename_slack_channel_task_params.py b/rootly_sdk/models/rename_slack_channel_task_params.py index 47cecb7e..e5b419ff 100644 --- a/rootly_sdk/models/rename_slack_channel_task_params.py +++ b/rootly_sdk/models/rename_slack_channel_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class RenameSlackChannelTaskParams: Attributes: channel (RenameSlackChannelTaskParamsChannel): title (str): - task_type (Union[Unset, RenameSlackChannelTaskParamsTaskType]): + task_type (RenameSlackChannelTaskParamsTaskType | Unset): """ - channel: "RenameSlackChannelTaskParamsChannel" + channel: RenameSlackChannelTaskParamsChannel title: str - task_type: Unset | RenameSlackChannelTaskParamsTaskType = UNSET + task_type: RenameSlackChannelTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: title = self.title - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title") _task_type = d.pop("task_type", UNSET) - task_type: Unset | RenameSlackChannelTaskParamsTaskType + task_type: RenameSlackChannelTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/rename_slack_channel_task_params_channel.py b/rootly_sdk/models/rename_slack_channel_task_params_channel.py index 4d14a018..e2cc7d5f 100644 --- a/rootly_sdk/models/rename_slack_channel_task_params_channel.py +++ b/rootly_sdk/models/rename_slack_channel_task_params_channel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class RenameSlackChannelTaskParamsChannel: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/resolve_alert.py b/rootly_sdk/models/resolve_alert.py index d14428fe..70892c51 100644 --- a/rootly_sdk/models/resolve_alert.py +++ b/rootly_sdk/models/resolve_alert.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class ResolveAlert: """ Attributes: - data (Union[Unset, ResolveAlertData]): + data (ResolveAlertData | Unset): """ - data: Union[Unset, "ResolveAlertData"] = UNSET + data: ResolveAlertData | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | ResolveAlertData + data: ResolveAlertData | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/resolve_alert_data.py b/rootly_sdk/models/resolve_alert_data.py index 7286461f..e35a0113 100644 --- a/rootly_sdk/models/resolve_alert_data.py +++ b/rootly_sdk/models/resolve_alert_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class ResolveAlertData: """ Attributes: - type_ (Union[Unset, ResolveAlertDataType]): - attributes (Union[Unset, ResolveAlertDataAttributes]): + type_ (ResolveAlertDataType | Unset): + attributes (ResolveAlertDataAttributes | Unset): """ - type_: Unset | ResolveAlertDataType = UNSET - attributes: Union[Unset, "ResolveAlertDataAttributes"] = UNSET + type_: ResolveAlertDataType | Unset = UNSET + attributes: ResolveAlertDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -51,14 +53,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _type_ = d.pop("type", UNSET) - type_: Unset | ResolveAlertDataType + type_: ResolveAlertDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_resolve_alert_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | ResolveAlertDataAttributes + attributes: ResolveAlertDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/resolve_alert_data_attributes.py b/rootly_sdk/models/resolve_alert_data_attributes.py index a074323f..145979dc 100644 --- a/rootly_sdk/models/resolve_alert_data_attributes.py +++ b/rootly_sdk/models/resolve_alert_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,21 +14,21 @@ class ResolveAlertDataAttributes: """ Attributes: - resolution_message (Union[None, Unset, str]): How was the alert resolved? - resolve_related_incidents (Union[None, Unset, bool]): Resolve all associated incidents + resolution_message (None | str | Unset): How was the alert resolved? + resolve_related_incidents (bool | None | Unset): Resolve all associated incidents """ - resolution_message: None | Unset | str = UNSET - resolve_related_incidents: None | Unset | bool = UNSET + resolution_message: None | str | Unset = UNSET + resolve_related_incidents: bool | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: - resolution_message: None | Unset | str + resolution_message: None | str | Unset if isinstance(self.resolution_message, Unset): resolution_message = UNSET else: resolution_message = self.resolution_message - resolve_related_incidents: None | Unset | bool + resolve_related_incidents: bool | None | Unset if isinstance(self.resolve_related_incidents, Unset): resolve_related_incidents = UNSET else: @@ -46,21 +48,21 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_resolution_message(data: object) -> None | Unset | str: + def _parse_resolution_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolution_message = _parse_resolution_message(d.pop("resolution_message", UNSET)) - def _parse_resolve_related_incidents(data: object) -> None | Unset | bool: + def _parse_resolve_related_incidents(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) resolve_related_incidents = _parse_resolve_related_incidents(d.pop("resolve_related_incidents", UNSET)) diff --git a/rootly_sdk/models/resolve_incident.py b/rootly_sdk/models/resolve_incident.py index dd2a87be..466294e2 100644 --- a/rootly_sdk/models/resolve_incident.py +++ b/rootly_sdk/models/resolve_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ResolveIncident: data (ResolveIncidentData): """ - data: "ResolveIncidentData" + data: ResolveIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/resolve_incident_data.py b/rootly_sdk/models/resolve_incident_data.py index 7f814f56..79454ac7 100644 --- a/rootly_sdk/models/resolve_incident_data.py +++ b/rootly_sdk/models/resolve_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class ResolveIncidentData: """ type_: ResolveIncidentDataType - attributes: "ResolveIncidentDataAttributes" + attributes: ResolveIncidentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/resolve_incident_data_attributes.py b/rootly_sdk/models/resolve_incident_data_attributes.py index 779a6bc0..f692c9d9 100644 --- a/rootly_sdk/models/resolve_incident_data_attributes.py +++ b/rootly_sdk/models/resolve_incident_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,13 +14,13 @@ class ResolveIncidentDataAttributes: """ Attributes: - resolution_message (Union[None, Unset, str]): How was the incident resolved? + resolution_message (None | str | Unset): How was the incident resolved? """ - resolution_message: None | Unset | str = UNSET + resolution_message: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - resolution_message: None | Unset | str + resolution_message: None | str | Unset if isinstance(self.resolution_message, Unset): resolution_message = UNSET else: @@ -36,12 +38,12 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_resolution_message(data: object) -> None | Unset | str: + def _parse_resolution_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolution_message = _parse_resolution_message(d.pop("resolution_message", UNSET)) diff --git a/rootly_sdk/models/restart_incident.py b/rootly_sdk/models/restart_incident.py index 6ad06f78..87a940c1 100644 --- a/rootly_sdk/models/restart_incident.py +++ b/rootly_sdk/models/restart_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RestartIncident: data (RestartIncidentData): """ - data: "RestartIncidentData" + data: RestartIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/restart_incident_data.py b/rootly_sdk/models/restart_incident_data.py index ac26db8c..149161b4 100644 --- a/rootly_sdk/models/restart_incident_data.py +++ b/rootly_sdk/models/restart_incident_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,17 +21,17 @@ class RestartIncidentData: """ Attributes: type_ (RestartIncidentDataType): - attributes (Union[Unset, RestartIncidentDataAttributes]): + attributes (RestartIncidentDataAttributes | Unset): """ type_: RestartIncidentDataType - attributes: Union[Unset, "RestartIncidentDataAttributes"] = UNSET + attributes: RestartIncidentDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: type_: str = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -53,7 +55,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: type_ = check_restart_incident_data_type(d.pop("type")) _attributes = d.pop("attributes", UNSET) - attributes: Unset | RestartIncidentDataAttributes + attributes: RestartIncidentDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/restart_incident_data_attributes.py b/rootly_sdk/models/restart_incident_data_attributes.py index 17cdc6f5..3d95b753 100644 --- a/rootly_sdk/models/restart_incident_data_attributes.py +++ b/rootly_sdk/models/restart_incident_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -11,6 +13,7 @@ class RestartIncidentDataAttributes: """ """ def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} return field_dict diff --git a/rootly_sdk/models/retrospective_configuration.py b/rootly_sdk/models/retrospective_configuration.py index 3374e771..f2ccd845 100644 --- a/rootly_sdk/models/retrospective_configuration.py +++ b/rootly_sdk/models/retrospective_configuration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,29 +19,28 @@ class RetrospectiveConfiguration: """ Attributes: - kind (Union[Unset, RetrospectiveConfigurationKind]): The kind of the configuration. - severity_ids (Union[None, Unset, list[str]]): The Severity IDs to attach to the retrospective configuration - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the retrospective configuration - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the retrospective - configuration - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + kind (RetrospectiveConfigurationKind | Unset): The kind of the configuration. + severity_ids (list[str] | None | Unset): The Severity IDs to attach to the retrospective configuration + group_ids (list[str] | None | Unset): The Team IDs to attach to the retrospective configuration + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the retrospective configuration + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ - kind: Unset | RetrospectiveConfigurationKind = UNSET - severity_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + kind: RetrospectiveConfigurationKind | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -48,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -57,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -92,13 +93,13 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _kind = d.pop("kind", UNSET) - kind: Unset | RetrospectiveConfigurationKind + kind: RetrospectiveConfigurationKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_retrospective_configuration_kind(_kind) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -109,13 +110,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -126,13 +127,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -143,9 +144,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/retrospective_configuration_list.py b/rootly_sdk/models/retrospective_configuration_list.py index 84354f14..30398957 100644 --- a/rootly_sdk/models/retrospective_configuration_list.py +++ b/rootly_sdk/models/retrospective_configuration_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,10 +17,10 @@ class RetrospectiveConfigurationList: """ Attributes: - data (list['RetrospectiveConfigurationListDataItem']): + data (list[RetrospectiveConfigurationListDataItem]): """ - data: list["RetrospectiveConfigurationListDataItem"] + data: list[RetrospectiveConfigurationListDataItem] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_configuration_list_data_item.py b/rootly_sdk/models/retrospective_configuration_list_data_item.py index c3f88c45..55494c90 100644 --- a/rootly_sdk/models/retrospective_configuration_list_data_item.py +++ b/rootly_sdk/models/retrospective_configuration_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveConfigurationListDataItem: id: str type_: RetrospectiveConfigurationListDataItemType - attributes: "RetrospectiveConfiguration" + attributes: RetrospectiveConfiguration additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_configuration_response.py b/rootly_sdk/models/retrospective_configuration_response.py index ca49f117..56b42d68 100644 --- a/rootly_sdk/models/retrospective_configuration_response.py +++ b/rootly_sdk/models/retrospective_configuration_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RetrospectiveConfigurationResponse: data (RetrospectiveConfigurationResponseData): """ - data: "RetrospectiveConfigurationResponseData" + data: RetrospectiveConfigurationResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_configuration_response_data.py b/rootly_sdk/models/retrospective_configuration_response_data.py index fc3eeec0..430c8851 100644 --- a/rootly_sdk/models/retrospective_configuration_response_data.py +++ b/rootly_sdk/models/retrospective_configuration_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveConfigurationResponseData: id: str type_: RetrospectiveConfigurationResponseDataType - attributes: "RetrospectiveConfiguration" + attributes: RetrospectiveConfiguration additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process.py b/rootly_sdk/models/retrospective_process.py index 7f16675f..05b0511d 100644 --- a/rootly_sdk/models/retrospective_process.py +++ b/rootly_sdk/models/retrospective_process.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,29 +27,29 @@ class RetrospectiveProcess: """ Attributes: - name (Union[Unset, str]): The name of the retrospective process - description (Union[None, Unset, str]): The description of the retrospective process - is_default (Union[None, Unset, bool]): Indicates the default process that Rootly created. This will be used as a + name (str | Unset): The name of the retrospective process + description (None | str | Unset): The description of the retrospective process + is_default (bool | None | Unset): Indicates the default process that Rootly created. This will be used as a fallback if no processes match the incident's conditions. The default process cannot have conditions and cannot be changed. - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update - retrospective_process_matching_criteria (Union['RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0', - 'RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1', - 'RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2', Unset]): + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + retrospective_process_matching_criteria (RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0 | + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1 | + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2 | Unset): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - is_default: None | Unset | bool = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET - retrospective_process_matching_criteria: Union[ - "RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0", - "RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1", - "RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2", - Unset, - ] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + is_default: bool | None | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + retrospective_process_matching_criteria: ( + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0 + | RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1 + | RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2 + | Unset + ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -60,13 +62,13 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - is_default: None | Unset | bool + is_default: bool | None | Unset if isinstance(self.is_default, Unset): is_default = UNSET else: @@ -76,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - retrospective_process_matching_criteria: Unset | dict[str, Any] + retrospective_process_matching_criteria: dict[str, Any] | Unset if isinstance(self.retrospective_process_matching_criteria, Unset): retrospective_process_matching_criteria = UNSET elif isinstance( @@ -123,21 +125,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_is_default(data: object) -> None | Unset | bool: + def _parse_is_default(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) is_default = _parse_is_default(d.pop("is_default", UNSET)) @@ -147,12 +149,12 @@ def _parse_is_default(data: object) -> None | Unset | bool: def _parse_retrospective_process_matching_criteria( data: object, - ) -> Union[ - "RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0", - "RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1", - "RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2", - Unset, - ]: + ) -> ( + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0 + | RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1 + | RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2 + | Unset + ): if isinstance(data, Unset): return data try: @@ -163,7 +165,7 @@ def _parse_retrospective_process_matching_criteria( ) return retrospective_process_matching_criteria_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -173,7 +175,7 @@ def _parse_retrospective_process_matching_criteria( ) return retrospective_process_matching_criteria_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/retrospective_process_group.py b/rootly_sdk/models/retrospective_process_group.py index bd6c59c6..c6214add 100644 --- a/rootly_sdk/models/retrospective_process_group.py +++ b/rootly_sdk/models/retrospective_process_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/retrospective_process_group_list.py b/rootly_sdk/models/retrospective_process_group_list.py index 15c96b6a..e55e6833 100644 --- a/rootly_sdk/models/retrospective_process_group_list.py +++ b/rootly_sdk/models/retrospective_process_group_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class RetrospectiveProcessGroupList: """ Attributes: - data (list['RetrospectiveProcessGroupListDataItem']): + data (list[RetrospectiveProcessGroupListDataItem]): links (Links): meta (Meta): """ - data: list["RetrospectiveProcessGroupListDataItem"] - links: "Links" - meta: "Meta" + data: list[RetrospectiveProcessGroupListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_list_data_item.py b/rootly_sdk/models/retrospective_process_group_list_data_item.py index 001161de..bd83fc5d 100644 --- a/rootly_sdk/models/retrospective_process_group_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_group_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveProcessGroupListDataItem: id: str type_: RetrospectiveProcessGroupListDataItemType - attributes: "RetrospectiveProcessGroup" + attributes: RetrospectiveProcessGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_response.py b/rootly_sdk/models/retrospective_process_group_response.py index 6f45e077..28a77ec2 100644 --- a/rootly_sdk/models/retrospective_process_group_response.py +++ b/rootly_sdk/models/retrospective_process_group_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RetrospectiveProcessGroupResponse: data (RetrospectiveProcessGroupResponseData): """ - data: "RetrospectiveProcessGroupResponseData" + data: RetrospectiveProcessGroupResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_response_data.py b/rootly_sdk/models/retrospective_process_group_response_data.py index 728a7c2d..e031954a 100644 --- a/rootly_sdk/models/retrospective_process_group_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveProcessGroupResponseData: id: str type_: RetrospectiveProcessGroupResponseDataType - attributes: "RetrospectiveProcessGroup" + attributes: RetrospectiveProcessGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_step.py b/rootly_sdk/models/retrospective_process_group_step.py index c1e006cd..d03eeab7 100644 --- a/rootly_sdk/models/retrospective_process_group_step.py +++ b/rootly_sdk/models/retrospective_process_group_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/retrospective_process_group_step_list.py b/rootly_sdk/models/retrospective_process_group_step_list.py index e52ddb67..215c2e5f 100644 --- a/rootly_sdk/models/retrospective_process_group_step_list.py +++ b/rootly_sdk/models/retrospective_process_group_step_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class RetrospectiveProcessGroupStepList: """ Attributes: - data (list['RetrospectiveProcessGroupStepListDataItem']): + data (list[RetrospectiveProcessGroupStepListDataItem]): links (Links): meta (Meta): """ - data: list["RetrospectiveProcessGroupStepListDataItem"] - links: "Links" - meta: "Meta" + data: list[RetrospectiveProcessGroupStepListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_step_list_data_item.py b/rootly_sdk/models/retrospective_process_group_step_list_data_item.py index 760eb209..51a6371d 100644 --- a/rootly_sdk/models/retrospective_process_group_step_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_group_step_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveProcessGroupStepListDataItem: id: str type_: RetrospectiveProcessGroupStepListDataItemType - attributes: "RetrospectiveProcessGroupStep" + attributes: RetrospectiveProcessGroupStep additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_step_response.py b/rootly_sdk/models/retrospective_process_group_step_response.py index a6f4e1db..2a20a98c 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response.py +++ b/rootly_sdk/models/retrospective_process_group_step_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RetrospectiveProcessGroupStepResponse: data (RetrospectiveProcessGroupStepResponseData): """ - data: "RetrospectiveProcessGroupStepResponseData" + data: RetrospectiveProcessGroupStepResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_group_step_response_data.py b/rootly_sdk/models/retrospective_process_group_step_response_data.py index 9cc6a8ce..786a454c 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_step_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveProcessGroupStepResponseData: id: str type_: RetrospectiveProcessGroupStepResponseDataType - attributes: "RetrospectiveProcessGroupStep" + attributes: RetrospectiveProcessGroupStep additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_list.py b/rootly_sdk/models/retrospective_process_list.py index 2abf4965..1026fd52 100644 --- a/rootly_sdk/models/retrospective_process_list.py +++ b/rootly_sdk/models/retrospective_process_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class RetrospectiveProcessList: """ Attributes: - data (list['RetrospectiveProcessListDataItem']): + data (list[RetrospectiveProcessListDataItem]): links (Links): meta (Meta): """ - data: list["RetrospectiveProcessListDataItem"] - links: "Links" - meta: "Meta" + data: list[RetrospectiveProcessListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_list_data_item.py b/rootly_sdk/models/retrospective_process_list_data_item.py index 0689a834..a63c45f5 100644 --- a/rootly_sdk/models/retrospective_process_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveProcessListDataItem: id: str type_: RetrospectiveProcessListDataItemType - attributes: "RetrospectiveProcess" + attributes: RetrospectiveProcess additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_response.py b/rootly_sdk/models/retrospective_process_response.py index 6f89046c..7070b2eb 100644 --- a/rootly_sdk/models/retrospective_process_response.py +++ b/rootly_sdk/models/retrospective_process_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RetrospectiveProcessResponse: data (RetrospectiveProcessResponseData): """ - data: "RetrospectiveProcessResponseData" + data: RetrospectiveProcessResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_response_data.py b/rootly_sdk/models/retrospective_process_response_data.py index 63527e2b..2b72ed88 100644 --- a/rootly_sdk/models/retrospective_process_response_data.py +++ b/rootly_sdk/models/retrospective_process_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveProcessResponseData: id: str type_: RetrospectiveProcessResponseDataType - attributes: "RetrospectiveProcess" + attributes: RetrospectiveProcess additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_0.py b/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_0.py index c5264651..dc946fab 100644 --- a/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_0.py +++ b/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_1.py b/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_1.py index 5ad34cd0..07a6c5da 100644 --- a/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_1.py +++ b/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_2.py b/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_2.py index a1080736..4243efab 100644 --- a/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_2.py +++ b/rootly_sdk/models/retrospective_process_retrospective_process_matching_criteria_type_2.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/retrospective_step.py b/rootly_sdk/models/retrospective_step.py index 753bfd37..2f2c7941 100644 --- a/rootly_sdk/models/retrospective_step.py +++ b/rootly_sdk/models/retrospective_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,25 +19,25 @@ class RetrospectiveStep: title (str): The name of the step created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the step - description (Union[None, Unset, str]): The description of the step - incident_role_id (Union[None, Unset, str]): Users assigned to the selected incident role will be the default - owners for this step - due_after_days (Union[None, Unset, int]): Due date in days - position (Union[Unset, int]): Position of the step - skippable (Union[Unset, bool]): Is the step skippable? + slug (str | Unset): The slug of the step + description (None | str | Unset): The description of the step + incident_role_id (None | str | Unset): Users assigned to the selected incident role will be the default owners + for this step + due_after_days (int | None | Unset): Due date in days + position (int | Unset): Position of the step + skippable (bool | Unset): Is the step skippable? """ retrospective_process_id: str title: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - incident_role_id: None | Unset | str = UNSET - due_after_days: None | Unset | int = UNSET - position: Unset | int = UNSET - skippable: Unset | bool = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + incident_role_id: None | str | Unset = UNSET + due_after_days: int | None | Unset = UNSET + position: int | Unset = UNSET + skippable: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -49,19 +51,19 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - incident_role_id: None | Unset | str + incident_role_id: None | str | Unset if isinstance(self.incident_role_id, Unset): incident_role_id = UNSET else: incident_role_id = self.incident_role_id - due_after_days: None | Unset | int + due_after_days: int | None | Unset if isinstance(self.due_after_days, Unset): due_after_days = UNSET else: @@ -109,30 +111,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_incident_role_id(data: object) -> None | Unset | str: + def _parse_incident_role_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_role_id = _parse_incident_role_id(d.pop("incident_role_id", UNSET)) - def _parse_due_after_days(data: object) -> None | Unset | int: + def _parse_due_after_days(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) due_after_days = _parse_due_after_days(d.pop("due_after_days", UNSET)) diff --git a/rootly_sdk/models/retrospective_step_list.py b/rootly_sdk/models/retrospective_step_list.py index 162d1872..0637abde 100644 --- a/rootly_sdk/models/retrospective_step_list.py +++ b/rootly_sdk/models/retrospective_step_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class RetrospectiveStepList: """ Attributes: - data (list['RetrospectiveStepListDataItem']): + data (list[RetrospectiveStepListDataItem]): links (Links): meta (Meta): """ - data: list["RetrospectiveStepListDataItem"] - links: "Links" - meta: "Meta" + data: list[RetrospectiveStepListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_step_list_data_item.py b/rootly_sdk/models/retrospective_step_list_data_item.py index 160e4e85..3080ab76 100644 --- a/rootly_sdk/models/retrospective_step_list_data_item.py +++ b/rootly_sdk/models/retrospective_step_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveStepListDataItem: id: str type_: RetrospectiveStepListDataItemType - attributes: "RetrospectiveStep" + attributes: RetrospectiveStep additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_step_response.py b/rootly_sdk/models/retrospective_step_response.py index 52096f9d..4b45f083 100644 --- a/rootly_sdk/models/retrospective_step_response.py +++ b/rootly_sdk/models/retrospective_step_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RetrospectiveStepResponse: data (RetrospectiveStepResponseData): """ - data: "RetrospectiveStepResponseData" + data: RetrospectiveStepResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/retrospective_step_response_data.py b/rootly_sdk/models/retrospective_step_response_data.py index 28e0e5b4..db9cd74c 100644 --- a/rootly_sdk/models/retrospective_step_response_data.py +++ b/rootly_sdk/models/retrospective_step_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class RetrospectiveStepResponseData: id: str type_: RetrospectiveStepResponseDataType - attributes: "RetrospectiveStep" + attributes: RetrospectiveStep additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/role.py b/rootly_sdk/models/role.py index 9e956076..58edeedd 100644 --- a/rootly_sdk/models/role.py +++ b/rootly_sdk/models/role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -8,6 +10,15 @@ from ..models.role_api_keys_permissions_item import RoleApiKeysPermissionsItem, check_role_api_keys_permissions_item from ..models.role_audits_permissions_item import RoleAuditsPermissionsItem, check_role_audits_permissions_item from ..models.role_billing_permissions_item import RoleBillingPermissionsItem, check_role_billing_permissions_item +from ..models.role_catalogs_permissions_item import RoleCatalogsPermissionsItem, check_role_catalogs_permissions_item +from ..models.role_communication_permissions_item import ( + RoleCommunicationPermissionsItem, + check_role_communication_permissions_item, +) +from ..models.role_edge_connector_permissions_item import ( + RoleEdgeConnectorPermissionsItem, + check_role_edge_connector_permissions_item, +) from ..models.role_environments_permissions_item import ( RoleEnvironmentsPermissionsItem, check_role_environments_permissions_item, @@ -25,6 +36,10 @@ RoleIncidentCausesPermissionsItem, check_role_incident_causes_permissions_item, ) +from ..models.role_incident_communication_permissions_item import ( + RoleIncidentCommunicationPermissionsItem, + check_role_incident_communication_permissions_item, +) from ..models.role_incident_feedbacks_permissions_item import ( RoleIncidentFeedbacksPermissionsItem, check_role_incident_feedbacks_permissions_item, @@ -46,6 +61,7 @@ RoleInvitationsPermissionsItem, check_role_invitations_permissions_item, ) +from ..models.role_paging_permissions_item import RolePagingPermissionsItem, check_role_paging_permissions_item from ..models.role_playbooks_permissions_item import RolePlaybooksPermissionsItem, check_role_playbooks_permissions_item from ..models.role_private_incidents_permissions_item import ( RolePrivateIncidentsPermissionsItem, @@ -63,10 +79,15 @@ RoleSeveritiesPermissionsItem, check_role_severities_permissions_item, ) +from ..models.role_slas_permissions_item import RoleSlasPermissionsItem, check_role_slas_permissions_item from ..models.role_status_pages_permissions_item import ( RoleStatusPagesPermissionsItem, check_role_status_pages_permissions_item, ) +from ..models.role_sub_statuses_permissions_item import ( + RoleSubStatusesPermissionsItem, + check_role_sub_statuses_permissions_item, +) from ..models.role_webhooks_permissions_item import RoleWebhooksPermissionsItem, check_role_webhooks_permissions_item from ..models.role_workflows_permissions_item import RoleWorkflowsPermissionsItem, check_role_workflows_permissions_item from ..types import UNSET, Unset @@ -81,71 +102,85 @@ class Role: name (str): The role name. created_at (str): updated_at (str): - slug (Union[Unset, str]): The role slug. - incident_permission_set_id (Union[None, Unset, str]): Associated incident permissions set. - is_deletable (Union[Unset, bool]): Whether the role can be deleted. - is_editable (Union[Unset, bool]): Whether the role can be edited. - alerts_permissions (Union[Unset, list[RoleAlertsPermissionsItem]]): - api_keys_permissions (Union[Unset, list[RoleApiKeysPermissionsItem]]): - audits_permissions (Union[Unset, list[RoleAuditsPermissionsItem]]): - billing_permissions (Union[Unset, list[RoleBillingPermissionsItem]]): - environments_permissions (Union[Unset, list[RoleEnvironmentsPermissionsItem]]): - form_fields_permissions (Union[Unset, list[RoleFormFieldsPermissionsItem]]): - functionalities_permissions (Union[Unset, list[RoleFunctionalitiesPermissionsItem]]): - groups_permissions (Union[Unset, list[RoleGroupsPermissionsItem]]): - incident_causes_permissions (Union[Unset, list[RoleIncidentCausesPermissionsItem]]): - incident_feedbacks_permissions (Union[Unset, list[RoleIncidentFeedbacksPermissionsItem]]): - incident_roles_permissions (Union[Unset, list[RoleIncidentRolesPermissionsItem]]): - incident_types_permissions (Union[Unset, list[RoleIncidentTypesPermissionsItem]]): - incidents_permissions (Union[Unset, list[RoleIncidentsPermissionsItem]]): - integrations_permissions (Union[Unset, list[RoleIntegrationsPermissionsItem]]): - invitations_permissions (Union[Unset, list[RoleInvitationsPermissionsItem]]): - playbooks_permissions (Union[Unset, list[RolePlaybooksPermissionsItem]]): - private_incidents_permissions (Union[Unset, list[RolePrivateIncidentsPermissionsItem]]): - pulses_permissions (Union[Unset, list[RolePulsesPermissionsItem]]): - retrospective_permissions (Union[Unset, list[RoleRetrospectivePermissionsItem]]): - roles_permissions (Union[Unset, list[RoleRolesPermissionsItem]]): - secrets_permissions (Union[Unset, list[RoleSecretsPermissionsItem]]): - services_permissions (Union[Unset, list[RoleServicesPermissionsItem]]): - severities_permissions (Union[Unset, list[RoleSeveritiesPermissionsItem]]): - status_pages_permissions (Union[Unset, list[RoleStatusPagesPermissionsItem]]): - webhooks_permissions (Union[Unset, list[RoleWebhooksPermissionsItem]]): - workflows_permissions (Union[Unset, list[RoleWorkflowsPermissionsItem]]): + slug (str | Unset): The role slug. + incident_permission_set_id (None | str | Unset): Associated incident permissions set. + is_deletable (bool | Unset): Whether the role can be deleted. + is_editable (bool | Unset): Whether the role can be edited. + alerts_permissions (list[RoleAlertsPermissionsItem] | Unset): + api_keys_permissions (list[RoleApiKeysPermissionsItem] | Unset): + audits_permissions (list[RoleAuditsPermissionsItem] | Unset): + billing_permissions (list[RoleBillingPermissionsItem] | Unset): + environments_permissions (list[RoleEnvironmentsPermissionsItem] | Unset): + form_fields_permissions (list[RoleFormFieldsPermissionsItem] | Unset): + functionalities_permissions (list[RoleFunctionalitiesPermissionsItem] | Unset): + groups_permissions (list[RoleGroupsPermissionsItem] | Unset): + incident_causes_permissions (list[RoleIncidentCausesPermissionsItem] | Unset): + incident_feedbacks_permissions (list[RoleIncidentFeedbacksPermissionsItem] | Unset): + incident_roles_permissions (list[RoleIncidentRolesPermissionsItem] | Unset): + incident_types_permissions (list[RoleIncidentTypesPermissionsItem] | Unset): + incidents_permissions (list[RoleIncidentsPermissionsItem] | Unset): + integrations_permissions (list[RoleIntegrationsPermissionsItem] | Unset): + invitations_permissions (list[RoleInvitationsPermissionsItem] | Unset): + playbooks_permissions (list[RolePlaybooksPermissionsItem] | Unset): + private_incidents_permissions (list[RolePrivateIncidentsPermissionsItem] | Unset): + pulses_permissions (list[RolePulsesPermissionsItem] | Unset): + retrospective_permissions (list[RoleRetrospectivePermissionsItem] | Unset): + roles_permissions (list[RoleRolesPermissionsItem] | Unset): + secrets_permissions (list[RoleSecretsPermissionsItem] | Unset): + services_permissions (list[RoleServicesPermissionsItem] | Unset): + severities_permissions (list[RoleSeveritiesPermissionsItem] | Unset): + status_pages_permissions (list[RoleStatusPagesPermissionsItem] | Unset): + webhooks_permissions (list[RoleWebhooksPermissionsItem] | Unset): + workflows_permissions (list[RoleWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[RoleCatalogsPermissionsItem] | Unset): + sub_statuses_permissions (list[RoleSubStatusesPermissionsItem] | Unset): + edge_connector_permissions (list[RoleEdgeConnectorPermissionsItem] | Unset): + slas_permissions (list[RoleSlasPermissionsItem] | Unset): + paging_permissions (list[RolePagingPermissionsItem] | Unset): + incident_communication_permissions (list[RoleIncidentCommunicationPermissionsItem] | Unset): + communication_permissions (list[RoleCommunicationPermissionsItem] | Unset): """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - incident_permission_set_id: None | Unset | str = UNSET - is_deletable: Unset | bool = UNSET - is_editable: Unset | bool = UNSET - alerts_permissions: Unset | list[RoleAlertsPermissionsItem] = UNSET - api_keys_permissions: Unset | list[RoleApiKeysPermissionsItem] = UNSET - audits_permissions: Unset | list[RoleAuditsPermissionsItem] = UNSET - billing_permissions: Unset | list[RoleBillingPermissionsItem] = UNSET - environments_permissions: Unset | list[RoleEnvironmentsPermissionsItem] = UNSET - form_fields_permissions: Unset | list[RoleFormFieldsPermissionsItem] = UNSET - functionalities_permissions: Unset | list[RoleFunctionalitiesPermissionsItem] = UNSET - groups_permissions: Unset | list[RoleGroupsPermissionsItem] = UNSET - incident_causes_permissions: Unset | list[RoleIncidentCausesPermissionsItem] = UNSET - incident_feedbacks_permissions: Unset | list[RoleIncidentFeedbacksPermissionsItem] = UNSET - incident_roles_permissions: Unset | list[RoleIncidentRolesPermissionsItem] = UNSET - incident_types_permissions: Unset | list[RoleIncidentTypesPermissionsItem] = UNSET - incidents_permissions: Unset | list[RoleIncidentsPermissionsItem] = UNSET - integrations_permissions: Unset | list[RoleIntegrationsPermissionsItem] = UNSET - invitations_permissions: Unset | list[RoleInvitationsPermissionsItem] = UNSET - playbooks_permissions: Unset | list[RolePlaybooksPermissionsItem] = UNSET - private_incidents_permissions: Unset | list[RolePrivateIncidentsPermissionsItem] = UNSET - pulses_permissions: Unset | list[RolePulsesPermissionsItem] = UNSET - retrospective_permissions: Unset | list[RoleRetrospectivePermissionsItem] = UNSET - roles_permissions: Unset | list[RoleRolesPermissionsItem] = UNSET - secrets_permissions: Unset | list[RoleSecretsPermissionsItem] = UNSET - services_permissions: Unset | list[RoleServicesPermissionsItem] = UNSET - severities_permissions: Unset | list[RoleSeveritiesPermissionsItem] = UNSET - status_pages_permissions: Unset | list[RoleStatusPagesPermissionsItem] = UNSET - webhooks_permissions: Unset | list[RoleWebhooksPermissionsItem] = UNSET - workflows_permissions: Unset | list[RoleWorkflowsPermissionsItem] = UNSET + slug: str | Unset = UNSET + incident_permission_set_id: None | str | Unset = UNSET + is_deletable: bool | Unset = UNSET + is_editable: bool | Unset = UNSET + alerts_permissions: list[RoleAlertsPermissionsItem] | Unset = UNSET + api_keys_permissions: list[RoleApiKeysPermissionsItem] | Unset = UNSET + audits_permissions: list[RoleAuditsPermissionsItem] | Unset = UNSET + billing_permissions: list[RoleBillingPermissionsItem] | Unset = UNSET + environments_permissions: list[RoleEnvironmentsPermissionsItem] | Unset = UNSET + form_fields_permissions: list[RoleFormFieldsPermissionsItem] | Unset = UNSET + functionalities_permissions: list[RoleFunctionalitiesPermissionsItem] | Unset = UNSET + groups_permissions: list[RoleGroupsPermissionsItem] | Unset = UNSET + incident_causes_permissions: list[RoleIncidentCausesPermissionsItem] | Unset = UNSET + incident_feedbacks_permissions: list[RoleIncidentFeedbacksPermissionsItem] | Unset = UNSET + incident_roles_permissions: list[RoleIncidentRolesPermissionsItem] | Unset = UNSET + incident_types_permissions: list[RoleIncidentTypesPermissionsItem] | Unset = UNSET + incidents_permissions: list[RoleIncidentsPermissionsItem] | Unset = UNSET + integrations_permissions: list[RoleIntegrationsPermissionsItem] | Unset = UNSET + invitations_permissions: list[RoleInvitationsPermissionsItem] | Unset = UNSET + playbooks_permissions: list[RolePlaybooksPermissionsItem] | Unset = UNSET + private_incidents_permissions: list[RolePrivateIncidentsPermissionsItem] | Unset = UNSET + pulses_permissions: list[RolePulsesPermissionsItem] | Unset = UNSET + retrospective_permissions: list[RoleRetrospectivePermissionsItem] | Unset = UNSET + roles_permissions: list[RoleRolesPermissionsItem] | Unset = UNSET + secrets_permissions: list[RoleSecretsPermissionsItem] | Unset = UNSET + services_permissions: list[RoleServicesPermissionsItem] | Unset = UNSET + severities_permissions: list[RoleSeveritiesPermissionsItem] | Unset = UNSET + status_pages_permissions: list[RoleStatusPagesPermissionsItem] | Unset = UNSET + webhooks_permissions: list[RoleWebhooksPermissionsItem] | Unset = UNSET + workflows_permissions: list[RoleWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[RoleCatalogsPermissionsItem] | Unset = UNSET + sub_statuses_permissions: list[RoleSubStatusesPermissionsItem] | Unset = UNSET + edge_connector_permissions: list[RoleEdgeConnectorPermissionsItem] | Unset = UNSET + slas_permissions: list[RoleSlasPermissionsItem] | Unset = UNSET + paging_permissions: list[RolePagingPermissionsItem] | Unset = UNSET + incident_communication_permissions: list[RoleIncidentCommunicationPermissionsItem] | Unset = UNSET + communication_permissions: list[RoleCommunicationPermissionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -157,7 +192,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - incident_permission_set_id: None | Unset | str + incident_permission_set_id: None | str | Unset if isinstance(self.incident_permission_set_id, Unset): incident_permission_set_id = UNSET else: @@ -167,188 +202,237 @@ def to_dict(self) -> dict[str, Any]: is_editable = self.is_editable - alerts_permissions: Unset | list[str] = UNSET + alerts_permissions: list[str] | Unset = UNSET if not isinstance(self.alerts_permissions, Unset): alerts_permissions = [] for alerts_permissions_item_data in self.alerts_permissions: alerts_permissions_item: str = alerts_permissions_item_data alerts_permissions.append(alerts_permissions_item) - api_keys_permissions: Unset | list[str] = UNSET + api_keys_permissions: list[str] | Unset = UNSET if not isinstance(self.api_keys_permissions, Unset): api_keys_permissions = [] for api_keys_permissions_item_data in self.api_keys_permissions: api_keys_permissions_item: str = api_keys_permissions_item_data api_keys_permissions.append(api_keys_permissions_item) - audits_permissions: Unset | list[str] = UNSET + audits_permissions: list[str] | Unset = UNSET if not isinstance(self.audits_permissions, Unset): audits_permissions = [] for audits_permissions_item_data in self.audits_permissions: audits_permissions_item: str = audits_permissions_item_data audits_permissions.append(audits_permissions_item) - billing_permissions: Unset | list[str] = UNSET + billing_permissions: list[str] | Unset = UNSET if not isinstance(self.billing_permissions, Unset): billing_permissions = [] for billing_permissions_item_data in self.billing_permissions: billing_permissions_item: str = billing_permissions_item_data billing_permissions.append(billing_permissions_item) - environments_permissions: Unset | list[str] = UNSET + environments_permissions: list[str] | Unset = UNSET if not isinstance(self.environments_permissions, Unset): environments_permissions = [] for environments_permissions_item_data in self.environments_permissions: environments_permissions_item: str = environments_permissions_item_data environments_permissions.append(environments_permissions_item) - form_fields_permissions: Unset | list[str] = UNSET + form_fields_permissions: list[str] | Unset = UNSET if not isinstance(self.form_fields_permissions, Unset): form_fields_permissions = [] for form_fields_permissions_item_data in self.form_fields_permissions: form_fields_permissions_item: str = form_fields_permissions_item_data form_fields_permissions.append(form_fields_permissions_item) - functionalities_permissions: Unset | list[str] = UNSET + functionalities_permissions: list[str] | Unset = UNSET if not isinstance(self.functionalities_permissions, Unset): functionalities_permissions = [] for functionalities_permissions_item_data in self.functionalities_permissions: functionalities_permissions_item: str = functionalities_permissions_item_data functionalities_permissions.append(functionalities_permissions_item) - groups_permissions: Unset | list[str] = UNSET + groups_permissions: list[str] | Unset = UNSET if not isinstance(self.groups_permissions, Unset): groups_permissions = [] for groups_permissions_item_data in self.groups_permissions: groups_permissions_item: str = groups_permissions_item_data groups_permissions.append(groups_permissions_item) - incident_causes_permissions: Unset | list[str] = UNSET + incident_causes_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_causes_permissions, Unset): incident_causes_permissions = [] for incident_causes_permissions_item_data in self.incident_causes_permissions: incident_causes_permissions_item: str = incident_causes_permissions_item_data incident_causes_permissions.append(incident_causes_permissions_item) - incident_feedbacks_permissions: Unset | list[str] = UNSET + incident_feedbacks_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_feedbacks_permissions, Unset): incident_feedbacks_permissions = [] for incident_feedbacks_permissions_item_data in self.incident_feedbacks_permissions: incident_feedbacks_permissions_item: str = incident_feedbacks_permissions_item_data incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) - incident_roles_permissions: Unset | list[str] = UNSET + incident_roles_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_roles_permissions, Unset): incident_roles_permissions = [] for incident_roles_permissions_item_data in self.incident_roles_permissions: incident_roles_permissions_item: str = incident_roles_permissions_item_data incident_roles_permissions.append(incident_roles_permissions_item) - incident_types_permissions: Unset | list[str] = UNSET + incident_types_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_types_permissions, Unset): incident_types_permissions = [] for incident_types_permissions_item_data in self.incident_types_permissions: incident_types_permissions_item: str = incident_types_permissions_item_data incident_types_permissions.append(incident_types_permissions_item) - incidents_permissions: Unset | list[str] = UNSET + incidents_permissions: list[str] | Unset = UNSET if not isinstance(self.incidents_permissions, Unset): incidents_permissions = [] for incidents_permissions_item_data in self.incidents_permissions: incidents_permissions_item: str = incidents_permissions_item_data incidents_permissions.append(incidents_permissions_item) - integrations_permissions: Unset | list[str] = UNSET + integrations_permissions: list[str] | Unset = UNSET if not isinstance(self.integrations_permissions, Unset): integrations_permissions = [] for integrations_permissions_item_data in self.integrations_permissions: integrations_permissions_item: str = integrations_permissions_item_data integrations_permissions.append(integrations_permissions_item) - invitations_permissions: Unset | list[str] = UNSET + invitations_permissions: list[str] | Unset = UNSET if not isinstance(self.invitations_permissions, Unset): invitations_permissions = [] for invitations_permissions_item_data in self.invitations_permissions: invitations_permissions_item: str = invitations_permissions_item_data invitations_permissions.append(invitations_permissions_item) - playbooks_permissions: Unset | list[str] = UNSET + playbooks_permissions: list[str] | Unset = UNSET if not isinstance(self.playbooks_permissions, Unset): playbooks_permissions = [] for playbooks_permissions_item_data in self.playbooks_permissions: playbooks_permissions_item: str = playbooks_permissions_item_data playbooks_permissions.append(playbooks_permissions_item) - private_incidents_permissions: Unset | list[str] = UNSET + private_incidents_permissions: list[str] | Unset = UNSET if not isinstance(self.private_incidents_permissions, Unset): private_incidents_permissions = [] for private_incidents_permissions_item_data in self.private_incidents_permissions: private_incidents_permissions_item: str = private_incidents_permissions_item_data private_incidents_permissions.append(private_incidents_permissions_item) - pulses_permissions: Unset | list[str] = UNSET + pulses_permissions: list[str] | Unset = UNSET if not isinstance(self.pulses_permissions, Unset): pulses_permissions = [] for pulses_permissions_item_data in self.pulses_permissions: pulses_permissions_item: str = pulses_permissions_item_data pulses_permissions.append(pulses_permissions_item) - retrospective_permissions: Unset | list[str] = UNSET + retrospective_permissions: list[str] | Unset = UNSET if not isinstance(self.retrospective_permissions, Unset): retrospective_permissions = [] for retrospective_permissions_item_data in self.retrospective_permissions: retrospective_permissions_item: str = retrospective_permissions_item_data retrospective_permissions.append(retrospective_permissions_item) - roles_permissions: Unset | list[str] = UNSET + roles_permissions: list[str] | Unset = UNSET if not isinstance(self.roles_permissions, Unset): roles_permissions = [] for roles_permissions_item_data in self.roles_permissions: roles_permissions_item: str = roles_permissions_item_data roles_permissions.append(roles_permissions_item) - secrets_permissions: Unset | list[str] = UNSET + secrets_permissions: list[str] | Unset = UNSET if not isinstance(self.secrets_permissions, Unset): secrets_permissions = [] for secrets_permissions_item_data in self.secrets_permissions: secrets_permissions_item: str = secrets_permissions_item_data secrets_permissions.append(secrets_permissions_item) - services_permissions: Unset | list[str] = UNSET + services_permissions: list[str] | Unset = UNSET if not isinstance(self.services_permissions, Unset): services_permissions = [] for services_permissions_item_data in self.services_permissions: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) - severities_permissions: Unset | list[str] = UNSET + severities_permissions: list[str] | Unset = UNSET if not isinstance(self.severities_permissions, Unset): severities_permissions = [] for severities_permissions_item_data in self.severities_permissions: severities_permissions_item: str = severities_permissions_item_data severities_permissions.append(severities_permissions_item) - status_pages_permissions: Unset | list[str] = UNSET + status_pages_permissions: list[str] | Unset = UNSET if not isinstance(self.status_pages_permissions, Unset): status_pages_permissions = [] for status_pages_permissions_item_data in self.status_pages_permissions: status_pages_permissions_item: str = status_pages_permissions_item_data status_pages_permissions.append(status_pages_permissions_item) - webhooks_permissions: Unset | list[str] = UNSET + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] for webhooks_permissions_item_data in self.webhooks_permissions: webhooks_permissions_item: str = webhooks_permissions_item_data webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions: Unset | list[str] = UNSET + workflows_permissions: list[str] | Unset = UNSET if not isinstance(self.workflows_permissions, Unset): workflows_permissions = [] for workflows_permissions_item_data in self.workflows_permissions: workflows_permissions_item: str = workflows_permissions_item_data workflows_permissions.append(workflows_permissions_item) + catalogs_permissions: list[str] | Unset = UNSET + if not isinstance(self.catalogs_permissions, Unset): + catalogs_permissions = [] + for catalogs_permissions_item_data in self.catalogs_permissions: + catalogs_permissions_item: str = catalogs_permissions_item_data + catalogs_permissions.append(catalogs_permissions_item) + + sub_statuses_permissions: list[str] | Unset = UNSET + if not isinstance(self.sub_statuses_permissions, Unset): + sub_statuses_permissions = [] + for sub_statuses_permissions_item_data in self.sub_statuses_permissions: + sub_statuses_permissions_item: str = sub_statuses_permissions_item_data + sub_statuses_permissions.append(sub_statuses_permissions_item) + + edge_connector_permissions: list[str] | Unset = UNSET + if not isinstance(self.edge_connector_permissions, Unset): + edge_connector_permissions = [] + for edge_connector_permissions_item_data in self.edge_connector_permissions: + edge_connector_permissions_item: str = edge_connector_permissions_item_data + edge_connector_permissions.append(edge_connector_permissions_item) + + slas_permissions: list[str] | Unset = UNSET + if not isinstance(self.slas_permissions, Unset): + slas_permissions = [] + for slas_permissions_item_data in self.slas_permissions: + slas_permissions_item: str = slas_permissions_item_data + slas_permissions.append(slas_permissions_item) + + paging_permissions: list[str] | Unset = UNSET + if not isinstance(self.paging_permissions, Unset): + paging_permissions = [] + for paging_permissions_item_data in self.paging_permissions: + paging_permissions_item: str = paging_permissions_item_data + paging_permissions.append(paging_permissions_item) + + incident_communication_permissions: list[str] | Unset = UNSET + if not isinstance(self.incident_communication_permissions, Unset): + incident_communication_permissions = [] + for incident_communication_permissions_item_data in self.incident_communication_permissions: + incident_communication_permissions_item: str = incident_communication_permissions_item_data + incident_communication_permissions.append(incident_communication_permissions_item) + + communication_permissions: list[str] | Unset = UNSET + if not isinstance(self.communication_permissions, Unset): + communication_permissions = [] + for communication_permissions_item_data in self.communication_permissions: + communication_permissions_item: str = communication_permissions_item_data + communication_permissions.append(communication_permissions_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -418,6 +502,20 @@ def to_dict(self) -> dict[str, Any]: field_dict["webhooks_permissions"] = webhooks_permissions if workflows_permissions is not UNSET: field_dict["workflows_permissions"] = workflows_permissions + if catalogs_permissions is not UNSET: + field_dict["catalogs_permissions"] = catalogs_permissions + if sub_statuses_permissions is not UNSET: + field_dict["sub_statuses_permissions"] = sub_statuses_permissions + if edge_connector_permissions is not UNSET: + field_dict["edge_connector_permissions"] = edge_connector_permissions + if slas_permissions is not UNSET: + field_dict["slas_permissions"] = slas_permissions + if paging_permissions is not UNSET: + field_dict["paging_permissions"] = paging_permissions + if incident_communication_permissions is not UNSET: + field_dict["incident_communication_permissions"] = incident_communication_permissions + if communication_permissions is not UNSET: + field_dict["communication_permissions"] = communication_permissions return field_dict @@ -432,12 +530,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_incident_permission_set_id(data: object) -> None | Unset | str: + def _parse_incident_permission_set_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_permission_set_id = _parse_incident_permission_set_id(d.pop("incident_permission_set_id", UNSET)) @@ -445,201 +543,334 @@ def _parse_incident_permission_set_id(data: object) -> None | Unset | str: is_editable = d.pop("is_editable", UNSET) - alerts_permissions = [] _alerts_permissions = d.pop("alerts_permissions", UNSET) - for alerts_permissions_item_data in _alerts_permissions or []: - alerts_permissions_item = check_role_alerts_permissions_item(alerts_permissions_item_data) + alerts_permissions: list[RoleAlertsPermissionsItem] | Unset = UNSET + if _alerts_permissions is not UNSET: + alerts_permissions = [] + for alerts_permissions_item_data in _alerts_permissions: + alerts_permissions_item = check_role_alerts_permissions_item(alerts_permissions_item_data) - alerts_permissions.append(alerts_permissions_item) + alerts_permissions.append(alerts_permissions_item) - api_keys_permissions = [] _api_keys_permissions = d.pop("api_keys_permissions", UNSET) - for api_keys_permissions_item_data in _api_keys_permissions or []: - api_keys_permissions_item = check_role_api_keys_permissions_item(api_keys_permissions_item_data) + api_keys_permissions: list[RoleApiKeysPermissionsItem] | Unset = UNSET + if _api_keys_permissions is not UNSET: + api_keys_permissions = [] + for api_keys_permissions_item_data in _api_keys_permissions: + api_keys_permissions_item = check_role_api_keys_permissions_item(api_keys_permissions_item_data) - api_keys_permissions.append(api_keys_permissions_item) + api_keys_permissions.append(api_keys_permissions_item) - audits_permissions = [] _audits_permissions = d.pop("audits_permissions", UNSET) - for audits_permissions_item_data in _audits_permissions or []: - audits_permissions_item = check_role_audits_permissions_item(audits_permissions_item_data) + audits_permissions: list[RoleAuditsPermissionsItem] | Unset = UNSET + if _audits_permissions is not UNSET: + audits_permissions = [] + for audits_permissions_item_data in _audits_permissions: + audits_permissions_item = check_role_audits_permissions_item(audits_permissions_item_data) - audits_permissions.append(audits_permissions_item) + audits_permissions.append(audits_permissions_item) - billing_permissions = [] _billing_permissions = d.pop("billing_permissions", UNSET) - for billing_permissions_item_data in _billing_permissions or []: - billing_permissions_item = check_role_billing_permissions_item(billing_permissions_item_data) + billing_permissions: list[RoleBillingPermissionsItem] | Unset = UNSET + if _billing_permissions is not UNSET: + billing_permissions = [] + for billing_permissions_item_data in _billing_permissions: + billing_permissions_item = check_role_billing_permissions_item(billing_permissions_item_data) - billing_permissions.append(billing_permissions_item) + billing_permissions.append(billing_permissions_item) - environments_permissions = [] _environments_permissions = d.pop("environments_permissions", UNSET) - for environments_permissions_item_data in _environments_permissions or []: - environments_permissions_item = check_role_environments_permissions_item(environments_permissions_item_data) + environments_permissions: list[RoleEnvironmentsPermissionsItem] | Unset = UNSET + if _environments_permissions is not UNSET: + environments_permissions = [] + for environments_permissions_item_data in _environments_permissions: + environments_permissions_item = check_role_environments_permissions_item( + environments_permissions_item_data + ) - environments_permissions.append(environments_permissions_item) + environments_permissions.append(environments_permissions_item) - form_fields_permissions = [] _form_fields_permissions = d.pop("form_fields_permissions", UNSET) - for form_fields_permissions_item_data in _form_fields_permissions or []: - form_fields_permissions_item = check_role_form_fields_permissions_item(form_fields_permissions_item_data) + form_fields_permissions: list[RoleFormFieldsPermissionsItem] | Unset = UNSET + if _form_fields_permissions is not UNSET: + form_fields_permissions = [] + for form_fields_permissions_item_data in _form_fields_permissions: + form_fields_permissions_item = check_role_form_fields_permissions_item( + form_fields_permissions_item_data + ) - form_fields_permissions.append(form_fields_permissions_item) + form_fields_permissions.append(form_fields_permissions_item) - functionalities_permissions = [] _functionalities_permissions = d.pop("functionalities_permissions", UNSET) - for functionalities_permissions_item_data in _functionalities_permissions or []: - functionalities_permissions_item = check_role_functionalities_permissions_item( - functionalities_permissions_item_data - ) + functionalities_permissions: list[RoleFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = check_role_functionalities_permissions_item( + functionalities_permissions_item_data + ) - functionalities_permissions.append(functionalities_permissions_item) + functionalities_permissions.append(functionalities_permissions_item) - groups_permissions = [] _groups_permissions = d.pop("groups_permissions", UNSET) - for groups_permissions_item_data in _groups_permissions or []: - groups_permissions_item = check_role_groups_permissions_item(groups_permissions_item_data) + groups_permissions: list[RoleGroupsPermissionsItem] | Unset = UNSET + if _groups_permissions is not UNSET: + groups_permissions = [] + for groups_permissions_item_data in _groups_permissions: + groups_permissions_item = check_role_groups_permissions_item(groups_permissions_item_data) - groups_permissions.append(groups_permissions_item) + groups_permissions.append(groups_permissions_item) - incident_causes_permissions = [] _incident_causes_permissions = d.pop("incident_causes_permissions", UNSET) - for incident_causes_permissions_item_data in _incident_causes_permissions or []: - incident_causes_permissions_item = check_role_incident_causes_permissions_item( - incident_causes_permissions_item_data - ) + incident_causes_permissions: list[RoleIncidentCausesPermissionsItem] | Unset = UNSET + if _incident_causes_permissions is not UNSET: + incident_causes_permissions = [] + for incident_causes_permissions_item_data in _incident_causes_permissions: + incident_causes_permissions_item = check_role_incident_causes_permissions_item( + incident_causes_permissions_item_data + ) - incident_causes_permissions.append(incident_causes_permissions_item) + incident_causes_permissions.append(incident_causes_permissions_item) - incident_feedbacks_permissions = [] _incident_feedbacks_permissions = d.pop("incident_feedbacks_permissions", UNSET) - for incident_feedbacks_permissions_item_data in _incident_feedbacks_permissions or []: - incident_feedbacks_permissions_item = check_role_incident_feedbacks_permissions_item( - incident_feedbacks_permissions_item_data - ) + incident_feedbacks_permissions: list[RoleIncidentFeedbacksPermissionsItem] | Unset = UNSET + if _incident_feedbacks_permissions is not UNSET: + incident_feedbacks_permissions = [] + for incident_feedbacks_permissions_item_data in _incident_feedbacks_permissions: + incident_feedbacks_permissions_item = check_role_incident_feedbacks_permissions_item( + incident_feedbacks_permissions_item_data + ) - incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) + incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) - incident_roles_permissions = [] _incident_roles_permissions = d.pop("incident_roles_permissions", UNSET) - for incident_roles_permissions_item_data in _incident_roles_permissions or []: - incident_roles_permissions_item = check_role_incident_roles_permissions_item( - incident_roles_permissions_item_data - ) + incident_roles_permissions: list[RoleIncidentRolesPermissionsItem] | Unset = UNSET + if _incident_roles_permissions is not UNSET: + incident_roles_permissions = [] + for incident_roles_permissions_item_data in _incident_roles_permissions: + incident_roles_permissions_item = check_role_incident_roles_permissions_item( + incident_roles_permissions_item_data + ) - incident_roles_permissions.append(incident_roles_permissions_item) + incident_roles_permissions.append(incident_roles_permissions_item) - incident_types_permissions = [] _incident_types_permissions = d.pop("incident_types_permissions", UNSET) - for incident_types_permissions_item_data in _incident_types_permissions or []: - incident_types_permissions_item = check_role_incident_types_permissions_item( - incident_types_permissions_item_data - ) + incident_types_permissions: list[RoleIncidentTypesPermissionsItem] | Unset = UNSET + if _incident_types_permissions is not UNSET: + incident_types_permissions = [] + for incident_types_permissions_item_data in _incident_types_permissions: + incident_types_permissions_item = check_role_incident_types_permissions_item( + incident_types_permissions_item_data + ) - incident_types_permissions.append(incident_types_permissions_item) + incident_types_permissions.append(incident_types_permissions_item) - incidents_permissions = [] _incidents_permissions = d.pop("incidents_permissions", UNSET) - for incidents_permissions_item_data in _incidents_permissions or []: - incidents_permissions_item = check_role_incidents_permissions_item(incidents_permissions_item_data) + incidents_permissions: list[RoleIncidentsPermissionsItem] | Unset = UNSET + if _incidents_permissions is not UNSET: + incidents_permissions = [] + for incidents_permissions_item_data in _incidents_permissions: + incidents_permissions_item = check_role_incidents_permissions_item(incidents_permissions_item_data) - incidents_permissions.append(incidents_permissions_item) + incidents_permissions.append(incidents_permissions_item) - integrations_permissions = [] _integrations_permissions = d.pop("integrations_permissions", UNSET) - for integrations_permissions_item_data in _integrations_permissions or []: - integrations_permissions_item = check_role_integrations_permissions_item(integrations_permissions_item_data) + integrations_permissions: list[RoleIntegrationsPermissionsItem] | Unset = UNSET + if _integrations_permissions is not UNSET: + integrations_permissions = [] + for integrations_permissions_item_data in _integrations_permissions: + integrations_permissions_item = check_role_integrations_permissions_item( + integrations_permissions_item_data + ) - integrations_permissions.append(integrations_permissions_item) + integrations_permissions.append(integrations_permissions_item) - invitations_permissions = [] _invitations_permissions = d.pop("invitations_permissions", UNSET) - for invitations_permissions_item_data in _invitations_permissions or []: - invitations_permissions_item = check_role_invitations_permissions_item(invitations_permissions_item_data) + invitations_permissions: list[RoleInvitationsPermissionsItem] | Unset = UNSET + if _invitations_permissions is not UNSET: + invitations_permissions = [] + for invitations_permissions_item_data in _invitations_permissions: + invitations_permissions_item = check_role_invitations_permissions_item( + invitations_permissions_item_data + ) - invitations_permissions.append(invitations_permissions_item) + invitations_permissions.append(invitations_permissions_item) - playbooks_permissions = [] _playbooks_permissions = d.pop("playbooks_permissions", UNSET) - for playbooks_permissions_item_data in _playbooks_permissions or []: - playbooks_permissions_item = check_role_playbooks_permissions_item(playbooks_permissions_item_data) + playbooks_permissions: list[RolePlaybooksPermissionsItem] | Unset = UNSET + if _playbooks_permissions is not UNSET: + playbooks_permissions = [] + for playbooks_permissions_item_data in _playbooks_permissions: + playbooks_permissions_item = check_role_playbooks_permissions_item(playbooks_permissions_item_data) - playbooks_permissions.append(playbooks_permissions_item) + playbooks_permissions.append(playbooks_permissions_item) - private_incidents_permissions = [] _private_incidents_permissions = d.pop("private_incidents_permissions", UNSET) - for private_incidents_permissions_item_data in _private_incidents_permissions or []: - private_incidents_permissions_item = check_role_private_incidents_permissions_item( - private_incidents_permissions_item_data - ) + private_incidents_permissions: list[RolePrivateIncidentsPermissionsItem] | Unset = UNSET + if _private_incidents_permissions is not UNSET: + private_incidents_permissions = [] + for private_incidents_permissions_item_data in _private_incidents_permissions: + private_incidents_permissions_item = check_role_private_incidents_permissions_item( + private_incidents_permissions_item_data + ) - private_incidents_permissions.append(private_incidents_permissions_item) + private_incidents_permissions.append(private_incidents_permissions_item) - pulses_permissions = [] _pulses_permissions = d.pop("pulses_permissions", UNSET) - for pulses_permissions_item_data in _pulses_permissions or []: - pulses_permissions_item = check_role_pulses_permissions_item(pulses_permissions_item_data) + pulses_permissions: list[RolePulsesPermissionsItem] | Unset = UNSET + if _pulses_permissions is not UNSET: + pulses_permissions = [] + for pulses_permissions_item_data in _pulses_permissions: + pulses_permissions_item = check_role_pulses_permissions_item(pulses_permissions_item_data) - pulses_permissions.append(pulses_permissions_item) + pulses_permissions.append(pulses_permissions_item) - retrospective_permissions = [] _retrospective_permissions = d.pop("retrospective_permissions", UNSET) - for retrospective_permissions_item_data in _retrospective_permissions or []: - retrospective_permissions_item = check_role_retrospective_permissions_item( - retrospective_permissions_item_data - ) + retrospective_permissions: list[RoleRetrospectivePermissionsItem] | Unset = UNSET + if _retrospective_permissions is not UNSET: + retrospective_permissions = [] + for retrospective_permissions_item_data in _retrospective_permissions: + retrospective_permissions_item = check_role_retrospective_permissions_item( + retrospective_permissions_item_data + ) - retrospective_permissions.append(retrospective_permissions_item) + retrospective_permissions.append(retrospective_permissions_item) - roles_permissions = [] _roles_permissions = d.pop("roles_permissions", UNSET) - for roles_permissions_item_data in _roles_permissions or []: - roles_permissions_item = check_role_roles_permissions_item(roles_permissions_item_data) + roles_permissions: list[RoleRolesPermissionsItem] | Unset = UNSET + if _roles_permissions is not UNSET: + roles_permissions = [] + for roles_permissions_item_data in _roles_permissions: + roles_permissions_item = check_role_roles_permissions_item(roles_permissions_item_data) - roles_permissions.append(roles_permissions_item) + roles_permissions.append(roles_permissions_item) - secrets_permissions = [] _secrets_permissions = d.pop("secrets_permissions", UNSET) - for secrets_permissions_item_data in _secrets_permissions or []: - secrets_permissions_item = check_role_secrets_permissions_item(secrets_permissions_item_data) + secrets_permissions: list[RoleSecretsPermissionsItem] | Unset = UNSET + if _secrets_permissions is not UNSET: + secrets_permissions = [] + for secrets_permissions_item_data in _secrets_permissions: + secrets_permissions_item = check_role_secrets_permissions_item(secrets_permissions_item_data) - secrets_permissions.append(secrets_permissions_item) + secrets_permissions.append(secrets_permissions_item) - services_permissions = [] _services_permissions = d.pop("services_permissions", UNSET) - for services_permissions_item_data in _services_permissions or []: - services_permissions_item = check_role_services_permissions_item(services_permissions_item_data) + services_permissions: list[RoleServicesPermissionsItem] | Unset = UNSET + if _services_permissions is not UNSET: + services_permissions = [] + for services_permissions_item_data in _services_permissions: + services_permissions_item = check_role_services_permissions_item(services_permissions_item_data) - services_permissions.append(services_permissions_item) + services_permissions.append(services_permissions_item) - severities_permissions = [] _severities_permissions = d.pop("severities_permissions", UNSET) - for severities_permissions_item_data in _severities_permissions or []: - severities_permissions_item = check_role_severities_permissions_item(severities_permissions_item_data) + severities_permissions: list[RoleSeveritiesPermissionsItem] | Unset = UNSET + if _severities_permissions is not UNSET: + severities_permissions = [] + for severities_permissions_item_data in _severities_permissions: + severities_permissions_item = check_role_severities_permissions_item(severities_permissions_item_data) - severities_permissions.append(severities_permissions_item) + severities_permissions.append(severities_permissions_item) - status_pages_permissions = [] _status_pages_permissions = d.pop("status_pages_permissions", UNSET) - for status_pages_permissions_item_data in _status_pages_permissions or []: - status_pages_permissions_item = check_role_status_pages_permissions_item(status_pages_permissions_item_data) + status_pages_permissions: list[RoleStatusPagesPermissionsItem] | Unset = UNSET + if _status_pages_permissions is not UNSET: + status_pages_permissions = [] + for status_pages_permissions_item_data in _status_pages_permissions: + status_pages_permissions_item = check_role_status_pages_permissions_item( + status_pages_permissions_item_data + ) - status_pages_permissions.append(status_pages_permissions_item) + status_pages_permissions.append(status_pages_permissions_item) - webhooks_permissions = [] _webhooks_permissions = d.pop("webhooks_permissions", UNSET) - for webhooks_permissions_item_data in _webhooks_permissions or []: - webhooks_permissions_item = check_role_webhooks_permissions_item(webhooks_permissions_item_data) + webhooks_permissions: list[RoleWebhooksPermissionsItem] | Unset = UNSET + if _webhooks_permissions is not UNSET: + webhooks_permissions = [] + for webhooks_permissions_item_data in _webhooks_permissions: + webhooks_permissions_item = check_role_webhooks_permissions_item(webhooks_permissions_item_data) - webhooks_permissions.append(webhooks_permissions_item) + webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions = [] _workflows_permissions = d.pop("workflows_permissions", UNSET) - for workflows_permissions_item_data in _workflows_permissions or []: - workflows_permissions_item = check_role_workflows_permissions_item(workflows_permissions_item_data) + workflows_permissions: list[RoleWorkflowsPermissionsItem] | Unset = UNSET + if _workflows_permissions is not UNSET: + workflows_permissions = [] + for workflows_permissions_item_data in _workflows_permissions: + workflows_permissions_item = check_role_workflows_permissions_item(workflows_permissions_item_data) + + workflows_permissions.append(workflows_permissions_item) - workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[RoleCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_role_catalogs_permissions_item(catalogs_permissions_item_data) + + catalogs_permissions.append(catalogs_permissions_item) + + _sub_statuses_permissions = d.pop("sub_statuses_permissions", UNSET) + sub_statuses_permissions: list[RoleSubStatusesPermissionsItem] | Unset = UNSET + if _sub_statuses_permissions is not UNSET: + sub_statuses_permissions = [] + for sub_statuses_permissions_item_data in _sub_statuses_permissions: + sub_statuses_permissions_item = check_role_sub_statuses_permissions_item( + sub_statuses_permissions_item_data + ) + + sub_statuses_permissions.append(sub_statuses_permissions_item) + + _edge_connector_permissions = d.pop("edge_connector_permissions", UNSET) + edge_connector_permissions: list[RoleEdgeConnectorPermissionsItem] | Unset = UNSET + if _edge_connector_permissions is not UNSET: + edge_connector_permissions = [] + for edge_connector_permissions_item_data in _edge_connector_permissions: + edge_connector_permissions_item = check_role_edge_connector_permissions_item( + edge_connector_permissions_item_data + ) + + edge_connector_permissions.append(edge_connector_permissions_item) + + _slas_permissions = d.pop("slas_permissions", UNSET) + slas_permissions: list[RoleSlasPermissionsItem] | Unset = UNSET + if _slas_permissions is not UNSET: + slas_permissions = [] + for slas_permissions_item_data in _slas_permissions: + slas_permissions_item = check_role_slas_permissions_item(slas_permissions_item_data) + + slas_permissions.append(slas_permissions_item) + + _paging_permissions = d.pop("paging_permissions", UNSET) + paging_permissions: list[RolePagingPermissionsItem] | Unset = UNSET + if _paging_permissions is not UNSET: + paging_permissions = [] + for paging_permissions_item_data in _paging_permissions: + paging_permissions_item = check_role_paging_permissions_item(paging_permissions_item_data) + + paging_permissions.append(paging_permissions_item) + + _incident_communication_permissions = d.pop("incident_communication_permissions", UNSET) + incident_communication_permissions: list[RoleIncidentCommunicationPermissionsItem] | Unset = UNSET + if _incident_communication_permissions is not UNSET: + incident_communication_permissions = [] + for incident_communication_permissions_item_data in _incident_communication_permissions: + incident_communication_permissions_item = check_role_incident_communication_permissions_item( + incident_communication_permissions_item_data + ) + + incident_communication_permissions.append(incident_communication_permissions_item) + + _communication_permissions = d.pop("communication_permissions", UNSET) + communication_permissions: list[RoleCommunicationPermissionsItem] | Unset = UNSET + if _communication_permissions is not UNSET: + communication_permissions = [] + for communication_permissions_item_data in _communication_permissions: + communication_permissions_item = check_role_communication_permissions_item( + communication_permissions_item_data + ) + + communication_permissions.append(communication_permissions_item) role = cls( name=name, @@ -675,6 +906,13 @@ def _parse_incident_permission_set_id(data: object) -> None | Unset | str: status_pages_permissions=status_pages_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, + sub_statuses_permissions=sub_statuses_permissions, + edge_connector_permissions=edge_connector_permissions, + slas_permissions=slas_permissions, + paging_permissions=paging_permissions, + incident_communication_permissions=incident_communication_permissions, + communication_permissions=communication_permissions, ) role.additional_properties = d diff --git a/rootly_sdk/models/role_catalogs_permissions_item.py b/rootly_sdk/models/role_catalogs_permissions_item.py new file mode 100644 index 00000000..5eabe26f --- /dev/null +++ b/rootly_sdk/models/role_catalogs_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +RoleCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES: set[RoleCatalogsPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_role_catalogs_permissions_item(value: str | None) -> RoleCatalogsPermissionsItem | None: + if value is None: + return None + if value in ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(RoleCatalogsPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/role_communication_permissions_item.py b/rootly_sdk/models/role_communication_permissions_item.py new file mode 100644 index 00000000..b1a3ddba --- /dev/null +++ b/rootly_sdk/models/role_communication_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +RoleCommunicationPermissionsItem = Literal["create", "delete", "read", "update"] + +ROLE_COMMUNICATION_PERMISSIONS_ITEM_VALUES: set[RoleCommunicationPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_role_communication_permissions_item(value: str | None) -> RoleCommunicationPermissionsItem | None: + if value is None: + return None + if value in ROLE_COMMUNICATION_PERMISSIONS_ITEM_VALUES: + return cast(RoleCommunicationPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROLE_COMMUNICATION_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/role_edge_connector_permissions_item.py b/rootly_sdk/models/role_edge_connector_permissions_item.py new file mode 100644 index 00000000..2660f3e3 --- /dev/null +++ b/rootly_sdk/models/role_edge_connector_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +RoleEdgeConnectorPermissionsItem = Literal["create", "delete", "read", "update"] + +ROLE_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES: set[RoleEdgeConnectorPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_role_edge_connector_permissions_item(value: str | None) -> RoleEdgeConnectorPermissionsItem | None: + if value is None: + return None + if value in ROLE_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES: + return cast(RoleEdgeConnectorPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROLE_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/role_incident_communication_permissions_item.py b/rootly_sdk/models/role_incident_communication_permissions_item.py new file mode 100644 index 00000000..08924e2d --- /dev/null +++ b/rootly_sdk/models/role_incident_communication_permissions_item.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +RoleIncidentCommunicationPermissionsItem = Literal["create", "delete", "read", "send", "update"] + +ROLE_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES: set[RoleIncidentCommunicationPermissionsItem] = { + "create", + "delete", + "read", + "send", + "update", +} + + +def check_role_incident_communication_permissions_item( + value: str | None, +) -> RoleIncidentCommunicationPermissionsItem | None: + if value is None: + return None + if value in ROLE_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES: + return cast(RoleIncidentCommunicationPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ROLE_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/role_list.py b/rootly_sdk/models/role_list.py index 7fbca8e0..c7559c21 100644 --- a/rootly_sdk/models/role_list.py +++ b/rootly_sdk/models/role_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class RoleList: """ Attributes: - data (list['RoleListDataItem']): + data (list[RoleListDataItem]): links (Links): meta (Meta): """ - data: list["RoleListDataItem"] - links: "Links" - meta: "Meta" + data: list[RoleListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/role_list_data_item.py b/rootly_sdk/models/role_list_data_item.py index 438b2303..8fccfd1c 100644 --- a/rootly_sdk/models/role_list_data_item.py +++ b/rootly_sdk/models/role_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class RoleListDataItem: id: str type_: RoleListDataItemType - attributes: "Role" + attributes: Role additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/role_paging_permissions_item.py b/rootly_sdk/models/role_paging_permissions_item.py new file mode 100644 index 00000000..03231191 --- /dev/null +++ b/rootly_sdk/models/role_paging_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +RolePagingPermissionsItem = Literal["create", "delete", "read", "update"] + +ROLE_PAGING_PERMISSIONS_ITEM_VALUES: set[RolePagingPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_role_paging_permissions_item(value: str | None) -> RolePagingPermissionsItem | None: + if value is None: + return None + if value in ROLE_PAGING_PERMISSIONS_ITEM_VALUES: + return cast(RolePagingPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROLE_PAGING_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/role_relationship.py b/rootly_sdk/models/role_relationship.py index 3bd40da5..a8a730e0 100644 --- a/rootly_sdk/models/role_relationship.py +++ b/rootly_sdk/models/role_relationship.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class RoleRelationship: """ Attributes: - data (Union['RoleRelationshipDataType0', None, Unset]): + data (None | RoleRelationshipDataType0 | Unset): """ - data: Union["RoleRelationshipDataType0", None, Unset] = UNSET + data: None | RoleRelationshipDataType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.role_relationship_data_type_0 import RoleRelationshipDataType0 - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, RoleRelationshipDataType0): @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_data(data: object) -> Union["RoleRelationshipDataType0", None, Unset]: + def _parse_data(data: object) -> None | RoleRelationshipDataType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -59,9 +61,9 @@ def _parse_data(data: object) -> Union["RoleRelationshipDataType0", None, Unset] data_type_0 = RoleRelationshipDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["RoleRelationshipDataType0", None, Unset], data) + return cast(None | RoleRelationshipDataType0 | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/role_relationship_data_type_0.py b/rootly_sdk/models/role_relationship_data_type_0.py index 5f7ec2fe..6a7576ec 100644 --- a/rootly_sdk/models/role_relationship_data_type_0.py +++ b/rootly_sdk/models/role_relationship_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class RoleRelationshipDataType0: """ Attributes: - id (Union[Unset, str]): - type_ (Union[Unset, RoleRelationshipDataType0Type]): + id (str | Unset): + type_ (RoleRelationshipDataType0Type | Unset): """ - id: Unset | str = UNSET - type_: Unset | RoleRelationshipDataType0Type = UNSET + id: str | Unset = UNSET + type_: RoleRelationshipDataType0Type | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | RoleRelationshipDataType0Type + type_: RoleRelationshipDataType0Type | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/role_response.py b/rootly_sdk/models/role_response.py index 2ab83130..6c71767b 100644 --- a/rootly_sdk/models/role_response.py +++ b/rootly_sdk/models/role_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class RoleResponse: data (RoleResponseData): """ - data: "RoleResponseData" + data: RoleResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/role_response_data.py b/rootly_sdk/models/role_response_data.py index d1400829..9f83836c 100644 --- a/rootly_sdk/models/role_response_data.py +++ b/rootly_sdk/models/role_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class RoleResponseData: id: str type_: RoleResponseDataType - attributes: "Role" + attributes: Role additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/role_slas_permissions_item.py b/rootly_sdk/models/role_slas_permissions_item.py new file mode 100644 index 00000000..bf8f9dbd --- /dev/null +++ b/rootly_sdk/models/role_slas_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +RoleSlasPermissionsItem = Literal["create", "delete", "read", "update"] + +ROLE_SLAS_PERMISSIONS_ITEM_VALUES: set[RoleSlasPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_role_slas_permissions_item(value: str | None) -> RoleSlasPermissionsItem | None: + if value is None: + return None + if value in ROLE_SLAS_PERMISSIONS_ITEM_VALUES: + return cast(RoleSlasPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROLE_SLAS_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/role_sub_statuses_permissions_item.py b/rootly_sdk/models/role_sub_statuses_permissions_item.py new file mode 100644 index 00000000..cf66ea97 --- /dev/null +++ b/rootly_sdk/models/role_sub_statuses_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +RoleSubStatusesPermissionsItem = Literal["create", "delete", "read", "update"] + +ROLE_SUB_STATUSES_PERMISSIONS_ITEM_VALUES: set[RoleSubStatusesPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_role_sub_statuses_permissions_item(value: str | None) -> RoleSubStatusesPermissionsItem | None: + if value is None: + return None + if value in ROLE_SUB_STATUSES_PERMISSIONS_ITEM_VALUES: + return cast(RoleSubStatusesPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROLE_SUB_STATUSES_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/rotate_api_key.py b/rootly_sdk/models/rotate_api_key.py new file mode 100644 index 00000000..56c7a0ae --- /dev/null +++ b/rootly_sdk/models/rotate_api_key.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.rotate_api_key_data import RotateApiKeyData + + +T = TypeVar("T", bound="RotateApiKey") + + +@_attrs_define +class RotateApiKey: + """ + Attributes: + data (RotateApiKeyData): + """ + + data: RotateApiKeyData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.rotate_api_key_data import RotateApiKeyData + + d = dict(src_dict) + data = RotateApiKeyData.from_dict(d.pop("data")) + + rotate_api_key = cls( + data=data, + ) + + rotate_api_key.additional_properties = d + return rotate_api_key + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/rotate_api_key_data.py b/rootly_sdk/models/rotate_api_key_data.py new file mode 100644 index 00000000..9ba610bb --- /dev/null +++ b/rootly_sdk/models/rotate_api_key_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.rotate_api_key_data_type import RotateApiKeyDataType, check_rotate_api_key_data_type + +if TYPE_CHECKING: + from ..models.rotate_api_key_data_attributes import RotateApiKeyDataAttributes + + +T = TypeVar("T", bound="RotateApiKeyData") + + +@_attrs_define +class RotateApiKeyData: + """ + Attributes: + type_ (RotateApiKeyDataType): + attributes (RotateApiKeyDataAttributes): + """ + + type_: RotateApiKeyDataType + attributes: RotateApiKeyDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.rotate_api_key_data_attributes import RotateApiKeyDataAttributes + + d = dict(src_dict) + type_ = check_rotate_api_key_data_type(d.pop("type")) + + attributes = RotateApiKeyDataAttributes.from_dict(d.pop("attributes")) + + rotate_api_key_data = cls( + type_=type_, + attributes=attributes, + ) + + rotate_api_key_data.additional_properties = d + return rotate_api_key_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/rotate_api_key_data_attributes.py b/rootly_sdk/models/rotate_api_key_data_attributes.py new file mode 100644 index 00000000..a65b88c0 --- /dev/null +++ b/rootly_sdk/models/rotate_api_key_data_attributes.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RotateApiKeyDataAttributes") + + +@_attrs_define +class RotateApiKeyDataAttributes: + """ + Attributes: + expires_at (datetime.datetime | None | Unset): The new expiration date after rotation (ISO 8601) + grace_period_minutes (int | Unset): How many minutes to keep the old token valid. Only applies when the grace + period feature is enabled for your organization. Defaults to 30. Default: 30. + """ + + expires_at: datetime.datetime | None | Unset = UNSET + grace_period_minutes: int | Unset = 30 + + def to_dict(self) -> dict[str, Any]: + expires_at: None | str | Unset + if isinstance(self.expires_at, Unset): + expires_at = UNSET + elif isinstance(self.expires_at, datetime.datetime): + expires_at = self.expires_at.isoformat() + else: + expires_at = self.expires_at + + grace_period_minutes = self.grace_period_minutes + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if expires_at is not UNSET: + field_dict["expires_at"] = expires_at + if grace_period_minutes is not UNSET: + field_dict["grace_period_minutes"] = grace_period_minutes + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_expires_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + expires_at_type_0 = isoparse(data) + + return expires_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + expires_at = _parse_expires_at(d.pop("expires_at", UNSET)) + + grace_period_minutes = d.pop("grace_period_minutes", UNSET) + + rotate_api_key_data_attributes = cls( + expires_at=expires_at, + grace_period_minutes=grace_period_minutes, + ) + + return rotate_api_key_data_attributes diff --git a/rootly_sdk/models/rotate_api_key_data_type.py b/rootly_sdk/models/rotate_api_key_data_type.py new file mode 100644 index 00000000..3e8d5c7e --- /dev/null +++ b/rootly_sdk/models/rotate_api_key_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +RotateApiKeyDataType = Literal["api_keys"] + +ROTATE_API_KEY_DATA_TYPE_VALUES: set[RotateApiKeyDataType] = { + "api_keys", +} + + +def check_rotate_api_key_data_type(value: str | None) -> RotateApiKeyDataType | None: + if value is None: + return None + if value in ROTATE_API_KEY_DATA_TYPE_VALUES: + return cast(RotateApiKeyDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ROTATE_API_KEY_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/run_command_heroku_task_params.py b/rootly_sdk/models/run_command_heroku_task_params.py index 49a46930..8535d2cc 100644 --- a/rootly_sdk/models/run_command_heroku_task_params.py +++ b/rootly_sdk/models/run_command_heroku_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -30,17 +32,17 @@ class RunCommandHerokuTaskParams: command (str): app_name (str): size (RunCommandHerokuTaskParamsSize): - task_type (Union[Unset, RunCommandHerokuTaskParamsTaskType]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['RunCommandHerokuTaskParamsPostToSlackChannelsItem']]): + task_type (RunCommandHerokuTaskParamsTaskType | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[RunCommandHerokuTaskParamsPostToSlackChannelsItem] | Unset): """ command: str app_name: str size: RunCommandHerokuTaskParamsSize - task_type: Unset | RunCommandHerokuTaskParamsTaskType = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["RunCommandHerokuTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: RunCommandHerokuTaskParamsTaskType | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[RunCommandHerokuTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,13 +52,13 @@ def to_dict(self) -> dict[str, Any]: size: str = self.size - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -95,7 +97,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: size = check_run_command_heroku_task_params_size(d.pop("size")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | RunCommandHerokuTaskParamsTaskType + task_type: RunCommandHerokuTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -103,14 +105,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = RunCommandHerokuTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[RunCommandHerokuTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = RunCommandHerokuTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) run_command_heroku_task_params = cls( command=command, diff --git a/rootly_sdk/models/run_command_heroku_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/run_command_heroku_task_params_post_to_slack_channels_item.py index 27b0a046..034627af 100644 --- a/rootly_sdk/models/run_command_heroku_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/run_command_heroku_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class RunCommandHerokuTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule.py b/rootly_sdk/models/schedule.py index 60789d1a..d1398fe7 100644 --- a/rootly_sdk/models/schedule.py +++ b/rootly_sdk/models/schedule.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,22 +24,22 @@ class Schedule: owner_user_id (int): ID of user assigned as owner of the schedule created_at (str): Date of creation updated_at (str): Date of last update - description (Union[None, Unset, str]): The description of the schedule - all_time_coverage (Union[None, Unset, bool]): 24/7 coverage of the schedule - slack_user_group (Union['ScheduleSlackUserGroupType0', None, Unset]): Synced slack group of the schedule - slack_channel (Union['ScheduleSlackChannelType0', None, Unset]): Synced slack channel of the schedule - owner_group_ids (Union[Unset, list[str]]): Owning teams. + description (None | str | Unset): The description of the schedule + all_time_coverage (bool | None | Unset): 24/7 coverage of the schedule + slack_user_group (None | ScheduleSlackUserGroupType0 | Unset): Synced slack group of the schedule + slack_channel (None | ScheduleSlackChannelType0 | Unset): Synced slack channel of the schedule + owner_group_ids (list[str] | Unset): Owning teams. """ name: str owner_user_id: int created_at: str updated_at: str - description: None | Unset | str = UNSET - all_time_coverage: None | Unset | bool = UNSET - slack_user_group: Union["ScheduleSlackUserGroupType0", None, Unset] = UNSET - slack_channel: Union["ScheduleSlackChannelType0", None, Unset] = UNSET - owner_group_ids: Unset | list[str] = UNSET + description: None | str | Unset = UNSET + all_time_coverage: bool | None | Unset = UNSET + slack_user_group: None | ScheduleSlackUserGroupType0 | Unset = UNSET + slack_channel: None | ScheduleSlackChannelType0 | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,19 +54,19 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - all_time_coverage: None | Unset | bool + all_time_coverage: bool | None | Unset if isinstance(self.all_time_coverage, Unset): all_time_coverage = UNSET else: all_time_coverage = self.all_time_coverage - slack_user_group: None | Unset | dict[str, Any] + slack_user_group: dict[str, Any] | None | Unset if isinstance(self.slack_user_group, Unset): slack_user_group = UNSET elif isinstance(self.slack_user_group, ScheduleSlackUserGroupType0): @@ -72,7 +74,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_user_group = self.slack_user_group - slack_channel: None | Unset | dict[str, Any] + slack_channel: dict[str, Any] | None | Unset if isinstance(self.slack_channel, Unset): slack_channel = UNSET elif isinstance(self.slack_channel, ScheduleSlackChannelType0): @@ -80,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channel = self.slack_channel - owner_group_ids: Unset | list[str] = UNSET + owner_group_ids: list[str] | Unset = UNSET if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids @@ -121,25 +123,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_all_time_coverage(data: object) -> None | Unset | bool: + def _parse_all_time_coverage(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) all_time_coverage = _parse_all_time_coverage(d.pop("all_time_coverage", UNSET)) - def _parse_slack_user_group(data: object) -> Union["ScheduleSlackUserGroupType0", None, Unset]: + def _parse_slack_user_group(data: object) -> None | ScheduleSlackUserGroupType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -150,13 +152,13 @@ def _parse_slack_user_group(data: object) -> Union["ScheduleSlackUserGroupType0" slack_user_group_type_0 = ScheduleSlackUserGroupType0.from_dict(data) return slack_user_group_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ScheduleSlackUserGroupType0", None, Unset], data) + return cast(None | ScheduleSlackUserGroupType0 | Unset, data) slack_user_group = _parse_slack_user_group(d.pop("slack_user_group", UNSET)) - def _parse_slack_channel(data: object) -> Union["ScheduleSlackChannelType0", None, Unset]: + def _parse_slack_channel(data: object) -> None | ScheduleSlackChannelType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -167,9 +169,9 @@ def _parse_slack_channel(data: object) -> Union["ScheduleSlackChannelType0", Non slack_channel_type_0 = ScheduleSlackChannelType0.from_dict(data) return slack_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ScheduleSlackChannelType0", None, Unset], data) + return cast(None | ScheduleSlackChannelType0 | Unset, data) slack_channel = _parse_slack_channel(d.pop("slack_channel", UNSET)) diff --git a/rootly_sdk/models/schedule_list.py b/rootly_sdk/models/schedule_list.py index a57e0c4c..352c0968 100644 --- a/rootly_sdk/models/schedule_list.py +++ b/rootly_sdk/models/schedule_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class ScheduleList: """ Attributes: - data (list['ScheduleListDataItem']): + data (list[ScheduleListDataItem]): links (Links): meta (Meta): """ - data: list["ScheduleListDataItem"] - links: "Links" - meta: "Meta" + data: list[ScheduleListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_list_data_item.py b/rootly_sdk/models/schedule_list_data_item.py index dee5f4d0..f3cd6fdb 100644 --- a/rootly_sdk/models/schedule_list_data_item.py +++ b/rootly_sdk/models/schedule_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class ScheduleListDataItem: id: str type_: ScheduleListDataItemType - attributes: "Schedule" + attributes: Schedule additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_response.py b/rootly_sdk/models/schedule_response.py index 568d9af6..8cde142a 100644 --- a/rootly_sdk/models/schedule_response.py +++ b/rootly_sdk/models/schedule_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ScheduleResponse: data (ScheduleResponseData): """ - data: "ScheduleResponseData" + data: ScheduleResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_response_data.py b/rootly_sdk/models/schedule_response_data.py index 4b483ed5..1d25406d 100644 --- a/rootly_sdk/models/schedule_response_data.py +++ b/rootly_sdk/models/schedule_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class ScheduleResponseData: id: str type_: ScheduleResponseDataType - attributes: "Schedule" + attributes: Schedule additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation.py b/rootly_sdk/models/schedule_rotation.py index 35cf924b..3b2997a6 100644 --- a/rootly_sdk/models/schedule_rotation.py +++ b/rootly_sdk/models/schedule_rotation.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -42,39 +44,39 @@ class ScheduleRotation: schedule_id (str): The ID of parent schedule name (str): The name of the schedule rotation schedule_rotationable_type (ScheduleRotationScheduleRotationableType): Schedule rotation type - schedule_rotationable_attributes (Union['ScheduleRotationScheduleRotationableAttributesType0', - 'ScheduleRotationScheduleRotationableAttributesType1', 'ScheduleRotationScheduleRotationableAttributesType2', - 'ScheduleRotationScheduleRotationableAttributesType3']): - position (Union[Unset, int]): Position of the schedule rotation - active_all_week (Union[Unset, bool]): Schedule rotation active all week? Default: True. - active_days (Union[Unset, list[ScheduleRotationActiveDaysItem]]): - active_time_type (Union[Unset, str]): - active_time_attributes (Union[Unset, list['ScheduleRotationActiveTimeAttributesItem']]): Schedule rotation's - active times - time_zone (Union[Unset, str]): A valid IANA time zone name. Default: 'Etc/UTC'. - start_time (Union[None, Unset, datetime.date]): ISO8601 date and time when rotation starts. Shifts will only be + schedule_rotationable_attributes (ScheduleRotationScheduleRotationableAttributesType0 | + ScheduleRotationScheduleRotationableAttributesType1 | ScheduleRotationScheduleRotationableAttributesType2 | + ScheduleRotationScheduleRotationableAttributesType3): + position (int | Unset): Position of the schedule rotation + active_all_week (bool | Unset): Schedule rotation active all week? Default: True. + active_days (list[ScheduleRotationActiveDaysItem] | Unset): + active_time_type (str | Unset): + active_time_attributes (list[ScheduleRotationActiveTimeAttributesItem] | Unset): Schedule rotation's active + times + time_zone (str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. + start_time (datetime.date | None | Unset): ISO8601 date and time when rotation starts. Shifts will only be created after this time. - end_time (Union[None, Unset, datetime.date]): ISO8601 date and time when rotation ends. Shifts will only be - created before this time. + end_time (datetime.date | None | Unset): ISO8601 date and time when rotation ends. Shifts will only be created + before this time. """ schedule_id: str name: str schedule_rotationable_type: ScheduleRotationScheduleRotationableType - schedule_rotationable_attributes: Union[ - "ScheduleRotationScheduleRotationableAttributesType0", - "ScheduleRotationScheduleRotationableAttributesType1", - "ScheduleRotationScheduleRotationableAttributesType2", - "ScheduleRotationScheduleRotationableAttributesType3", - ] - position: Unset | int = UNSET - active_all_week: Unset | bool = True - active_days: Unset | list[ScheduleRotationActiveDaysItem] = UNSET - active_time_type: Unset | str = UNSET - active_time_attributes: Unset | list["ScheduleRotationActiveTimeAttributesItem"] = UNSET - time_zone: Unset | str = "Etc/UTC" - start_time: None | Unset | datetime.date = UNSET - end_time: None | Unset | datetime.date = UNSET + schedule_rotationable_attributes: ( + ScheduleRotationScheduleRotationableAttributesType0 + | ScheduleRotationScheduleRotationableAttributesType1 + | ScheduleRotationScheduleRotationableAttributesType2 + | ScheduleRotationScheduleRotationableAttributesType3 + ) + position: int | Unset = UNSET + active_all_week: bool | Unset = True + active_days: list[ScheduleRotationActiveDaysItem] | Unset = UNSET + active_time_type: str | Unset = UNSET + active_time_attributes: list[ScheduleRotationActiveTimeAttributesItem] | Unset = UNSET + time_zone: str | Unset = "Etc/UTC" + start_time: datetime.date | None | Unset = UNSET + end_time: datetime.date | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -108,7 +110,7 @@ def to_dict(self) -> dict[str, Any]: active_all_week = self.active_all_week - active_days: Unset | list[str] = UNSET + active_days: list[str] | Unset = UNSET if not isinstance(self.active_days, Unset): active_days = [] for active_days_item_data in self.active_days: @@ -117,7 +119,7 @@ def to_dict(self) -> dict[str, Any]: active_time_type = self.active_time_type - active_time_attributes: Unset | list[dict[str, Any]] = UNSET + active_time_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.active_time_attributes, Unset): active_time_attributes = [] for active_time_attributes_item_data in self.active_time_attributes: @@ -126,7 +128,7 @@ def to_dict(self) -> dict[str, Any]: time_zone = self.time_zone - start_time: None | Unset | str + start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET elif isinstance(self.start_time, datetime.date): @@ -134,7 +136,7 @@ def to_dict(self) -> dict[str, Any]: else: start_time = self.start_time - end_time: None | Unset | str + end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET elif isinstance(self.end_time, datetime.date): @@ -198,12 +200,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_schedule_rotationable_attributes( data: object, - ) -> Union[ - "ScheduleRotationScheduleRotationableAttributesType0", - "ScheduleRotationScheduleRotationableAttributesType1", - "ScheduleRotationScheduleRotationableAttributesType2", - "ScheduleRotationScheduleRotationableAttributesType3", - ]: + ) -> ( + ScheduleRotationScheduleRotationableAttributesType0 + | ScheduleRotationScheduleRotationableAttributesType1 + | ScheduleRotationScheduleRotationableAttributesType2 + | ScheduleRotationScheduleRotationableAttributesType3 + ): try: if not isinstance(data, dict): raise TypeError() @@ -212,7 +214,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -222,7 +224,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -232,7 +234,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() @@ -250,27 +252,31 @@ def _parse_schedule_rotationable_attributes( active_all_week = d.pop("active_all_week", UNSET) - active_days = [] _active_days = d.pop("active_days", UNSET) - for active_days_item_data in _active_days or []: - active_days_item = check_schedule_rotation_active_days_item(active_days_item_data) + active_days: list[ScheduleRotationActiveDaysItem] | Unset = UNSET + if _active_days is not UNSET: + active_days = [] + for active_days_item_data in _active_days: + active_days_item = check_schedule_rotation_active_days_item(active_days_item_data) - active_days.append(active_days_item) + active_days.append(active_days_item) active_time_type = d.pop("active_time_type", UNSET) - active_time_attributes = [] _active_time_attributes = d.pop("active_time_attributes", UNSET) - for active_time_attributes_item_data in _active_time_attributes or []: - active_time_attributes_item = ScheduleRotationActiveTimeAttributesItem.from_dict( - active_time_attributes_item_data - ) + active_time_attributes: list[ScheduleRotationActiveTimeAttributesItem] | Unset = UNSET + if _active_time_attributes is not UNSET: + active_time_attributes = [] + for active_time_attributes_item_data in _active_time_attributes: + active_time_attributes_item = ScheduleRotationActiveTimeAttributesItem.from_dict( + active_time_attributes_item_data + ) - active_time_attributes.append(active_time_attributes_item) + active_time_attributes.append(active_time_attributes_item) time_zone = d.pop("time_zone", UNSET) - def _parse_start_time(data: object) -> None | Unset | datetime.date: + def _parse_start_time(data: object) -> datetime.date | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -281,13 +287,13 @@ def _parse_start_time(data: object) -> None | Unset | datetime.date: start_time_type_0 = isoparse(data).date() return start_time_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.date, data) + return cast(datetime.date | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | Unset | datetime.date: + def _parse_end_time(data: object) -> datetime.date | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -298,9 +304,9 @@ def _parse_end_time(data: object) -> None | Unset | datetime.date: end_time_type_0 = isoparse(data).date() return end_time_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.date, data) + return cast(datetime.date | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/schedule_rotation_active_day.py b/rootly_sdk/models/schedule_rotation_active_day.py index f3b1c891..d21d18dd 100644 --- a/rootly_sdk/models/schedule_rotation_active_day.py +++ b/rootly_sdk/models/schedule_rotation_active_day.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,15 +26,15 @@ class ScheduleRotationActiveDay: Attributes: schedule_rotation_id (str): day_name (ScheduleRotationActiveDayDayName): Schedule rotation day name for which active times to be created - active_time_attributes (list['ScheduleRotationActiveDayActiveTimeAttributesItem']): Schedule rotation active - times per day + active_time_attributes (list[ScheduleRotationActiveDayActiveTimeAttributesItem]): Schedule rotation active times + per day created_at (str): Date of creation updated_at (str): Date of last update """ schedule_rotation_id: str day_name: ScheduleRotationActiveDayDayName - active_time_attributes: list["ScheduleRotationActiveDayActiveTimeAttributesItem"] + active_time_attributes: list[ScheduleRotationActiveDayActiveTimeAttributesItem] created_at: str updated_at: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) diff --git a/rootly_sdk/models/schedule_rotation_active_day_active_time_attributes_item.py b/rootly_sdk/models/schedule_rotation_active_day_active_time_attributes_item.py index ee238b25..8407725b 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_active_time_attributes_item.py +++ b/rootly_sdk/models/schedule_rotation_active_day_active_time_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class ScheduleRotationActiveDayActiveTimeAttributesItem: """ Attributes: - start_time (Union[Unset, str]): Start time for schedule rotation active time - end_time (Union[Unset, str]): End time for schedule rotation active time + start_time (str | Unset): Start time for schedule rotation active time + end_time (str | Unset): End time for schedule rotation active time """ - start_time: Unset | str = UNSET - end_time: Unset | str = UNSET + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_active_day_list.py b/rootly_sdk/models/schedule_rotation_active_day_list.py index 6c31233d..c8db539a 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_list.py +++ b/rootly_sdk/models/schedule_rotation_active_day_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class ScheduleRotationActiveDayList: """ Attributes: - data (list['ScheduleRotationActiveDayListDataItem']): + data (list[ScheduleRotationActiveDayListDataItem]): links (Links): meta (Meta): """ - data: list["ScheduleRotationActiveDayListDataItem"] - links: "Links" - meta: "Meta" + data: list[ScheduleRotationActiveDayListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py b/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py index e5f8d111..89218d8f 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_active_day_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class ScheduleRotationActiveDayListDataItem: id: str type_: ScheduleRotationActiveDayListDataItemType - attributes: "ScheduleRotationActiveDay" + attributes: ScheduleRotationActiveDay additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_active_day_response.py b/rootly_sdk/models/schedule_rotation_active_day_response.py index ad1e54da..c1367dc9 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class ScheduleRotationActiveDayResponse: """ Attributes: - data (Union[Unset, ScheduleRotationActiveDayResponseData]): + data (ScheduleRotationActiveDayResponseData | Unset): """ - data: Union[Unset, "ScheduleRotationActiveDayResponseData"] = UNSET + data: ScheduleRotationActiveDayResponseData | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | ScheduleRotationActiveDayResponseData + data: ScheduleRotationActiveDayResponseData | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/schedule_rotation_active_day_response_data.py b/rootly_sdk/models/schedule_rotation_active_day_response_data.py index 97dce826..de8b9b12 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response_data.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,24 +23,24 @@ class ScheduleRotationActiveDayResponseData: """ Attributes: - id (Union[Unset, str]): Unique ID of the schedule rotation active time - type_ (Union[Unset, ScheduleRotationActiveDayResponseDataType]): - attributes (Union[Unset, ScheduleRotationActiveDay]): + id (str | Unset): Unique ID of the schedule rotation active time + type_ (ScheduleRotationActiveDayResponseDataType | Unset): + attributes (ScheduleRotationActiveDay | Unset): """ - id: Unset | str = UNSET - type_: Unset | ScheduleRotationActiveDayResponseDataType = UNSET - attributes: Union[Unset, "ScheduleRotationActiveDay"] = UNSET + id: str | Unset = UNSET + type_: ScheduleRotationActiveDayResponseDataType | Unset = UNSET + attributes: ScheduleRotationActiveDay | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -62,14 +64,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | ScheduleRotationActiveDayResponseDataType + type_: ScheduleRotationActiveDayResponseDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_schedule_rotation_active_day_response_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | ScheduleRotationActiveDay + attributes: ScheduleRotationActiveDay | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/schedule_rotation_active_time_attributes_item.py b/rootly_sdk/models/schedule_rotation_active_time_attributes_item.py index 0133b6f5..f61260d2 100644 --- a/rootly_sdk/models/schedule_rotation_active_time_attributes_item.py +++ b/rootly_sdk/models/schedule_rotation_active_time_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/schedule_rotation_list.py b/rootly_sdk/models/schedule_rotation_list.py index 7811c80f..ffb96650 100644 --- a/rootly_sdk/models/schedule_rotation_list.py +++ b/rootly_sdk/models/schedule_rotation_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class ScheduleRotationList: """ Attributes: - data (list['ScheduleRotationListDataItem']): + data (list[ScheduleRotationListDataItem]): links (Links): meta (Meta): """ - data: list["ScheduleRotationListDataItem"] - links: "Links" - meta: "Meta" + data: list[ScheduleRotationListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_list_data_item.py b/rootly_sdk/models/schedule_rotation_list_data_item.py index c61c5b9c..a05d662e 100644 --- a/rootly_sdk/models/schedule_rotation_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class ScheduleRotationListDataItem: id: str type_: ScheduleRotationListDataItemType - attributes: "ScheduleRotation" + attributes: ScheduleRotation additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_response.py b/rootly_sdk/models/schedule_rotation_response.py index 8e7474df..f6161b5a 100644 --- a/rootly_sdk/models/schedule_rotation_response.py +++ b/rootly_sdk/models/schedule_rotation_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ScheduleRotationResponse: data (ScheduleRotationResponseData): """ - data: "ScheduleRotationResponseData" + data: ScheduleRotationResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_response_data.py b/rootly_sdk/models/schedule_rotation_response_data.py index 885266b5..23264402 100644 --- a/rootly_sdk/models/schedule_rotation_response_data.py +++ b/rootly_sdk/models/schedule_rotation_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class ScheduleRotationResponseData: id: str type_: ScheduleRotationResponseDataType - attributes: "ScheduleRotation" + attributes: ScheduleRotation additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_0.py b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_0.py index 6835c072..2cd22b53 100644 --- a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_0.py +++ b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_1.py b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_1.py index e03a3206..c36e9741 100644 --- a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_1.py +++ b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_2.py b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_2.py index b58fca4b..01e31b7b 100644 --- a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_2.py +++ b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_2.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_3.py b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_3.py index 78bf3791..4134c043 100644 --- a/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_3.py +++ b/rootly_sdk/models/schedule_rotation_schedule_rotationable_attributes_type_3.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/schedule_rotation_user.py b/rootly_sdk/models/schedule_rotation_user.py index eb4942e9..77738f7a 100644 --- a/rootly_sdk/models/schedule_rotation_user.py +++ b/rootly_sdk/models/schedule_rotation_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/schedule_rotation_user_list.py b/rootly_sdk/models/schedule_rotation_user_list.py index b35db118..aa284d9c 100644 --- a/rootly_sdk/models/schedule_rotation_user_list.py +++ b/rootly_sdk/models/schedule_rotation_user_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class ScheduleRotationUserList: """ Attributes: - data (list['ScheduleRotationUserListDataItem']): + data (list[ScheduleRotationUserListDataItem]): links (Links): meta (Meta): """ - data: list["ScheduleRotationUserListDataItem"] - links: "Links" - meta: "Meta" + data: list[ScheduleRotationUserListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_user_list_data_item.py b/rootly_sdk/models/schedule_rotation_user_list_data_item.py index 654de35e..0ad5a6bf 100644 --- a/rootly_sdk/models/schedule_rotation_user_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_user_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class ScheduleRotationUserListDataItem: id: str type_: ScheduleRotationUserListDataItemType - attributes: "ScheduleRotationUser" + attributes: ScheduleRotationUser additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_user_response.py b/rootly_sdk/models/schedule_rotation_user_response.py index 336ef564..35fafdb4 100644 --- a/rootly_sdk/models/schedule_rotation_user_response.py +++ b/rootly_sdk/models/schedule_rotation_user_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ScheduleRotationUserResponse: data (ScheduleRotationUserResponseData): """ - data: "ScheduleRotationUserResponseData" + data: ScheduleRotationUserResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_rotation_user_response_data.py b/rootly_sdk/models/schedule_rotation_user_response_data.py index f406ddaf..bfb24d1c 100644 --- a/rootly_sdk/models/schedule_rotation_user_response_data.py +++ b/rootly_sdk/models/schedule_rotation_user_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class ScheduleRotationUserResponseData: id: str type_: ScheduleRotationUserResponseDataType - attributes: "ScheduleRotationUser" + attributes: ScheduleRotationUser additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_slack_channel_type_0.py b/rootly_sdk/models/schedule_slack_channel_type_0.py index ec9d0e00..eb26f635 100644 --- a/rootly_sdk/models/schedule_slack_channel_type_0.py +++ b/rootly_sdk/models/schedule_slack_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class ScheduleSlackChannelType0: """Synced slack channel of the schedule Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/schedule_slack_user_group_type_0.py b/rootly_sdk/models/schedule_slack_user_group_type_0.py index 692964b9..ac2adf75 100644 --- a/rootly_sdk/models/schedule_slack_user_group_type_0.py +++ b/rootly_sdk/models/schedule_slack_user_group_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class ScheduleSlackUserGroupType0: """Synced slack group of the schedule Attributes: - id (Union[Unset, str]): Slack user group ID - name (Union[Unset, str]): Slack user group name + id (str | Unset): Slack user group ID + name (str | Unset): Slack user group name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/secret.py b/rootly_sdk/models/secret.py index e3fd23f3..19dae479 100644 --- a/rootly_sdk/models/secret.py +++ b/rootly_sdk/models/secret.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,19 +18,19 @@ class Secret: name (str): The name of the secret created_at (str): Date of creation updated_at (str): Date of last update - secret (Union[Unset, str]): The redacted secret - hashicorp_vault_mount (Union[Unset, str]): The HashiCorp Vault secret mount path - hashicorp_vault_path (Union[None, Unset, str]): The HashiCorp Vault secret path - hashicorp_vault_version (Union[Unset, int]): The HashiCorp Vault secret version + secret (str | Unset): The redacted secret + hashicorp_vault_mount (str | Unset): The HashiCorp Vault secret mount path + hashicorp_vault_path (None | str | Unset): The HashiCorp Vault secret path + hashicorp_vault_version (int | Unset): The HashiCorp Vault secret version """ name: str created_at: str updated_at: str - secret: Unset | str = UNSET - hashicorp_vault_mount: Unset | str = UNSET - hashicorp_vault_path: None | Unset | str = UNSET - hashicorp_vault_version: Unset | int = UNSET + secret: str | Unset = UNSET + hashicorp_vault_mount: str | Unset = UNSET + hashicorp_vault_path: None | str | Unset = UNSET + hashicorp_vault_version: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: hashicorp_vault_mount = self.hashicorp_vault_mount - hashicorp_vault_path: None | Unset | str + hashicorp_vault_path: None | str | Unset if isinstance(self.hashicorp_vault_path, Unset): hashicorp_vault_path = UNSET else: @@ -83,12 +85,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: hashicorp_vault_mount = d.pop("hashicorp_vault_mount", UNSET) - def _parse_hashicorp_vault_path(data: object) -> None | Unset | str: + def _parse_hashicorp_vault_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) hashicorp_vault_path = _parse_hashicorp_vault_path(d.pop("hashicorp_vault_path", UNSET)) diff --git a/rootly_sdk/models/secret_list.py b/rootly_sdk/models/secret_list.py index f08a58b1..3dd6f324 100644 --- a/rootly_sdk/models/secret_list.py +++ b/rootly_sdk/models/secret_list.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class SecretList: """ Attributes: - data (list['SecretListDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[SecretListDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["SecretListDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[SecretListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/secret_list_data_item.py b/rootly_sdk/models/secret_list_data_item.py index 87fbca70..77572c28 100644 --- a/rootly_sdk/models/secret_list_data_item.py +++ b/rootly_sdk/models/secret_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class SecretListDataItem: id: str type_: SecretListDataItemType - attributes: "Secret" + attributes: Secret additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/secret_response.py b/rootly_sdk/models/secret_response.py index d6359e52..19eff24a 100644 --- a/rootly_sdk/models/secret_response.py +++ b/rootly_sdk/models/secret_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class SecretResponse: data (SecretResponseData): """ - data: "SecretResponseData" + data: SecretResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/secret_response_data.py b/rootly_sdk/models/secret_response_data.py index 2c776f8e..a0383993 100644 --- a/rootly_sdk/models/secret_response_data.py +++ b/rootly_sdk/models/secret_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class SecretResponseData: id: str type_: SecretResponseDataType - attributes: "Secret" + attributes: Secret additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/send_dashboard_report_task_params.py b/rootly_sdk/models/send_dashboard_report_task_params.py index 66a38904..ee77ed07 100644 --- a/rootly_sdk/models/send_dashboard_report_task_params.py +++ b/rootly_sdk/models/send_dashboard_report_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,20 +22,20 @@ class SendDashboardReportTaskParams: dashboard_ids (list[str]): to (list[str]): subject (str): The subject - body (Union[None, str]): The email body - task_type (Union[Unset, SendDashboardReportTaskParamsTaskType]): - from_ (Union[Unset, str]): The from email address. Need to use SMTP integration if different than rootly.com - Default: 'Rootly '. - preheader (Union[None, Unset, str]): The preheader + body (None | str): The email body + task_type (SendDashboardReportTaskParamsTaskType | Unset): + from_ (str | Unset): The from email address. Need to use SMTP integration if different than rootly.com Default: + 'Rootly '. + preheader (None | str | Unset): The preheader """ dashboard_ids: list[str] to: list[str] subject: str body: None | str - task_type: Unset | SendDashboardReportTaskParamsTaskType = UNSET - from_: Unset | str = "Rootly " - preheader: None | Unset | str = UNSET + task_type: SendDashboardReportTaskParamsTaskType | Unset = UNSET + from_: str | Unset = "Rootly " + preheader: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,13 +48,13 @@ def to_dict(self) -> dict[str, Any]: body: None | str body = self.body - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type from_ = self.from_ - preheader: None | Unset | str + preheader: None | str | Unset if isinstance(self.preheader, Unset): preheader = UNSET else: @@ -94,7 +96,7 @@ def _parse_body(data: object) -> None | str: body = _parse_body(d.pop("body")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | SendDashboardReportTaskParamsTaskType + task_type: SendDashboardReportTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -102,12 +104,12 @@ def _parse_body(data: object) -> None | str: from_ = d.pop("from", UNSET) - def _parse_preheader(data: object) -> None | Unset | str: + def _parse_preheader(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) preheader = _parse_preheader(d.pop("preheader", UNSET)) diff --git a/rootly_sdk/models/send_email_task_params.py b/rootly_sdk/models/send_email_task_params.py index 4f63f560..6e1d8cfc 100644 --- a/rootly_sdk/models/send_email_task_params.py +++ b/rootly_sdk/models/send_email_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,29 +21,29 @@ class SendEmailTaskParams: Attributes: to (list[str]): subject (str): The subject - body (Union[None, str]): The email body - task_type (Union[Unset, SendEmailTaskParamsTaskType]): - from_ (Union[Unset, str]): The from email address. Need to use SMTP integration if different than rootly.com - Default: 'Rootly '. - cc (Union[Unset, list[str]]): - bcc (Union[Unset, list[str]]): - preheader (Union[None, Unset, str]): The preheader - include_header (Union[Unset, bool]): - include_footer (Union[Unset, bool]): - custom_logo_url (Union[None, Unset, str]): URL to your custom email logo + body (None | str): The email body + task_type (SendEmailTaskParamsTaskType | Unset): + from_ (str | Unset): The from email address. Need to use SMTP integration if different than rootly.com Default: + 'Rootly '. + cc (list[str] | Unset): + bcc (list[str] | Unset): + preheader (None | str | Unset): The preheader + include_header (bool | Unset): + include_footer (bool | Unset): + custom_logo_url (None | str | Unset): URL to your custom email logo """ to: list[str] subject: str body: None | str - task_type: Unset | SendEmailTaskParamsTaskType = UNSET - from_: Unset | str = "Rootly " - cc: Unset | list[str] = UNSET - bcc: Unset | list[str] = UNSET - preheader: None | Unset | str = UNSET - include_header: Unset | bool = UNSET - include_footer: Unset | bool = UNSET - custom_logo_url: None | Unset | str = UNSET + task_type: SendEmailTaskParamsTaskType | Unset = UNSET + from_: str | Unset = "Rootly " + cc: list[str] | Unset = UNSET + bcc: list[str] | Unset = UNSET + preheader: None | str | Unset = UNSET + include_header: bool | Unset = UNSET + include_footer: bool | Unset = UNSET + custom_logo_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,21 +54,21 @@ def to_dict(self) -> dict[str, Any]: body: None | str body = self.body - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type from_ = self.from_ - cc: Unset | list[str] = UNSET + cc: list[str] | Unset = UNSET if not isinstance(self.cc, Unset): cc = self.cc - bcc: Unset | list[str] = UNSET + bcc: list[str] | Unset = UNSET if not isinstance(self.bcc, Unset): bcc = self.bcc - preheader: None | Unset | str + preheader: None | str | Unset if isinstance(self.preheader, Unset): preheader = UNSET else: @@ -76,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: include_footer = self.include_footer - custom_logo_url: None | Unset | str + custom_logo_url: None | str | Unset if isinstance(self.custom_logo_url, Unset): custom_logo_url = UNSET else: @@ -125,7 +127,7 @@ def _parse_body(data: object) -> None | str: body = _parse_body(d.pop("body")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | SendEmailTaskParamsTaskType + task_type: SendEmailTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -137,12 +139,12 @@ def _parse_body(data: object) -> None | str: bcc = cast(list[str], d.pop("bcc", UNSET)) - def _parse_preheader(data: object) -> None | Unset | str: + def _parse_preheader(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) preheader = _parse_preheader(d.pop("preheader", UNSET)) @@ -150,12 +152,12 @@ def _parse_preheader(data: object) -> None | Unset | str: include_footer = d.pop("include_footer", UNSET) - def _parse_custom_logo_url(data: object) -> None | Unset | str: + def _parse_custom_logo_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_logo_url = _parse_custom_logo_url(d.pop("custom_logo_url", UNSET)) diff --git a/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py index a0c00b13..4e82900e 100644 --- a/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py +++ b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,14 +25,14 @@ class SendMicrosoftTeamsChatMessageTaskParams: """ Attributes: - chats (list['SendMicrosoftTeamsChatMessageTaskParamsChatsItem']): + chats (list[SendMicrosoftTeamsChatMessageTaskParamsChatsItem]): text (str): The message text - task_type (Union[Unset, SendMicrosoftTeamsChatMessageTaskParamsTaskType]): + task_type (SendMicrosoftTeamsChatMessageTaskParamsTaskType | Unset): """ - chats: list["SendMicrosoftTeamsChatMessageTaskParamsChatsItem"] + chats: list[SendMicrosoftTeamsChatMessageTaskParamsChatsItem] text: str - task_type: Unset | SendMicrosoftTeamsChatMessageTaskParamsTaskType = UNSET + task_type: SendMicrosoftTeamsChatMessageTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -41,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: text = self.text - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -75,7 +77,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: text = d.pop("text") _task_type = d.pop("task_type", UNSET) - task_type: Unset | SendMicrosoftTeamsChatMessageTaskParamsTaskType + task_type: SendMicrosoftTeamsChatMessageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/send_microsoft_teams_chat_message_task_params_chats_item.py b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params_chats_item.py index 79ad0464..b5eb86bf 100644 --- a/rootly_sdk/models/send_microsoft_teams_chat_message_task_params_chats_item.py +++ b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params_chats_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SendMicrosoftTeamsChatMessageTaskParamsChatsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/send_sms_task_params.py b/rootly_sdk/models/send_sms_task_params.py index a7013664..188935ea 100644 --- a/rootly_sdk/models/send_sms_task_params.py +++ b/rootly_sdk/models/send_sms_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,13 +19,13 @@ class SendSmsTaskParams: phone_numbers (list[str]): name (str): The name content (str): The SMS message - task_type (Union[Unset, SendSmsTaskParamsTaskType]): + task_type (SendSmsTaskParamsTaskType | Unset): """ phone_numbers: list[str] name: str content: str - task_type: Unset | SendSmsTaskParamsTaskType = UNSET + task_type: SendSmsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -33,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: content = self.content - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -61,7 +63,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content") _task_type = d.pop("task_type", UNSET) - task_type: Unset | SendSmsTaskParamsTaskType + task_type: SendSmsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/send_whatsapp_message_task_params.py b/rootly_sdk/models/send_whatsapp_message_task_params.py index afc93d42..ba3492e7 100644 --- a/rootly_sdk/models/send_whatsapp_message_task_params.py +++ b/rootly_sdk/models/send_whatsapp_message_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,13 +22,13 @@ class SendWhatsappMessageTaskParams: phone_numbers (list[str]): name (str): The name content (str): The WhatsApp message - task_type (Union[Unset, SendWhatsappMessageTaskParamsTaskType]): + task_type (SendWhatsappMessageTaskParamsTaskType | Unset): """ phone_numbers: list[str] name: str content: str - task_type: Unset | SendWhatsappMessageTaskParamsTaskType = UNSET + task_type: SendWhatsappMessageTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: content = self.content - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -64,7 +66,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content") _task_type = d.pop("task_type", UNSET) - task_type: Unset | SendWhatsappMessageTaskParamsTaskType + task_type: SendWhatsappMessageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/service.py b/rootly_sdk/models/service.py index 46d297c9..78e50976 100644 --- a/rootly_sdk/models/service.py +++ b/rootly_sdk/models/service.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,8 +10,8 @@ if TYPE_CHECKING: from ..models.service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 - from ..models.service_fields_type_0_item import ServiceFieldsType0Item from ..models.service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 + from ..models.service_properties_type_0_item import ServicePropertiesType0Item from ..models.service_slack_aliases_type_0_item import ServiceSlackAliasesType0Item from ..models.service_slack_channels_type_0_item import ServiceSlackChannelsType0Item @@ -24,85 +26,80 @@ class Service: name (str): The name of the service created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the service - description (Union[None, Unset, str]): The description of the service - public_description (Union[None, Unset, str]): The public description of the service - notify_emails (Union[None, Unset, list[str]]): Emails attached to the service - color (Union[None, Unset, str]): The hex color of the service - position (Union[None, Unset, int]): Position of the service - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this service. eg: + slug (str | Unset): The slug of the service + description (None | str | Unset): The description of the service + public_description (None | str | Unset): The public description of the service + notify_emails (list[str] | None | Unset): Emails attached to the service + color (None | str | Unset): The hex color of the service + position (int | None | Unset): Position of the service + backstage_id (None | str | Unset): The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this service - pagerduty_id (Union[None, Unset, str]): The PagerDuty service id associated to this service - opsgenie_id (Union[None, Unset, str]): The Opsgenie service id associated to this service - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this service - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this service - github_repository_name (Union[None, Unset, str]): The GitHub repository name associated to this service. eg: + external_id (None | str | Unset): The external id associated to this service + pagerduty_id (None | str | Unset): The PagerDuty service id associated to this service + opsgenie_id (None | str | Unset): The Opsgenie service id associated to this service + cortex_id (None | str | Unset): The Cortex group id associated to this service + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this service + github_repository_name (None | str | Unset): The GitHub repository name associated to this service. eg: rootlyhq/my-service - github_repository_branch (Union[None, Unset, str]): The GitHub repository branch associated to this service. eg: - main - gitlab_repository_name (Union[None, Unset, str]): The GitLab repository name associated to this service. eg: + github_repository_branch (None | str | Unset): The GitHub repository branch associated to this service. eg: main + gitlab_repository_name (None | str | Unset): The GitLab repository name associated to this service. eg: rootlyhq/my-service - gitlab_repository_branch (Union[None, Unset, str]): The GitLab repository branch associated to this service. eg: - main - kubernetes_deployment_name (Union[None, Unset, str]): The Kubernetes deployment name associated to this service. - eg: namespace/deployment-name - environment_ids (Union[None, Unset, list[str]]): Environments associated with this service - service_ids (Union[None, Unset, list[str]]): Services dependent on this service - owner_group_ids (Union[None, Unset, list[str]]): Owner Teams associated with this service - owner_user_ids (Union[None, Unset, list[int]]): Owner Users associated with this service - alert_urgency_id (Union[None, Unset, str]): The alert urgency id of the service - escalation_policy_id (Union[None, Unset, str]): The escalation policy id of the service - alerts_email_enabled (Union[None, Unset, bool]): Enable alerts through email - alerts_email_address (Union[None, Unset, str]): Email generated to send alerts to - slack_channels (Union[None, Unset, list['ServiceSlackChannelsType0Item']]): Slack Channels associated with this - service - slack_aliases (Union[None, Unset, list['ServiceSlackAliasesType0Item']]): Slack Aliases associated with this - service - alert_broadcast_enabled (Union[None, Unset, bool]): Enable alerts to be broadcasted to a specific channel - alert_broadcast_channel (Union['ServiceAlertBroadcastChannelType0', None, Unset]): Slack channel to broadcast - alerts to - incident_broadcast_enabled (Union[None, Unset, bool]): Enable incidents to be broadcasted to a specific channel - incident_broadcast_channel (Union['ServiceIncidentBroadcastChannelType0', None, Unset]): Slack channel to - broadcast incidents to - fields (Union[None, Unset, list['ServiceFieldsType0Item']]): Array of field values for this service. + gitlab_repository_branch (None | str | Unset): The GitLab repository branch associated to this service. eg: main + kubernetes_deployment_name (None | str | Unset): The Kubernetes deployment name associated to this service. eg: + namespace/deployment-name + environment_ids (list[str] | None | Unset): Environments associated with this service + service_ids (list[str] | None | Unset): Services dependent on this service + owner_group_ids (list[str] | None | Unset): Owner Teams associated with this service + owner_user_ids (list[int] | None | Unset): Owner Users associated with this service + alert_urgency_id (None | str | Unset): The alert urgency id of the service + escalation_policy_id (None | str | Unset): The escalation policy id of the service + alerts_email_enabled (bool | None | Unset): Enable alerts through email + alerts_email_address (None | str | Unset): Email generated to send alerts to + slack_channels (list[ServiceSlackChannelsType0Item] | None | Unset): Slack Channels associated with this service + slack_aliases (list[ServiceSlackAliasesType0Item] | None | Unset): Slack Aliases associated with this service + alert_broadcast_enabled (bool | None | Unset): Enable alerts to be broadcasted to a specific channel + alert_broadcast_channel (None | ServiceAlertBroadcastChannelType0 | Unset): Slack channel to broadcast alerts to + incident_broadcast_enabled (bool | None | Unset): Enable incidents to be broadcasted to a specific channel + incident_broadcast_channel (None | ServiceIncidentBroadcastChannelType0 | Unset): Slack channel to broadcast + incidents to + properties (list[ServicePropertiesType0Item] | None | Unset): Array of property values for this service. """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - github_repository_name: None | Unset | str = UNSET - github_repository_branch: None | Unset | str = UNSET - gitlab_repository_name: None | Unset | str = UNSET - gitlab_repository_branch: None | Unset | str = UNSET - kubernetes_deployment_name: None | Unset | str = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - owner_group_ids: None | Unset | list[str] = UNSET - owner_user_ids: None | Unset | list[int] = UNSET - alert_urgency_id: None | Unset | str = UNSET - escalation_policy_id: None | Unset | str = UNSET - alerts_email_enabled: None | Unset | bool = UNSET - alerts_email_address: None | Unset | str = UNSET - slack_channels: None | Unset | list["ServiceSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["ServiceSlackAliasesType0Item"] = UNSET - alert_broadcast_enabled: None | Unset | bool = UNSET - alert_broadcast_channel: Union["ServiceAlertBroadcastChannelType0", None, Unset] = UNSET - incident_broadcast_enabled: None | Unset | bool = UNSET - incident_broadcast_channel: Union["ServiceIncidentBroadcastChannelType0", None, Unset] = UNSET - fields: None | Unset | list["ServiceFieldsType0Item"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + github_repository_name: None | str | Unset = UNSET + github_repository_branch: None | str | Unset = UNSET + gitlab_repository_name: None | str | Unset = UNSET + gitlab_repository_branch: None | str | Unset = UNSET + kubernetes_deployment_name: None | str | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + owner_group_ids: list[str] | None | Unset = UNSET + owner_user_ids: list[int] | None | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + escalation_policy_id: None | str | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + alerts_email_address: None | str | Unset = UNSET + slack_channels: list[ServiceSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[ServiceSlackAliasesType0Item] | None | Unset = UNSET + alert_broadcast_enabled: bool | None | Unset = UNSET + alert_broadcast_channel: None | ServiceAlertBroadcastChannelType0 | Unset = UNSET + incident_broadcast_enabled: bool | None | Unset = UNSET + incident_broadcast_channel: None | ServiceIncidentBroadcastChannelType0 | Unset = UNSET + properties: list[ServicePropertiesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -117,19 +114,19 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -138,85 +135,85 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - github_repository_name: None | Unset | str + github_repository_name: None | str | Unset if isinstance(self.github_repository_name, Unset): github_repository_name = UNSET else: github_repository_name = self.github_repository_name - github_repository_branch: None | Unset | str + github_repository_branch: None | str | Unset if isinstance(self.github_repository_branch, Unset): github_repository_branch = UNSET else: github_repository_branch = self.github_repository_branch - gitlab_repository_name: None | Unset | str + gitlab_repository_name: None | str | Unset if isinstance(self.gitlab_repository_name, Unset): gitlab_repository_name = UNSET else: gitlab_repository_name = self.gitlab_repository_name - gitlab_repository_branch: None | Unset | str + gitlab_repository_branch: None | str | Unset if isinstance(self.gitlab_repository_branch, Unset): gitlab_repository_branch = UNSET else: gitlab_repository_branch = self.gitlab_repository_branch - kubernetes_deployment_name: None | Unset | str + kubernetes_deployment_name: None | str | Unset if isinstance(self.kubernetes_deployment_name, Unset): kubernetes_deployment_name = UNSET else: kubernetes_deployment_name = self.kubernetes_deployment_name - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -225,7 +222,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -234,7 +231,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - owner_group_ids: None | Unset | list[str] + owner_group_ids: list[str] | None | Unset if isinstance(self.owner_group_ids, Unset): owner_group_ids = UNSET elif isinstance(self.owner_group_ids, list): @@ -243,7 +240,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_group_ids = self.owner_group_ids - owner_user_ids: None | Unset | list[int] + owner_user_ids: list[int] | None | Unset if isinstance(self.owner_user_ids, Unset): owner_user_ids = UNSET elif isinstance(self.owner_user_ids, list): @@ -252,31 +249,31 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - escalation_policy_id: None | Unset | str + escalation_policy_id: None | str | Unset if isinstance(self.escalation_policy_id, Unset): escalation_policy_id = UNSET else: escalation_policy_id = self.escalation_policy_id - alerts_email_enabled: None | Unset | bool + alerts_email_enabled: bool | None | Unset if isinstance(self.alerts_email_enabled, Unset): alerts_email_enabled = UNSET else: alerts_email_enabled = self.alerts_email_enabled - alerts_email_address: None | Unset | str + alerts_email_address: None | str | Unset if isinstance(self.alerts_email_address, Unset): alerts_email_address = UNSET else: alerts_email_address = self.alerts_email_address - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -288,7 +285,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -300,13 +297,13 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - alert_broadcast_enabled: None | Unset | bool + alert_broadcast_enabled: bool | None | Unset if isinstance(self.alert_broadcast_enabled, Unset): alert_broadcast_enabled = UNSET else: alert_broadcast_enabled = self.alert_broadcast_enabled - alert_broadcast_channel: None | Unset | dict[str, Any] + alert_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.alert_broadcast_channel, Unset): alert_broadcast_channel = UNSET elif isinstance(self.alert_broadcast_channel, ServiceAlertBroadcastChannelType0): @@ -314,13 +311,13 @@ def to_dict(self) -> dict[str, Any]: else: alert_broadcast_channel = self.alert_broadcast_channel - incident_broadcast_enabled: None | Unset | bool + incident_broadcast_enabled: bool | None | Unset if isinstance(self.incident_broadcast_enabled, Unset): incident_broadcast_enabled = UNSET else: incident_broadcast_enabled = self.incident_broadcast_enabled - incident_broadcast_channel: None | Unset | dict[str, Any] + incident_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.incident_broadcast_channel, Unset): incident_broadcast_channel = UNSET elif isinstance(self.incident_broadcast_channel, ServiceIncidentBroadcastChannelType0): @@ -328,17 +325,17 @@ def to_dict(self) -> dict[str, Any]: else: incident_broadcast_channel = self.incident_broadcast_channel - fields: None | Unset | list[dict[str, Any]] - if isinstance(self.fields, Unset): - fields = UNSET - elif isinstance(self.fields, list): - fields = [] - for fields_type_0_item_data in self.fields: - fields_type_0_item = fields_type_0_item_data.to_dict() - fields.append(fields_type_0_item) + properties: list[dict[str, Any]] | None | Unset + if isinstance(self.properties, Unset): + properties = UNSET + elif isinstance(self.properties, list): + properties = [] + for properties_type_0_item_data in self.properties: + properties_type_0_item = properties_type_0_item_data.to_dict() + properties.append(properties_type_0_item) else: - fields = self.fields + properties = self.properties field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -411,16 +408,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_enabled"] = incident_broadcast_enabled if incident_broadcast_channel is not UNSET: field_dict["incident_broadcast_channel"] = incident_broadcast_channel - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 - from ..models.service_fields_type_0_item import ServiceFieldsType0Item from ..models.service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 + from ..models.service_properties_type_0_item import ServicePropertiesType0Item from ..models.service_slack_aliases_type_0_item import ServiceSlackAliasesType0Item from ..models.service_slack_channels_type_0_item import ServiceSlackChannelsType0Item @@ -433,25 +430,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -462,130 +459,130 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_github_repository_name(data: object) -> None | Unset | str: + def _parse_github_repository_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_repository_name = _parse_github_repository_name(d.pop("github_repository_name", UNSET)) - def _parse_github_repository_branch(data: object) -> None | Unset | str: + def _parse_github_repository_branch(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_repository_branch = _parse_github_repository_branch(d.pop("github_repository_branch", UNSET)) - def _parse_gitlab_repository_name(data: object) -> None | Unset | str: + def _parse_gitlab_repository_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_repository_name = _parse_gitlab_repository_name(d.pop("gitlab_repository_name", UNSET)) - def _parse_gitlab_repository_branch(data: object) -> None | Unset | str: + def _parse_gitlab_repository_branch(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_repository_branch = _parse_gitlab_repository_branch(d.pop("gitlab_repository_branch", UNSET)) - def _parse_kubernetes_deployment_name(data: object) -> None | Unset | str: + def _parse_kubernetes_deployment_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kubernetes_deployment_name = _parse_kubernetes_deployment_name(d.pop("kubernetes_deployment_name", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -596,13 +593,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -613,13 +610,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: + def _parse_owner_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -630,13 +627,13 @@ def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: owner_group_ids_type_0 = cast(list[str], data) return owner_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) owner_group_ids = _parse_owner_group_ids(d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: + def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -647,49 +644,49 @@ def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: owner_user_ids_type_0 = cast(list[int], data) return owner_user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_escalation_policy_id(data: object) -> None | Unset | str: + def _parse_escalation_policy_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) - def _parse_alerts_email_enabled(data: object) -> None | Unset | bool: + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) - def _parse_alerts_email_address(data: object) -> None | Unset | str: + def _parse_alerts_email_address(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alerts_email_address = _parse_alerts_email_address(d.pop("alerts_email_address", UNSET)) - def _parse_slack_channels(data: object) -> None | Unset | list["ServiceSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[ServiceSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -707,13 +704,13 @@ def _parse_slack_channels(data: object) -> None | Unset | list["ServiceSlackChan slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["ServiceSlackChannelsType0Item"], data) + return cast(list[ServiceSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases(data: object) -> None | Unset | list["ServiceSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[ServiceSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -729,22 +726,22 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["ServiceSlackAlias slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["ServiceSlackAliasesType0Item"], data) + return cast(list[ServiceSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_alert_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_alert_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alert_broadcast_enabled = _parse_alert_broadcast_enabled(d.pop("alert_broadcast_enabled", UNSET)) - def _parse_alert_broadcast_channel(data: object) -> Union["ServiceAlertBroadcastChannelType0", None, Unset]: + def _parse_alert_broadcast_channel(data: object) -> None | ServiceAlertBroadcastChannelType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -755,24 +752,22 @@ def _parse_alert_broadcast_channel(data: object) -> Union["ServiceAlertBroadcast alert_broadcast_channel_type_0 = ServiceAlertBroadcastChannelType0.from_dict(data) return alert_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ServiceAlertBroadcastChannelType0", None, Unset], data) + return cast(None | ServiceAlertBroadcastChannelType0 | Unset, data) alert_broadcast_channel = _parse_alert_broadcast_channel(d.pop("alert_broadcast_channel", UNSET)) - def _parse_incident_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_incident_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) incident_broadcast_enabled = _parse_incident_broadcast_enabled(d.pop("incident_broadcast_enabled", UNSET)) - def _parse_incident_broadcast_channel( - data: object, - ) -> Union["ServiceIncidentBroadcastChannelType0", None, Unset]: + def _parse_incident_broadcast_channel(data: object) -> None | ServiceIncidentBroadcastChannelType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -783,13 +778,13 @@ def _parse_incident_broadcast_channel( incident_broadcast_channel_type_0 = ServiceIncidentBroadcastChannelType0.from_dict(data) return incident_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ServiceIncidentBroadcastChannelType0", None, Unset], data) + return cast(None | ServiceIncidentBroadcastChannelType0 | Unset, data) incident_broadcast_channel = _parse_incident_broadcast_channel(d.pop("incident_broadcast_channel", UNSET)) - def _parse_fields(data: object) -> None | Unset | list["ServiceFieldsType0Item"]: + def _parse_properties(data: object) -> list[ServicePropertiesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -797,19 +792,19 @@ def _parse_fields(data: object) -> None | Unset | list["ServiceFieldsType0Item"] try: if not isinstance(data, list): raise TypeError() - fields_type_0 = [] - _fields_type_0 = data - for fields_type_0_item_data in _fields_type_0: - fields_type_0_item = ServiceFieldsType0Item.from_dict(fields_type_0_item_data) + properties_type_0 = [] + _properties_type_0 = data + for properties_type_0_item_data in _properties_type_0: + properties_type_0_item = ServicePropertiesType0Item.from_dict(properties_type_0_item_data) - fields_type_0.append(fields_type_0_item) + properties_type_0.append(properties_type_0_item) - return fields_type_0 - except: # noqa: E722 + return properties_type_0 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["ServiceFieldsType0Item"], data) + return cast(list[ServicePropertiesType0Item] | None | Unset, data) - fields = _parse_fields(d.pop("fields", UNSET)) + properties = _parse_properties(d.pop("properties", UNSET)) service = cls( name=name, @@ -846,7 +841,7 @@ def _parse_fields(data: object) -> None | Unset | list["ServiceFieldsType0Item"] alert_broadcast_channel=alert_broadcast_channel, incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, - fields=fields, + properties=properties, ) service.additional_properties = d diff --git a/rootly_sdk/models/service_alert_broadcast_channel_type_0.py b/rootly_sdk/models/service_alert_broadcast_channel_type_0.py index c8429803..352191db 100644 --- a/rootly_sdk/models/service_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/service_alert_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class ServiceAlertBroadcastChannelType0: """Slack channel to broadcast alerts to Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/service_incident_broadcast_channel_type_0.py b/rootly_sdk/models/service_incident_broadcast_channel_type_0.py index 801815e9..d5173bde 100644 --- a/rootly_sdk/models/service_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/service_incident_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class ServiceIncidentBroadcastChannelType0: """Slack channel to broadcast incidents to Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/service_list.py b/rootly_sdk/models/service_list.py index 8ff8a38f..fb54a8c7 100644 --- a/rootly_sdk/models/service_list.py +++ b/rootly_sdk/models/service_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class ServiceList: """ Attributes: - data (list['ServiceListDataItem']): + data (list[ServiceListDataItem]): links (Links): meta (Meta): """ - data: list["ServiceListDataItem"] - links: "Links" - meta: "Meta" + data: list[ServiceListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/service_list_data_item.py b/rootly_sdk/models/service_list_data_item.py index 07946659..809cde14 100644 --- a/rootly_sdk/models/service_list_data_item.py +++ b/rootly_sdk/models/service_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class ServiceListDataItem: id: str type_: ServiceListDataItemType - attributes: "Service" + attributes: Service additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/cause_fields_item.py b/rootly_sdk/models/service_properties_type_0_item.py similarity index 65% rename from rootly_sdk/models/cause_fields_item.py rename to rootly_sdk/models/service_properties_type_0_item.py index eec0315b..ca3eadbd 100644 --- a/rootly_sdk/models/cause_fields_item.py +++ b/rootly_sdk/models/service_properties_type_0_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="CauseFieldsItem") +T = TypeVar("T", bound="ServicePropertiesType0Item") @_attrs_define -class CauseFieldsItem: - """Set a value for a catalog field +class ServicePropertiesType0Item: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - cause_fields_item = cls( - catalog_field_id=catalog_field_id, + service_properties_type_0_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - cause_fields_item.additional_properties = d - return cause_fields_item + service_properties_type_0_item.additional_properties = d + return service_properties_type_0_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/service_response.py b/rootly_sdk/models/service_response.py index 53e659b4..2b2849d3 100644 --- a/rootly_sdk/models/service_response.py +++ b/rootly_sdk/models/service_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ServiceResponse: data (ServiceResponseData): """ - data: "ServiceResponseData" + data: ServiceResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/service_response_data.py b/rootly_sdk/models/service_response_data.py index a94a16d4..3ee17f08 100644 --- a/rootly_sdk/models/service_response_data.py +++ b/rootly_sdk/models/service_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class ServiceResponseData: id: str type_: ServiceResponseDataType - attributes: "Service" + attributes: Service additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/service_slack_aliases_type_0_item.py b/rootly_sdk/models/service_slack_aliases_type_0_item.py index e4b5ebfb..9349bda9 100644 --- a/rootly_sdk/models/service_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/service_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/service_slack_channels_type_0_item.py b/rootly_sdk/models/service_slack_channels_type_0_item.py index 0a61b094..a86a7471 100644 --- a/rootly_sdk/models/service_slack_channels_type_0_item.py +++ b/rootly_sdk/models/service_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/severity.py b/rootly_sdk/models/severity.py index 91ec5e93..a3bee45c 100644 --- a/rootly_sdk/models/severity.py +++ b/rootly_sdk/models/severity.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -22,29 +24,28 @@ class Severity: name (str): The name of the severity created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the severity - description (Union[None, Unset, str]): The description of the severity - severity (Union[Unset, SeveritySeverity]): The severity of the severity - color (Union[None, Unset, str]): The hex color of the severity - position (Union[None, Unset, int]): Position of the severity - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the severity - slack_channels (Union[None, Unset, list['SeveritySlackChannelsType0Item']]): Slack Channels associated with this - severity - slack_aliases (Union[None, Unset, list['SeveritySlackAliasesType0Item']]): Slack Aliases associated with this + slug (str | Unset): The slug of the severity + description (None | str | Unset): The description of the severity + severity (SeveritySeverity | Unset): The severity of the severity + color (None | str | Unset): The hex color of the severity + position (int | None | Unset): Position of the severity + notify_emails (list[str] | None | Unset): Emails to attach to the severity + slack_channels (list[SeveritySlackChannelsType0Item] | None | Unset): Slack Channels associated with this severity + slack_aliases (list[SeveritySlackAliasesType0Item] | None | Unset): Slack Aliases associated with this severity """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - severity: Unset | SeveritySeverity = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["SeveritySlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["SeveritySlackAliasesType0Item"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + severity: SeveritySeverity | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[SeveritySlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[SeveritySlackAliasesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,29 +57,29 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - severity: Unset | str = UNSET + severity: str | Unset = UNSET if not isinstance(self.severity, Unset): severity = self.severity - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -87,7 +88,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -99,7 +100,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -153,41 +154,41 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _severity = d.pop("severity", UNSET) - severity: Unset | SeveritySeverity + severity: SeveritySeverity | Unset if isinstance(_severity, Unset): severity = UNSET else: severity = check_severity_severity(_severity) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -198,13 +199,13 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_slack_channels(data: object) -> None | Unset | list["SeveritySlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[SeveritySlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -222,13 +223,13 @@ def _parse_slack_channels(data: object) -> None | Unset | list["SeveritySlackCha slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["SeveritySlackChannelsType0Item"], data) + return cast(list[SeveritySlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases(data: object) -> None | Unset | list["SeveritySlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[SeveritySlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -244,9 +245,9 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["SeveritySlackAlia slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["SeveritySlackAliasesType0Item"], data) + return cast(list[SeveritySlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) diff --git a/rootly_sdk/models/severity_list.py b/rootly_sdk/models/severity_list.py index fcef2269..7cfa514c 100644 --- a/rootly_sdk/models/severity_list.py +++ b/rootly_sdk/models/severity_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class SeverityList: """ Attributes: - data (list['SeverityListDataItem']): + data (list[SeverityListDataItem]): links (Links): meta (Meta): """ - data: list["SeverityListDataItem"] - links: "Links" - meta: "Meta" + data: list[SeverityListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/severity_list_data_item.py b/rootly_sdk/models/severity_list_data_item.py index 75581779..70b771d4 100644 --- a/rootly_sdk/models/severity_list_data_item.py +++ b/rootly_sdk/models/severity_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class SeverityListDataItem: id: str type_: SeverityListDataItemType - attributes: "Severity" + attributes: Severity additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/severity_response.py b/rootly_sdk/models/severity_response.py index a7b595e9..9eb6fb82 100644 --- a/rootly_sdk/models/severity_response.py +++ b/rootly_sdk/models/severity_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class SeverityResponse: data (SeverityResponseData): """ - data: "SeverityResponseData" + data: SeverityResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/severity_response_data.py b/rootly_sdk/models/severity_response_data.py index 45ad1467..0e33a4b6 100644 --- a/rootly_sdk/models/severity_response_data.py +++ b/rootly_sdk/models/severity_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class SeverityResponseData: id: str type_: SeverityResponseDataType - attributes: "Severity" + attributes: Severity additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/severity_slack_aliases_type_0_item.py b/rootly_sdk/models/severity_slack_aliases_type_0_item.py index 62f76e97..d7ac6e2f 100644 --- a/rootly_sdk/models/severity_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/severity_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/severity_slack_channels_type_0_item.py b/rootly_sdk/models/severity_slack_channels_type_0_item.py index 38119176..6412d29a 100644 --- a/rootly_sdk/models/severity_slack_channels_type_0_item.py +++ b/rootly_sdk/models/severity_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/shift.py b/rootly_sdk/models/shift.py index 5baa9696..2243e08f 100644 --- a/rootly_sdk/models/shift.py +++ b/rootly_sdk/models/shift.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -14,11 +16,12 @@ class Shift: """ Attributes: schedule_id (str): ID of schedule - rotation_id (Union[None, str]): ID of rotation + rotation_id (None | str): ID of rotation starts_at (str): Start datetime of shift ends_at (str): End datetime of shift is_override (bool): Denotes shift is an override shift - user_id (Union[None, Unset, int]): ID of user on shift + is_shadow (bool): Denotes shift is a shadow shift + user_id (int | None | Unset): ID of user on shift """ schedule_id: str @@ -26,7 +29,8 @@ class Shift: starts_at: str ends_at: str is_override: bool - user_id: None | Unset | int = UNSET + is_shadow: bool + user_id: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -41,7 +45,9 @@ def to_dict(self) -> dict[str, Any]: is_override = self.is_override - user_id: None | Unset | int + is_shadow = self.is_shadow + + user_id: int | None | Unset if isinstance(self.user_id, Unset): user_id = UNSET else: @@ -56,6 +62,7 @@ def to_dict(self) -> dict[str, Any]: "starts_at": starts_at, "ends_at": ends_at, "is_override": is_override, + "is_shadow": is_shadow, } ) if user_id is not UNSET: @@ -81,12 +88,14 @@ def _parse_rotation_id(data: object) -> None | str: is_override = d.pop("is_override") - def _parse_user_id(data: object) -> None | Unset | int: + is_shadow = d.pop("is_shadow") + + def _parse_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) user_id = _parse_user_id(d.pop("user_id", UNSET)) @@ -96,6 +105,7 @@ def _parse_user_id(data: object) -> None | Unset | int: starts_at=starts_at, ends_at=ends_at, is_override=is_override, + is_shadow=is_shadow, user_id=user_id, ) diff --git a/rootly_sdk/models/shift_list.py b/rootly_sdk/models/shift_list.py index a0738854..81d9997b 100644 --- a/rootly_sdk/models/shift_list.py +++ b/rootly_sdk/models/shift_list.py @@ -1,10 +1,15 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: + from ..models.meta import Meta from ..models.shift_list_data_item import ShiftListDataItem @@ -15,10 +20,12 @@ class ShiftList: """ Attributes: - data (list['ShiftListDataItem']): + data (list[ShiftListDataItem]): + meta (Meta | Unset): """ - data: list["ShiftListDataItem"] + data: list[ShiftListDataItem] + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -27,6 +34,10 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) + meta: dict[str, Any] | Unset = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -34,11 +45,14 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if meta is not UNSET: + field_dict["meta"] = meta return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meta import Meta from ..models.shift_list_data_item import ShiftListDataItem d = dict(src_dict) @@ -49,8 +63,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) + _meta = d.pop("meta", UNSET) + meta: Meta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = Meta.from_dict(_meta) + shift_list = cls( data=data, + meta=meta, ) shift_list.additional_properties = d diff --git a/rootly_sdk/models/shift_list_data_item.py b/rootly_sdk/models/shift_list_data_item.py index 430d4e47..12519c88 100644 --- a/rootly_sdk/models/shift_list_data_item.py +++ b/rootly_sdk/models/shift_list_data_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,13 +24,13 @@ class ShiftListDataItem: id (str): Unique ID of the shift type_ (ShiftListDataItemType): attributes (Shift): - relationships (Union[Unset, ShiftRelationships]): + relationships (ShiftRelationships | Unset): """ id: str type_: ShiftListDataItemType - attributes: "Shift" - relationships: Union[Unset, "ShiftRelationships"] = UNSET + attributes: Shift + relationships: ShiftRelationships | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - relationships: Unset | dict[str, Any] = UNSET + relationships: dict[str, Any] | Unset = UNSET if not isinstance(self.relationships, Unset): relationships = self.relationships.to_dict() @@ -69,7 +71,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = Shift.from_dict(d.pop("attributes")) _relationships = d.pop("relationships", UNSET) - relationships: Unset | ShiftRelationships + relationships: ShiftRelationships | Unset if isinstance(_relationships, Unset): relationships = UNSET else: diff --git a/rootly_sdk/models/shift_override.py b/rootly_sdk/models/shift_override.py index 93b17a4c..b96b91fe 100644 --- a/rootly_sdk/models/shift_override.py +++ b/rootly_sdk/models/shift_override.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,14 +17,14 @@ class ShiftOverride: Attributes: shift_id (str): ID of shift created_by_user_id (int): User who created the override - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ shift_id: str created_by_user_id: int - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/shift_override_response.py b/rootly_sdk/models/shift_override_response.py index 81b10817..63b4796b 100644 --- a/rootly_sdk/models/shift_override_response.py +++ b/rootly_sdk/models/shift_override_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ShiftOverrideResponse: data (ShiftOverrideResponseData): """ - data: "ShiftOverrideResponseData" + data: ShiftOverrideResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/shift_override_response_data.py b/rootly_sdk/models/shift_override_response_data.py index 30c2fcd8..c290bb53 100644 --- a/rootly_sdk/models/shift_override_response_data.py +++ b/rootly_sdk/models/shift_override_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class ShiftOverrideResponseData: id: str type_: ShiftOverrideResponseDataType - attributes: "ShiftOverride" + attributes: ShiftOverride additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/shift_relationships.py b/rootly_sdk/models/shift_relationships.py index 0c6fc19b..f258b100 100644 --- a/rootly_sdk/models/shift_relationships.py +++ b/rootly_sdk/models/shift_relationships.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,26 +21,26 @@ class ShiftRelationships: """ Attributes: - shift_override (Union[Unset, ShiftRelationshipsShiftOverride]): - user (Union[Unset, ShiftRelationshipsUser]): - assignee (Union[Unset, ShiftRelationshipsAssignee]): Assignee can be either a User or Schedule + shift_override (ShiftRelationshipsShiftOverride | Unset): + user (ShiftRelationshipsUser | Unset): + assignee (ShiftRelationshipsAssignee | Unset): Assignee can be either a User or Schedule """ - shift_override: Union[Unset, "ShiftRelationshipsShiftOverride"] = UNSET - user: Union[Unset, "ShiftRelationshipsUser"] = UNSET - assignee: Union[Unset, "ShiftRelationshipsAssignee"] = UNSET + shift_override: ShiftRelationshipsShiftOverride | Unset = UNSET + user: ShiftRelationshipsUser | Unset = UNSET + assignee: ShiftRelationshipsAssignee | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - shift_override: Unset | dict[str, Any] = UNSET + shift_override: dict[str, Any] | Unset = UNSET if not isinstance(self.shift_override, Unset): shift_override = self.shift_override.to_dict() - user: Unset | dict[str, Any] = UNSET + user: dict[str, Any] | Unset = UNSET if not isinstance(self.user, Unset): user = self.user.to_dict() - assignee: Unset | dict[str, Any] = UNSET + assignee: dict[str, Any] | Unset = UNSET if not isinstance(self.assignee, Unset): assignee = self.assignee.to_dict() @@ -62,21 +64,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _shift_override = d.pop("shift_override", UNSET) - shift_override: Unset | ShiftRelationshipsShiftOverride + shift_override: ShiftRelationshipsShiftOverride | Unset if isinstance(_shift_override, Unset): shift_override = UNSET else: shift_override = ShiftRelationshipsShiftOverride.from_dict(_shift_override) _user = d.pop("user", UNSET) - user: Unset | ShiftRelationshipsUser + user: ShiftRelationshipsUser | Unset if isinstance(_user, Unset): user = UNSET else: user = ShiftRelationshipsUser.from_dict(_user) _assignee = d.pop("assignee", UNSET) - assignee: Unset | ShiftRelationshipsAssignee + assignee: ShiftRelationshipsAssignee | Unset if isinstance(_assignee, Unset): assignee = UNSET else: diff --git a/rootly_sdk/models/shift_relationships_assignee.py b/rootly_sdk/models/shift_relationships_assignee.py index fc798a60..8c75aa9a 100644 --- a/rootly_sdk/models/shift_relationships_assignee.py +++ b/rootly_sdk/models/shift_relationships_assignee.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +20,16 @@ class ShiftRelationshipsAssignee: """Assignee can be either a User or Schedule Attributes: - data (Union['ShiftRelationshipsAssigneeDataType0', None, Unset]): + data (None | ShiftRelationshipsAssigneeDataType0 | Unset): """ - data: Union["ShiftRelationshipsAssigneeDataType0", None, Unset] = UNSET + data: None | ShiftRelationshipsAssigneeDataType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.shift_relationships_assignee_data_type_0 import ShiftRelationshipsAssigneeDataType0 - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, ShiftRelationshipsAssigneeDataType0): @@ -49,7 +51,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_data(data: object) -> Union["ShiftRelationshipsAssigneeDataType0", None, Unset]: + def _parse_data(data: object) -> None | ShiftRelationshipsAssigneeDataType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -60,9 +62,9 @@ def _parse_data(data: object) -> Union["ShiftRelationshipsAssigneeDataType0", No data_type_0 = ShiftRelationshipsAssigneeDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ShiftRelationshipsAssigneeDataType0", None, Unset], data) + return cast(None | ShiftRelationshipsAssigneeDataType0 | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/shift_relationships_assignee_data_type_0.py b/rootly_sdk/models/shift_relationships_assignee_data_type_0.py index aeb1080c..6d1a4577 100644 --- a/rootly_sdk/models/shift_relationships_assignee_data_type_0.py +++ b/rootly_sdk/models/shift_relationships_assignee_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class ShiftRelationshipsAssigneeDataType0: """ Attributes: - id (Union[Unset, str]): - type_ (Union[Unset, str]): + id (str | Unset): + type_ (str | Unset): """ - id: Unset | str = UNSET - type_: Unset | str = UNSET + id: str | Unset = UNSET + type_: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/shift_relationships_shift_override.py b/rootly_sdk/models/shift_relationships_shift_override.py index d90fc42e..843e25e3 100644 --- a/rootly_sdk/models/shift_relationships_shift_override.py +++ b/rootly_sdk/models/shift_relationships_shift_override.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class ShiftRelationshipsShiftOverride: """ Attributes: - data (Union['ShiftRelationshipsShiftOverrideDataType0', None, Unset]): + data (None | ShiftRelationshipsShiftOverrideDataType0 | Unset): """ - data: Union["ShiftRelationshipsShiftOverrideDataType0", None, Unset] = UNSET + data: None | ShiftRelationshipsShiftOverrideDataType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.shift_relationships_shift_override_data_type_0 import ShiftRelationshipsShiftOverrideDataType0 - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, ShiftRelationshipsShiftOverrideDataType0): @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_data(data: object) -> Union["ShiftRelationshipsShiftOverrideDataType0", None, Unset]: + def _parse_data(data: object) -> None | ShiftRelationshipsShiftOverrideDataType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -59,9 +61,9 @@ def _parse_data(data: object) -> Union["ShiftRelationshipsShiftOverrideDataType0 data_type_0 = ShiftRelationshipsShiftOverrideDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ShiftRelationshipsShiftOverrideDataType0", None, Unset], data) + return cast(None | ShiftRelationshipsShiftOverrideDataType0 | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/shift_relationships_shift_override_data_type_0.py b/rootly_sdk/models/shift_relationships_shift_override_data_type_0.py index 914df41a..d5650162 100644 --- a/rootly_sdk/models/shift_relationships_shift_override_data_type_0.py +++ b/rootly_sdk/models/shift_relationships_shift_override_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class ShiftRelationshipsShiftOverrideDataType0: """ Attributes: - id (Union[Unset, str]): - type_ (Union[Unset, ShiftRelationshipsShiftOverrideDataType0Type]): + id (str | Unset): + type_ (ShiftRelationshipsShiftOverrideDataType0Type | Unset): """ - id: Unset | str = UNSET - type_: Unset | ShiftRelationshipsShiftOverrideDataType0Type = UNSET + id: str | Unset = UNSET + type_: ShiftRelationshipsShiftOverrideDataType0Type | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | ShiftRelationshipsShiftOverrideDataType0Type + type_: ShiftRelationshipsShiftOverrideDataType0Type | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/shift_relationships_user.py b/rootly_sdk/models/shift_relationships_user.py index b8b6e5f6..0e550589 100644 --- a/rootly_sdk/models/shift_relationships_user.py +++ b/rootly_sdk/models/shift_relationships_user.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class ShiftRelationshipsUser: """ Attributes: - data (Union['ShiftRelationshipsUserDataType0', None, Unset]): + data (None | ShiftRelationshipsUserDataType0 | Unset): """ - data: Union["ShiftRelationshipsUserDataType0", None, Unset] = UNSET + data: None | ShiftRelationshipsUserDataType0 | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: from ..models.shift_relationships_user_data_type_0 import ShiftRelationshipsUserDataType0 - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, ShiftRelationshipsUserDataType0): @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_data(data: object) -> Union["ShiftRelationshipsUserDataType0", None, Unset]: + def _parse_data(data: object) -> None | ShiftRelationshipsUserDataType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -59,9 +61,9 @@ def _parse_data(data: object) -> Union["ShiftRelationshipsUserDataType0", None, data_type_0 = ShiftRelationshipsUserDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["ShiftRelationshipsUserDataType0", None, Unset], data) + return cast(None | ShiftRelationshipsUserDataType0 | Unset, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/shift_relationships_user_data_type_0.py b/rootly_sdk/models/shift_relationships_user_data_type_0.py index d7a7fea9..edc4b248 100644 --- a/rootly_sdk/models/shift_relationships_user_data_type_0.py +++ b/rootly_sdk/models/shift_relationships_user_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class ShiftRelationshipsUserDataType0: """ Attributes: - id (Union[Unset, str]): - type_ (Union[Unset, ShiftRelationshipsUserDataType0Type]): + id (str | Unset): + type_ (ShiftRelationshipsUserDataType0Type | Unset): """ - id: Unset | str = UNSET - type_: Unset | ShiftRelationshipsUserDataType0Type = UNSET + id: str | Unset = UNSET + type_: ShiftRelationshipsUserDataType0Type | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _type_ = d.pop("type", UNSET) - type_: Unset | ShiftRelationshipsUserDataType0Type + type_: ShiftRelationshipsUserDataType0Type | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/simple_trigger_params.py b/rootly_sdk/models/simple_trigger_params.py index de2934e1..75b0f282 100644 --- a/rootly_sdk/models/simple_trigger_params.py +++ b/rootly_sdk/models/simple_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -22,17 +24,17 @@ class SimpleTriggerParams: """ Attributes: trigger_type (SimpleTriggerParamsTriggerType): - triggers (Union[Unset, list[SimpleTriggerParamsTriggersItem]]): + triggers (list[SimpleTriggerParamsTriggersItem] | Unset): """ trigger_type: SimpleTriggerParamsTriggerType - triggers: Unset | list[SimpleTriggerParamsTriggersItem] = UNSET + triggers: list[SimpleTriggerParamsTriggersItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: trigger_type: str = self.trigger_type - triggers: Unset | list[str] = UNSET + triggers: list[str] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = [] for triggers_item_data in self.triggers: @@ -56,12 +58,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) trigger_type = check_simple_trigger_params_trigger_type(d.pop("trigger_type")) - triggers = [] _triggers = d.pop("triggers", UNSET) - for triggers_item_data in _triggers or []: - triggers_item = check_simple_trigger_params_triggers_item(triggers_item_data) + triggers: list[SimpleTriggerParamsTriggersItem] | Unset = UNSET + if _triggers is not UNSET: + triggers = [] + for triggers_item_data in _triggers: + triggers_item = check_simple_trigger_params_triggers_item(triggers_item_data) - triggers.append(triggers_item) + triggers.append(triggers_item) simple_trigger_params = cls( trigger_type=trigger_type, diff --git a/rootly_sdk/models/sla.py b/rootly_sdk/models/sla.py new file mode 100644 index 00000000..a35b8bef --- /dev/null +++ b/rootly_sdk/models/sla.py @@ -0,0 +1,361 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sla_condition_match_type import SlaConditionMatchType, check_sla_condition_match_type +from ..models.sla_entity_type import SlaEntityType, check_sla_entity_type +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sla_conditions_item import SlaConditionsItem + from ..models.sla_notification_configurations_item import SlaNotificationConfigurationsItem + + +T = TypeVar("T", bound="Sla") + + +@_attrs_define +class Sla: + """ + Attributes: + name (str): The name of the SLA + condition_match_type (SlaConditionMatchType): Whether all or any conditions must match + assignment_deadline_days (int): Number of days for the assignment deadline + assignment_deadline_parent_status (str): The incident parent status that triggers the assignment deadline + completion_deadline_days (int): Number of days for the completion deadline + completion_deadline_parent_status (str): The incident parent status that triggers the completion deadline + created_at (str): Date of creation + updated_at (str): Date of last update + slug (str | Unset): The slug of the SLA + description (None | str | Unset): A description of the SLA + position (int | Unset): Position of the SLA for ordering + entity_type (SlaEntityType | Unset): The entity type this SLA applies to + manager_role_id (None | Unset | UUID): The ID of the manager incident role + manager_user_id (int | None | Unset): The ID of the manager user + assignment_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the assignment deadline + assignment_skip_weekends (bool | Unset): Whether to skip weekends when calculating the assignment deadline + completion_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the completion deadline + completion_skip_weekends (bool | Unset): Whether to skip weekends when calculating the completion deadline + conditions (list[SlaConditionsItem] | Unset): Conditions that determine which incidents this SLA applies to + notification_configurations (list[SlaNotificationConfigurationsItem] | Unset): Notification timing + configurations + """ + + name: str + condition_match_type: SlaConditionMatchType + assignment_deadline_days: int + assignment_deadline_parent_status: str + completion_deadline_days: int + completion_deadline_parent_status: str + created_at: str + updated_at: str + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | Unset = UNSET + entity_type: SlaEntityType | Unset = UNSET + manager_role_id: None | Unset | UUID = UNSET + manager_user_id: int | None | Unset = UNSET + assignment_deadline_sub_status_id: None | Unset | UUID = UNSET + assignment_skip_weekends: bool | Unset = UNSET + completion_deadline_sub_status_id: None | Unset | UUID = UNSET + completion_skip_weekends: bool | Unset = UNSET + conditions: list[SlaConditionsItem] | Unset = UNSET + notification_configurations: list[SlaNotificationConfigurationsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + condition_match_type: str = self.condition_match_type + + assignment_deadline_days = self.assignment_deadline_days + + assignment_deadline_parent_status = self.assignment_deadline_parent_status + + completion_deadline_days = self.completion_deadline_days + + completion_deadline_parent_status = self.completion_deadline_parent_status + + created_at = self.created_at + + updated_at = self.updated_at + + slug = self.slug + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + position = self.position + + entity_type: str | Unset = UNSET + if not isinstance(self.entity_type, Unset): + entity_type = self.entity_type + + manager_role_id: None | str | Unset + if isinstance(self.manager_role_id, Unset): + manager_role_id = UNSET + elif isinstance(self.manager_role_id, UUID): + manager_role_id = str(self.manager_role_id) + else: + manager_role_id = self.manager_role_id + + manager_user_id: int | None | Unset + if isinstance(self.manager_user_id, Unset): + manager_user_id = UNSET + else: + manager_user_id = self.manager_user_id + + assignment_deadline_sub_status_id: None | str | Unset + if isinstance(self.assignment_deadline_sub_status_id, Unset): + assignment_deadline_sub_status_id = UNSET + elif isinstance(self.assignment_deadline_sub_status_id, UUID): + assignment_deadline_sub_status_id = str(self.assignment_deadline_sub_status_id) + else: + assignment_deadline_sub_status_id = self.assignment_deadline_sub_status_id + + assignment_skip_weekends = self.assignment_skip_weekends + + completion_deadline_sub_status_id: None | str | Unset + if isinstance(self.completion_deadline_sub_status_id, Unset): + completion_deadline_sub_status_id = UNSET + elif isinstance(self.completion_deadline_sub_status_id, UUID): + completion_deadline_sub_status_id = str(self.completion_deadline_sub_status_id) + else: + completion_deadline_sub_status_id = self.completion_deadline_sub_status_id + + completion_skip_weekends = self.completion_skip_weekends + + conditions: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + conditions.append(conditions_item) + + notification_configurations: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.notification_configurations, Unset): + notification_configurations = [] + for notification_configurations_item_data in self.notification_configurations: + notification_configurations_item = notification_configurations_item_data.to_dict() + notification_configurations.append(notification_configurations_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "condition_match_type": condition_match_type, + "assignment_deadline_days": assignment_deadline_days, + "assignment_deadline_parent_status": assignment_deadline_parent_status, + "completion_deadline_days": completion_deadline_days, + "completion_deadline_parent_status": completion_deadline_parent_status, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if slug is not UNSET: + field_dict["slug"] = slug + if description is not UNSET: + field_dict["description"] = description + if position is not UNSET: + field_dict["position"] = position + if entity_type is not UNSET: + field_dict["entity_type"] = entity_type + if manager_role_id is not UNSET: + field_dict["manager_role_id"] = manager_role_id + if manager_user_id is not UNSET: + field_dict["manager_user_id"] = manager_user_id + if assignment_deadline_sub_status_id is not UNSET: + field_dict["assignment_deadline_sub_status_id"] = assignment_deadline_sub_status_id + if assignment_skip_weekends is not UNSET: + field_dict["assignment_skip_weekends"] = assignment_skip_weekends + if completion_deadline_sub_status_id is not UNSET: + field_dict["completion_deadline_sub_status_id"] = completion_deadline_sub_status_id + if completion_skip_weekends is not UNSET: + field_dict["completion_skip_weekends"] = completion_skip_weekends + if conditions is not UNSET: + field_dict["conditions"] = conditions + if notification_configurations is not UNSET: + field_dict["notification_configurations"] = notification_configurations + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sla_conditions_item import SlaConditionsItem + from ..models.sla_notification_configurations_item import SlaNotificationConfigurationsItem + + d = dict(src_dict) + name = d.pop("name") + + condition_match_type = check_sla_condition_match_type(d.pop("condition_match_type")) + + assignment_deadline_days = d.pop("assignment_deadline_days") + + assignment_deadline_parent_status = d.pop("assignment_deadline_parent_status") + + completion_deadline_days = d.pop("completion_deadline_days") + + completion_deadline_parent_status = d.pop("completion_deadline_parent_status") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + slug = d.pop("slug", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + position = d.pop("position", UNSET) + + _entity_type = d.pop("entity_type", UNSET) + entity_type: SlaEntityType | Unset + if isinstance(_entity_type, Unset): + entity_type = UNSET + else: + entity_type = check_sla_entity_type(_entity_type) + + def _parse_manager_role_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + manager_role_id_type_0 = UUID(data) + + return manager_role_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + manager_role_id = _parse_manager_role_id(d.pop("manager_role_id", UNSET)) + + def _parse_manager_user_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + manager_user_id = _parse_manager_user_id(d.pop("manager_user_id", UNSET)) + + def _parse_assignment_deadline_sub_status_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + assignment_deadline_sub_status_id_type_0 = UUID(data) + + return assignment_deadline_sub_status_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + assignment_deadline_sub_status_id = _parse_assignment_deadline_sub_status_id( + d.pop("assignment_deadline_sub_status_id", UNSET) + ) + + assignment_skip_weekends = d.pop("assignment_skip_weekends", UNSET) + + def _parse_completion_deadline_sub_status_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completion_deadline_sub_status_id_type_0 = UUID(data) + + return completion_deadline_sub_status_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + completion_deadline_sub_status_id = _parse_completion_deadline_sub_status_id( + d.pop("completion_deadline_sub_status_id", UNSET) + ) + + completion_skip_weekends = d.pop("completion_skip_weekends", UNSET) + + _conditions = d.pop("conditions", UNSET) + conditions: list[SlaConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = SlaConditionsItem.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _notification_configurations = d.pop("notification_configurations", UNSET) + notification_configurations: list[SlaNotificationConfigurationsItem] | Unset = UNSET + if _notification_configurations is not UNSET: + notification_configurations = [] + for notification_configurations_item_data in _notification_configurations: + notification_configurations_item = SlaNotificationConfigurationsItem.from_dict( + notification_configurations_item_data + ) + + notification_configurations.append(notification_configurations_item) + + sla = cls( + name=name, + condition_match_type=condition_match_type, + assignment_deadline_days=assignment_deadline_days, + assignment_deadline_parent_status=assignment_deadline_parent_status, + completion_deadline_days=completion_deadline_days, + completion_deadline_parent_status=completion_deadline_parent_status, + created_at=created_at, + updated_at=updated_at, + slug=slug, + description=description, + position=position, + entity_type=entity_type, + manager_role_id=manager_role_id, + manager_user_id=manager_user_id, + assignment_deadline_sub_status_id=assignment_deadline_sub_status_id, + assignment_skip_weekends=assignment_skip_weekends, + completion_deadline_sub_status_id=completion_deadline_sub_status_id, + completion_skip_weekends=completion_skip_weekends, + conditions=conditions, + notification_configurations=notification_configurations, + ) + + sla.additional_properties = d + return sla + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_condition_match_type.py b/rootly_sdk/models/sla_condition_match_type.py new file mode 100644 index 00000000..4f0303e9 --- /dev/null +++ b/rootly_sdk/models/sla_condition_match_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +SlaConditionMatchType = Literal["ALL", "ANY"] + +SLA_CONDITION_MATCH_TYPE_VALUES: set[SlaConditionMatchType] = { + "ALL", + "ANY", +} + + +def check_sla_condition_match_type(value: str | None) -> SlaConditionMatchType | None: + if value is None: + return None + if value in SLA_CONDITION_MATCH_TYPE_VALUES: + return cast(SlaConditionMatchType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SLA_CONDITION_MATCH_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/sla_conditions_item.py b/rootly_sdk/models/sla_conditions_item.py new file mode 100644 index 00000000..9a5b164e --- /dev/null +++ b/rootly_sdk/models/sla_conditions_item.py @@ -0,0 +1,188 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sla_conditions_item_conditionable_type import ( + SlaConditionsItemConditionableType, + check_sla_conditions_item_conditionable_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SlaConditionsItem") + + +@_attrs_define +class SlaConditionsItem: + """ + Attributes: + id (UUID | Unset): Unique ID of the condition + position (int | Unset): The position of the condition + conditionable_type (SlaConditionsItemConditionableType | Unset): The type of condition + property_ (None | str | Unset): The property to evaluate (for built-in field conditions) + operator (str | Unset): The comparison operator + values (list[str] | None | Unset): The values to compare against + form_field_id (None | Unset | UUID): The ID of the form field (for custom field conditions) + """ + + id: UUID | Unset = UNSET + position: int | Unset = UNSET + conditionable_type: SlaConditionsItemConditionableType | Unset = UNSET + property_: None | str | Unset = UNSET + operator: str | Unset = UNSET + values: list[str] | None | Unset = UNSET + form_field_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + position = self.position + + conditionable_type: str | Unset = UNSET + if not isinstance(self.conditionable_type, Unset): + conditionable_type = self.conditionable_type + + property_: None | str | Unset + if isinstance(self.property_, Unset): + property_ = UNSET + else: + property_ = self.property_ + + operator = self.operator + + values: list[str] | None | Unset + if isinstance(self.values, Unset): + values = UNSET + elif isinstance(self.values, list): + values = self.values + + else: + values = self.values + + form_field_id: None | str | Unset + if isinstance(self.form_field_id, Unset): + form_field_id = UNSET + elif isinstance(self.form_field_id, UUID): + form_field_id = str(self.form_field_id) + else: + form_field_id = self.form_field_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if position is not UNSET: + field_dict["position"] = position + if conditionable_type is not UNSET: + field_dict["conditionable_type"] = conditionable_type + if property_ is not UNSET: + field_dict["property"] = property_ + if operator is not UNSET: + field_dict["operator"] = operator + if values is not UNSET: + field_dict["values"] = values + if form_field_id is not UNSET: + field_dict["form_field_id"] = form_field_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + position = d.pop("position", UNSET) + + _conditionable_type = d.pop("conditionable_type", UNSET) + conditionable_type: SlaConditionsItemConditionableType | Unset + if isinstance(_conditionable_type, Unset): + conditionable_type = UNSET + else: + conditionable_type = check_sla_conditions_item_conditionable_type(_conditionable_type) + + def _parse_property_(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + property_ = _parse_property_(d.pop("property", UNSET)) + + operator = d.pop("operator", UNSET) + + def _parse_values(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + values_type_0 = cast(list[str], data) + + return values_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + values = _parse_values(d.pop("values", UNSET)) + + def _parse_form_field_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + form_field_id_type_0 = UUID(data) + + return form_field_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + form_field_id = _parse_form_field_id(d.pop("form_field_id", UNSET)) + + sla_conditions_item = cls( + id=id, + position=position, + conditionable_type=conditionable_type, + property_=property_, + operator=operator, + values=values, + form_field_id=form_field_id, + ) + + sla_conditions_item.additional_properties = d + return sla_conditions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_conditions_item_conditionable_type.py b/rootly_sdk/models/sla_conditions_item_conditionable_type.py new file mode 100644 index 00000000..3401ddf6 --- /dev/null +++ b/rootly_sdk/models/sla_conditions_item_conditionable_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +SlaConditionsItemConditionableType = Literal["SLAs::BuiltInFieldCondition", "SLAs::CustomFieldCondition"] + +SLA_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES: set[SlaConditionsItemConditionableType] = { + "SLAs::BuiltInFieldCondition", + "SLAs::CustomFieldCondition", +} + + +def check_sla_conditions_item_conditionable_type(value: str | None) -> SlaConditionsItemConditionableType | None: + if value is None: + return None + if value in SLA_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES: + return cast(SlaConditionsItemConditionableType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SLA_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/sla_entity_type.py b/rootly_sdk/models/sla_entity_type.py new file mode 100644 index 00000000..345e545f --- /dev/null +++ b/rootly_sdk/models/sla_entity_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +SlaEntityType = Literal["follow_up"] + +SLA_ENTITY_TYPE_VALUES: set[SlaEntityType] = { + "follow_up", +} + + +def check_sla_entity_type(value: str | None) -> SlaEntityType | None: + if value is None: + return None + if value in SLA_ENTITY_TYPE_VALUES: + return cast(SlaEntityType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SLA_ENTITY_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/sla_list.py b/rootly_sdk/models/sla_list.py new file mode 100644 index 00000000..e0f39cea --- /dev/null +++ b/rootly_sdk/models/sla_list.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.links import Links + from ..models.meta import Meta + from ..models.sla_list_data_item import SlaListDataItem + + +T = TypeVar("T", bound="SlaList") + + +@_attrs_define +class SlaList: + """ + Attributes: + data (list[SlaListDataItem]): + links (Links): + meta (Meta): + """ + + data: list[SlaListDataItem] + links: Links + meta: Meta + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + links = self.links.to_dict() + + meta = self.meta.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "links": links, + "meta": meta, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.links import Links + from ..models.meta import Meta + from ..models.sla_list_data_item import SlaListDataItem + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = SlaListDataItem.from_dict(data_item_data) + + data.append(data_item) + + links = Links.from_dict(d.pop("links")) + + meta = Meta.from_dict(d.pop("meta")) + + sla_list = cls( + data=data, + links=links, + meta=meta, + ) + + sla_list.additional_properties = d + return sla_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_list_data_item.py b/rootly_sdk/models/sla_list_data_item.py new file mode 100644 index 00000000..5b7c4779 --- /dev/null +++ b/rootly_sdk/models/sla_list_data_item.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sla_list_data_item_type import SlaListDataItemType, check_sla_list_data_item_type + +if TYPE_CHECKING: + from ..models.sla import Sla + + +T = TypeVar("T", bound="SlaListDataItem") + + +@_attrs_define +class SlaListDataItem: + """ + Attributes: + id (str): Unique ID of the SLA + type_ (SlaListDataItemType): + attributes (Sla): + """ + + id: str + type_: SlaListDataItemType + attributes: Sla + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sla import Sla + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_sla_list_data_item_type(d.pop("type")) + + attributes = Sla.from_dict(d.pop("attributes")) + + sla_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + sla_list_data_item.additional_properties = d + return sla_list_data_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_list_data_item_type.py b/rootly_sdk/models/sla_list_data_item_type.py new file mode 100644 index 00000000..aa372ff6 --- /dev/null +++ b/rootly_sdk/models/sla_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +SlaListDataItemType = Literal["slas"] + +SLA_LIST_DATA_ITEM_TYPE_VALUES: set[SlaListDataItemType] = { + "slas", +} + + +def check_sla_list_data_item_type(value: str | None) -> SlaListDataItemType | None: + if value is None: + return None + if value in SLA_LIST_DATA_ITEM_TYPE_VALUES: + return cast(SlaListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SLA_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/sla_notification_configurations_item.py b/rootly_sdk/models/sla_notification_configurations_item.py new file mode 100644 index 00000000..dfb47329 --- /dev/null +++ b/rootly_sdk/models/sla_notification_configurations_item.py @@ -0,0 +1,117 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sla_notification_configurations_item_offset_type import ( + SlaNotificationConfigurationsItemOffsetType, + check_sla_notification_configurations_item_offset_type, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SlaNotificationConfigurationsItem") + + +@_attrs_define +class SlaNotificationConfigurationsItem: + """ + Attributes: + id (UUID | Unset): Unique ID of the notification configuration + offset_type (SlaNotificationConfigurationsItemOffsetType | Unset): When to send the notification relative to the + deadline + offset_days (int | Unset): Number of days offset from the deadline + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + """ + + id: UUID | Unset = UNSET + offset_type: SlaNotificationConfigurationsItemOffsetType | Unset = UNSET + offset_days: int | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id: str | Unset = UNSET + if not isinstance(self.id, Unset): + id = str(self.id) + + offset_type: str | Unset = UNSET + if not isinstance(self.offset_type, Unset): + offset_type = self.offset_type + + offset_days = self.offset_days + + created_at = self.created_at + + updated_at = self.updated_at + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if offset_type is not UNSET: + field_dict["offset_type"] = offset_type + if offset_days is not UNSET: + field_dict["offset_days"] = offset_days + if created_at is not UNSET: + field_dict["created_at"] = created_at + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _id = d.pop("id", UNSET) + id: UUID | Unset + if isinstance(_id, Unset): + id = UNSET + else: + id = UUID(_id) + + _offset_type = d.pop("offset_type", UNSET) + offset_type: SlaNotificationConfigurationsItemOffsetType | Unset + if isinstance(_offset_type, Unset): + offset_type = UNSET + else: + offset_type = check_sla_notification_configurations_item_offset_type(_offset_type) + + offset_days = d.pop("offset_days", UNSET) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + sla_notification_configurations_item = cls( + id=id, + offset_type=offset_type, + offset_days=offset_days, + created_at=created_at, + updated_at=updated_at, + ) + + sla_notification_configurations_item.additional_properties = d + return sla_notification_configurations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_notification_configurations_item_offset_type.py b/rootly_sdk/models/sla_notification_configurations_item_offset_type.py new file mode 100644 index 00000000..1d49fb68 --- /dev/null +++ b/rootly_sdk/models/sla_notification_configurations_item_offset_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +SlaNotificationConfigurationsItemOffsetType = Literal["after_due", "before_due", "when_due"] + +SLA_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES: set[SlaNotificationConfigurationsItemOffsetType] = { + "after_due", + "before_due", + "when_due", +} + + +def check_sla_notification_configurations_item_offset_type( + value: str | None, +) -> SlaNotificationConfigurationsItemOffsetType | None: + if value is None: + return None + if value in SLA_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES: + return cast(SlaNotificationConfigurationsItemOffsetType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SLA_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/sla_response.py b/rootly_sdk/models/sla_response.py new file mode 100644 index 00000000..967627f5 --- /dev/null +++ b/rootly_sdk/models/sla_response.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sla_response_data import SlaResponseData + + +T = TypeVar("T", bound="SlaResponse") + + +@_attrs_define +class SlaResponse: + """ + Attributes: + data (SlaResponseData): + """ + + data: SlaResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sla_response_data import SlaResponseData + + d = dict(src_dict) + data = SlaResponseData.from_dict(d.pop("data")) + + sla_response = cls( + data=data, + ) + + sla_response.additional_properties = d + return sla_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_response_data.py b/rootly_sdk/models/sla_response_data.py new file mode 100644 index 00000000..b1b876c7 --- /dev/null +++ b/rootly_sdk/models/sla_response_data.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sla_response_data_type import SlaResponseDataType, check_sla_response_data_type + +if TYPE_CHECKING: + from ..models.sla import Sla + + +T = TypeVar("T", bound="SlaResponseData") + + +@_attrs_define +class SlaResponseData: + """ + Attributes: + id (str): Unique ID of the SLA + type_ (SlaResponseDataType): + attributes (Sla): + """ + + id: str + type_: SlaResponseDataType + attributes: Sla + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sla import Sla + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_sla_response_data_type(d.pop("type")) + + attributes = Sla.from_dict(d.pop("attributes")) + + sla_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + sla_response_data.additional_properties = d + return sla_response_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/sla_response_data_type.py b/rootly_sdk/models/sla_response_data_type.py new file mode 100644 index 00000000..6aca4e6d --- /dev/null +++ b/rootly_sdk/models/sla_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +SlaResponseDataType = Literal["slas"] + +SLA_RESPONSE_DATA_TYPE_VALUES: set[SlaResponseDataType] = { + "slas", +} + + +def check_sla_response_data_type(value: str | None) -> SlaResponseDataType | None: + if value is None: + return None + if value in SLA_RESPONSE_DATA_TYPE_VALUES: + return cast(SlaResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SLA_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/snapshot_datadog_graph_task_params.py b/rootly_sdk/models/snapshot_datadog_graph_task_params.py index f4a21240..a527230a 100644 --- a/rootly_sdk/models/snapshot_datadog_graph_task_params.py +++ b/rootly_sdk/models/snapshot_datadog_graph_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -25,42 +27,42 @@ class SnapshotDatadogGraphTaskParams: """ Attributes: past_duration (str): in format '1 minute', '30 days', '3 months', etc Example: 1 hour. - task_type (Union[Unset, SnapshotDatadogGraphTaskParamsTaskType]): - dashboards (Union[Unset, list['SnapshotDatadogGraphTaskParamsDashboardsItem']]): - metric_queries (Union[Unset, list[str]]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem']]): + task_type (SnapshotDatadogGraphTaskParamsTaskType | Unset): + dashboards (list[SnapshotDatadogGraphTaskParamsDashboardsItem] | Unset): + metric_queries (list[str] | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem] | Unset): """ past_duration: str - task_type: Unset | SnapshotDatadogGraphTaskParamsTaskType = UNSET - dashboards: Unset | list["SnapshotDatadogGraphTaskParamsDashboardsItem"] = UNSET - metric_queries: Unset | list[str] = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: SnapshotDatadogGraphTaskParamsTaskType | Unset = UNSET + dashboards: list[SnapshotDatadogGraphTaskParamsDashboardsItem] | Unset = UNSET + metric_queries: list[str] | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: past_duration = self.past_duration - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - dashboards: Unset | list[dict[str, Any]] = UNSET + dashboards: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.dashboards, Unset): dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() dashboards.append(dashboards_item) - metric_queries: Unset | list[str] = UNSET + metric_queries: list[str] | Unset = UNSET if not isinstance(self.metric_queries, Unset): metric_queries = self.metric_queries post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -100,31 +102,35 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: past_duration = d.pop("past_duration") _task_type = d.pop("task_type", UNSET) - task_type: Unset | SnapshotDatadogGraphTaskParamsTaskType + task_type: SnapshotDatadogGraphTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_snapshot_datadog_graph_task_params_task_type(_task_type) - dashboards = [] _dashboards = d.pop("dashboards", UNSET) - for dashboards_item_data in _dashboards or []: - dashboards_item = SnapshotDatadogGraphTaskParamsDashboardsItem.from_dict(dashboards_item_data) + dashboards: list[SnapshotDatadogGraphTaskParamsDashboardsItem] | Unset = UNSET + if _dashboards is not UNSET: + dashboards = [] + for dashboards_item_data in _dashboards: + dashboards_item = SnapshotDatadogGraphTaskParamsDashboardsItem.from_dict(dashboards_item_data) - dashboards.append(dashboards_item) + dashboards.append(dashboards_item) metric_queries = cast(list[str], d.pop("metric_queries", UNSET)) post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) snapshot_datadog_graph_task_params = cls( past_duration=past_duration, diff --git a/rootly_sdk/models/snapshot_datadog_graph_task_params_dashboards_item.py b/rootly_sdk/models/snapshot_datadog_graph_task_params_dashboards_item.py index 7b7b6330..9c746203 100644 --- a/rootly_sdk/models/snapshot_datadog_graph_task_params_dashboards_item.py +++ b/rootly_sdk/models/snapshot_datadog_graph_task_params_dashboards_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotDatadogGraphTaskParamsDashboardsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/snapshot_datadog_graph_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/snapshot_datadog_graph_task_params_post_to_slack_channels_item.py index ea37cf49..1e3ef6f9 100644 --- a/rootly_sdk/models/snapshot_datadog_graph_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/snapshot_datadog_graph_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py index 96877abd..dfda8c8d 100644 --- a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py +++ b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -26,16 +28,16 @@ class SnapshotGrafanaDashboardTaskParams: """ Attributes: - dashboards (list['SnapshotGrafanaDashboardTaskParamsDashboardsItem']): - task_type (Union[Unset, SnapshotGrafanaDashboardTaskParamsTaskType]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem']]): + dashboards (list[SnapshotGrafanaDashboardTaskParamsDashboardsItem]): + task_type (SnapshotGrafanaDashboardTaskParamsTaskType | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem] | Unset): """ - dashboards: list["SnapshotGrafanaDashboardTaskParamsDashboardsItem"] - task_type: Unset | SnapshotGrafanaDashboardTaskParamsTaskType = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem"] = UNSET + dashboards: list[SnapshotGrafanaDashboardTaskParamsDashboardsItem] + task_type: SnapshotGrafanaDashboardTaskParamsTaskType | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,13 +46,13 @@ def to_dict(self) -> dict[str, Any]: dashboards_item = dashboards_item_data.to_dict() dashboards.append(dashboards_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -91,7 +93,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dashboards.append(dashboards_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | SnapshotGrafanaDashboardTaskParamsTaskType + task_type: SnapshotGrafanaDashboardTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -99,14 +101,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) snapshot_grafana_dashboard_task_params = cls( dashboards=dashboards, diff --git a/rootly_sdk/models/snapshot_grafana_dashboard_task_params_dashboards_item.py b/rootly_sdk/models/snapshot_grafana_dashboard_task_params_dashboards_item.py index 4c028f49..7b0c3437 100644 --- a/rootly_sdk/models/snapshot_grafana_dashboard_task_params_dashboards_item.py +++ b/rootly_sdk/models/snapshot_grafana_dashboard_task_params_dashboards_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotGrafanaDashboardTaskParamsDashboardsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/snapshot_grafana_dashboard_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/snapshot_grafana_dashboard_task_params_post_to_slack_channels_item.py index 0edaa27c..cfa584d1 100644 --- a/rootly_sdk/models/snapshot_grafana_dashboard_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/snapshot_grafana_dashboard_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/snapshot_looker_look_task_params.py b/rootly_sdk/models/snapshot_looker_look_task_params.py index 87fb439c..f30ca13f 100644 --- a/rootly_sdk/models/snapshot_looker_look_task_params.py +++ b/rootly_sdk/models/snapshot_looker_look_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,16 +26,16 @@ class SnapshotLookerLookTaskParams: """ Attributes: - dashboards (list['SnapshotLookerLookTaskParamsDashboardsItem']): - task_type (Union[Unset, SnapshotLookerLookTaskParamsTaskType]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['SnapshotLookerLookTaskParamsPostToSlackChannelsItem']]): + dashboards (list[SnapshotLookerLookTaskParamsDashboardsItem]): + task_type (SnapshotLookerLookTaskParamsTaskType | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[SnapshotLookerLookTaskParamsPostToSlackChannelsItem] | Unset): """ - dashboards: list["SnapshotLookerLookTaskParamsDashboardsItem"] - task_type: Unset | SnapshotLookerLookTaskParamsTaskType = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["SnapshotLookerLookTaskParamsPostToSlackChannelsItem"] = UNSET + dashboards: list[SnapshotLookerLookTaskParamsDashboardsItem] + task_type: SnapshotLookerLookTaskParamsTaskType | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[SnapshotLookerLookTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,13 +44,13 @@ def to_dict(self) -> dict[str, Any]: dashboards_item = dashboards_item_data.to_dict() dashboards.append(dashboards_item) - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dashboards.append(dashboards_item) _task_type = d.pop("task_type", UNSET) - task_type: Unset | SnapshotLookerLookTaskParamsTaskType + task_type: SnapshotLookerLookTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -95,14 +97,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = SnapshotLookerLookTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[SnapshotLookerLookTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = SnapshotLookerLookTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) snapshot_looker_look_task_params = cls( dashboards=dashboards, diff --git a/rootly_sdk/models/snapshot_looker_look_task_params_dashboards_item.py b/rootly_sdk/models/snapshot_looker_look_task_params_dashboards_item.py index 3a5baf68..8f376d5f 100644 --- a/rootly_sdk/models/snapshot_looker_look_task_params_dashboards_item.py +++ b/rootly_sdk/models/snapshot_looker_look_task_params_dashboards_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotLookerLookTaskParamsDashboardsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/snapshot_looker_look_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/snapshot_looker_look_task_params_post_to_slack_channels_item.py index fde08d8f..919bbb01 100644 --- a/rootly_sdk/models/snapshot_looker_look_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/snapshot_looker_look_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotLookerLookTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/snapshot_new_relic_graph_task_params.py b/rootly_sdk/models/snapshot_new_relic_graph_task_params.py index aa99c427..364069f3 100644 --- a/rootly_sdk/models/snapshot_new_relic_graph_task_params.py +++ b/rootly_sdk/models/snapshot_new_relic_graph_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -29,16 +31,16 @@ class SnapshotNewRelicGraphTaskParams: Attributes: metric_query (str): metric_type (SnapshotNewRelicGraphTaskParamsMetricType): - task_type (Union[Unset, SnapshotNewRelicGraphTaskParamsTaskType]): - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem']]): + task_type (SnapshotNewRelicGraphTaskParamsTaskType | Unset): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem] | Unset): """ metric_query: str metric_type: SnapshotNewRelicGraphTaskParamsMetricType - task_type: Unset | SnapshotNewRelicGraphTaskParamsTaskType = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: SnapshotNewRelicGraphTaskParamsTaskType | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,13 +48,13 @@ def to_dict(self) -> dict[str, Any]: metric_type: str = self.metric_type - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -88,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: metric_type = check_snapshot_new_relic_graph_task_params_metric_type(d.pop("metric_type")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | SnapshotNewRelicGraphTaskParamsTaskType + task_type: SnapshotNewRelicGraphTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -96,14 +98,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) snapshot_new_relic_graph_task_params = cls( metric_query=metric_query, diff --git a/rootly_sdk/models/snapshot_new_relic_graph_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/snapshot_new_relic_graph_task_params_post_to_slack_channels_item.py index b56e5eee..143318a5 100644 --- a/rootly_sdk/models/snapshot_new_relic_graph_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/snapshot_new_relic_graph_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status.py b/rootly_sdk/models/status.py index 4059997d..629cb1f0 100644 --- a/rootly_sdk/models/status.py +++ b/rootly_sdk/models/status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,8 +20,8 @@ class Status: enabled (bool): created_at (str): updated_at (str): - slug (Union[Unset, str]): - description (Union[None, Unset, str]): + slug (str | Unset): + description (None | str | Unset): """ name: str @@ -27,8 +29,8 @@ class Status: enabled: bool created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -83,12 +85,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/status_list.py b/rootly_sdk/models/status_list.py index 90ef2bf7..56778c66 100644 --- a/rootly_sdk/models/status_list.py +++ b/rootly_sdk/models/status_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class StatusList: """ Attributes: - data (list['StatusListDataItem']): + data (list[StatusListDataItem]): links (Links): meta (Meta): """ - data: list["StatusListDataItem"] - links: "Links" - meta: "Meta" + data: list[StatusListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_list_data_item.py b/rootly_sdk/models/status_list_data_item.py index 6b27a0a1..14605fe4 100644 --- a/rootly_sdk/models/status_list_data_item.py +++ b/rootly_sdk/models/status_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class StatusListDataItem: id: str type_: StatusListDataItemType - attributes: "Status" + attributes: Status additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page.py b/rootly_sdk/models/status_page.py index 4201dc03..310d9446 100644 --- a/rootly_sdk/models/status_page.py +++ b/rootly_sdk/models/status_page.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,12 +14,20 @@ StatusPageSamlNameIdentifierFormat, check_status_page_saml_name_identifier_format, ) +from ..models.status_page_section_order_type_0_item import ( + StatusPageSectionOrderType0Item, + check_status_page_section_order_type_0_item, +) from ..models.status_page_show_uptime_last_days import ( StatusPageShowUptimeLastDays, check_status_page_show_uptime_last_days, ) from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.status_page_cname_records_type_0 import StatusPageCnameRecordsType0 + + T = TypeVar("T", bound="StatusPage") @@ -28,74 +38,81 @@ class StatusPage: title (str): The title of the status page created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the status page - public_title (Union[None, Unset, str]): The public title of the status page - description (Union[None, Unset, str]): The description of the status page - public_description (Union[None, Unset, str]): The public description of the status page - header_color (Union[None, Unset, str]): The color of the header. Eg. "#0061F2" - footer_color (Union[None, Unset, str]): The color of the footer. Eg. "#1F2F41" - allow_search_engine_index (Union[None, Unset, bool]): Allow search engines to include your public status page in + slug (str | Unset): The slug of the status page + public_title (None | str | Unset): The public title of the status page + description (None | str | Unset): The description of the status page + public_description (None | str | Unset): The public description of the status page + header_color (None | str | Unset): The color of the header. Eg. "#0061F2" + footer_color (None | str | Unset): The color of the footer. Eg. "#1F2F41" + allow_search_engine_index (bool | None | Unset): Allow search engines to include your public status page in search results - show_uptime (Union[None, Unset, bool]): Show uptime - show_uptime_last_days (Union[Unset, StatusPageShowUptimeLastDays]): Show uptime over x days - success_message (Union[None, Unset, str]): Message showing when all components are operational - failure_message (Union[None, Unset, str]): Message showing when at least one component is not operational - authentication_method (Union[Unset, StatusPageAuthenticationMethod]): Authentication method Default: 'none'. - authentication_enabled (Union[None, Unset, bool]): Enable authentication (deprecated - use authentication_method + show_uptime (bool | None | Unset): Show uptime + show_uptime_last_days (StatusPageShowUptimeLastDays | Unset): Show uptime over x days + success_message (None | str | Unset): Message showing when all components are operational + failure_message (None | str | Unset): Message showing when at least one component is not operational + authentication_method (StatusPageAuthenticationMethod | Unset): Authentication method Default: 'none'. + authentication_enabled (bool | None | Unset): Enable authentication (deprecated - use authentication_method instead) Default: False. - authentication_password (Union[None, Unset, str]): Authentication password - saml_idp_sso_service_url (Union[None, Unset, str]): SAML IdP SSO service URL - saml_idp_slo_service_url (Union[None, Unset, str]): SAML IdP SLO service URL - saml_idp_cert (Union[None, Unset, str]): SAML IdP certificate - saml_idp_cert_fingerprint (Union[None, Unset, str]): SAML IdP certificate fingerprint - saml_name_identifier_format (Union[Unset, StatusPageSamlNameIdentifierFormat]): SAML name identifier format - website_url (Union[None, Unset, str]): Website URL - website_privacy_url (Union[None, Unset, str]): Website Privacy URL - website_support_url (Union[None, Unset, str]): Website Support URL - ga_tracking_id (Union[None, Unset, str]): Google Analytics tracking ID - time_zone (Union[None, Unset, str]): A valid IANA time zone name. Default: 'Etc/UTC'. - public (Union[None, Unset, bool]): Make the status page accessible to the public - service_ids (Union[Unset, list[str]]): Services attached to the status page - functionality_ids (Union[Unset, list[str]]): Functionalities attached to the status page - external_domain_names (Union[Unset, list[str]]): External domain names attached to the status page - enabled (Union[None, Unset, bool]): Enabled / Disable the status page + authentication_password (None | str | Unset): Authentication password + saml_idp_sso_service_url (None | str | Unset): SAML IdP SSO service URL + saml_idp_slo_service_url (None | str | Unset): SAML IdP SLO service URL + saml_idp_cert (None | str | Unset): SAML IdP certificate + saml_idp_cert_fingerprint (None | str | Unset): SAML IdP certificate fingerprint + saml_name_identifier_format (StatusPageSamlNameIdentifierFormat | Unset): SAML name identifier format + section_order (list[StatusPageSectionOrderType0Item] | None | Unset): Order of sections on the status page + website_url (None | str | Unset): Website URL + website_privacy_url (None | str | Unset): Website Privacy URL + website_support_url (None | str | Unset): Website Support URL + ga_tracking_id (None | str | Unset): Google Analytics tracking ID + time_zone (None | str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. + public (bool | None | Unset): Make the status page accessible to the public + service_ids (list[str] | Unset): Services attached to the status page + functionality_ids (list[str] | Unset): Functionalities attached to the status page + external_domain_names (list[str] | Unset): External domain names attached to the status page + cname_records (None | StatusPageCnameRecordsType0 | Unset): CNAME records mapping external domain names to their + DNS target values. These are populated asynchronously after setting external_domain_names. + enabled (bool | None | Unset): Enabled / Disable the status page """ title: str created_at: str updated_at: str - slug: Unset | str = UNSET - public_title: None | Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - header_color: None | Unset | str = UNSET - footer_color: None | Unset | str = UNSET - allow_search_engine_index: None | Unset | bool = UNSET - show_uptime: None | Unset | bool = UNSET - show_uptime_last_days: Unset | StatusPageShowUptimeLastDays = UNSET - success_message: None | Unset | str = UNSET - failure_message: None | Unset | str = UNSET - authentication_method: Unset | StatusPageAuthenticationMethod = "none" - authentication_enabled: None | Unset | bool = False - authentication_password: None | Unset | str = UNSET - saml_idp_sso_service_url: None | Unset | str = UNSET - saml_idp_slo_service_url: None | Unset | str = UNSET - saml_idp_cert: None | Unset | str = UNSET - saml_idp_cert_fingerprint: None | Unset | str = UNSET - saml_name_identifier_format: Unset | StatusPageSamlNameIdentifierFormat = UNSET - website_url: None | Unset | str = UNSET - website_privacy_url: None | Unset | str = UNSET - website_support_url: None | Unset | str = UNSET - ga_tracking_id: None | Unset | str = UNSET - time_zone: None | Unset | str = "Etc/UTC" - public: None | Unset | bool = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - external_domain_names: Unset | list[str] = UNSET - enabled: None | Unset | bool = UNSET + slug: str | Unset = UNSET + public_title: None | str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + header_color: None | str | Unset = UNSET + footer_color: None | str | Unset = UNSET + allow_search_engine_index: bool | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: StatusPageShowUptimeLastDays | Unset = UNSET + success_message: None | str | Unset = UNSET + failure_message: None | str | Unset = UNSET + authentication_method: StatusPageAuthenticationMethod | Unset = "none" + authentication_enabled: bool | None | Unset = False + authentication_password: None | str | Unset = UNSET + saml_idp_sso_service_url: None | str | Unset = UNSET + saml_idp_slo_service_url: None | str | Unset = UNSET + saml_idp_cert: None | str | Unset = UNSET + saml_idp_cert_fingerprint: None | str | Unset = UNSET + saml_name_identifier_format: StatusPageSamlNameIdentifierFormat | Unset = UNSET + section_order: list[StatusPageSectionOrderType0Item] | None | Unset = UNSET + website_url: None | str | Unset = UNSET + website_privacy_url: None | str | Unset = UNSET + website_support_url: None | str | Unset = UNSET + ga_tracking_id: None | str | Unset = UNSET + time_zone: None | str | Unset = "Etc/UTC" + public: bool | None | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + external_domain_names: list[str] | Unset = UNSET + cname_records: None | StatusPageCnameRecordsType0 | Unset = UNSET + enabled: bool | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page_cname_records_type_0 import StatusPageCnameRecordsType0 + title = self.title created_at = self.created_at @@ -104,157 +121,177 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - public_title: None | Unset | str + public_title: None | str | Unset if isinstance(self.public_title, Unset): public_title = UNSET else: public_title = self.public_title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - header_color: None | Unset | str + header_color: None | str | Unset if isinstance(self.header_color, Unset): header_color = UNSET else: header_color = self.header_color - footer_color: None | Unset | str + footer_color: None | str | Unset if isinstance(self.footer_color, Unset): footer_color = UNSET else: footer_color = self.footer_color - allow_search_engine_index: None | Unset | bool + allow_search_engine_index: bool | None | Unset if isinstance(self.allow_search_engine_index, Unset): allow_search_engine_index = UNSET else: allow_search_engine_index = self.allow_search_engine_index - show_uptime: None | Unset | bool + show_uptime: bool | None | Unset if isinstance(self.show_uptime, Unset): show_uptime = UNSET else: show_uptime = self.show_uptime - show_uptime_last_days: Unset | int = UNSET + show_uptime_last_days: int | Unset = UNSET if not isinstance(self.show_uptime_last_days, Unset): show_uptime_last_days = self.show_uptime_last_days - success_message: None | Unset | str + success_message: None | str | Unset if isinstance(self.success_message, Unset): success_message = UNSET else: success_message = self.success_message - failure_message: None | Unset | str + failure_message: None | str | Unset if isinstance(self.failure_message, Unset): failure_message = UNSET else: failure_message = self.failure_message - authentication_method: Unset | str = UNSET + authentication_method: str | Unset = UNSET if not isinstance(self.authentication_method, Unset): authentication_method = self.authentication_method - authentication_enabled: None | Unset | bool + authentication_enabled: bool | None | Unset if isinstance(self.authentication_enabled, Unset): authentication_enabled = UNSET else: authentication_enabled = self.authentication_enabled - authentication_password: None | Unset | str + authentication_password: None | str | Unset if isinstance(self.authentication_password, Unset): authentication_password = UNSET else: authentication_password = self.authentication_password - saml_idp_sso_service_url: None | Unset | str + saml_idp_sso_service_url: None | str | Unset if isinstance(self.saml_idp_sso_service_url, Unset): saml_idp_sso_service_url = UNSET else: saml_idp_sso_service_url = self.saml_idp_sso_service_url - saml_idp_slo_service_url: None | Unset | str + saml_idp_slo_service_url: None | str | Unset if isinstance(self.saml_idp_slo_service_url, Unset): saml_idp_slo_service_url = UNSET else: saml_idp_slo_service_url = self.saml_idp_slo_service_url - saml_idp_cert: None | Unset | str + saml_idp_cert: None | str | Unset if isinstance(self.saml_idp_cert, Unset): saml_idp_cert = UNSET else: saml_idp_cert = self.saml_idp_cert - saml_idp_cert_fingerprint: None | Unset | str + saml_idp_cert_fingerprint: None | str | Unset if isinstance(self.saml_idp_cert_fingerprint, Unset): saml_idp_cert_fingerprint = UNSET else: saml_idp_cert_fingerprint = self.saml_idp_cert_fingerprint - saml_name_identifier_format: Unset | str = UNSET + saml_name_identifier_format: str | Unset = UNSET if not isinstance(self.saml_name_identifier_format, Unset): saml_name_identifier_format = self.saml_name_identifier_format - website_url: None | Unset | str + section_order: list[str] | None | Unset + if isinstance(self.section_order, Unset): + section_order = UNSET + elif isinstance(self.section_order, list): + section_order = [] + for section_order_type_0_item_data in self.section_order: + section_order_type_0_item: str = section_order_type_0_item_data + section_order.append(section_order_type_0_item) + + else: + section_order = self.section_order + + website_url: None | str | Unset if isinstance(self.website_url, Unset): website_url = UNSET else: website_url = self.website_url - website_privacy_url: None | Unset | str + website_privacy_url: None | str | Unset if isinstance(self.website_privacy_url, Unset): website_privacy_url = UNSET else: website_privacy_url = self.website_privacy_url - website_support_url: None | Unset | str + website_support_url: None | str | Unset if isinstance(self.website_support_url, Unset): website_support_url = UNSET else: website_support_url = self.website_support_url - ga_tracking_id: None | Unset | str + ga_tracking_id: None | str | Unset if isinstance(self.ga_tracking_id, Unset): ga_tracking_id = UNSET else: ga_tracking_id = self.ga_tracking_id - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: time_zone = self.time_zone - public: None | Unset | bool + public: bool | None | Unset if isinstance(self.public, Unset): public = UNSET else: public = self.public - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - external_domain_names: Unset | list[str] = UNSET + external_domain_names: list[str] | Unset = UNSET if not isinstance(self.external_domain_names, Unset): external_domain_names = self.external_domain_names - enabled: None | Unset | bool + cname_records: dict[str, Any] | None | Unset + if isinstance(self.cname_records, Unset): + cname_records = UNSET + elif isinstance(self.cname_records, StatusPageCnameRecordsType0): + cname_records = self.cname_records.to_dict() + else: + cname_records = self.cname_records + + enabled: bool | None | Unset if isinstance(self.enabled, Unset): enabled = UNSET else: @@ -307,6 +344,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["saml_idp_cert_fingerprint"] = saml_idp_cert_fingerprint if saml_name_identifier_format is not UNSET: field_dict["saml_name_identifier_format"] = saml_name_identifier_format + if section_order is not UNSET: + field_dict["section_order"] = section_order if website_url is not UNSET: field_dict["website_url"] = website_url if website_privacy_url is not UNSET: @@ -325,6 +364,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["functionality_ids"] = functionality_ids if external_domain_names is not UNSET: field_dict["external_domain_names"] = external_domain_names + if cname_records is not UNSET: + field_dict["cname_records"] = cname_records if enabled is not UNSET: field_dict["enabled"] = enabled @@ -332,6 +373,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.status_page_cname_records_type_0 import StatusPageCnameRecordsType0 + d = dict(src_dict) title = d.pop("title") @@ -341,213 +384,237 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_public_title(data: object) -> None | Unset | str: + def _parse_public_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_title = _parse_public_title(d.pop("public_title", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_header_color(data: object) -> None | Unset | str: + def _parse_header_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) header_color = _parse_header_color(d.pop("header_color", UNSET)) - def _parse_footer_color(data: object) -> None | Unset | str: + def _parse_footer_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) footer_color = _parse_footer_color(d.pop("footer_color", UNSET)) - def _parse_allow_search_engine_index(data: object) -> None | Unset | bool: + def _parse_allow_search_engine_index(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) allow_search_engine_index = _parse_allow_search_engine_index(d.pop("allow_search_engine_index", UNSET)) - def _parse_show_uptime(data: object) -> None | Unset | bool: + def _parse_show_uptime(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) _show_uptime_last_days = d.pop("show_uptime_last_days", UNSET) - show_uptime_last_days: Unset | StatusPageShowUptimeLastDays + show_uptime_last_days: StatusPageShowUptimeLastDays | Unset if isinstance(_show_uptime_last_days, Unset): show_uptime_last_days = UNSET else: show_uptime_last_days = check_status_page_show_uptime_last_days(_show_uptime_last_days) - def _parse_success_message(data: object) -> None | Unset | str: + def _parse_success_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) success_message = _parse_success_message(d.pop("success_message", UNSET)) - def _parse_failure_message(data: object) -> None | Unset | str: + def _parse_failure_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) failure_message = _parse_failure_message(d.pop("failure_message", UNSET)) _authentication_method = d.pop("authentication_method", UNSET) - authentication_method: Unset | StatusPageAuthenticationMethod + authentication_method: StatusPageAuthenticationMethod | Unset if isinstance(_authentication_method, Unset): authentication_method = UNSET else: authentication_method = check_status_page_authentication_method(_authentication_method) - def _parse_authentication_enabled(data: object) -> None | Unset | bool: + def _parse_authentication_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) authentication_enabled = _parse_authentication_enabled(d.pop("authentication_enabled", UNSET)) - def _parse_authentication_password(data: object) -> None | Unset | str: + def _parse_authentication_password(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) authentication_password = _parse_authentication_password(d.pop("authentication_password", UNSET)) - def _parse_saml_idp_sso_service_url(data: object) -> None | Unset | str: + def _parse_saml_idp_sso_service_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_sso_service_url = _parse_saml_idp_sso_service_url(d.pop("saml_idp_sso_service_url", UNSET)) - def _parse_saml_idp_slo_service_url(data: object) -> None | Unset | str: + def _parse_saml_idp_slo_service_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_slo_service_url = _parse_saml_idp_slo_service_url(d.pop("saml_idp_slo_service_url", UNSET)) - def _parse_saml_idp_cert(data: object) -> None | Unset | str: + def _parse_saml_idp_cert(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_cert = _parse_saml_idp_cert(d.pop("saml_idp_cert", UNSET)) - def _parse_saml_idp_cert_fingerprint(data: object) -> None | Unset | str: + def _parse_saml_idp_cert_fingerprint(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_cert_fingerprint = _parse_saml_idp_cert_fingerprint(d.pop("saml_idp_cert_fingerprint", UNSET)) _saml_name_identifier_format = d.pop("saml_name_identifier_format", UNSET) - saml_name_identifier_format: Unset | StatusPageSamlNameIdentifierFormat + saml_name_identifier_format: StatusPageSamlNameIdentifierFormat | Unset if isinstance(_saml_name_identifier_format, Unset): saml_name_identifier_format = UNSET else: saml_name_identifier_format = check_status_page_saml_name_identifier_format(_saml_name_identifier_format) - def _parse_website_url(data: object) -> None | Unset | str: + def _parse_section_order(data: object) -> list[StatusPageSectionOrderType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + section_order_type_0 = [] + _section_order_type_0 = data + for section_order_type_0_item_data in _section_order_type_0: + section_order_type_0_item = check_status_page_section_order_type_0_item( + section_order_type_0_item_data + ) + + section_order_type_0.append(section_order_type_0_item) + + return section_order_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[StatusPageSectionOrderType0Item] | None | Unset, data) + + section_order = _parse_section_order(d.pop("section_order", UNSET)) + + def _parse_website_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_url = _parse_website_url(d.pop("website_url", UNSET)) - def _parse_website_privacy_url(data: object) -> None | Unset | str: + def _parse_website_privacy_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_privacy_url = _parse_website_privacy_url(d.pop("website_privacy_url", UNSET)) - def _parse_website_support_url(data: object) -> None | Unset | str: + def _parse_website_support_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_support_url = _parse_website_support_url(d.pop("website_support_url", UNSET)) - def _parse_ga_tracking_id(data: object) -> None | Unset | str: + def _parse_ga_tracking_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) ga_tracking_id = _parse_ga_tracking_id(d.pop("ga_tracking_id", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) - def _parse_public(data: object) -> None | Unset | bool: + def _parse_public(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) public = _parse_public(d.pop("public", UNSET)) @@ -557,12 +624,29 @@ def _parse_public(data: object) -> None | Unset | bool: external_domain_names = cast(list[str], d.pop("external_domain_names", UNSET)) - def _parse_enabled(data: object) -> None | Unset | bool: + def _parse_cname_records(data: object) -> None | StatusPageCnameRecordsType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + cname_records_type_0 = StatusPageCnameRecordsType0.from_dict(data) + + return cname_records_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | StatusPageCnameRecordsType0 | Unset, data) + + cname_records = _parse_cname_records(d.pop("cname_records", UNSET)) + + def _parse_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) enabled = _parse_enabled(d.pop("enabled", UNSET)) @@ -589,6 +673,7 @@ def _parse_enabled(data: object) -> None | Unset | bool: saml_idp_cert=saml_idp_cert, saml_idp_cert_fingerprint=saml_idp_cert_fingerprint, saml_name_identifier_format=saml_name_identifier_format, + section_order=section_order, website_url=website_url, website_privacy_url=website_privacy_url, website_support_url=website_support_url, @@ -598,6 +683,7 @@ def _parse_enabled(data: object) -> None | Unset | bool: service_ids=service_ids, functionality_ids=functionality_ids, external_domain_names=external_domain_names, + cname_records=cname_records, enabled=enabled, ) diff --git a/rootly_sdk/models/status_page_cname_records_type_0.py b/rootly_sdk/models/status_page_cname_records_type_0.py new file mode 100644 index 00000000..372a2510 --- /dev/null +++ b/rootly_sdk/models/status_page_cname_records_type_0.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StatusPageCnameRecordsType0") + + +@_attrs_define +class StatusPageCnameRecordsType0: + """CNAME records mapping external domain names to their DNS target values. These are populated asynchronously after + setting external_domain_names. + + """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + status_page_cname_records_type_0 = cls() + + status_page_cname_records_type_0.additional_properties = d + return status_page_cname_records_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/status_page_list.py b/rootly_sdk/models/status_page_list.py index 2eb46282..7522d23a 100644 --- a/rootly_sdk/models/status_page_list.py +++ b/rootly_sdk/models/status_page_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class StatusPageList: """ Attributes: - data (list['StatusPageListDataItem']): + data (list[StatusPageListDataItem]): links (Links): meta (Meta): """ - data: list["StatusPageListDataItem"] - links: "Links" - meta: "Meta" + data: list[StatusPageListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_list_data_item.py b/rootly_sdk/models/status_page_list_data_item.py index e1f97706..997d37f3 100644 --- a/rootly_sdk/models/status_page_list_data_item.py +++ b/rootly_sdk/models/status_page_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class StatusPageListDataItem: id: str type_: StatusPageListDataItemType - attributes: "StatusPage" + attributes: StatusPage additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_response.py b/rootly_sdk/models/status_page_response.py index 7b84477d..6e42cf5d 100644 --- a/rootly_sdk/models/status_page_response.py +++ b/rootly_sdk/models/status_page_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class StatusPageResponse: data (StatusPageResponseData): """ - data: "StatusPageResponseData" + data: StatusPageResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_response_data.py b/rootly_sdk/models/status_page_response_data.py index 84a57c52..6c86f9e6 100644 --- a/rootly_sdk/models/status_page_response_data.py +++ b/rootly_sdk/models/status_page_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class StatusPageResponseData: id: str type_: StatusPageResponseDataType - attributes: "StatusPage" + attributes: StatusPage additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_section_order_type_0_item.py b/rootly_sdk/models/status_page_section_order_type_0_item.py new file mode 100644 index 00000000..c542f520 --- /dev/null +++ b/rootly_sdk/models/status_page_section_order_type_0_item.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +StatusPageSectionOrderType0Item = Literal["incidents", "maintenance", "system_status"] + +STATUS_PAGE_SECTION_ORDER_TYPE_0_ITEM_VALUES: set[StatusPageSectionOrderType0Item] = { + "incidents", + "maintenance", + "system_status", +} + + +def check_status_page_section_order_type_0_item(value: str | None) -> StatusPageSectionOrderType0Item | None: + if value is None: + return None + if value in STATUS_PAGE_SECTION_ORDER_TYPE_0_ITEM_VALUES: + return cast(StatusPageSectionOrderType0Item, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {STATUS_PAGE_SECTION_ORDER_TYPE_0_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/status_page_template.py b/rootly_sdk/models/status_page_template.py index 993227c1..082b8b2b 100644 --- a/rootly_sdk/models/status_page_template.py +++ b/rootly_sdk/models/status_page_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -19,12 +21,12 @@ class StatusPageTemplate: body (str): Description of the event the template will populate created_at (str): Date of creation updated_at (str): Date of last update - update_title (Union[None, Unset, str]): Title that will be used for the status page update - update_status (Union[None, Unset, str]): Status of the event the template will populate - kind (Union[Unset, StatusPageTemplateKind]): The kind of the status page template - should_notify_subscribers (Union[None, Unset, bool]): Controls if incident subscribers should be notified - enabled (Union[None, Unset, bool]): Enable / Disable the status page template - position (Union[Unset, int]): Position of the workflow task + update_title (None | str | Unset): Title that will be used for the status page update + update_status (None | str | Unset): Status of the event the template will populate + kind (StatusPageTemplateKind | Unset): The kind of the status page template + should_notify_subscribers (bool | None | Unset): Controls if incident subscribers should be notified + enabled (bool | None | Unset): Enable / Disable the status page template + position (int | Unset): Position of the workflow task """ status_page_id: str @@ -32,12 +34,12 @@ class StatusPageTemplate: body: str created_at: str updated_at: str - update_title: None | Unset | str = UNSET - update_status: None | Unset | str = UNSET - kind: Unset | StatusPageTemplateKind = UNSET - should_notify_subscribers: None | Unset | bool = UNSET - enabled: None | Unset | bool = UNSET - position: Unset | int = UNSET + update_title: None | str | Unset = UNSET + update_status: None | str | Unset = UNSET + kind: StatusPageTemplateKind | Unset = UNSET + should_notify_subscribers: bool | None | Unset = UNSET + enabled: bool | None | Unset = UNSET + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,29 +53,29 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - update_title: None | Unset | str + update_title: None | str | Unset if isinstance(self.update_title, Unset): update_title = UNSET else: update_title = self.update_title - update_status: None | Unset | str + update_status: None | str | Unset if isinstance(self.update_status, Unset): update_status = UNSET else: update_status = self.update_status - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - should_notify_subscribers: None | Unset | bool + should_notify_subscribers: bool | None | Unset if isinstance(self.should_notify_subscribers, Unset): should_notify_subscribers = UNSET else: should_notify_subscribers = self.should_notify_subscribers - enabled: None | Unset | bool + enabled: bool | None | Unset if isinstance(self.enabled, Unset): enabled = UNSET else: @@ -120,46 +122,46 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_update_title(data: object) -> None | Unset | str: + def _parse_update_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_title = _parse_update_title(d.pop("update_title", UNSET)) - def _parse_update_status(data: object) -> None | Unset | str: + def _parse_update_status(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_status = _parse_update_status(d.pop("update_status", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | StatusPageTemplateKind + kind: StatusPageTemplateKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_status_page_template_kind(_kind) - def _parse_should_notify_subscribers(data: object) -> None | Unset | bool: + def _parse_should_notify_subscribers(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) should_notify_subscribers = _parse_should_notify_subscribers(d.pop("should_notify_subscribers", UNSET)) - def _parse_enabled(data: object) -> None | Unset | bool: + def _parse_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) enabled = _parse_enabled(d.pop("enabled", UNSET)) diff --git a/rootly_sdk/models/status_page_template_list.py b/rootly_sdk/models/status_page_template_list.py index b1f43624..798c5c46 100644 --- a/rootly_sdk/models/status_page_template_list.py +++ b/rootly_sdk/models/status_page_template_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class StatusPageTemplateList: """ Attributes: - data (list['StatusPageTemplateListDataItem']): + data (list[StatusPageTemplateListDataItem]): links (Links): meta (Meta): """ - data: list["StatusPageTemplateListDataItem"] - links: "Links" - meta: "Meta" + data: list[StatusPageTemplateListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_template_list_data_item.py b/rootly_sdk/models/status_page_template_list_data_item.py index 9a0b4d49..ae1a0142 100644 --- a/rootly_sdk/models/status_page_template_list_data_item.py +++ b/rootly_sdk/models/status_page_template_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class StatusPageTemplateListDataItem: id: str type_: StatusPageTemplateListDataItemType - attributes: "StatusPageTemplate" + attributes: StatusPageTemplate additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_template_response.py b/rootly_sdk/models/status_page_template_response.py index d48aea72..0152dc65 100644 --- a/rootly_sdk/models/status_page_template_response.py +++ b/rootly_sdk/models/status_page_template_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class StatusPageTemplateResponse: data (StatusPageTemplateResponseData): """ - data: "StatusPageTemplateResponseData" + data: StatusPageTemplateResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_page_template_response_data.py b/rootly_sdk/models/status_page_template_response_data.py index b79e157e..aa4d8b7a 100644 --- a/rootly_sdk/models/status_page_template_response_data.py +++ b/rootly_sdk/models/status_page_template_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class StatusPageTemplateResponseData: id: str type_: StatusPageTemplateResponseDataType - attributes: "StatusPageTemplate" + attributes: StatusPageTemplate additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_response.py b/rootly_sdk/models/status_response.py index e47cbeda..e7d2809e 100644 --- a/rootly_sdk/models/status_response.py +++ b/rootly_sdk/models/status_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class StatusResponse: data (StatusResponseData): """ - data: "StatusResponseData" + data: StatusResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/status_response_data.py b/rootly_sdk/models/status_response_data.py index 973536c0..d5ff8e77 100644 --- a/rootly_sdk/models/status_response_data.py +++ b/rootly_sdk/models/status_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class StatusResponseData: id: str type_: StatusResponseDataType - attributes: "Status" + attributes: Status additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/sub_status.py b/rootly_sdk/models/sub_status.py index 890672f8..6018ef9b 100644 --- a/rootly_sdk/models/sub_status.py +++ b/rootly_sdk/models/sub_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,18 +20,18 @@ class SubStatus: parent_status (SubStatusParentStatus): created_at (str): updated_at (str): - slug (Union[Unset, str]): - description (Union[None, Unset, str]): - position (Union[None, Unset, int]): + slug (str | Unset): + description (None | str | Unset): + position (int | None | Unset): """ name: str parent_status: SubStatusParentStatus created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -43,13 +45,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -87,21 +89,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/sub_status_list.py b/rootly_sdk/models/sub_status_list.py index 8d40964c..850597d9 100644 --- a/rootly_sdk/models/sub_status_list.py +++ b/rootly_sdk/models/sub_status_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class SubStatusList: """ Attributes: - data (list['SubStatusListDataItem']): + data (list[SubStatusListDataItem]): links (Links): meta (Meta): """ - data: list["SubStatusListDataItem"] - links: "Links" - meta: "Meta" + data: list[SubStatusListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/sub_status_list_data_item.py b/rootly_sdk/models/sub_status_list_data_item.py index 364a7b4e..2fa6ad7e 100644 --- a/rootly_sdk/models/sub_status_list_data_item.py +++ b/rootly_sdk/models/sub_status_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class SubStatusListDataItem: id: str type_: SubStatusListDataItemType - attributes: "SubStatus" + attributes: SubStatus additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/sub_status_response.py b/rootly_sdk/models/sub_status_response.py index 13fffc65..d990432b 100644 --- a/rootly_sdk/models/sub_status_response.py +++ b/rootly_sdk/models/sub_status_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class SubStatusResponse: data (SubStatusResponseData): """ - data: "SubStatusResponseData" + data: SubStatusResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/sub_status_response_data.py b/rootly_sdk/models/sub_status_response_data.py index 7766e6a6..065a8226 100644 --- a/rootly_sdk/models/sub_status_response_data.py +++ b/rootly_sdk/models/sub_status_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class SubStatusResponseData: id: str type_: SubStatusResponseDataType - attributes: "SubStatus" + attributes: SubStatus additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/team.py b/rootly_sdk/models/team.py index 7a06786c..a8c10f4f 100644 --- a/rootly_sdk/models/team.py +++ b/rootly_sdk/models/team.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,8 +10,8 @@ if TYPE_CHECKING: from ..models.team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 - from ..models.team_fields_type_0_item import TeamFieldsType0Item from ..models.team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 + from ..models.team_properties_type_0_item import TeamPropertiesType0Item from ..models.team_slack_aliases_type_0_item import TeamSlackAliasesType0Item from ..models.team_slack_channels_type_0_item import TeamSlackChannelsType0Item @@ -24,71 +26,68 @@ class Team: name (str): The name of the team created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): - description (Union[None, Unset, str]): The description of the team - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the team - color (Union[None, Unset, str]): The hex color of the team - position (Union[None, Unset, int]): Position of the team - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this team. eg: + slug (str | Unset): + description (None | str | Unset): The description of the team + notify_emails (list[str] | None | Unset): Emails to attach to the team + color (None | str | Unset): The hex color of the team + position (int | None | Unset): Position of the team + backstage_id (None | str | Unset): The Backstage entity id associated to this team. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this team - pagerduty_id (Union[None, Unset, str]): The PagerDuty group id associated to this team - pagerduty_service_id (Union[None, Unset, str]): The PagerDuty service id associated to this team - opsgenie_id (Union[None, Unset, str]): The Opsgenie group id associated to this team - victor_ops_id (Union[None, Unset, str]): The VictorOps group id associated to this team - pagertree_id (Union[None, Unset, str]): The PagerTree group id associated to this team - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this team - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this team - user_ids (Union[None, Unset, list[int]]): The user ids of the members of this team. - admin_ids (Union[None, Unset, list[int]]): The user ids of the admins of this team. These users must also be - present in user_ids attribute. - alerts_email_enabled (Union[None, Unset, bool]): Enable alerts through email - alerts_email_address (Union[None, Unset, str]): Email generated to send alerts to - alert_urgency_id (Union[None, Unset, str]): The alert urgency id of the team - slack_channels (Union[None, Unset, list['TeamSlackChannelsType0Item']]): Slack Channels associated with this - team - slack_aliases (Union[None, Unset, list['TeamSlackAliasesType0Item']]): Slack Aliases associated with this team - alert_broadcast_enabled (Union[None, Unset, bool]): Enable alerts to be broadcasted to a specific channel - alert_broadcast_channel (Union['TeamAlertBroadcastChannelType0', None, Unset]): Slack channel to broadcast - alerts to - incident_broadcast_enabled (Union[None, Unset, bool]): Enable incidents to be broadcasted to a specific channel - incident_broadcast_channel (Union['TeamIncidentBroadcastChannelType0', None, Unset]): Slack channel to broadcast + external_id (None | str | Unset): The external id associated to this team + pagerduty_id (None | str | Unset): The PagerDuty group id associated to this team + pagerduty_service_id (None | str | Unset): The PagerDuty service id associated to this team + opsgenie_id (None | str | Unset): The Opsgenie group id associated to this team + victor_ops_id (None | str | Unset): The VictorOps group id associated to this team + pagertree_id (None | str | Unset): The PagerTree group id associated to this team + cortex_id (None | str | Unset): The Cortex group id associated to this team + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this team + user_ids (list[int] | None | Unset): The user ids of the members of this team. + admin_ids (list[int] | None | Unset): The user ids of the admins of this team. These users must also be present + in user_ids attribute. + alerts_email_enabled (bool | None | Unset): Enable alerts through email + alerts_email_address (None | str | Unset): Email generated to send alerts to + alert_urgency_id (None | str | Unset): The alert urgency id of the team + slack_channels (list[TeamSlackChannelsType0Item] | None | Unset): Slack Channels associated with this team + slack_aliases (list[TeamSlackAliasesType0Item] | None | Unset): Slack Aliases associated with this team + alert_broadcast_enabled (bool | None | Unset): Enable alerts to be broadcasted to a specific channel + alert_broadcast_channel (None | TeamAlertBroadcastChannelType0 | Unset): Slack channel to broadcast alerts to + incident_broadcast_enabled (bool | None | Unset): Enable incidents to be broadcasted to a specific channel + incident_broadcast_channel (None | TeamIncidentBroadcastChannelType0 | Unset): Slack channel to broadcast incidents to - auto_add_members_when_attached (Union[None, Unset, bool]): Auto add members to incident channel when team is - attached - fields (Union[None, Unset, list['TeamFieldsType0Item']]): Array of field values for this team. + auto_add_members_when_attached (bool | None | Unset): Auto add members to incident channel when team is attached + properties (list[TeamPropertiesType0Item] | None | Unset): Array of property values for this team. """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - pagerduty_service_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - victor_ops_id: None | Unset | str = UNSET - pagertree_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - user_ids: None | Unset | list[int] = UNSET - admin_ids: None | Unset | list[int] = UNSET - alerts_email_enabled: None | Unset | bool = UNSET - alerts_email_address: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - slack_channels: None | Unset | list["TeamSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["TeamSlackAliasesType0Item"] = UNSET - alert_broadcast_enabled: None | Unset | bool = UNSET - alert_broadcast_channel: Union["TeamAlertBroadcastChannelType0", None, Unset] = UNSET - incident_broadcast_enabled: None | Unset | bool = UNSET - incident_broadcast_channel: Union["TeamIncidentBroadcastChannelType0", None, Unset] = UNSET - auto_add_members_when_attached: None | Unset | bool = UNSET - fields: None | Unset | list["TeamFieldsType0Item"] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + pagerduty_service_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + victor_ops_id: None | str | Unset = UNSET + pagertree_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + user_ids: list[int] | None | Unset = UNSET + admin_ids: list[int] | None | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + alerts_email_address: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + slack_channels: list[TeamSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[TeamSlackAliasesType0Item] | None | Unset = UNSET + alert_broadcast_enabled: bool | None | Unset = UNSET + alert_broadcast_channel: None | TeamAlertBroadcastChannelType0 | Unset = UNSET + incident_broadcast_enabled: bool | None | Unset = UNSET + incident_broadcast_channel: None | TeamIncidentBroadcastChannelType0 | Unset = UNSET + auto_add_members_when_attached: bool | None | Unset = UNSET + properties: list[TeamPropertiesType0Item] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -103,13 +102,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -118,73 +117,73 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - pagerduty_service_id: None | Unset | str + pagerduty_service_id: None | str | Unset if isinstance(self.pagerduty_service_id, Unset): pagerduty_service_id = UNSET else: pagerduty_service_id = self.pagerduty_service_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - victor_ops_id: None | Unset | str + victor_ops_id: None | str | Unset if isinstance(self.victor_ops_id, Unset): victor_ops_id = UNSET else: victor_ops_id = self.victor_ops_id - pagertree_id: None | Unset | str + pagertree_id: None | str | Unset if isinstance(self.pagertree_id, Unset): pagertree_id = UNSET else: pagertree_id = self.pagertree_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - user_ids: None | Unset | list[int] + user_ids: list[int] | None | Unset if isinstance(self.user_ids, Unset): user_ids = UNSET elif isinstance(self.user_ids, list): @@ -193,7 +192,7 @@ def to_dict(self) -> dict[str, Any]: else: user_ids = self.user_ids - admin_ids: None | Unset | list[int] + admin_ids: list[int] | None | Unset if isinstance(self.admin_ids, Unset): admin_ids = UNSET elif isinstance(self.admin_ids, list): @@ -202,25 +201,25 @@ def to_dict(self) -> dict[str, Any]: else: admin_ids = self.admin_ids - alerts_email_enabled: None | Unset | bool + alerts_email_enabled: bool | None | Unset if isinstance(self.alerts_email_enabled, Unset): alerts_email_enabled = UNSET else: alerts_email_enabled = self.alerts_email_enabled - alerts_email_address: None | Unset | str + alerts_email_address: None | str | Unset if isinstance(self.alerts_email_address, Unset): alerts_email_address = UNSET else: alerts_email_address = self.alerts_email_address - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -232,7 +231,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -244,13 +243,13 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - alert_broadcast_enabled: None | Unset | bool + alert_broadcast_enabled: bool | None | Unset if isinstance(self.alert_broadcast_enabled, Unset): alert_broadcast_enabled = UNSET else: alert_broadcast_enabled = self.alert_broadcast_enabled - alert_broadcast_channel: None | Unset | dict[str, Any] + alert_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.alert_broadcast_channel, Unset): alert_broadcast_channel = UNSET elif isinstance(self.alert_broadcast_channel, TeamAlertBroadcastChannelType0): @@ -258,13 +257,13 @@ def to_dict(self) -> dict[str, Any]: else: alert_broadcast_channel = self.alert_broadcast_channel - incident_broadcast_enabled: None | Unset | bool + incident_broadcast_enabled: bool | None | Unset if isinstance(self.incident_broadcast_enabled, Unset): incident_broadcast_enabled = UNSET else: incident_broadcast_enabled = self.incident_broadcast_enabled - incident_broadcast_channel: None | Unset | dict[str, Any] + incident_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.incident_broadcast_channel, Unset): incident_broadcast_channel = UNSET elif isinstance(self.incident_broadcast_channel, TeamIncidentBroadcastChannelType0): @@ -272,23 +271,23 @@ def to_dict(self) -> dict[str, Any]: else: incident_broadcast_channel = self.incident_broadcast_channel - auto_add_members_when_attached: None | Unset | bool + auto_add_members_when_attached: bool | None | Unset if isinstance(self.auto_add_members_when_attached, Unset): auto_add_members_when_attached = UNSET else: auto_add_members_when_attached = self.auto_add_members_when_attached - fields: None | Unset | list[dict[str, Any]] - if isinstance(self.fields, Unset): - fields = UNSET - elif isinstance(self.fields, list): - fields = [] - for fields_type_0_item_data in self.fields: - fields_type_0_item = fields_type_0_item_data.to_dict() - fields.append(fields_type_0_item) + properties: list[dict[str, Any]] | None | Unset + if isinstance(self.properties, Unset): + properties = UNSET + elif isinstance(self.properties, list): + properties = [] + for properties_type_0_item_data in self.properties: + properties_type_0_item = properties_type_0_item_data.to_dict() + properties.append(properties_type_0_item) else: - fields = self.fields + properties = self.properties field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -351,16 +350,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_channel"] = incident_broadcast_channel if auto_add_members_when_attached is not UNSET: field_dict["auto_add_members_when_attached"] = auto_add_members_when_attached - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 - from ..models.team_fields_type_0_item import TeamFieldsType0Item from ..models.team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 + from ..models.team_properties_type_0_item import TeamPropertiesType0Item from ..models.team_slack_aliases_type_0_item import TeamSlackAliasesType0Item from ..models.team_slack_channels_type_0_item import TeamSlackChannelsType0Item @@ -373,16 +372,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -393,112 +392,112 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_pagerduty_service_id(data: object) -> None | Unset | str: + def _parse_pagerduty_service_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_service_id = _parse_pagerduty_service_id(d.pop("pagerduty_service_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_victor_ops_id(data: object) -> None | Unset | str: + def _parse_victor_ops_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) victor_ops_id = _parse_victor_ops_id(d.pop("victor_ops_id", UNSET)) - def _parse_pagertree_id(data: object) -> None | Unset | str: + def _parse_pagertree_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagertree_id = _parse_pagertree_id(d.pop("pagertree_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_user_ids(data: object) -> None | Unset | list[int]: + def _parse_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -509,13 +508,13 @@ def _parse_user_ids(data: object) -> None | Unset | list[int]: user_ids_type_0 = cast(list[int], data) return user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) user_ids = _parse_user_ids(d.pop("user_ids", UNSET)) - def _parse_admin_ids(data: object) -> None | Unset | list[int]: + def _parse_admin_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -526,40 +525,40 @@ def _parse_admin_ids(data: object) -> None | Unset | list[int]: admin_ids_type_0 = cast(list[int], data) return admin_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) admin_ids = _parse_admin_ids(d.pop("admin_ids", UNSET)) - def _parse_alerts_email_enabled(data: object) -> None | Unset | bool: + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) - def _parse_alerts_email_address(data: object) -> None | Unset | str: + def _parse_alerts_email_address(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alerts_email_address = _parse_alerts_email_address(d.pop("alerts_email_address", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_slack_channels(data: object) -> None | Unset | list["TeamSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[TeamSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -575,13 +574,13 @@ def _parse_slack_channels(data: object) -> None | Unset | list["TeamSlackChannel slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["TeamSlackChannelsType0Item"], data) + return cast(list[TeamSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases(data: object) -> None | Unset | list["TeamSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[TeamSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -597,22 +596,22 @@ def _parse_slack_aliases(data: object) -> None | Unset | list["TeamSlackAliasesT slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["TeamSlackAliasesType0Item"], data) + return cast(list[TeamSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_alert_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_alert_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alert_broadcast_enabled = _parse_alert_broadcast_enabled(d.pop("alert_broadcast_enabled", UNSET)) - def _parse_alert_broadcast_channel(data: object) -> Union["TeamAlertBroadcastChannelType0", None, Unset]: + def _parse_alert_broadcast_channel(data: object) -> None | TeamAlertBroadcastChannelType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -623,22 +622,22 @@ def _parse_alert_broadcast_channel(data: object) -> Union["TeamAlertBroadcastCha alert_broadcast_channel_type_0 = TeamAlertBroadcastChannelType0.from_dict(data) return alert_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["TeamAlertBroadcastChannelType0", None, Unset], data) + return cast(None | TeamAlertBroadcastChannelType0 | Unset, data) alert_broadcast_channel = _parse_alert_broadcast_channel(d.pop("alert_broadcast_channel", UNSET)) - def _parse_incident_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_incident_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) incident_broadcast_enabled = _parse_incident_broadcast_enabled(d.pop("incident_broadcast_enabled", UNSET)) - def _parse_incident_broadcast_channel(data: object) -> Union["TeamIncidentBroadcastChannelType0", None, Unset]: + def _parse_incident_broadcast_channel(data: object) -> None | TeamIncidentBroadcastChannelType0 | Unset: if data is None: return data if isinstance(data, Unset): @@ -649,24 +648,24 @@ def _parse_incident_broadcast_channel(data: object) -> Union["TeamIncidentBroadc incident_broadcast_channel_type_0 = TeamIncidentBroadcastChannelType0.from_dict(data) return incident_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["TeamIncidentBroadcastChannelType0", None, Unset], data) + return cast(None | TeamIncidentBroadcastChannelType0 | Unset, data) incident_broadcast_channel = _parse_incident_broadcast_channel(d.pop("incident_broadcast_channel", UNSET)) - def _parse_auto_add_members_when_attached(data: object) -> None | Unset | bool: + def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) auto_add_members_when_attached = _parse_auto_add_members_when_attached( d.pop("auto_add_members_when_attached", UNSET) ) - def _parse_fields(data: object) -> None | Unset | list["TeamFieldsType0Item"]: + def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -674,19 +673,19 @@ def _parse_fields(data: object) -> None | Unset | list["TeamFieldsType0Item"]: try: if not isinstance(data, list): raise TypeError() - fields_type_0 = [] - _fields_type_0 = data - for fields_type_0_item_data in _fields_type_0: - fields_type_0_item = TeamFieldsType0Item.from_dict(fields_type_0_item_data) + properties_type_0 = [] + _properties_type_0 = data + for properties_type_0_item_data in _properties_type_0: + properties_type_0_item = TeamPropertiesType0Item.from_dict(properties_type_0_item_data) - fields_type_0.append(fields_type_0_item) + properties_type_0.append(properties_type_0_item) - return fields_type_0 - except: # noqa: E722 + return properties_type_0 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["TeamFieldsType0Item"], data) + return cast(list[TeamPropertiesType0Item] | None | Unset, data) - fields = _parse_fields(d.pop("fields", UNSET)) + properties = _parse_properties(d.pop("properties", UNSET)) team = cls( name=name, @@ -718,7 +717,7 @@ def _parse_fields(data: object) -> None | Unset | list["TeamFieldsType0Item"]: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, - fields=fields, + properties=properties, ) team.additional_properties = d diff --git a/rootly_sdk/models/team_alert_broadcast_channel_type_0.py b/rootly_sdk/models/team_alert_broadcast_channel_type_0.py index 091dde36..137ccd8f 100644 --- a/rootly_sdk/models/team_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/team_alert_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class TeamAlertBroadcastChannelType0: """Slack channel to broadcast alerts to Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/team_incident_broadcast_channel_type_0.py b/rootly_sdk/models/team_incident_broadcast_channel_type_0.py index 43046eb0..787a395f 100644 --- a/rootly_sdk/models/team_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/team_incident_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class TeamIncidentBroadcastChannelType0: """Slack channel to broadcast incidents to Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/team_list.py b/rootly_sdk/models/team_list.py index 7a9a3c8d..88a51540 100644 --- a/rootly_sdk/models/team_list.py +++ b/rootly_sdk/models/team_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class TeamList: """ Attributes: - data (list['TeamListDataItem']): + data (list[TeamListDataItem]): links (Links): meta (Meta): """ - data: list["TeamListDataItem"] - links: "Links" - meta: "Meta" + data: list[TeamListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/team_list_data_item.py b/rootly_sdk/models/team_list_data_item.py index 836ccae2..f1419dae 100644 --- a/rootly_sdk/models/team_list_data_item.py +++ b/rootly_sdk/models/team_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class TeamListDataItem: id: str type_: TeamListDataItemType - attributes: "Team" + attributes: Team additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/incident_type_fields_item.py b/rootly_sdk/models/team_properties_type_0_item.py similarity index 65% rename from rootly_sdk/models/incident_type_fields_item.py rename to rootly_sdk/models/team_properties_type_0_item.py index bad943af..c184a5a0 100644 --- a/rootly_sdk/models/incident_type_fields_item.py +++ b/rootly_sdk/models/team_properties_type_0_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="IncidentTypeFieldsItem") +T = TypeVar("T", bound="TeamPropertiesType0Item") @_attrs_define -class IncidentTypeFieldsItem: - """Set a value for a catalog field +class TeamPropertiesType0Item: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - incident_type_fields_item = cls( - catalog_field_id=catalog_field_id, + team_properties_type_0_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - incident_type_fields_item.additional_properties = d - return incident_type_fields_item + team_properties_type_0_item.additional_properties = d + return team_properties_type_0_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/team_response.py b/rootly_sdk/models/team_response.py index 3d9f003a..8a02c104 100644 --- a/rootly_sdk/models/team_response.py +++ b/rootly_sdk/models/team_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class TeamResponse: data (TeamResponseData): """ - data: "TeamResponseData" + data: TeamResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/team_response_data.py b/rootly_sdk/models/team_response_data.py index 50e1b9a5..a9adb9e2 100644 --- a/rootly_sdk/models/team_response_data.py +++ b/rootly_sdk/models/team_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class TeamResponseData: id: str type_: TeamResponseDataType - attributes: "Team" + attributes: Team additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/team_slack_aliases_type_0_item.py b/rootly_sdk/models/team_slack_aliases_type_0_item.py index e489c76a..5dfb959c 100644 --- a/rootly_sdk/models/team_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/team_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/team_slack_channels_type_0_item.py b/rootly_sdk/models/team_slack_channels_type_0_item.py index f91186df..9f85b005 100644 --- a/rootly_sdk/models/team_slack_channels_type_0_item.py +++ b/rootly_sdk/models/team_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/tiptap_block_schema.py b/rootly_sdk/models/tiptap_block_schema.py index e0255e8f..dc2ea2cc 100644 --- a/rootly_sdk/models/tiptap_block_schema.py +++ b/rootly_sdk/models/tiptap_block_schema.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,20 +21,20 @@ class TiptapBlockSchema: """TipTap block component schema for post mortem templates Attributes: - followup_component (Union[Unset, TiptapBlockSchemaFollowupComponent]): Followup component block - timeline_component (Union[Unset, TiptapBlockSchemaTimelineComponent]): Timeline component block + followup_component (TiptapBlockSchemaFollowupComponent | Unset): Followup component block + timeline_component (TiptapBlockSchemaTimelineComponent | Unset): Timeline component block """ - followup_component: Union[Unset, "TiptapBlockSchemaFollowupComponent"] = UNSET - timeline_component: Union[Unset, "TiptapBlockSchemaTimelineComponent"] = UNSET + followup_component: TiptapBlockSchemaFollowupComponent | Unset = UNSET + timeline_component: TiptapBlockSchemaTimelineComponent | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - followup_component: Unset | dict[str, Any] = UNSET + followup_component: dict[str, Any] | Unset = UNSET if not isinstance(self.followup_component, Unset): followup_component = self.followup_component.to_dict() - timeline_component: Unset | dict[str, Any] = UNSET + timeline_component: dict[str, Any] | Unset = UNSET if not isinstance(self.timeline_component, Unset): timeline_component = self.timeline_component.to_dict() @@ -53,14 +55,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _followup_component = d.pop("followup_component", UNSET) - followup_component: Unset | TiptapBlockSchemaFollowupComponent + followup_component: TiptapBlockSchemaFollowupComponent | Unset if isinstance(_followup_component, Unset): followup_component = UNSET else: followup_component = TiptapBlockSchemaFollowupComponent.from_dict(_followup_component) _timeline_component = d.pop("timeline_component", UNSET) - timeline_component: Unset | TiptapBlockSchemaTimelineComponent + timeline_component: TiptapBlockSchemaTimelineComponent | Unset if isinstance(_timeline_component, Unset): timeline_component = UNSET else: diff --git a/rootly_sdk/models/tiptap_block_schema_followup_component.py b/rootly_sdk/models/tiptap_block_schema_followup_component.py index d233714d..8220706b 100644 --- a/rootly_sdk/models/tiptap_block_schema_followup_component.py +++ b/rootly_sdk/models/tiptap_block_schema_followup_component.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,18 +23,18 @@ class TiptapBlockSchemaFollowupComponent: html (str): HTML representation:
Example:
. - data_sort (Union[Unset, TiptapBlockSchemaFollowupComponentDataSort]): Sort order for followups. Valid values: + data_sort (TiptapBlockSchemaFollowupComponentDataSort | Unset): Sort order for followups. Valid values: due_date, status, priority Default: 'due_date'. """ html: str - data_sort: Unset | TiptapBlockSchemaFollowupComponentDataSort = "due_date" + data_sort: TiptapBlockSchemaFollowupComponentDataSort | Unset = "due_date" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: html = self.html - data_sort: Unset | str = UNSET + data_sort: str | Unset = UNSET if not isinstance(self.data_sort, Unset): data_sort = self.data_sort @@ -54,7 +56,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: html = d.pop("html") _data_sort = d.pop("data_sort", UNSET) - data_sort: Unset | TiptapBlockSchemaFollowupComponentDataSort + data_sort: TiptapBlockSchemaFollowupComponentDataSort | Unset if isinstance(_data_sort, Unset): data_sort = UNSET else: diff --git a/rootly_sdk/models/tiptap_block_schema_timeline_component.py b/rootly_sdk/models/tiptap_block_schema_timeline_component.py index 8eef08fc..a8ec7f99 100644 --- a/rootly_sdk/models/tiptap_block_schema_timeline_component.py +++ b/rootly_sdk/models/tiptap_block_schema_timeline_component.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/trigger_workflow_task_params.py b/rootly_sdk/models/trigger_workflow_task_params.py index 43012e68..efd310af 100644 --- a/rootly_sdk/models/trigger_workflow_task_params.py +++ b/rootly_sdk/models/trigger_workflow_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -42,16 +44,16 @@ class TriggerWorkflowTaskParams: [:id]"] Default: 'id'. resource (TriggerWorkflowTaskParamsResource): workflow (TriggerWorkflowTaskParamsWorkflow): - task_type (Union[Unset, TriggerWorkflowTaskParamsTaskType]): - check_workflow_conditions (Union[Unset, bool]): + task_type (TriggerWorkflowTaskParamsTaskType | Unset): + check_workflow_conditions (bool | Unset): """ - resource: "TriggerWorkflowTaskParamsResource" - workflow: "TriggerWorkflowTaskParamsWorkflow" + resource: TriggerWorkflowTaskParamsResource + workflow: TriggerWorkflowTaskParamsWorkflow kind: TriggerWorkflowTaskParamsKind = "incident" attribute_to_query_by: TriggerWorkflowTaskParamsAttributeToQueryBy = "id" - task_type: Unset | TriggerWorkflowTaskParamsTaskType = UNSET - check_workflow_conditions: Unset | bool = UNSET + task_type: TriggerWorkflowTaskParamsTaskType | Unset = UNSET + check_workflow_conditions: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -63,7 +65,7 @@ def to_dict(self) -> dict[str, Any]: workflow = self.workflow.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -101,7 +103,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflow = TriggerWorkflowTaskParamsWorkflow.from_dict(d.pop("workflow")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | TriggerWorkflowTaskParamsTaskType + task_type: TriggerWorkflowTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/trigger_workflow_task_params_resource.py b/rootly_sdk/models/trigger_workflow_task_params_resource.py index 00c4d41f..79d16a80 100644 --- a/rootly_sdk/models/trigger_workflow_task_params_resource.py +++ b/rootly_sdk/models/trigger_workflow_task_params_resource.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class TriggerWorkflowTaskParamsResource: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/trigger_workflow_task_params_workflow.py b/rootly_sdk/models/trigger_workflow_task_params_workflow.py index 4eb056c6..c4ad90c9 100644 --- a/rootly_sdk/models/trigger_workflow_task_params_workflow.py +++ b/rootly_sdk/models/trigger_workflow_task_params_workflow.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class TriggerWorkflowTaskParamsWorkflow: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/tweet_twitter_message_task_params.py b/rootly_sdk/models/tweet_twitter_message_task_params.py index 41f13fc8..9c9498a3 100644 --- a/rootly_sdk/models/tweet_twitter_message_task_params.py +++ b/rootly_sdk/models/tweet_twitter_message_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,17 +20,17 @@ class TweetTwitterMessageTaskParams: """ Attributes: message (str): - task_type (Union[Unset, TweetTwitterMessageTaskParamsTaskType]): + task_type (TweetTwitterMessageTaskParamsTaskType | Unset): """ message: str - task_type: Unset | TweetTwitterMessageTaskParamsTaskType = UNSET + task_type: TweetTwitterMessageTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: message = self.message - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -50,7 +52,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: message = d.pop("message") _task_type = d.pop("task_type", UNSET) - task_type: Unset | TweetTwitterMessageTaskParamsTaskType + task_type: TweetTwitterMessageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/unassign_role_from_user.py b/rootly_sdk/models/unassign_role_from_user.py index 3475de0e..3a117134 100644 --- a/rootly_sdk/models/unassign_role_from_user.py +++ b/rootly_sdk/models/unassign_role_from_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UnassignRoleFromUser: data (UnassignRoleFromUserData): """ - data: "UnassignRoleFromUserData" + data: UnassignRoleFromUserData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/unassign_role_from_user_data.py b/rootly_sdk/models/unassign_role_from_user_data.py index 8771ae9c..ea929298 100644 --- a/rootly_sdk/models/unassign_role_from_user_data.py +++ b/rootly_sdk/models/unassign_role_from_user_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UnassignRoleFromUserData: """ type_: UnassignRoleFromUserDataType - attributes: "UnassignRoleFromUserDataAttributes" + attributes: UnassignRoleFromUserDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/unassign_role_from_user_data_attributes.py b/rootly_sdk/models/unassign_role_from_user_data_attributes.py index 6f79ddc6..b936640f 100644 --- a/rootly_sdk/models/unassign_role_from_user_data_attributes.py +++ b/rootly_sdk/models/unassign_role_from_user_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,12 +14,12 @@ class UnassignRoleFromUserDataAttributes: """ Attributes: - user_id (Union[Unset, str]): ID of user you wish to remove as assigned user from this incident - incident_role_id (Union[Unset, str]): ID of the incident role + user_id (str | Unset): ID of user you wish to remove as assigned user from this incident + incident_role_id (str | Unset): ID of the incident role """ - user_id: Unset | str = UNSET - incident_role_id: Unset | str = UNSET + user_id: str | Unset = UNSET + incident_role_id: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: user_id = self.user_id diff --git a/rootly_sdk/models/update_action_item_task_params.py b/rootly_sdk/models/update_action_item_task_params.py index f7d9e4bd..fa6a1f0b 100644 --- a/rootly_sdk/models/update_action_item_task_params.py +++ b/rootly_sdk/models/update_action_item_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,33 +38,32 @@ class UpdateActionItemTaskParams: query_value (str): Value that attribute_to_query_by to uses to match against attribute_to_query_by (UpdateActionItemTaskParamsAttributeToQueryBy): Attribute of the action item to match against Default: 'id'. - task_type (Union[Unset, UpdateActionItemTaskParamsTaskType]): - summary (Union[Unset, str]): Brief description of the action item - assigned_to_user_id (Union[Unset, str]): [DEPRECATED] Use assigned_to_user attribute instead. The user id this - action item is assigned to - assigned_to_user (Union[Unset, UpdateActionItemTaskParamsAssignedToUser]): The user this action item is - assigned to - group_ids (Union[None, Unset, list[str]]): - description (Union[Unset, str]): The action item description - priority (Union[Unset, UpdateActionItemTaskParamsPriority]): The action item priority - status (Union[Unset, UpdateActionItemTaskParamsStatus]): The action item status - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateActionItemTaskParamsTaskType | Unset): + summary (str | Unset): Brief description of the action item + assigned_to_user_id (str | Unset): [DEPRECATED] Use assigned_to_user attribute instead. The user id this action + item is assigned to + assigned_to_user (UpdateActionItemTaskParamsAssignedToUser | Unset): The user this action item is assigned to + group_ids (list[str] | None | Unset): + description (str | Unset): The action item description + priority (UpdateActionItemTaskParamsPriority | Unset): The action item priority + status (UpdateActionItemTaskParamsStatus | Unset): The action item status + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - post_to_incident_timeline (Union[Unset, bool]): + post_to_incident_timeline (bool | Unset): """ query_value: str attribute_to_query_by: UpdateActionItemTaskParamsAttributeToQueryBy = "id" - task_type: Unset | UpdateActionItemTaskParamsTaskType = UNSET - summary: Unset | str = UNSET - assigned_to_user_id: Unset | str = UNSET - assigned_to_user: Union[Unset, "UpdateActionItemTaskParamsAssignedToUser"] = UNSET - group_ids: None | Unset | list[str] = UNSET - description: Unset | str = UNSET - priority: Unset | UpdateActionItemTaskParamsPriority = UNSET - status: Unset | UpdateActionItemTaskParamsStatus = UNSET - custom_fields_mapping: None | Unset | str = UNSET - post_to_incident_timeline: Unset | bool = UNSET + task_type: UpdateActionItemTaskParamsTaskType | Unset = UNSET + summary: str | Unset = UNSET + assigned_to_user_id: str | Unset = UNSET + assigned_to_user: UpdateActionItemTaskParamsAssignedToUser | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + description: str | Unset = UNSET + priority: UpdateActionItemTaskParamsPriority | Unset = UNSET + status: UpdateActionItemTaskParamsStatus | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -70,7 +71,7 @@ def to_dict(self) -> dict[str, Any]: attribute_to_query_by: str = self.attribute_to_query_by - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -78,11 +79,11 @@ def to_dict(self) -> dict[str, Any]: assigned_to_user_id = self.assigned_to_user_id - assigned_to_user: Unset | dict[str, Any] = UNSET + assigned_to_user: dict[str, Any] | Unset = UNSET if not isinstance(self.assigned_to_user, Unset): assigned_to_user = self.assigned_to_user.to_dict() - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -93,15 +94,15 @@ def to_dict(self) -> dict[str, Any]: description = self.description - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -152,7 +153,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateActionItemTaskParamsTaskType + task_type: UpdateActionItemTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -163,13 +164,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assigned_to_user_id = d.pop("assigned_to_user_id", UNSET) _assigned_to_user = d.pop("assigned_to_user", UNSET) - assigned_to_user: Unset | UpdateActionItemTaskParamsAssignedToUser + assigned_to_user: UpdateActionItemTaskParamsAssignedToUser | Unset if isinstance(_assigned_to_user, Unset): assigned_to_user = UNSET else: assigned_to_user = UpdateActionItemTaskParamsAssignedToUser.from_dict(_assigned_to_user) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -180,34 +181,34 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) description = d.pop("description", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateActionItemTaskParamsPriority + priority: UpdateActionItemTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = check_update_action_item_task_params_priority(_priority) _status = d.pop("status", UNSET) - status: Unset | UpdateActionItemTaskParamsStatus + status: UpdateActionItemTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_update_action_item_task_params_status(_status) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/update_action_item_task_params_assigned_to_user.py b/rootly_sdk/models/update_action_item_task_params_assigned_to_user.py index e3bd45eb..215e2fc0 100644 --- a/rootly_sdk/models/update_action_item_task_params_assigned_to_user.py +++ b/rootly_sdk/models/update_action_item_task_params_assigned_to_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateActionItemTaskParamsAssignedToUser: """The user this action item is assigned to Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_airtable_table_record_task_params.py b/rootly_sdk/models/update_airtable_table_record_task_params.py index 5df66fe6..59509bfc 100644 --- a/rootly_sdk/models/update_airtable_table_record_task_params.py +++ b/rootly_sdk/models/update_airtable_table_record_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,16 +22,16 @@ class UpdateAirtableTableRecordTaskParams: base_key (str): The base key table_name (str): The table name record_id (str): The record id - task_type (Union[Unset, UpdateAirtableTableRecordTaskParamsTaskType]): - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateAirtableTableRecordTaskParamsTaskType | Unset): + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON """ base_key: str table_name: str record_id: str - task_type: Unset | UpdateAirtableTableRecordTaskParamsTaskType = UNSET - custom_fields_mapping: None | Unset | str = UNSET + task_type: UpdateAirtableTableRecordTaskParamsTaskType | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,11 +41,11 @@ def to_dict(self) -> dict[str, Any]: record_id = self.record_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -75,18 +77,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: record_id = d.pop("record_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateAirtableTableRecordTaskParamsTaskType + task_type: UpdateAirtableTableRecordTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_update_airtable_table_record_task_params_task_type(_task_type) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/update_alert.py b/rootly_sdk/models/update_alert.py index 761a488e..e7b43c0e 100644 --- a/rootly_sdk/models/update_alert.py +++ b/rootly_sdk/models/update_alert.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlert: data (UpdateAlertData): """ - data: "UpdateAlertData" + data: UpdateAlertData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_data.py b/rootly_sdk/models/update_alert_data.py index f0e79abf..ab38085f 100644 --- a/rootly_sdk/models/update_alert_data.py +++ b/rootly_sdk/models/update_alert_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,17 +21,17 @@ class UpdateAlertData: """ Attributes: attributes (UpdateAlertDataAttributes): - type_ (Union[Unset, UpdateAlertDataType]): + type_ (UpdateAlertDataType | Unset): """ - attributes: "UpdateAlertDataAttributes" - type_: Unset | UpdateAlertDataType = UNSET + attributes: UpdateAlertDataAttributes + type_: UpdateAlertDataType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -53,7 +55,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = UpdateAlertDataAttributes.from_dict(d.pop("attributes")) _type_ = d.pop("type", UNSET) - type_: Unset | UpdateAlertDataType + type_: UpdateAlertDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/update_alert_data_attributes.py b/rootly_sdk/models/update_alert_data_attributes.py index 1d86e444..08578eac 100644 --- a/rootly_sdk/models/update_alert_data_attributes.py +++ b/rootly_sdk/models/update_alert_data_attributes.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from dateutil.parser import isoparse @@ -30,45 +32,43 @@ class UpdateAlertDataAttributes: """ Attributes: - noise (Union[Unset, UpdateAlertDataAttributesNoise]): Whether the alert is marked as noise - source (Union[Unset, UpdateAlertDataAttributesSource]): The source of the alert - summary (Union[Unset, str]): The summary of the alert - description (Union[None, Unset, str]): The description of the alert - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the alert - group_ids (Union[None, Unset, list[str]]): The Group IDs to attach to the alert - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the alert - started_at (Union[None, Unset, datetime.datetime]): Alert start datetime - ended_at (Union[None, Unset, datetime.datetime]): Alert end datetime - external_id (Union[None, Unset, str]): External ID - external_url (Union[None, Unset, str]): External Url - alert_urgency_id (Union[None, Unset, str]): The ID of the alert urgency - labels (Union[Unset, list[Union['UpdateAlertDataAttributesLabelsItemType0', None]]]): - data (Union['UpdateAlertDataAttributesDataType0', None, Unset]): Additional data - deduplication_key (Union[None, Unset, str]): Alerts sharing the same deduplication key are treated as a single - alert. - alert_field_values_attributes (Union[Unset, - list[Union['UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0', None]]]): Custom alert field values - to create with the alert + noise (UpdateAlertDataAttributesNoise | Unset): Whether the alert is marked as noise + source (UpdateAlertDataAttributesSource | Unset): The source of the alert + summary (str | Unset): The summary of the alert + description (None | str | Unset): The description of the alert + service_ids (list[str] | None | Unset): The Service IDs to attach to the alert + group_ids (list[str] | None | Unset): The Group IDs to attach to the alert + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the alert + started_at (datetime.datetime | None | Unset): Alert start datetime + ended_at (datetime.datetime | None | Unset): Alert end datetime + external_id (None | str | Unset): External ID + external_url (None | str | Unset): External Url + alert_urgency_id (None | str | Unset): The ID of the alert urgency + labels (list[None | UpdateAlertDataAttributesLabelsItemType0] | Unset): + data (None | Unset | UpdateAlertDataAttributesDataType0): Additional data + deduplication_key (None | str | Unset): Alerts sharing the same deduplication key are treated as a single alert. + alert_field_values_attributes (list[None | UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0] | + Unset): Custom alert field values to create with the alert """ - noise: Unset | UpdateAlertDataAttributesNoise = UNSET - source: Unset | UpdateAlertDataAttributesSource = UNSET - summary: Unset | str = UNSET - description: None | Unset | str = UNSET - service_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - started_at: None | Unset | datetime.datetime = UNSET - ended_at: None | Unset | datetime.datetime = UNSET - external_id: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - labels: Unset | list[Union["UpdateAlertDataAttributesLabelsItemType0", None]] = UNSET - data: Union["UpdateAlertDataAttributesDataType0", None, Unset] = UNSET - deduplication_key: None | Unset | str = UNSET - alert_field_values_attributes: ( - Unset | list[Union["UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0", None]] - ) = UNSET + noise: UpdateAlertDataAttributesNoise | Unset = UNSET + source: UpdateAlertDataAttributesSource | Unset = UNSET + summary: str | Unset = UNSET + description: None | str | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + external_id: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + labels: list[None | UpdateAlertDataAttributesLabelsItemType0] | Unset = UNSET + data: None | Unset | UpdateAlertDataAttributesDataType0 = UNSET + deduplication_key: None | str | Unset = UNSET + alert_field_values_attributes: list[None | UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0] | Unset = ( + UNSET + ) def to_dict(self) -> dict[str, Any]: from ..models.update_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( @@ -77,23 +77,23 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_alert_data_attributes_data_type_0 import UpdateAlertDataAttributesDataType0 from ..models.update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 - noise: Unset | str = UNSET + noise: str | Unset = UNSET if not isinstance(self.noise, Unset): noise = self.noise - source: Unset | str = UNSET + source: str | Unset = UNSET if not isinstance(self.source, Unset): source = self.source summary = self.summary - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -102,7 +102,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -111,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -120,7 +120,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET elif isinstance(self.started_at, datetime.datetime): @@ -128,7 +128,7 @@ def to_dict(self) -> dict[str, Any]: else: started_at = self.started_at - ended_at: None | Unset | str + ended_at: None | str | Unset if isinstance(self.ended_at, Unset): ended_at = UNSET elif isinstance(self.ended_at, datetime.datetime): @@ -136,36 +136,36 @@ def to_dict(self) -> dict[str, Any]: else: ended_at = self.ended_at - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - labels: Unset | list[None | dict[str, Any]] = UNSET + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: - labels_item: None | dict[str, Any] + labels_item: dict[str, Any] | None if isinstance(labels_item_data, UpdateAlertDataAttributesLabelsItemType0): labels_item = labels_item_data.to_dict() else: labels_item = labels_item_data labels.append(labels_item) - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, UpdateAlertDataAttributesDataType0): @@ -173,17 +173,17 @@ def to_dict(self) -> dict[str, Any]: else: data = self.data - deduplication_key: None | Unset | str + deduplication_key: None | str | Unset if isinstance(self.deduplication_key, Unset): deduplication_key = UNSET else: deduplication_key = self.deduplication_key - alert_field_values_attributes: Unset | list[None | dict[str, Any]] = UNSET + alert_field_values_attributes: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.alert_field_values_attributes, Unset): alert_field_values_attributes = [] for alert_field_values_attributes_item_data in self.alert_field_values_attributes: - alert_field_values_attributes_item: None | dict[str, Any] + alert_field_values_attributes_item: dict[str, Any] | None if isinstance( alert_field_values_attributes_item_data, UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0, @@ -241,14 +241,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _noise = d.pop("noise", UNSET) - noise: Unset | UpdateAlertDataAttributesNoise + noise: UpdateAlertDataAttributesNoise | Unset if isinstance(_noise, Unset): noise = UNSET else: noise = check_update_alert_data_attributes_noise(_noise) _source = d.pop("source", UNSET) - source: Unset | UpdateAlertDataAttributesSource + source: UpdateAlertDataAttributesSource | Unset if isinstance(_source, Unset): source = UNSET else: @@ -256,16 +256,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: summary = d.pop("summary", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -276,13 +276,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -293,13 +293,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -310,13 +310,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_started_at(data: object) -> None | Unset | datetime.datetime: + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -327,13 +327,13 @@ def _parse_started_at(data: object) -> None | Unset | datetime.datetime: started_at_type_0 = isoparse(data) return started_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -344,61 +344,63 @@ def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: ended_at_type_0 = isoparse(data) return ended_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: + labels: list[None | UpdateAlertDataAttributesLabelsItemType0] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: - def _parse_labels_item(data: object) -> Union["UpdateAlertDataAttributesLabelsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - labels_item_type_0 = UpdateAlertDataAttributesLabelsItemType0.from_dict(data) + def _parse_labels_item(data: object) -> None | UpdateAlertDataAttributesLabelsItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + labels_item_type_0 = UpdateAlertDataAttributesLabelsItemType0.from_dict(data) - return labels_item_type_0 - except: # noqa: E722 - pass - return cast(Union["UpdateAlertDataAttributesLabelsItemType0", None], data) + return labels_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UpdateAlertDataAttributesLabelsItemType0, data) - labels_item = _parse_labels_item(labels_item_data) + labels_item = _parse_labels_item(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) - def _parse_data(data: object) -> Union["UpdateAlertDataAttributesDataType0", None, Unset]: + def _parse_data(data: object) -> None | Unset | UpdateAlertDataAttributesDataType0: if data is None: return data if isinstance(data, Unset): @@ -409,47 +411,51 @@ def _parse_data(data: object) -> Union["UpdateAlertDataAttributesDataType0", Non data_type_0 = UpdateAlertDataAttributesDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateAlertDataAttributesDataType0", None, Unset], data) + return cast(None | Unset | UpdateAlertDataAttributesDataType0, data) data = _parse_data(d.pop("data", UNSET)) - def _parse_deduplication_key(data: object) -> None | Unset | str: + def _parse_deduplication_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key = _parse_deduplication_key(d.pop("deduplication_key", UNSET)) - alert_field_values_attributes = [] _alert_field_values_attributes = d.pop("alert_field_values_attributes", UNSET) - for alert_field_values_attributes_item_data in _alert_field_values_attributes or []: - - def _parse_alert_field_values_attributes_item( - data: object, - ) -> Union["UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - alert_field_values_attributes_item_type_0 = ( - UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0.from_dict(data) - ) - - return alert_field_values_attributes_item_type_0 - except: # noqa: E722 - pass - return cast(Union["UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0", None], data) - - alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( - alert_field_values_attributes_item_data - ) - - alert_field_values_attributes.append(alert_field_values_attributes_item) + alert_field_values_attributes: ( + list[None | UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0] | Unset + ) = UNSET + if _alert_field_values_attributes is not UNSET: + alert_field_values_attributes = [] + for alert_field_values_attributes_item_data in _alert_field_values_attributes: + + def _parse_alert_field_values_attributes_item( + data: object, + ) -> None | UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + alert_field_values_attributes_item_type_0 = ( + UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0.from_dict(data) + ) + + return alert_field_values_attributes_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0, data) + + alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( + alert_field_values_attributes_item_data + ) + + alert_field_values_attributes.append(alert_field_values_attributes_item) update_alert_data_attributes = cls( noise=noise, diff --git a/rootly_sdk/models/update_alert_data_attributes_alert_field_values_attributes_item_type_0.py b/rootly_sdk/models/update_alert_data_attributes_alert_field_values_attributes_item_type_0.py index f34dfe8e..ff427941 100644 --- a/rootly_sdk/models/update_alert_data_attributes_alert_field_values_attributes_item_type_0.py +++ b/rootly_sdk/models/update_alert_data_attributes_alert_field_values_attributes_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_alert_data_attributes_data_type_0.py b/rootly_sdk/models/update_alert_data_attributes_data_type_0.py index 300227e7..29405f27 100644 --- a/rootly_sdk/models/update_alert_data_attributes_data_type_0.py +++ b/rootly_sdk/models/update_alert_data_attributes_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class UpdateAlertDataAttributesDataType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/update_alert_data_attributes_labels_item_type_0.py b/rootly_sdk/models/update_alert_data_attributes_labels_item_type_0.py index 369b1029..52b1e2d8 100644 --- a/rootly_sdk/models/update_alert_data_attributes_labels_item_type_0.py +++ b/rootly_sdk/models/update_alert_data_attributes_labels_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,7 +14,7 @@ class UpdateAlertDataAttributesLabelsItemType0: """ Attributes: key (str): Key of the tag - value (Union[bool, float, str]): Value of the tag + value (bool | float | str): Value of the tag """ key: str diff --git a/rootly_sdk/models/update_alert_data_attributes_source.py b/rootly_sdk/models/update_alert_data_attributes_source.py index 729b6dd3..15477ee7 100644 --- a/rootly_sdk/models/update_alert_data_attributes_source.py +++ b/rootly_sdk/models/update_alert_data_attributes_source.py @@ -6,6 +6,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -14,6 +15,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", @@ -52,6 +54,7 @@ "app_dynamics", "app_optics", "asana", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -60,6 +63,7 @@ "clickup", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "gitlab", diff --git a/rootly_sdk/models/update_alert_event.py b/rootly_sdk/models/update_alert_event.py index 7e1573dc..be423dc3 100644 --- a/rootly_sdk/models/update_alert_event.py +++ b/rootly_sdk/models/update_alert_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,7 +21,7 @@ class UpdateAlertEvent: data (UpdateAlertEventData): """ - data: "UpdateAlertEventData" + data: UpdateAlertEventData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_event_data.py b/rootly_sdk/models/update_alert_event_data.py index 9c5af1dd..24317292 100644 --- a/rootly_sdk/models/update_alert_event_data.py +++ b/rootly_sdk/models/update_alert_event_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAlertEventData: """ type_: UpdateAlertEventDataType - attributes: "UpdateAlertEventDataAttributes" + attributes: UpdateAlertEventDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_event_data_attributes.py b/rootly_sdk/models/update_alert_event_data_attributes.py index 03b49195..82b7f634 100644 --- a/rootly_sdk/models/update_alert_event_data_attributes.py +++ b/rootly_sdk/models/update_alert_event_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,11 +15,11 @@ class UpdateAlertEventDataAttributes: """ Attributes: details (str): Note message. - user_id (Union[Unset, int]): Author of the note. + user_id (int | Unset): Author of the note. """ details: str - user_id: Unset | int = UNSET + user_id: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: details = self.details diff --git a/rootly_sdk/models/update_alert_field.py b/rootly_sdk/models/update_alert_field.py index fa71ba3b..6639f945 100644 --- a/rootly_sdk/models/update_alert_field.py +++ b/rootly_sdk/models/update_alert_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlertField: data (UpdateAlertFieldData): """ - data: "UpdateAlertFieldData" + data: UpdateAlertFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_field_data.py b/rootly_sdk/models/update_alert_field_data.py index 3eb15a6f..49eb5c01 100644 --- a/rootly_sdk/models/update_alert_field_data.py +++ b/rootly_sdk/models/update_alert_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAlertFieldData: """ type_: UpdateAlertFieldDataType - attributes: "UpdateAlertFieldDataAttributes" + attributes: UpdateAlertFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_field_data_attributes.py b/rootly_sdk/models/update_alert_field_data_attributes.py index 3702d7db..67e5080a 100644 --- a/rootly_sdk/models/update_alert_field_data_attributes.py +++ b/rootly_sdk/models/update_alert_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,10 +14,10 @@ class UpdateAlertFieldDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert field + name (str | Unset): The name of the alert field """ - name: Unset | str = UNSET + name: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name diff --git a/rootly_sdk/models/update_alert_group.py b/rootly_sdk/models/update_alert_group.py index 6576d80b..19968c62 100644 --- a/rootly_sdk/models/update_alert_group.py +++ b/rootly_sdk/models/update_alert_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlertGroup: data (UpdateAlertGroupData): """ - data: "UpdateAlertGroupData" + data: UpdateAlertGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_group_data.py b/rootly_sdk/models/update_alert_group_data.py index f39cb79b..22fb4f53 100644 --- a/rootly_sdk/models/update_alert_group_data.py +++ b/rootly_sdk/models/update_alert_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAlertGroupData: """ type_: UpdateAlertGroupDataType - attributes: "UpdateAlertGroupDataAttributes" + attributes: UpdateAlertGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_group_data_attributes.py b/rootly_sdk/models/update_alert_group_data_attributes.py index 22f1a7a7..6e777d38 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes.py +++ b/rootly_sdk/models/update_alert_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -30,37 +32,37 @@ class UpdateAlertGroupDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert group - description (Union[None, Unset, str]): The description of the alert group - time_window (Union[Unset, int]): The length of time an Alert Group should stay open and accept new alerts - targets (Union[Unset, list['UpdateAlertGroupDataAttributesTargetsItem']]): - attributes (Union[Unset, list['UpdateAlertGroupDataAttributesAttributesItem']]): This field is deprecated. - Please use the `conditions` field instead, `attributes` will be removed in the future. - group_by_alert_title (Union[Unset, UpdateAlertGroupDataAttributesGroupByAlertTitle]): [DEPRECATED] Whether the - alerts should be grouped by titles. This field is deprecated. Please use the `conditions` field with advanced + name (str | Unset): The name of the alert group + description (None | str | Unset): The description of the alert group + time_window (int | Unset): The length of time an Alert Group should stay open and accept new alerts + targets (list[UpdateAlertGroupDataAttributesTargetsItem] | Unset): + attributes (list[UpdateAlertGroupDataAttributesAttributesItem] | Unset): This field is deprecated. Please use + the `conditions` field instead, `attributes` will be removed in the future. + group_by_alert_title (UpdateAlertGroupDataAttributesGroupByAlertTitle | Unset): [DEPRECATED] Whether the alerts + should be grouped by titles. This field is deprecated. Please use the `conditions` field with advanced alert + grouping instead. + group_by_alert_urgency (UpdateAlertGroupDataAttributesGroupByAlertUrgency | Unset): [DEPRECATED] Whether the + alerts should be grouped by urgencies. This field is deprecated. Please use the `conditions` field with advanced alert grouping instead. - group_by_alert_urgency (Union[Unset, UpdateAlertGroupDataAttributesGroupByAlertUrgency]): [DEPRECATED] Whether - the alerts should be grouped by urgencies. This field is deprecated. Please use the `conditions` field with - advanced alert grouping instead. - condition_type (Union[Unset, UpdateAlertGroupDataAttributesConditionType]): Group alerts when ANY or ALL of the - fields are matching. - conditions (Union[Unset, list['UpdateAlertGroupDataAttributesConditionsItem']]): + condition_type (UpdateAlertGroupDataAttributesConditionType | Unset): Group alerts when ANY or ALL of the fields + are matching. + conditions (list[UpdateAlertGroupDataAttributesConditionsItem] | Unset): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - time_window: Unset | int = UNSET - targets: Unset | list["UpdateAlertGroupDataAttributesTargetsItem"] = UNSET - attributes: Unset | list["UpdateAlertGroupDataAttributesAttributesItem"] = UNSET - group_by_alert_title: Unset | UpdateAlertGroupDataAttributesGroupByAlertTitle = UNSET - group_by_alert_urgency: Unset | UpdateAlertGroupDataAttributesGroupByAlertUrgency = UNSET - condition_type: Unset | UpdateAlertGroupDataAttributesConditionType = UNSET - conditions: Unset | list["UpdateAlertGroupDataAttributesConditionsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + time_window: int | Unset = UNSET + targets: list[UpdateAlertGroupDataAttributesTargetsItem] | Unset = UNSET + attributes: list[UpdateAlertGroupDataAttributesAttributesItem] | Unset = UNSET + group_by_alert_title: UpdateAlertGroupDataAttributesGroupByAlertTitle | Unset = UNSET + group_by_alert_urgency: UpdateAlertGroupDataAttributesGroupByAlertUrgency | Unset = UNSET + condition_type: UpdateAlertGroupDataAttributesConditionType | Unset = UNSET + conditions: list[UpdateAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -68,33 +70,33 @@ def to_dict(self) -> dict[str, Any]: time_window = self.time_window - targets: Unset | list[dict[str, Any]] = UNSET + targets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.targets, Unset): targets = [] for targets_item_data in self.targets: targets_item = targets_item_data.to_dict() targets.append(targets_item) - attributes: Unset | list[dict[str, Any]] = UNSET + attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = [] for attributes_item_data in self.attributes: attributes_item = attributes_item_data.to_dict() attributes.append(attributes_item) - group_by_alert_title: Unset | int = UNSET + group_by_alert_title: int | Unset = UNSET if not isinstance(self.group_by_alert_title, Unset): group_by_alert_title = self.group_by_alert_title - group_by_alert_urgency: Unset | int = UNSET + group_by_alert_urgency: int | Unset = UNSET if not isinstance(self.group_by_alert_urgency, Unset): group_by_alert_urgency = self.group_by_alert_urgency - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: @@ -138,40 +140,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) time_window = d.pop("time_window", UNSET) - targets = [] _targets = d.pop("targets", UNSET) - for targets_item_data in _targets or []: - targets_item = UpdateAlertGroupDataAttributesTargetsItem.from_dict(targets_item_data) + targets: list[UpdateAlertGroupDataAttributesTargetsItem] | Unset = UNSET + if _targets is not UNSET: + targets = [] + for targets_item_data in _targets: + targets_item = UpdateAlertGroupDataAttributesTargetsItem.from_dict(targets_item_data) - targets.append(targets_item) + targets.append(targets_item) - attributes = [] _attributes = d.pop("attributes", UNSET) - for attributes_item_data in _attributes or []: - attributes_item = UpdateAlertGroupDataAttributesAttributesItem.from_dict(attributes_item_data) + attributes: list[UpdateAlertGroupDataAttributesAttributesItem] | Unset = UNSET + if _attributes is not UNSET: + attributes = [] + for attributes_item_data in _attributes: + attributes_item = UpdateAlertGroupDataAttributesAttributesItem.from_dict(attributes_item_data) - attributes.append(attributes_item) + attributes.append(attributes_item) _group_by_alert_title = d.pop("group_by_alert_title", UNSET) - group_by_alert_title: Unset | UpdateAlertGroupDataAttributesGroupByAlertTitle + group_by_alert_title: UpdateAlertGroupDataAttributesGroupByAlertTitle | Unset if isinstance(_group_by_alert_title, Unset): group_by_alert_title = UNSET else: group_by_alert_title = check_update_alert_group_data_attributes_group_by_alert_title(_group_by_alert_title) _group_by_alert_urgency = d.pop("group_by_alert_urgency", UNSET) - group_by_alert_urgency: Unset | UpdateAlertGroupDataAttributesGroupByAlertUrgency + group_by_alert_urgency: UpdateAlertGroupDataAttributesGroupByAlertUrgency | Unset if isinstance(_group_by_alert_urgency, Unset): group_by_alert_urgency = UNSET else: @@ -180,18 +186,20 @@ def _parse_description(data: object) -> None | Unset | str: ) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | UpdateAlertGroupDataAttributesConditionType + condition_type: UpdateAlertGroupDataAttributesConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_update_alert_group_data_attributes_condition_type(_condition_type) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = UpdateAlertGroupDataAttributesConditionsItem.from_dict(conditions_item_data) + conditions: list[UpdateAlertGroupDataAttributesConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = UpdateAlertGroupDataAttributesConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) update_alert_group_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/update_alert_group_data_attributes_attributes_item.py b/rootly_sdk/models/update_alert_group_data_attributes_attributes_item.py index b6248ab5..6ab7e774 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes_attributes_item.py +++ b/rootly_sdk/models/update_alert_group_data_attributes_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class UpdateAlertGroupDataAttributesAttributesItem: """ Attributes: - json_path (Union[Unset, str]): The JSON path to the value to group by. + json_path (str | Unset): The JSON path to the value to group by. """ - json_path: Unset | str = UNSET + json_path: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_group_data_attributes_conditions_item.py b/rootly_sdk/models/update_alert_group_data_attributes_conditions_item.py index 57211825..75f5bd3a 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes_conditions_item.py +++ b/rootly_sdk/models/update_alert_group_data_attributes_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -29,32 +31,31 @@ class UpdateAlertGroupDataAttributesConditionsItem: field property_field_condition_type (UpdateAlertGroupDataAttributesConditionsItemPropertyFieldConditionType): The condition type of the property field - property_field_name (Union[Unset, str]): The name of the property field. If the property field type is selected - as 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' - and 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the - property field name should be supplied in JSON Path syntax. - property_field_value (Union[Unset, str]): The value of the property field. Can be null if the property field - condition type is 'is_one_of' or 'is_not_one_of' - property_field_values (Union[Unset, list[str]]): The values of the property field. Need to be passed if the - property field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is - 'alert_urgency' - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition. Only need to - be set when the property field type is 'attribute', the property field name is 'alert_urgency' and the property + property_field_name (str | Unset): The name of the property field. If the property field type is selected as + 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' and + 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the property + field name should be supplied in JSON Path syntax. + property_field_value (str | Unset): The value of the property field. Can be null if the property field condition + type is 'is_one_of' or 'is_not_one_of' + property_field_values (list[str] | Unset): The values of the property field. Need to be passed if the property + field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is 'alert_urgency' + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition. Only need to be + set when the property field type is 'attribute', the property field name is 'alert_urgency' and the property field condition type is 'is_one_of' or 'is_not_one_of' - conditionable_type (Union[Unset, UpdateAlertGroupDataAttributesConditionsItemConditionableType]): The type of - the conditionable - conditionable_id (Union[Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, this is - the ID of the alert field. + conditionable_type (UpdateAlertGroupDataAttributesConditionsItemConditionableType | Unset): The type of the + conditionable + conditionable_id (str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is the ID + of the alert field. """ property_field_type: UpdateAlertGroupDataAttributesConditionsItemPropertyFieldType property_field_condition_type: UpdateAlertGroupDataAttributesConditionsItemPropertyFieldConditionType - property_field_name: Unset | str = UNSET - property_field_value: Unset | str = UNSET - property_field_values: Unset | list[str] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET - conditionable_type: Unset | UpdateAlertGroupDataAttributesConditionsItemConditionableType = UNSET - conditionable_id: Unset | str = UNSET + property_field_name: str | Unset = UNSET + property_field_value: str | Unset = UNSET + property_field_values: list[str] | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET + conditionable_type: UpdateAlertGroupDataAttributesConditionsItemConditionableType | Unset = UNSET + conditionable_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -66,11 +67,11 @@ def to_dict(self) -> dict[str, Any]: property_field_value = self.property_field_value - property_field_values: Unset | list[str] = UNSET + property_field_values: list[str] | Unset = UNSET if not isinstance(self.property_field_values, Unset): property_field_values = self.property_field_values - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -79,7 +80,7 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type @@ -127,7 +128,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: property_field_values = cast(list[str], d.pop("property_field_values", UNSET)) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -138,14 +139,14 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) - conditionable_type: Unset | UpdateAlertGroupDataAttributesConditionsItemConditionableType + conditionable_type: UpdateAlertGroupDataAttributesConditionsItemConditionableType | Unset if isinstance(_conditionable_type, Unset): conditionable_type = UNSET else: diff --git a/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py b/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py index 4815e55f..5df79c75 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py +++ b/rootly_sdk/models/update_alert_group_data_attributes_targets_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID diff --git a/rootly_sdk/models/update_alert_route.py b/rootly_sdk/models/update_alert_route.py index 05914582..0065ca5e 100644 --- a/rootly_sdk/models/update_alert_route.py +++ b/rootly_sdk/models/update_alert_route.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlertRoute: data (UpdateAlertRouteData): """ - data: "UpdateAlertRouteData" + data: UpdateAlertRouteData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_route_data.py b/rootly_sdk/models/update_alert_route_data.py index a962d3d6..977eaa55 100644 --- a/rootly_sdk/models/update_alert_route_data.py +++ b/rootly_sdk/models/update_alert_route_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAlertRouteData: """ type_: UpdateAlertRouteDataType - attributes: "UpdateAlertRouteDataAttributes" + attributes: UpdateAlertRouteDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_route_data_attributes.py b/rootly_sdk/models/update_alert_route_data_attributes.py index 69d9ef89..4a5c76eb 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes.py +++ b/rootly_sdk/models/update_alert_route_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID @@ -17,39 +19,39 @@ class UpdateAlertRouteDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert route - enabled (Union[Unset, bool]): Whether the alert route is enabled - alerts_source_ids (Union[Unset, list[UUID]]): - owning_team_ids (Union[Unset, list[UUID]]): - rules (Union[Unset, list['UpdateAlertRouteDataAttributesRulesItem']]): + name (str | Unset): The name of the alert route + enabled (bool | Unset): Whether the alert route is enabled + alerts_source_ids (list[UUID] | Unset): + owning_team_ids (list[UUID] | Unset): + rules (list[UpdateAlertRouteDataAttributesRulesItem] | Unset): """ - name: Unset | str = UNSET - enabled: Unset | bool = UNSET - alerts_source_ids: Unset | list[UUID] = UNSET - owning_team_ids: Unset | list[UUID] = UNSET - rules: Unset | list["UpdateAlertRouteDataAttributesRulesItem"] = UNSET + name: str | Unset = UNSET + enabled: bool | Unset = UNSET + alerts_source_ids: list[UUID] | Unset = UNSET + owning_team_ids: list[UUID] | Unset = UNSET + rules: list[UpdateAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name enabled = self.enabled - alerts_source_ids: Unset | list[str] = UNSET + alerts_source_ids: list[str] | Unset = UNSET if not isinstance(self.alerts_source_ids, Unset): alerts_source_ids = [] for alerts_source_ids_item_data in self.alerts_source_ids: alerts_source_ids_item = str(alerts_source_ids_item_data) alerts_source_ids.append(alerts_source_ids_item) - owning_team_ids: Unset | list[str] = UNSET + owning_team_ids: list[str] | Unset = UNSET if not isinstance(self.owning_team_ids, Unset): owning_team_ids = [] for owning_team_ids_item_data in self.owning_team_ids: owning_team_ids_item = str(owning_team_ids_item_data) owning_team_ids.append(owning_team_ids_item) - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -81,26 +83,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) - alerts_source_ids = [] _alerts_source_ids = d.pop("alerts_source_ids", UNSET) - for alerts_source_ids_item_data in _alerts_source_ids or []: - alerts_source_ids_item = UUID(alerts_source_ids_item_data) + alerts_source_ids: list[UUID] | Unset = UNSET + if _alerts_source_ids is not UNSET: + alerts_source_ids = [] + for alerts_source_ids_item_data in _alerts_source_ids: + alerts_source_ids_item = UUID(alerts_source_ids_item_data) - alerts_source_ids.append(alerts_source_ids_item) + alerts_source_ids.append(alerts_source_ids_item) - owning_team_ids = [] _owning_team_ids = d.pop("owning_team_ids", UNSET) - for owning_team_ids_item_data in _owning_team_ids or []: - owning_team_ids_item = UUID(owning_team_ids_item_data) + owning_team_ids: list[UUID] | Unset = UNSET + if _owning_team_ids is not UNSET: + owning_team_ids = [] + for owning_team_ids_item_data in _owning_team_ids: + owning_team_ids_item = UUID(owning_team_ids_item_data) - owning_team_ids.append(owning_team_ids_item) + owning_team_ids.append(owning_team_ids_item) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = UpdateAlertRouteDataAttributesRulesItem.from_dict(rules_item_data) + rules: list[UpdateAlertRouteDataAttributesRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = UpdateAlertRouteDataAttributesRulesItem.from_dict(rules_item_data) - rules.append(rules_item) + rules.append(rules_item) update_alert_route_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py index a0e81f48..bdfdc8ee 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,17 +25,17 @@ class UpdateAlertRouteDataAttributesRulesItem: """ Attributes: name (str): The name of the alert routing rule - destinations (list['UpdateAlertRouteDataAttributesRulesItemDestinationsItem']): - condition_groups (list['UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem']): - position (Union[Unset, int]): The position of the alert routing rule for ordering evaluation - fallback_rule (Union[Unset, bool]): Whether this is a fallback rule + destinations (list[UpdateAlertRouteDataAttributesRulesItemDestinationsItem]): + condition_groups (list[UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem]): + position (int | Unset): The position of the alert routing rule for ordering evaluation + fallback_rule (bool | Unset): Whether this is a fallback rule Default: False. """ name: str - destinations: list["UpdateAlertRouteDataAttributesRulesItemDestinationsItem"] - condition_groups: list["UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem"] - position: Unset | int = UNSET - fallback_rule: Unset | bool = UNSET + destinations: list[UpdateAlertRouteDataAttributesRulesItemDestinationsItem] + condition_groups: list[UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem] + position: int | Unset = UNSET + fallback_rule: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py index 69d9514c..7b75e980 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,12 +21,12 @@ class UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem: """ Attributes: - conditions (list['UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem']): - position (Union[Unset, int]): The position of the condition group + conditions (list[UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem]): + position (int | Unset): The position of the condition group """ - conditions: list["UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem"] - position: Unset | int = UNSET + conditions: list[UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem] + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py index 3e3d2b07..6ede7018 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -29,28 +31,27 @@ class UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem: property_field_condition_type (UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType): property_field_type (UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType): - property_field_name (Union[Unset, str]): The name of the property field - property_field_value (Union[None, Unset, str]): The value of the property field - property_field_values (Union[None, Unset, list[str]]): - alert_urgency_ids (Union[None, Unset, list[str]]): The Alert Urgency IDs to check in the condition - conditionable_type (Union[Unset, - UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType]): The type of the - conditionable - conditionable_id (Union[None, UUID, Unset]): The ID of the conditionable + property_field_name (str | Unset): The name of the property field + property_field_value (None | str | Unset): The value of the property field + property_field_values (list[str] | None | Unset): + alert_urgency_ids (list[str] | None | Unset): The Alert Urgency IDs to check in the condition + conditionable_type (UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | + Unset): The type of the conditionable + conditionable_id (None | Unset | UUID): The ID of the conditionable """ property_field_condition_type: ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType ) property_field_type: UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType - property_field_name: Unset | str = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: None | Unset | list[str] = UNSET - alert_urgency_ids: None | Unset | list[str] = UNSET + property_field_name: str | Unset = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | None | Unset = UNSET + alert_urgency_ids: list[str] | None | Unset = UNSET conditionable_type: ( - Unset | UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | Unset ) = UNSET - conditionable_id: None | UUID | Unset = UNSET + conditionable_id: None | Unset | UUID = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -60,13 +61,13 @@ def to_dict(self) -> dict[str, Any]: property_field_name = self.property_field_name - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: None | Unset | list[str] + property_field_values: list[str] | None | Unset if isinstance(self.property_field_values, Unset): property_field_values = UNSET elif isinstance(self.property_field_values, list): @@ -75,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: property_field_values = self.property_field_values - alert_urgency_ids: None | Unset | list[str] + alert_urgency_ids: list[str] | None | Unset if isinstance(self.alert_urgency_ids, Unset): alert_urgency_ids = UNSET elif isinstance(self.alert_urgency_ids, list): @@ -84,11 +85,11 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_ids = self.alert_urgency_ids - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET elif isinstance(self.conditionable_id, UUID): @@ -132,16 +133,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: property_field_name = d.pop("property_field_name", UNSET) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) - def _parse_property_field_values(data: object) -> None | Unset | list[str]: + def _parse_property_field_values(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -152,13 +153,13 @@ def _parse_property_field_values(data: object) -> None | Unset | list[str]: property_field_values_type_0 = cast(list[str], data) return property_field_values_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) property_field_values = _parse_property_field_values(d.pop("property_field_values", UNSET)) - def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_urgency_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -169,15 +170,15 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: alert_urgency_ids_type_0 = cast(list[str], data) return alert_urgency_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_urgency_ids = _parse_alert_urgency_ids(d.pop("alert_urgency_ids", UNSET)) _conditionable_type = d.pop("conditionable_type", UNSET) conditionable_type: ( - Unset | UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType | Unset ) if isinstance(_conditionable_type, Unset): conditionable_type = UNSET @@ -186,7 +187,7 @@ def _parse_alert_urgency_ids(data: object) -> None | Unset | list[str]: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | UUID | Unset: + def _parse_conditionable_id(data: object) -> None | Unset | UUID: if data is None: return data if isinstance(data, Unset): @@ -197,9 +198,9 @@ def _parse_conditionable_id(data: object) -> None | UUID | Unset: conditionable_id_type_0 = UUID(data) return conditionable_id_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | UUID | Unset, data) + return cast(None | Unset | UUID, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item.py index 0582df07..3e112e79 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -17,7 +19,8 @@ class UpdateAlertRouteDataAttributesRulesItemDestinationsItem: """ Attributes: - target_type (UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType): The type of the target + target_type (UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType): The type of the target. Please + contact support if you encounter issues using `Functionality` as a target type. target_id (UUID): The ID of the target """ diff --git a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item_target_type.py b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item_target_type.py index 148d750b..4bdedef3 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item_target_type.py +++ b/rootly_sdk/models/update_alert_route_data_attributes_rules_item_destinations_item_target_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service" +] UPDATE_ALERT_ROUTE_DATA_ATTRIBUTES_RULES_ITEM_DESTINATIONS_ITEM_TARGET_TYPE_VALUES: set[ UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/update_alert_routing_rule.py b/rootly_sdk/models/update_alert_routing_rule.py index ab1de97b..1756885e 100644 --- a/rootly_sdk/models/update_alert_routing_rule.py +++ b/rootly_sdk/models/update_alert_routing_rule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlertRoutingRule: data (UpdateAlertRoutingRuleData): """ - data: "UpdateAlertRoutingRuleData" + data: UpdateAlertRoutingRuleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_routing_rule_data.py b/rootly_sdk/models/update_alert_routing_rule_data.py index e4aafaf3..adbe7136 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data.py +++ b/rootly_sdk/models/update_alert_routing_rule_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateAlertRoutingRuleData: """ type_: UpdateAlertRoutingRuleDataType - attributes: "UpdateAlertRoutingRuleDataAttributes" + attributes: UpdateAlertRoutingRuleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_routing_rule_data_attributes.py b/rootly_sdk/models/update_alert_routing_rule_data_attributes.py index 181ae760..21b53c98 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from uuid import UUID from attrs import define as _attrs_define @@ -26,56 +28,56 @@ class UpdateAlertRoutingRuleDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert routing rule - enabled (Union[Unset, bool]): Whether the alert routing rule is enabled - alerts_source_id (Union[Unset, UUID]): The ID of the alerts source - position (Union[Unset, int]): The position of the alert routing rule for ordering evaluation - owning_team_ids (Union[Unset, list[UUID]]): The IDs of the teams that own the alert routing rule - condition_type (Union[Unset, UpdateAlertRoutingRuleDataAttributesConditionType]): The type of condition for the - alert routing rule - conditions (Union[Unset, list['UpdateAlertRoutingRuleDataAttributesConditionsItem']]): - destination (Union[Unset, UpdateAlertRoutingRuleDataAttributesDestination]): + name (str | Unset): The name of the alert routing rule + enabled (bool | Unset): Whether the alert routing rule is enabled + alerts_source_id (UUID | Unset): The ID of the alerts source + position (int | Unset): The position of the alert routing rule for ordering evaluation + owning_team_ids (list[UUID] | Unset): The IDs of the teams that own the alert routing rule + condition_type (UpdateAlertRoutingRuleDataAttributesConditionType | Unset): The type of condition for the alert + routing rule + conditions (list[UpdateAlertRoutingRuleDataAttributesConditionsItem] | Unset): + destination (UpdateAlertRoutingRuleDataAttributesDestination | Unset): """ - name: Unset | str = UNSET - enabled: Unset | bool = UNSET - alerts_source_id: Unset | UUID = UNSET - position: Unset | int = UNSET - owning_team_ids: Unset | list[UUID] = UNSET - condition_type: Unset | UpdateAlertRoutingRuleDataAttributesConditionType = UNSET - conditions: Unset | list["UpdateAlertRoutingRuleDataAttributesConditionsItem"] = UNSET - destination: Union[Unset, "UpdateAlertRoutingRuleDataAttributesDestination"] = UNSET + name: str | Unset = UNSET + enabled: bool | Unset = UNSET + alerts_source_id: UUID | Unset = UNSET + position: int | Unset = UNSET + owning_team_ids: list[UUID] | Unset = UNSET + condition_type: UpdateAlertRoutingRuleDataAttributesConditionType | Unset = UNSET + conditions: list[UpdateAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET + destination: UpdateAlertRoutingRuleDataAttributesDestination | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name enabled = self.enabled - alerts_source_id: Unset | str = UNSET + alerts_source_id: str | Unset = UNSET if not isinstance(self.alerts_source_id, Unset): alerts_source_id = str(self.alerts_source_id) position = self.position - owning_team_ids: Unset | list[str] = UNSET + owning_team_ids: list[str] | Unset = UNSET if not isinstance(self.owning_team_ids, Unset): owning_team_ids = [] for owning_team_ids_item_data in self.owning_team_ids: owning_team_ids_item = str(owning_team_ids_item_data) owning_team_ids.append(owning_team_ids_item) - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - conditions: Unset | list[dict[str, Any]] = UNSET + conditions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions, Unset): conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() conditions.append(conditions_item) - destination: Unset | dict[str, Any] = UNSET + destination: dict[str, Any] | Unset = UNSET if not isinstance(self.destination, Unset): destination = self.destination.to_dict() @@ -116,7 +118,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _alerts_source_id = d.pop("alerts_source_id", UNSET) - alerts_source_id: Unset | UUID + alerts_source_id: UUID | Unset if isinstance(_alerts_source_id, Unset): alerts_source_id = UNSET else: @@ -124,29 +126,33 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: position = d.pop("position", UNSET) - owning_team_ids = [] _owning_team_ids = d.pop("owning_team_ids", UNSET) - for owning_team_ids_item_data in _owning_team_ids or []: - owning_team_ids_item = UUID(owning_team_ids_item_data) + owning_team_ids: list[UUID] | Unset = UNSET + if _owning_team_ids is not UNSET: + owning_team_ids = [] + for owning_team_ids_item_data in _owning_team_ids: + owning_team_ids_item = UUID(owning_team_ids_item_data) - owning_team_ids.append(owning_team_ids_item) + owning_team_ids.append(owning_team_ids_item) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | UpdateAlertRoutingRuleDataAttributesConditionType + condition_type: UpdateAlertRoutingRuleDataAttributesConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_update_alert_routing_rule_data_attributes_condition_type(_condition_type) - conditions = [] _conditions = d.pop("conditions", UNSET) - for conditions_item_data in _conditions or []: - conditions_item = UpdateAlertRoutingRuleDataAttributesConditionsItem.from_dict(conditions_item_data) + conditions: list[UpdateAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = UpdateAlertRoutingRuleDataAttributesConditionsItem.from_dict(conditions_item_data) - conditions.append(conditions_item) + conditions.append(conditions_item) _destination = d.pop("destination", UNSET) - destination: Unset | UpdateAlertRoutingRuleDataAttributesDestination + destination: UpdateAlertRoutingRuleDataAttributesDestination | Unset if isinstance(_destination, Unset): destination = UNSET else: diff --git a/rootly_sdk/models/update_alert_routing_rule_data_attributes_conditions_item.py b/rootly_sdk/models/update_alert_routing_rule_data_attributes_conditions_item.py index 4c4aa987..307d337f 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes_conditions_item.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes_conditions_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast from uuid import UUID @@ -22,54 +24,53 @@ class UpdateAlertRoutingRuleDataAttributesConditionsItem: """ Attributes: - id (Union[Unset, UUID]): The ID of the alert routing rule condition - property_field_type (Union[Unset, UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType]): The - type of the property field - property_field_name (Union[Unset, str]): The name of the property field. If the property field type is selected - as 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' - and 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the - property field name should be supplied in JSON Path syntax. - property_field_condition_type (Union[Unset, - UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType]): The condition type of the - property field - property_field_value (Union[None, Unset, str]): The value of the property field. Can be null if the property - field condition type is 'is_one_of' or 'is_not_one_of' - property_field_values (Union[Unset, list[str]]): The values of the property field. Used if the property field + id (UUID | Unset): The ID of the alert routing rule condition + property_field_type (UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType | Unset): The type of + the property field + property_field_name (str | Unset): The name of the property field. If the property field type is selected as + 'attribute', then the allowed property field names are 'summary' (for Title), 'description', 'alert_urgency' and + 'external_url' (for Alert Source URL). If the property field type is selected as 'payload', then the property + field name should be supplied in JSON Path syntax. + property_field_condition_type (UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType | + Unset): The condition type of the property field + property_field_value (None | str | Unset): The value of the property field. Can be null if the property field + condition type is 'is_one_of' or 'is_not_one_of' + property_field_values (list[str] | Unset): The values of the property field. Used if the property field condition type is 'is_one_of' or 'is_not_one_of' except for when property field name is 'alert_urgency' """ - id: Unset | UUID = UNSET - property_field_type: Unset | UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType = UNSET - property_field_name: Unset | str = UNSET + id: UUID | Unset = UNSET + property_field_type: UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType | Unset = UNSET + property_field_name: str | Unset = UNSET property_field_condition_type: ( - Unset | UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType + UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType | Unset ) = UNSET - property_field_value: None | Unset | str = UNSET - property_field_values: Unset | list[str] = UNSET + property_field_value: None | str | Unset = UNSET + property_field_values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: Unset | str = UNSET + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.id) - property_field_type: Unset | str = UNSET + property_field_type: str | Unset = UNSET if not isinstance(self.property_field_type, Unset): property_field_type = self.property_field_type property_field_name = self.property_field_name - property_field_condition_type: Unset | str = UNSET + property_field_condition_type: str | Unset = UNSET if not isinstance(self.property_field_condition_type, Unset): property_field_condition_type = self.property_field_condition_type - property_field_value: None | Unset | str + property_field_value: None | str | Unset if isinstance(self.property_field_value, Unset): property_field_value = UNSET else: property_field_value = self.property_field_value - property_field_values: Unset | list[str] = UNSET + property_field_values: list[str] | Unset = UNSET if not isinstance(self.property_field_values, Unset): property_field_values = self.property_field_values @@ -95,14 +96,14 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _id = d.pop("id", UNSET) - id: Unset | UUID + id: UUID | Unset if isinstance(_id, Unset): id = UNSET else: id = UUID(_id) _property_field_type = d.pop("property_field_type", UNSET) - property_field_type: Unset | UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType + property_field_type: UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType | Unset if isinstance(_property_field_type, Unset): property_field_type = UNSET else: @@ -114,7 +115,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _property_field_condition_type = d.pop("property_field_condition_type", UNSET) property_field_condition_type: ( - Unset | UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType + UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType | Unset ) if isinstance(_property_field_condition_type, Unset): property_field_condition_type = UNSET @@ -125,12 +126,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) ) - def _parse_property_field_value(data: object) -> None | Unset | str: + def _parse_property_field_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) property_field_value = _parse_property_field_value(d.pop("property_field_value", UNSET)) diff --git a/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination.py b/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination.py index 1107b097..4354e978 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from uuid import UUID @@ -18,20 +20,21 @@ class UpdateAlertRoutingRuleDataAttributesDestination: """ Attributes: - target_type (Union[Unset, UpdateAlertRoutingRuleDataAttributesDestinationTargetType]): The type of the target - target_id (Union[Unset, UUID]): The ID of the target + target_type (UpdateAlertRoutingRuleDataAttributesDestinationTargetType | Unset): The type of the target. Please + contact support if you encounter issues using `Functionality` as a target type. + target_id (UUID | Unset): The ID of the target """ - target_type: Unset | UpdateAlertRoutingRuleDataAttributesDestinationTargetType = UNSET - target_id: Unset | UUID = UNSET + target_type: UpdateAlertRoutingRuleDataAttributesDestinationTargetType | Unset = UNSET + target_id: UUID | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - target_type: Unset | str = UNSET + target_type: str | Unset = UNSET if not isinstance(self.target_type, Unset): target_type = self.target_type - target_id: Unset | str = UNSET + target_id: str | Unset = UNSET if not isinstance(self.target_id, Unset): target_id = str(self.target_id) @@ -49,14 +52,14 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _target_type = d.pop("target_type", UNSET) - target_type: Unset | UpdateAlertRoutingRuleDataAttributesDestinationTargetType + target_type: UpdateAlertRoutingRuleDataAttributesDestinationTargetType | Unset if isinstance(_target_type, Unset): target_type = UNSET else: target_type = check_update_alert_routing_rule_data_attributes_destination_target_type(_target_type) _target_id = d.pop("target_id", UNSET) - target_id: Unset | UUID + target_id: UUID | Unset if isinstance(_target_id, Unset): target_id = UNSET else: diff --git a/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination_target_type.py b/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination_target_type.py index bae01320..de1fc25f 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination_target_type.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes_destination_target_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UpdateAlertRoutingRuleDataAttributesDestinationTargetType = Literal["EscalationPolicy", "Group", "Service"] +UpdateAlertRoutingRuleDataAttributesDestinationTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service" +] UPDATE_ALERT_ROUTING_RULE_DATA_ATTRIBUTES_DESTINATION_TARGET_TYPE_VALUES: set[ UpdateAlertRoutingRuleDataAttributesDestinationTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/update_alert_urgency.py b/rootly_sdk/models/update_alert_urgency.py index 4ab66a74..1f915593 100644 --- a/rootly_sdk/models/update_alert_urgency.py +++ b/rootly_sdk/models/update_alert_urgency.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlertUrgency: data (UpdateAlertUrgencyData): """ - data: "UpdateAlertUrgencyData" + data: UpdateAlertUrgencyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_urgency_data.py b/rootly_sdk/models/update_alert_urgency_data.py index 0e1ffff3..f1222acf 100644 --- a/rootly_sdk/models/update_alert_urgency_data.py +++ b/rootly_sdk/models/update_alert_urgency_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAlertUrgencyData: """ type_: UpdateAlertUrgencyDataType - attributes: "UpdateAlertUrgencyDataAttributes" + attributes: UpdateAlertUrgencyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alert_urgency_data_attributes.py b/rootly_sdk/models/update_alert_urgency_data_attributes.py index 88ae69eb..0099ccef 100644 --- a/rootly_sdk/models/update_alert_urgency_data_attributes.py +++ b/rootly_sdk/models/update_alert_urgency_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,21 +14,21 @@ class UpdateAlertUrgencyDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert urgency - description (Union[Unset, str]): The description of the alert urgency - position (Union[None, Unset, int]): Position of the alert urgency + name (str | Unset): The name of the alert urgency + description (str | Unset): The description of the alert urgency + position (int | None | Unset): Position of the alert urgency """ - name: Unset | str = UNSET - description: Unset | str = UNSET - position: None | Unset | int = UNSET + name: str | Unset = UNSET + description: str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -51,12 +53,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_alerts_source.py b/rootly_sdk/models/update_alerts_source.py index 2c27342d..21792cff 100644 --- a/rootly_sdk/models/update_alerts_source.py +++ b/rootly_sdk/models/update_alerts_source.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAlertsSource: data (UpdateAlertsSourceData): """ - data: "UpdateAlertsSourceData" + data: UpdateAlertsSourceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alerts_source_data.py b/rootly_sdk/models/update_alerts_source_data.py index c7409215..3ae5eb33 100644 --- a/rootly_sdk/models/update_alerts_source_data.py +++ b/rootly_sdk/models/update_alerts_source_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAlertsSourceData: """ type_: UpdateAlertsSourceDataType - attributes: "UpdateAlertsSourceDataAttributes" + attributes: UpdateAlertsSourceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_alerts_source_data_attributes.py b/rootly_sdk/models/update_alerts_source_data_attributes.py index 4e7c5263..91a3c487 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -38,51 +40,45 @@ class UpdateAlertsSourceDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the alert source - source_type (Union[Unset, UpdateAlertsSourceDataAttributesSourceType]): The alert source type - alert_urgency_id (Union[Unset, str]): ID for the default alert urgency assigned to this alert source - deduplicate_alerts_by_key (Union[Unset, bool]): Toggle alert deduplication using deduplication key. If enabled, + name (str | Unset): The name of the alert source + source_type (UpdateAlertsSourceDataAttributesSourceType | Unset): The alert source type + alert_urgency_id (str | Unset): ID for the default alert urgency assigned to this alert source + deduplicate_alerts_by_key (bool | Unset): Toggle alert deduplication using deduplication key. If enabled, deduplication_key_kind and deduplication_key_path are required. - deduplication_key_kind (Union[Unset, UpdateAlertsSourceDataAttributesDeduplicationKeyKind]): Kind of - deduplication key. - deduplication_key_path (Union[None, Unset, str]): Path to deduplication key. This is a JSON Path to extract the + deduplication_key_kind (UpdateAlertsSourceDataAttributesDeduplicationKeyKind | Unset): Kind of deduplication + key. + deduplication_key_path (None | str | Unset): Path to deduplication key. This is a JSON Path to extract the deduplication key from the request body. - deduplication_key_regexp (Union[None, Unset, str]): Regular expression to extract key from value found at key - path. - owner_group_ids (Union[Unset, list[str]]): List of team IDs that will own the alert source - alert_template_attributes (Union['UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0', None, Unset]): - alert_source_urgency_rules_attributes (Union[Unset, - list['UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem']]): List of rules that define the - conditions under which the alert urgency will be set automatically based on the alert payload - sourceable_attributes (Union['UpdateAlertsSourceDataAttributesSourceableAttributesType0', None, Unset]): Provide + deduplication_key_regexp (None | str | Unset): Regular expression to extract key from value found at key path. + owner_group_ids (list[str] | Unset): List of team IDs that will own the alert source + alert_template_attributes (None | Unset | UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0): + alert_source_urgency_rules_attributes + (list[UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem] | Unset): List of rules that define + the conditions under which the alert urgency will be set automatically based on the alert payload + sourceable_attributes (None | Unset | UpdateAlertsSourceDataAttributesSourceableAttributesType0): Provide additional attributes for generic_webhook alerts source - resolution_rule_attributes (Union['UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0', None, - Unset]): Provide additional attributes for email alerts source - alert_source_fields_attributes (Union[Unset, - list['UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem']]): List of alert fields to be added to - the alert source. Note: This attribute requires the alert field feature to be enabled on your account. Contact - Rootly customer support if you need assistance with this feature. + resolution_rule_attributes (None | Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0): + Provide additional attributes for email alerts source + alert_source_fields_attributes (list[UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset): + List of alert fields to be added to the alert source. Note: This attribute requires the alert field feature to + be enabled on your account. Contact Rootly customer support if you need assistance with this feature. """ - name: Unset | str = UNSET - source_type: Unset | UpdateAlertsSourceDataAttributesSourceType = UNSET - alert_urgency_id: Unset | str = UNSET - deduplicate_alerts_by_key: Unset | bool = UNSET - deduplication_key_kind: Unset | UpdateAlertsSourceDataAttributesDeduplicationKeyKind = UNSET - deduplication_key_path: None | Unset | str = UNSET - deduplication_key_regexp: None | Unset | str = UNSET - owner_group_ids: Unset | list[str] = UNSET - alert_template_attributes: Union["UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0", None, Unset] = ( - UNSET - ) + name: str | Unset = UNSET + source_type: UpdateAlertsSourceDataAttributesSourceType | Unset = UNSET + alert_urgency_id: str | Unset = UNSET + deduplicate_alerts_by_key: bool | Unset = UNSET + deduplication_key_kind: UpdateAlertsSourceDataAttributesDeduplicationKeyKind | Unset = UNSET + deduplication_key_path: None | str | Unset = UNSET + deduplication_key_regexp: None | str | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET + alert_template_attributes: None | Unset | UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0 = UNSET alert_source_urgency_rules_attributes: ( - Unset | list["UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem"] + list[UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem] | Unset ) = UNSET - sourceable_attributes: Union["UpdateAlertsSourceDataAttributesSourceableAttributesType0", None, Unset] = UNSET - resolution_rule_attributes: Union["UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0", None, Unset] = ( - UNSET - ) - alert_source_fields_attributes: Unset | list["UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem"] = ( + sourceable_attributes: None | Unset | UpdateAlertsSourceDataAttributesSourceableAttributesType0 = UNSET + resolution_rule_attributes: None | Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0 = UNSET + alert_source_fields_attributes: list[UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset = ( UNSET ) @@ -99,7 +95,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - source_type: Unset | str = UNSET + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -107,27 +103,27 @@ def to_dict(self) -> dict[str, Any]: deduplicate_alerts_by_key = self.deduplicate_alerts_by_key - deduplication_key_kind: Unset | str = UNSET + deduplication_key_kind: str | Unset = UNSET if not isinstance(self.deduplication_key_kind, Unset): deduplication_key_kind = self.deduplication_key_kind - deduplication_key_path: None | Unset | str + deduplication_key_path: None | str | Unset if isinstance(self.deduplication_key_path, Unset): deduplication_key_path = UNSET else: deduplication_key_path = self.deduplication_key_path - deduplication_key_regexp: None | Unset | str + deduplication_key_regexp: None | str | Unset if isinstance(self.deduplication_key_regexp, Unset): deduplication_key_regexp = UNSET else: deduplication_key_regexp = self.deduplication_key_regexp - owner_group_ids: Unset | list[str] = UNSET + owner_group_ids: list[str] | Unset = UNSET if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids - alert_template_attributes: None | Unset | dict[str, Any] + alert_template_attributes: dict[str, Any] | None | Unset if isinstance(self.alert_template_attributes, Unset): alert_template_attributes = UNSET elif isinstance(self.alert_template_attributes, UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0): @@ -135,14 +131,14 @@ def to_dict(self) -> dict[str, Any]: else: alert_template_attributes = self.alert_template_attributes - alert_source_urgency_rules_attributes: Unset | list[dict[str, Any]] = UNSET + alert_source_urgency_rules_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_source_urgency_rules_attributes, Unset): alert_source_urgency_rules_attributes = [] for alert_source_urgency_rules_attributes_item_data in self.alert_source_urgency_rules_attributes: alert_source_urgency_rules_attributes_item = alert_source_urgency_rules_attributes_item_data.to_dict() alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) - sourceable_attributes: None | Unset | dict[str, Any] + sourceable_attributes: dict[str, Any] | None | Unset if isinstance(self.sourceable_attributes, Unset): sourceable_attributes = UNSET elif isinstance(self.sourceable_attributes, UpdateAlertsSourceDataAttributesSourceableAttributesType0): @@ -150,7 +146,7 @@ def to_dict(self) -> dict[str, Any]: else: sourceable_attributes = self.sourceable_attributes - resolution_rule_attributes: None | Unset | dict[str, Any] + resolution_rule_attributes: dict[str, Any] | None | Unset if isinstance(self.resolution_rule_attributes, Unset): resolution_rule_attributes = UNSET elif isinstance(self.resolution_rule_attributes, UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0): @@ -158,7 +154,7 @@ def to_dict(self) -> dict[str, Any]: else: resolution_rule_attributes = self.resolution_rule_attributes - alert_source_fields_attributes: Unset | list[dict[str, Any]] = UNSET + alert_source_fields_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.alert_source_fields_attributes, Unset): alert_source_fields_attributes = [] for alert_source_fields_attributes_item_data in self.alert_source_fields_attributes: @@ -219,7 +215,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _source_type = d.pop("source_type", UNSET) - source_type: Unset | UpdateAlertsSourceDataAttributesSourceType + source_type: UpdateAlertsSourceDataAttributesSourceType | Unset if isinstance(_source_type, Unset): source_type = UNSET else: @@ -230,7 +226,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: deduplicate_alerts_by_key = d.pop("deduplicate_alerts_by_key", UNSET) _deduplication_key_kind = d.pop("deduplication_key_kind", UNSET) - deduplication_key_kind: Unset | UpdateAlertsSourceDataAttributesDeduplicationKeyKind + deduplication_key_kind: UpdateAlertsSourceDataAttributesDeduplicationKeyKind | Unset if isinstance(_deduplication_key_kind, Unset): deduplication_key_kind = UNSET else: @@ -238,21 +234,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _deduplication_key_kind ) - def _parse_deduplication_key_path(data: object) -> None | Unset | str: + def _parse_deduplication_key_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key_path = _parse_deduplication_key_path(d.pop("deduplication_key_path", UNSET)) - def _parse_deduplication_key_regexp(data: object) -> None | Unset | str: + def _parse_deduplication_key_regexp(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) deduplication_key_regexp = _parse_deduplication_key_regexp(d.pop("deduplication_key_regexp", UNSET)) @@ -260,7 +256,7 @@ def _parse_deduplication_key_regexp(data: object) -> None | Unset | str: def _parse_alert_template_attributes( data: object, - ) -> Union["UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0", None, Unset]: + ) -> None | Unset | UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0: if data is None: return data if isinstance(data, Unset): @@ -273,26 +269,30 @@ def _parse_alert_template_attributes( ) return alert_template_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0", None, Unset], data) + return cast(None | Unset | UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0, data) alert_template_attributes = _parse_alert_template_attributes(d.pop("alert_template_attributes", UNSET)) - alert_source_urgency_rules_attributes = [] _alert_source_urgency_rules_attributes = d.pop("alert_source_urgency_rules_attributes", UNSET) - for alert_source_urgency_rules_attributes_item_data in _alert_source_urgency_rules_attributes or []: - alert_source_urgency_rules_attributes_item = ( - UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem.from_dict( - alert_source_urgency_rules_attributes_item_data + alert_source_urgency_rules_attributes: ( + list[UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem] | Unset + ) = UNSET + if _alert_source_urgency_rules_attributes is not UNSET: + alert_source_urgency_rules_attributes = [] + for alert_source_urgency_rules_attributes_item_data in _alert_source_urgency_rules_attributes: + alert_source_urgency_rules_attributes_item = ( + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem.from_dict( + alert_source_urgency_rules_attributes_item_data + ) ) - ) - alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) + alert_source_urgency_rules_attributes.append(alert_source_urgency_rules_attributes_item) def _parse_sourceable_attributes( data: object, - ) -> Union["UpdateAlertsSourceDataAttributesSourceableAttributesType0", None, Unset]: + ) -> None | Unset | UpdateAlertsSourceDataAttributesSourceableAttributesType0: if data is None: return data if isinstance(data, Unset): @@ -303,15 +303,15 @@ def _parse_sourceable_attributes( sourceable_attributes_type_0 = UpdateAlertsSourceDataAttributesSourceableAttributesType0.from_dict(data) return sourceable_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateAlertsSourceDataAttributesSourceableAttributesType0", None, Unset], data) + return cast(None | Unset | UpdateAlertsSourceDataAttributesSourceableAttributesType0, data) sourceable_attributes = _parse_sourceable_attributes(d.pop("sourceable_attributes", UNSET)) def _parse_resolution_rule_attributes( data: object, - ) -> Union["UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0", None, Unset]: + ) -> None | Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0: if data is None: return data if isinstance(data, Unset): @@ -324,22 +324,26 @@ def _parse_resolution_rule_attributes( ) return resolution_rule_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0", None, Unset], data) + return cast(None | Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0, data) resolution_rule_attributes = _parse_resolution_rule_attributes(d.pop("resolution_rule_attributes", UNSET)) - alert_source_fields_attributes = [] _alert_source_fields_attributes = d.pop("alert_source_fields_attributes", UNSET) - for alert_source_fields_attributes_item_data in _alert_source_fields_attributes or []: - alert_source_fields_attributes_item = ( - UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem.from_dict( - alert_source_fields_attributes_item_data + alert_source_fields_attributes: ( + list[UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset + ) = UNSET + if _alert_source_fields_attributes is not UNSET: + alert_source_fields_attributes = [] + for alert_source_fields_attributes_item_data in _alert_source_fields_attributes: + alert_source_fields_attributes_item = ( + UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem.from_dict( + alert_source_fields_attributes_item_data + ) ) - ) - alert_source_fields_attributes.append(alert_source_fields_attributes_item) + alert_source_fields_attributes.append(alert_source_fields_attributes_item) update_alerts_source_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_fields_attributes_item.py b/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_fields_attributes_item.py index 954963ad..e08e80c0 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_fields_attributes_item.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_fields_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,19 +15,19 @@ class UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem: """ Attributes: - alert_field_id (Union[Unset, str]): The ID of the alert field - template_body (Union[None, Unset, str]): Liquid expression to extract a specific value from the alert's payload - for evaluation + alert_field_id (str | Unset): The ID of the alert field + template_body (None | str | Unset): Liquid expression to extract a specific value from the alert's payload for + evaluation """ - alert_field_id: Unset | str = UNSET - template_body: None | Unset | str = UNSET + alert_field_id: str | Unset = UNSET + template_body: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: alert_field_id = self.alert_field_id - template_body: None | Unset | str + template_body: None | str | Unset if isinstance(self.template_body, Unset): template_body = UNSET else: @@ -46,12 +48,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) alert_field_id = d.pop("alert_field_id", UNSET) - def _parse_template_body(data: object) -> None | Unset | str: + def _parse_template_body(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) template_body = _parse_template_body(d.pop("template_body", UNSET)) diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py b/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py index 4542ac61..8dbf2010 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,57 +27,56 @@ class UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem: """ Attributes: - json_path (Union[None, Unset, str]): JSON path expression to extract a specific value from the alert's payload - for evaluation - operator (Union[Unset, UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator]): - Comparison operator used to evaluate the extracted value against the specified condition - value (Union[Unset, str]): Value that the extracted payload data is compared to using the specified operator to + json_path (None | str | Unset): JSON path expression to extract a specific value from the alert's payload for + evaluation + operator (UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator | Unset): Comparison + operator used to evaluate the extracted value against the specified condition + value (str | Unset): Value that the extracted payload data is compared to using the specified operator to determine a match - conditionable_type (Union[Unset, - UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType]): The type of the - conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. - kind (Union[Unset, UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind]): The kind of the + conditionable_type (UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType | + Unset): The type of the conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. + kind (UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind | Unset): The kind of the conditionable - alert_urgency_id (Union[Unset, str]): The ID of the alert urgency + alert_urgency_id (str | Unset): The ID of the alert urgency """ - json_path: None | Unset | str = UNSET - operator: Unset | UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator = UNSET - value: Unset | str = UNSET + json_path: None | str | Unset = UNSET + operator: UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator | Unset = UNSET + value: str | Unset = UNSET conditionable_type: ( - Unset | UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType | Unset ) = UNSET - conditionable_id: None | Unset | str = UNSET - kind: Unset | UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind = UNSET - alert_urgency_id: Unset | str = UNSET + conditionable_id: None | str | Unset = UNSET + kind: UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind | Unset = UNSET + alert_urgency_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - json_path: None | Unset | str + json_path: None | str | Unset if isinstance(self.json_path, Unset): json_path = UNSET else: json_path = self.json_path - operator: Unset | str = UNSET + operator: str | Unset = UNSET if not isinstance(self.operator, Unset): operator = self.operator value = self.value - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: conditionable_id = self.conditionable_id - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -105,17 +106,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_json_path(data: object) -> None | Unset | str: + def _parse_json_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) json_path = _parse_json_path(d.pop("json_path", UNSET)) _operator = d.pop("operator", UNSET) - operator: Unset | UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator + operator: UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator | Unset if isinstance(_operator, Unset): operator = UNSET else: @@ -127,7 +128,7 @@ def _parse_json_path(data: object) -> None | Unset | str: _conditionable_type = d.pop("conditionable_type", UNSET) conditionable_type: ( - Unset | UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType | Unset ) if isinstance(_conditionable_type, Unset): conditionable_type = UNSET @@ -136,17 +137,17 @@ def _parse_json_path(data: object) -> None | Unset | str: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind + kind: UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_alert_template_attributes_type_0.py b/rootly_sdk/models/update_alerts_source_data_attributes_alert_template_attributes_type_0.py index 9e04ab56..246b5909 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_alert_template_attributes_type_0.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_alert_template_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,30 +15,30 @@ class UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0: """ Attributes: - title (Union[None, Unset, str]): The alert title. - description (Union[None, Unset, str]): The alert description. - external_url (Union[None, Unset, str]): The alert URL. + title (None | str | Unset): The alert title. + description (None | str | Unset): The alert description. + external_url (None | str | Unset): The alert URL. """ - title: None | Unset | str = UNSET - description: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET + title: None | str | Unset = UNSET + description: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: @@ -58,30 +60,30 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py b/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py index 2dce4d7d..0fb21b48 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -32,76 +34,74 @@ class UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0: """Provide additional attributes for email alerts source Attributes: - enabled (Union[Unset, bool]): Set this to true to enable the auto resolution rule - condition_type (Union[Unset, UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType]): The - type of condition to evaluate to apply auto resolution rule - identifier_matchable_type (Union[Unset, - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType]): The type of the - identifier matchable - identifier_matchable_id (Union[None, Unset, str]): The ID of the identifier matchable. If - identifier_matchable_type is AlertField, this is the ID of the alert field. - identifier_reference_kind (Union[Unset, - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind]): The kind of the - identifier reference - identifier_json_path (Union[None, Unset, str]): JSON path expression to extract unique alert identifier used to - match triggered alerts with resolving alerts - identifier_value_regex (Union[None, Unset, str]): Regex group to further specify the part of the string used as - a unique identifier - conditions_attributes (Union[Unset, - list['UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem']]): List of + enabled (bool | Unset): Set this to true to enable the auto resolution rule + condition_type (UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType | Unset): The type of + condition to evaluate to apply auto resolution rule + identifier_matchable_type (UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType + | Unset): The type of the identifier matchable + identifier_matchable_id (None | str | Unset): The ID of the identifier matchable. If identifier_matchable_type + is AlertField, this is the ID of the alert field. + identifier_reference_kind (UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind + | Unset): The kind of the identifier reference + identifier_json_path (None | str | Unset): JSON path expression to extract unique alert identifier used to match + triggered alerts with resolving alerts + identifier_value_regex (None | str | Unset): Regex group to further specify the part of the string used as a + unique identifier + conditions_attributes + (list[UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem] | Unset): List of conditions to evaluate for auto resolution """ - enabled: Unset | bool = UNSET - condition_type: Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType = UNSET + enabled: bool | Unset = UNSET + condition_type: UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType | Unset = UNSET identifier_matchable_type: ( - Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType | Unset ) = UNSET - identifier_matchable_id: None | Unset | str = UNSET + identifier_matchable_id: None | str | Unset = UNSET identifier_reference_kind: ( - Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind | Unset ) = UNSET - identifier_json_path: None | Unset | str = UNSET - identifier_value_regex: None | Unset | str = UNSET + identifier_json_path: None | str | Unset = UNSET + identifier_value_regex: None | str | Unset = UNSET conditions_attributes: ( - Unset | list["UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem"] + list[UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem] | Unset ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: enabled = self.enabled - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - identifier_matchable_type: Unset | str = UNSET + identifier_matchable_type: str | Unset = UNSET if not isinstance(self.identifier_matchable_type, Unset): identifier_matchable_type = self.identifier_matchable_type - identifier_matchable_id: None | Unset | str + identifier_matchable_id: None | str | Unset if isinstance(self.identifier_matchable_id, Unset): identifier_matchable_id = UNSET else: identifier_matchable_id = self.identifier_matchable_id - identifier_reference_kind: Unset | str = UNSET + identifier_reference_kind: str | Unset = UNSET if not isinstance(self.identifier_reference_kind, Unset): identifier_reference_kind = self.identifier_reference_kind - identifier_json_path: None | Unset | str + identifier_json_path: None | str | Unset if isinstance(self.identifier_json_path, Unset): identifier_json_path = UNSET else: identifier_json_path = self.identifier_json_path - identifier_value_regex: None | Unset | str + identifier_value_regex: None | str | Unset if isinstance(self.identifier_value_regex, Unset): identifier_value_regex = UNSET else: identifier_value_regex = self.identifier_value_regex - conditions_attributes: Unset | list[dict[str, Any]] = UNSET + conditions_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.conditions_attributes, Unset): conditions_attributes = [] for conditions_attributes_item_data in self.conditions_attributes: @@ -140,7 +140,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType + condition_type: UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: @@ -152,7 +152,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _identifier_matchable_type = d.pop("identifier_matchable_type", UNSET) identifier_matchable_type: ( - Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType | Unset ) if isinstance(_identifier_matchable_type, Unset): identifier_matchable_type = UNSET @@ -163,18 +163,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) ) - def _parse_identifier_matchable_id(data: object) -> None | Unset | str: + def _parse_identifier_matchable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_matchable_id = _parse_identifier_matchable_id(d.pop("identifier_matchable_id", UNSET)) _identifier_reference_kind = d.pop("identifier_reference_kind", UNSET) identifier_reference_kind: ( - Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind | Unset ) if isinstance(_identifier_reference_kind, Unset): identifier_reference_kind = UNSET @@ -185,34 +185,38 @@ def _parse_identifier_matchable_id(data: object) -> None | Unset | str: ) ) - def _parse_identifier_json_path(data: object) -> None | Unset | str: + def _parse_identifier_json_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_json_path = _parse_identifier_json_path(d.pop("identifier_json_path", UNSET)) - def _parse_identifier_value_regex(data: object) -> None | Unset | str: + def _parse_identifier_value_regex(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) identifier_value_regex = _parse_identifier_value_regex(d.pop("identifier_value_regex", UNSET)) - conditions_attributes = [] _conditions_attributes = d.pop("conditions_attributes", UNSET) - for conditions_attributes_item_data in _conditions_attributes or []: - conditions_attributes_item = ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem.from_dict( - conditions_attributes_item_data + conditions_attributes: ( + list[UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem] | Unset + ) = UNSET + if _conditions_attributes is not UNSET: + conditions_attributes = [] + for conditions_attributes_item_data in _conditions_attributes: + conditions_attributes_item = ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem.from_dict( + conditions_attributes_item_data + ) ) - ) - conditions_attributes.append(conditions_attributes_item) + conditions_attributes.append(conditions_attributes_item) update_alerts_source_data_attributes_resolution_rule_attributes_type_0 = cls( enabled=enabled, diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py b/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py index c991994f..0676be4b 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -25,58 +27,57 @@ class UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem: """ Attributes: - field (Union[None, Unset, str]): JSON path expression to extract a specific value from the alert's payload for + field (None | str | Unset): JSON path expression to extract a specific value from the alert's payload for evaluation - operator (Union[Unset, - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator]): Comparison - operator used to evaluate the extracted value against the specified condition - value (Union[Unset, str]): Value that the extracted payload data is compared to using the specified operator to + operator (UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator | + Unset): Comparison operator used to evaluate the extracted value against the specified condition + value (str | Unset): Value that the extracted payload data is compared to using the specified operator to determine a match - conditionable_type (Union[Unset, - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType]): The - type of the conditionable - conditionable_id (Union[None, Unset, str]): The ID of the conditionable. If conditionable_type is AlertField, - this is the ID of the alert field. - kind (Union[Unset, UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind]): - The kind of the conditionable + conditionable_type + (UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | + Unset): The type of the conditionable + conditionable_id (None | str | Unset): The ID of the conditionable. If conditionable_type is AlertField, this is + the ID of the alert field. + kind (UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset): The + kind of the conditionable """ - field: None | Unset | str = UNSET - operator: Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator = ( + field: None | str | Unset = UNSET + operator: UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset = ( UNSET ) - value: Unset | str = UNSET + value: str | Unset = UNSET conditionable_type: ( - Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType | Unset ) = UNSET - conditionable_id: None | Unset | str = UNSET - kind: Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind = UNSET + conditionable_id: None | str | Unset = UNSET + kind: UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - field: None | Unset | str + field: None | str | Unset if isinstance(self.field, Unset): field = UNSET else: field = self.field - operator: Unset | str = UNSET + operator: str | Unset = UNSET if not isinstance(self.operator, Unset): operator = self.operator value = self.value - conditionable_type: Unset | str = UNSET + conditionable_type: str | Unset = UNSET if not isinstance(self.conditionable_type, Unset): conditionable_type = self.conditionable_type - conditionable_id: None | Unset | str + conditionable_id: None | str | Unset if isinstance(self.conditionable_id, Unset): conditionable_id = UNSET else: conditionable_id = self.conditionable_id - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -102,17 +103,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_field(data: object) -> None | Unset | str: + def _parse_field(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) field = _parse_field(d.pop("field", UNSET)) _operator = d.pop("operator", UNSET) - operator: Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator + operator: UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator | Unset if isinstance(_operator, Unset): operator = UNSET else: @@ -124,8 +125,8 @@ def _parse_field(data: object) -> None | Unset | str: _conditionable_type = d.pop("conditionable_type", UNSET) conditionable_type: ( - Unset - | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType + | Unset ) if isinstance(_conditionable_type, Unset): conditionable_type = UNSET @@ -134,17 +135,17 @@ def _parse_field(data: object) -> None | Unset | str: _conditionable_type ) - def _parse_conditionable_id(data: object) -> None | Unset | str: + def _parse_conditionable_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) conditionable_id = _parse_conditionable_id(d.pop("conditionable_id", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind + kind: UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind | Unset if isinstance(_kind, Unset): kind = UNSET else: diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py b/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py index 9b3f2afc..547587cb 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_source_type.py @@ -4,6 +4,7 @@ "alertmanager", "app_dynamics", "app_optics", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -11,6 +12,7 @@ "chronosphere", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "google_cloud", @@ -28,6 +30,7 @@ "alertmanager", "app_dynamics", "app_optics", + "aws_sns", "azure", "bug_snag", "catchpoint", @@ -35,6 +38,7 @@ "chronosphere", "cloud_watch", "datadog", + "dynatrace", "email", "generic_webhook", "google_cloud", diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py index fa03678d..d1bd75ba 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -20,28 +22,28 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0: """Provide additional attributes for generic_webhook alerts source Attributes: - auto_resolve (Union[Unset, bool]): Set this to true to auto-resolve alerts based on field_mappings_attributes + auto_resolve (bool | Unset): Set this to true to auto-resolve alerts based on field_mappings_attributes conditions - resolve_state (Union[None, Unset, str]): This value is matched with the value extracted from alerts payload - using JSON path in field_mappings_attributes - accept_threaded_emails (Union[Unset, bool]): Set this to false to reject threaded emails - field_mappings_attributes (Union[Unset, - list['UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem']]): Specify rules to - auto resolve alerts + resolve_state (None | str | Unset): This value is matched with the value extracted from alerts payload using + JSON path in field_mappings_attributes + accept_threaded_emails (bool | Unset): Set this to false to reject threaded emails + field_mappings_attributes + (list[UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem] | Unset): Specify + rules to auto resolve alerts """ - auto_resolve: Unset | bool = UNSET - resolve_state: None | Unset | str = UNSET - accept_threaded_emails: Unset | bool = UNSET + auto_resolve: bool | Unset = UNSET + resolve_state: None | str | Unset = UNSET + accept_threaded_emails: bool | Unset = UNSET field_mappings_attributes: ( - Unset | list["UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem"] + list[UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem] | Unset ) = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: auto_resolve = self.auto_resolve - resolve_state: None | Unset | str + resolve_state: None | str | Unset if isinstance(self.resolve_state, Unset): resolve_state = UNSET else: @@ -49,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: accept_threaded_emails = self.accept_threaded_emails - field_mappings_attributes: Unset | list[dict[str, Any]] = UNSET + field_mappings_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.field_mappings_attributes, Unset): field_mappings_attributes = [] for field_mappings_attributes_item_data in self.field_mappings_attributes: @@ -79,27 +81,31 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) auto_resolve = d.pop("auto_resolve", UNSET) - def _parse_resolve_state(data: object) -> None | Unset | str: + def _parse_resolve_state(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolve_state = _parse_resolve_state(d.pop("resolve_state", UNSET)) accept_threaded_emails = d.pop("accept_threaded_emails", UNSET) - field_mappings_attributes = [] _field_mappings_attributes = d.pop("field_mappings_attributes", UNSET) - for field_mappings_attributes_item_data in _field_mappings_attributes or []: - field_mappings_attributes_item = ( - UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem.from_dict( - field_mappings_attributes_item_data + field_mappings_attributes: ( + list[UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem] | Unset + ) = UNSET + if _field_mappings_attributes is not UNSET: + field_mappings_attributes = [] + for field_mappings_attributes_item_data in _field_mappings_attributes: + field_mappings_attributes_item = ( + UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem.from_dict( + field_mappings_attributes_item_data + ) ) - ) - field_mappings_attributes.append(field_mappings_attributes_item) + field_mappings_attributes.append(field_mappings_attributes_item) update_alerts_source_data_attributes_sourceable_attributes_type_0 = cls( auto_resolve=auto_resolve, diff --git a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py index 9982bd39..b89f8b85 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,18 +19,18 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem: """ Attributes: - field (Union[Unset, UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField]): + field (UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset): Select the field on which the condition to be evaluated - json_path (Union[Unset, str]): JSON path expression to extract a specific value from the alert's payload for + json_path (str | Unset): JSON path expression to extract a specific value from the alert's payload for evaluation """ - field: Unset | UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField = UNSET - json_path: Unset | str = UNSET + field: UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET + json_path: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - field: Unset | str = UNSET + field: str | Unset = UNSET if not isinstance(self.field, Unset): field = self.field @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _field = d.pop("field", UNSET) - field: Unset | UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField + field: UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset if isinstance(_field, Unset): field = UNSET else: diff --git a/rootly_sdk/models/update_api_key.py b/rootly_sdk/models/update_api_key.py new file mode 100644 index 00000000..3bb6e234 --- /dev/null +++ b/rootly_sdk/models/update_api_key.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_api_key_data import UpdateApiKeyData + + +T = TypeVar("T", bound="UpdateApiKey") + + +@_attrs_define +class UpdateApiKey: + """ + Attributes: + data (UpdateApiKeyData): + """ + + data: UpdateApiKeyData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_api_key_data import UpdateApiKeyData + + d = dict(src_dict) + data = UpdateApiKeyData.from_dict(d.pop("data")) + + update_api_key = cls( + data=data, + ) + + update_api_key.additional_properties = d + return update_api_key + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_api_key_data.py b/rootly_sdk/models/update_api_key_data.py new file mode 100644 index 00000000..2577a981 --- /dev/null +++ b/rootly_sdk/models/update_api_key_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_api_key_data_type import UpdateApiKeyDataType, check_update_api_key_data_type + +if TYPE_CHECKING: + from ..models.update_api_key_data_attributes import UpdateApiKeyDataAttributes + + +T = TypeVar("T", bound="UpdateApiKeyData") + + +@_attrs_define +class UpdateApiKeyData: + """ + Attributes: + type_ (UpdateApiKeyDataType): + attributes (UpdateApiKeyDataAttributes): + """ + + type_: UpdateApiKeyDataType + attributes: UpdateApiKeyDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_api_key_data_attributes import UpdateApiKeyDataAttributes + + d = dict(src_dict) + type_ = check_update_api_key_data_type(d.pop("type")) + + attributes = UpdateApiKeyDataAttributes.from_dict(d.pop("attributes")) + + update_api_key_data = cls( + type_=type_, + attributes=attributes, + ) + + update_api_key_data.additional_properties = d + return update_api_key_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_api_key_data_attributes.py b/rootly_sdk/models/update_api_key_data_attributes.py new file mode 100644 index 00000000..a3739511 --- /dev/null +++ b/rootly_sdk/models/update_api_key_data_attributes.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateApiKeyDataAttributes") + + +@_attrs_define +class UpdateApiKeyDataAttributes: + """ + Attributes: + name (str | Unset): The name of the API key + description (None | str | Unset): A description of the API key + expires_at (datetime.datetime | None | Unset): The expiration date of the API key (ISO 8601) + """ + + name: str | Unset = UNSET + description: None | str | Unset = UNSET + expires_at: datetime.datetime | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + expires_at: None | str | Unset + if isinstance(self.expires_at, Unset): + expires_at = UNSET + elif isinstance(self.expires_at, datetime.datetime): + expires_at = self.expires_at.isoformat() + else: + expires_at = self.expires_at + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if expires_at is not UNSET: + field_dict["expires_at"] = expires_at + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_expires_at(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + expires_at_type_0 = isoparse(data) + + return expires_at_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + expires_at = _parse_expires_at(d.pop("expires_at", UNSET)) + + update_api_key_data_attributes = cls( + name=name, + description=description, + expires_at=expires_at, + ) + + return update_api_key_data_attributes diff --git a/rootly_sdk/models/update_api_key_data_type.py b/rootly_sdk/models/update_api_key_data_type.py new file mode 100644 index 00000000..49c80620 --- /dev/null +++ b/rootly_sdk/models/update_api_key_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +UpdateApiKeyDataType = Literal["api_keys"] + +UPDATE_API_KEY_DATA_TYPE_VALUES: set[UpdateApiKeyDataType] = { + "api_keys", +} + + +def check_update_api_key_data_type(value: str | None) -> UpdateApiKeyDataType | None: + if value is None: + return None + if value in UPDATE_API_KEY_DATA_TYPE_VALUES: + return cast(UpdateApiKeyDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_API_KEY_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/update_asana_task_task_params.py b/rootly_sdk/models/update_asana_task_task_params.py index 87c64f6c..5bc3f70a 100644 --- a/rootly_sdk/models/update_asana_task_task_params.py +++ b/rootly_sdk/models/update_asana_task_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -27,27 +29,27 @@ class UpdateAsanaTaskTaskParams: Attributes: task_id (str): The task id completion (UpdateAsanaTaskTaskParamsCompletion): - task_type (Union[Unset, UpdateAsanaTaskTaskParamsTaskType]): - title (Union[Unset, str]): The task title - notes (Union[Unset, str]): - assign_user_email (Union[Unset, str]): The assigned user's email - due_date (Union[Unset, str]): The due date - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateAsanaTaskTaskParamsTaskType | Unset): + title (str | Unset): The task title + notes (str | Unset): + assign_user_email (str | Unset): The assigned user's email + due_date (str | Unset): The due date + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - dependency_direction (Union[Unset, UpdateAsanaTaskTaskParamsDependencyDirection]): Default: 'blocking'. - dependent_task_ids (Union[None, Unset, list[str]]): Dependent task ids. Supports liquid syntax + dependency_direction (UpdateAsanaTaskTaskParamsDependencyDirection | Unset): Default: 'blocking'. + dependent_task_ids (list[str] | None | Unset): Dependent task ids. Supports liquid syntax """ task_id: str - completion: "UpdateAsanaTaskTaskParamsCompletion" - task_type: Unset | UpdateAsanaTaskTaskParamsTaskType = UNSET - title: Unset | str = UNSET - notes: Unset | str = UNSET - assign_user_email: Unset | str = UNSET - due_date: Unset | str = UNSET - custom_fields_mapping: None | Unset | str = UNSET - dependency_direction: Unset | UpdateAsanaTaskTaskParamsDependencyDirection = "blocking" - dependent_task_ids: None | Unset | list[str] = UNSET + completion: UpdateAsanaTaskTaskParamsCompletion + task_type: UpdateAsanaTaskTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + notes: str | Unset = UNSET + assign_user_email: str | Unset = UNSET + due_date: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + dependency_direction: UpdateAsanaTaskTaskParamsDependencyDirection | Unset = "blocking" + dependent_task_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -67,17 +69,17 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - dependency_direction: Unset | str = UNSET + dependency_direction: str | Unset = UNSET if not isinstance(self.dependency_direction, Unset): dependency_direction = self.dependency_direction - dependent_task_ids: None | Unset | list[str] + dependent_task_ids: list[str] | None | Unset if isinstance(self.dependent_task_ids, Unset): dependent_task_ids = UNSET elif isinstance(self.dependent_task_ids, list): @@ -123,7 +125,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = UpdateAsanaTaskTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateAsanaTaskTaskParamsTaskType + task_type: UpdateAsanaTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -137,23 +139,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) _dependency_direction = d.pop("dependency_direction", UNSET) - dependency_direction: Unset | UpdateAsanaTaskTaskParamsDependencyDirection + dependency_direction: UpdateAsanaTaskTaskParamsDependencyDirection | Unset if isinstance(_dependency_direction, Unset): dependency_direction = UNSET else: dependency_direction = check_update_asana_task_task_params_dependency_direction(_dependency_direction) - def _parse_dependent_task_ids(data: object) -> None | Unset | list[str]: + def _parse_dependent_task_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -164,9 +166,9 @@ def _parse_dependent_task_ids(data: object) -> None | Unset | list[str]: dependent_task_ids_type_0 = cast(list[str], data) return dependent_task_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) dependent_task_ids = _parse_dependent_task_ids(d.pop("dependent_task_ids", UNSET)) diff --git a/rootly_sdk/models/update_asana_task_task_params_completion.py b/rootly_sdk/models/update_asana_task_task_params_completion.py index 83952ce3..9ed49ae3 100644 --- a/rootly_sdk/models/update_asana_task_task_params_completion.py +++ b/rootly_sdk/models/update_asana_task_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateAsanaTaskTaskParamsCompletion: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_attached_alerts_task_params.py b/rootly_sdk/models/update_attached_alerts_task_params.py index 5220d7fb..eb67a79b 100644 --- a/rootly_sdk/models/update_attached_alerts_task_params.py +++ b/rootly_sdk/models/update_attached_alerts_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -22,17 +24,17 @@ class UpdateAttachedAlertsTaskParams: """ Attributes: status (UpdateAttachedAlertsTaskParamsStatus): - task_type (Union[Unset, UpdateAttachedAlertsTaskParamsTaskType]): + task_type (UpdateAttachedAlertsTaskParamsTaskType | Unset): """ status: UpdateAttachedAlertsTaskParamsStatus - task_type: Unset | UpdateAttachedAlertsTaskParamsTaskType = UNSET + task_type: UpdateAttachedAlertsTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: status: str = self.status - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -54,7 +56,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = check_update_attached_alerts_task_params_status(d.pop("status")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateAttachedAlertsTaskParamsTaskType + task_type: UpdateAttachedAlertsTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_authorization.py b/rootly_sdk/models/update_authorization.py index 93414489..ec2243f6 100644 --- a/rootly_sdk/models/update_authorization.py +++ b/rootly_sdk/models/update_authorization.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateAuthorization: data (UpdateAuthorizationData): """ - data: "UpdateAuthorizationData" + data: UpdateAuthorizationData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_authorization_data.py b/rootly_sdk/models/update_authorization_data.py index ff68e054..08aaa3c1 100644 --- a/rootly_sdk/models/update_authorization_data.py +++ b/rootly_sdk/models/update_authorization_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateAuthorizationData: """ type_: UpdateAuthorizationDataType - attributes: "UpdateAuthorizationDataAttributes" + attributes: UpdateAuthorizationDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_authorization_data_attributes.py b/rootly_sdk/models/update_authorization_data_attributes.py index e0ed42b6..a5e587cc 100644 --- a/rootly_sdk/models/update_authorization_data_attributes.py +++ b/rootly_sdk/models/update_authorization_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -16,13 +18,13 @@ class UpdateAuthorizationDataAttributes: """ Attributes: - permissions (Union[Unset, list[UpdateAuthorizationDataAttributesPermissionsItem]]): + permissions (list[UpdateAuthorizationDataAttributesPermissionsItem] | Unset): """ - permissions: Unset | list[UpdateAuthorizationDataAttributesPermissionsItem] = UNSET + permissions: list[UpdateAuthorizationDataAttributesPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - permissions: Unset | list[str] = UNSET + permissions: list[str] | Unset = UNSET if not isinstance(self.permissions, Unset): permissions = [] for permissions_item_data in self.permissions: @@ -40,12 +42,14 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - permissions = [] _permissions = d.pop("permissions", UNSET) - for permissions_item_data in _permissions or []: - permissions_item = check_update_authorization_data_attributes_permissions_item(permissions_item_data) + permissions: list[UpdateAuthorizationDataAttributesPermissionsItem] | Unset = UNSET + if _permissions is not UNSET: + permissions = [] + for permissions_item_data in _permissions: + permissions_item = check_update_authorization_data_attributes_permissions_item(permissions_item_data) - permissions.append(permissions_item) + permissions.append(permissions_item) update_authorization_data_attributes = cls( permissions=permissions, diff --git a/rootly_sdk/models/update_catalog.py b/rootly_sdk/models/update_catalog.py index 9eeca011..d016121c 100644 --- a/rootly_sdk/models/update_catalog.py +++ b/rootly_sdk/models/update_catalog.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCatalog: data (UpdateCatalogData): """ - data: "UpdateCatalogData" + data: UpdateCatalogData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_checklist_template.py b/rootly_sdk/models/update_catalog_checklist_template.py new file mode 100644 index 00000000..d6289434 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData + + +T = TypeVar("T", bound="UpdateCatalogChecklistTemplate") + + +@_attrs_define +class UpdateCatalogChecklistTemplate: + """ + Attributes: + data (UpdateCatalogChecklistTemplateData): + """ + + data: UpdateCatalogChecklistTemplateData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData + + d = dict(src_dict) + data = UpdateCatalogChecklistTemplateData.from_dict(d.pop("data")) + + update_catalog_checklist_template = cls( + data=data, + ) + + update_catalog_checklist_template.additional_properties = d + return update_catalog_checklist_template + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_checklist_template_data.py b/rootly_sdk/models/update_catalog_checklist_template_data.py new file mode 100644 index 00000000..405fd1e1 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_catalog_checklist_template_data_type import ( + UpdateCatalogChecklistTemplateDataType, + check_update_catalog_checklist_template_data_type, +) + +if TYPE_CHECKING: + from ..models.update_catalog_checklist_template_data_attributes import UpdateCatalogChecklistTemplateDataAttributes + + +T = TypeVar("T", bound="UpdateCatalogChecklistTemplateData") + + +@_attrs_define +class UpdateCatalogChecklistTemplateData: + """ + Attributes: + type_ (UpdateCatalogChecklistTemplateDataType): + attributes (UpdateCatalogChecklistTemplateDataAttributes): + """ + + type_: UpdateCatalogChecklistTemplateDataType + attributes: UpdateCatalogChecklistTemplateDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_catalog_checklist_template_data_attributes import ( + UpdateCatalogChecklistTemplateDataAttributes, + ) + + d = dict(src_dict) + type_ = check_update_catalog_checklist_template_data_type(d.pop("type")) + + attributes = UpdateCatalogChecklistTemplateDataAttributes.from_dict(d.pop("attributes")) + + update_catalog_checklist_template_data = cls( + type_=type_, + attributes=attributes, + ) + + update_catalog_checklist_template_data.additional_properties = d + return update_catalog_checklist_template_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py new file mode 100644 index 00000000..9e6825b4 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py @@ -0,0 +1,227 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_catalog_checklist_template_data_attributes_builtin_field import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinField, + ) + from ..models.update_catalog_checklist_template_data_attributes_custom_field import ( + UpdateCatalogChecklistTemplateDataAttributesCustomField, + ) + from ..models.update_catalog_checklist_template_data_attributes_owners_type_0_item import ( + UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item, + ) + + +T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributes") + + +@_attrs_define +class UpdateCatalogChecklistTemplateDataAttributes: + """ + Attributes: + name (str | Unset): The name of the checklist template + description (None | str | Unset): The description of the checklist template + fields (list[UpdateCatalogChecklistTemplateDataAttributesBuiltinField | + UpdateCatalogChecklistTemplateDataAttributesCustomField] | None | Unset): Template fields. Position is + determined by array order. Replaces all existing fields. + owners (list[UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset): Template owners. + Replaces all existing owners. + """ + + name: str | Unset = UNSET + description: None | str | Unset = UNSET + fields: ( + list[ + UpdateCatalogChecklistTemplateDataAttributesBuiltinField + | UpdateCatalogChecklistTemplateDataAttributesCustomField + ] + | None + | Unset + ) = UNSET + owners: list[UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_checklist_template_data_attributes_builtin_field import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinField, + ) + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + fields: list[dict[str, Any]] | None | Unset + if isinstance(self.fields, Unset): + fields = UNSET + elif isinstance(self.fields, list): + fields = [] + for fields_type_0_item_data in self.fields: + fields_type_0_item: dict[str, Any] + if isinstance(fields_type_0_item_data, UpdateCatalogChecklistTemplateDataAttributesBuiltinField): + fields_type_0_item = fields_type_0_item_data.to_dict() + else: + fields_type_0_item = fields_type_0_item_data.to_dict() + + fields.append(fields_type_0_item) + + else: + fields = self.fields + + owners: list[dict[str, Any]] | None | Unset + if isinstance(self.owners, Unset): + owners = UNSET + elif isinstance(self.owners, list): + owners = [] + for owners_type_0_item_data in self.owners: + owners_type_0_item = owners_type_0_item_data.to_dict() + owners.append(owners_type_0_item) + + else: + owners = self.owners + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if fields is not UNSET: + field_dict["fields"] = fields + if owners is not UNSET: + field_dict["owners"] = owners + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_catalog_checklist_template_data_attributes_builtin_field import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinField, + ) + from ..models.update_catalog_checklist_template_data_attributes_custom_field import ( + UpdateCatalogChecklistTemplateDataAttributesCustomField, + ) + from ..models.update_catalog_checklist_template_data_attributes_owners_type_0_item import ( + UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item, + ) + + d = dict(src_dict) + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_fields( + data: object, + ) -> ( + list[ + UpdateCatalogChecklistTemplateDataAttributesBuiltinField + | UpdateCatalogChecklistTemplateDataAttributesCustomField + ] + | None + | Unset + ): + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + fields_type_0 = [] + _fields_type_0 = data + for fields_type_0_item_data in _fields_type_0: + + def _parse_fields_type_0_item( + data: object, + ) -> ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinField + | UpdateCatalogChecklistTemplateDataAttributesCustomField + ): + try: + if not isinstance(data, dict): + raise TypeError() + fields_type_0_item_builtin_field = ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinField.from_dict(data) + ) + + return fields_type_0_item_builtin_field + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + fields_type_0_item_custom_field = ( + UpdateCatalogChecklistTemplateDataAttributesCustomField.from_dict(data) + ) + + return fields_type_0_item_custom_field + + fields_type_0_item = _parse_fields_type_0_item(fields_type_0_item_data) + + fields_type_0.append(fields_type_0_item) + + return fields_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + list[ + UpdateCatalogChecklistTemplateDataAttributesBuiltinField + | UpdateCatalogChecklistTemplateDataAttributesCustomField + ] + | None + | Unset, + data, + ) + + fields = _parse_fields(d.pop("fields", UNSET)) + + def _parse_owners( + data: object, + ) -> list[UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + owners_type_0 = [] + _owners_type_0 = data + for owners_type_0_item_data in _owners_type_0: + owners_type_0_item = UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item.from_dict( + owners_type_0_item_data + ) + + owners_type_0.append(owners_type_0_item) + + return owners_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset, data) + + owners = _parse_owners(d.pop("owners", UNSET)) + + update_catalog_checklist_template_data_attributes = cls( + name=name, + description=description, + fields=fields, + owners=owners, + ) + + return update_catalog_checklist_template_data_attributes diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field.py new file mode 100644 index 00000000..7e061904 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_catalog_checklist_template_data_attributes_builtin_field_field_source import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, + check_update_catalog_checklist_template_data_attributes_builtin_field_field_source, +) + +T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesBuiltinField") + + +@_attrs_define +class UpdateCatalogChecklistTemplateDataAttributesBuiltinField: + """ + Attributes: + field_source (UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource): + field_key (str): Key identifying the builtin field + """ + + field_source: UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource + field_key: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_source: str = self.field_source + + field_key = self.field_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "field_source": field_source, + "field_key": field_key, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field_source = check_update_catalog_checklist_template_data_attributes_builtin_field_field_source( + d.pop("field_source") + ) + + field_key = d.pop("field_key") + + update_catalog_checklist_template_data_attributes_builtin_field = cls( + field_source=field_source, + field_key=field_key, + ) + + update_catalog_checklist_template_data_attributes_builtin_field.additional_properties = d + return update_catalog_checklist_template_data_attributes_builtin_field + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field_field_source.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field_field_source.py new file mode 100644 index 00000000..1b299ca0 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_builtin_field_field_source.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource = Literal["builtin"] + +UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_BUILTIN_FIELD_FIELD_SOURCE_VALUES: set[ + UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource +] = { + "builtin", +} + + +def check_update_catalog_checklist_template_data_attributes_builtin_field_field_source( + value: str | None, +) -> UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource | None: + if value is None: + return None + if value in UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_BUILTIN_FIELD_FIELD_SOURCE_VALUES: + return cast(UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_BUILTIN_FIELD_FIELD_SOURCE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field.py new file mode 100644 index 00000000..7831a8c9 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_catalog_checklist_template_data_attributes_custom_field_field_source import ( + UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, + check_update_catalog_checklist_template_data_attributes_custom_field_field_source, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesCustomField") + + +@_attrs_define +class UpdateCatalogChecklistTemplateDataAttributesCustomField: + """ + Attributes: + field_source (UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource): + catalog_property_id (str): ID of the catalog property + field_key (str | Unset): Ignored for custom fields (auto-derived from catalog property) + """ + + field_source: UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource + catalog_property_id: str + field_key: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_source: str = self.field_source + + catalog_property_id = self.catalog_property_id + + field_key = self.field_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "field_source": field_source, + "catalog_property_id": catalog_property_id, + } + ) + if field_key is not UNSET: + field_dict["field_key"] = field_key + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + field_source = check_update_catalog_checklist_template_data_attributes_custom_field_field_source( + d.pop("field_source") + ) + + catalog_property_id = d.pop("catalog_property_id") + + field_key = d.pop("field_key", UNSET) + + update_catalog_checklist_template_data_attributes_custom_field = cls( + field_source=field_source, + catalog_property_id=catalog_property_id, + field_key=field_key, + ) + + update_catalog_checklist_template_data_attributes_custom_field.additional_properties = d + return update_catalog_checklist_template_data_attributes_custom_field + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field_field_source.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field_field_source.py new file mode 100644 index 00000000..e72f78ab --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_custom_field_field_source.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource = Literal["custom"] + +UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CUSTOM_FIELD_FIELD_SOURCE_VALUES: set[ + UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource +] = { + "custom", +} + + +def check_update_catalog_checklist_template_data_attributes_custom_field_field_source( + value: str | None, +) -> UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource | None: + if value is None: + return None + if value in UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CUSTOM_FIELD_FIELD_SOURCE_VALUES: + return cast(UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_CUSTOM_FIELD_FIELD_SOURCE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item.py new file mode 100644 index 00000000..d49718a9 --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( + UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType, + check_update_catalog_checklist_template_data_attributes_owners_type_0_item_type, +) + +T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item") + + +@_attrs_define +class UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item: + """ + Attributes: + id (str): User ID for user owners, or field key for field owners + type_ (UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType): Type of owner + """ + + id: str + type_: UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_: str = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + type_ = check_update_catalog_checklist_template_data_attributes_owners_type_0_item_type(d.pop("type")) + + update_catalog_checklist_template_data_attributes_owners_type_0_item = cls( + id=id, + type_=type_, + ) + + update_catalog_checklist_template_data_attributes_owners_type_0_item.additional_properties = d + return update_catalog_checklist_template_data_attributes_owners_type_0_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item_type.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item_type.py new file mode 100644 index 00000000..71c39dea --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes_owners_type_0_item_type.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType = Literal["field", "user"] + +UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_OWNERS_TYPE_0_ITEM_TYPE_VALUES: set[ + UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType +] = { + "field", + "user", +} + + +def check_update_catalog_checklist_template_data_attributes_owners_type_0_item_type( + value: str | None, +) -> UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType | None: + if value is None: + return None + if value in UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_OWNERS_TYPE_0_ITEM_TYPE_VALUES: + return cast(UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_ATTRIBUTES_OWNERS_TYPE_0_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_type.py b/rootly_sdk/models/update_catalog_checklist_template_data_type.py new file mode 100644 index 00000000..a3b555ac --- /dev/null +++ b/rootly_sdk/models/update_catalog_checklist_template_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +UpdateCatalogChecklistTemplateDataType = Literal["catalog_checklist_templates"] + +UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_TYPE_VALUES: set[UpdateCatalogChecklistTemplateDataType] = { + "catalog_checklist_templates", +} + + +def check_update_catalog_checklist_template_data_type( + value: str | None, +) -> UpdateCatalogChecklistTemplateDataType | None: + if value is None: + return None + if value in UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_TYPE_VALUES: + return cast(UpdateCatalogChecklistTemplateDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_CHECKLIST_TEMPLATE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_catalog_data.py b/rootly_sdk/models/update_catalog_data.py index a7def769..38041394 100644 --- a/rootly_sdk/models/update_catalog_data.py +++ b/rootly_sdk/models/update_catalog_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateCatalogData: """ type_: UpdateCatalogDataType - attributes: "UpdateCatalogDataAttributes" + attributes: UpdateCatalogDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_data_attributes.py b/rootly_sdk/models/update_catalog_data_attributes.py index 74745b02..63e8cf2b 100644 --- a/rootly_sdk/models/update_catalog_data_attributes.py +++ b/rootly_sdk/models/update_catalog_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,31 +18,31 @@ class UpdateCatalogDataAttributes: """ Attributes: - name (Union[Unset, str]): - description (Union[None, Unset, str]): - icon (Union[Unset, UpdateCatalogDataAttributesIcon]): - position (Union[None, Unset, int]): Default position of the catalog when displayed in a list. + name (str | Unset): + description (None | str | Unset): + icon (UpdateCatalogDataAttributesIcon | Unset): + position (int | None | Unset): Default position of the catalog when displayed in a list. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - icon: Unset | UpdateCatalogDataAttributesIcon = UNSET - position: None | Unset | int = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + icon: UpdateCatalogDataAttributesIcon | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - icon: Unset | str = UNSET + icon: str | Unset = UNSET if not isinstance(self.icon, Unset): icon = self.icon - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -65,28 +67,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _icon = d.pop("icon", UNSET) - icon: Unset | UpdateCatalogDataAttributesIcon + icon: UpdateCatalogDataAttributesIcon | Unset if isinstance(_icon, Unset): icon = UNSET else: icon = check_update_catalog_data_attributes_icon(_icon) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_catalog_entity.py b/rootly_sdk/models/update_catalog_entity.py index 1d01990b..c4e20cc9 100644 --- a/rootly_sdk/models/update_catalog_entity.py +++ b/rootly_sdk/models/update_catalog_entity.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCatalogEntity: data (UpdateCatalogEntityData): """ - data: "UpdateCatalogEntityData" + data: UpdateCatalogEntityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_entity_data.py b/rootly_sdk/models/update_catalog_entity_data.py index 1ae7aec8..380a9efd 100644 --- a/rootly_sdk/models/update_catalog_entity_data.py +++ b/rootly_sdk/models/update_catalog_entity_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateCatalogEntityData: """ type_: UpdateCatalogEntityDataType - attributes: "UpdateCatalogEntityDataAttributes" + attributes: UpdateCatalogEntityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_entity_data_attributes.py b/rootly_sdk/models/update_catalog_entity_data_attributes.py index f08cdb23..3b6fc8cf 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/update_catalog_entity_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,9 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_catalog_entity_data_attributes_fields_item import UpdateCatalogEntityDataAttributesFieldsItem + from ..models.update_catalog_entity_data_attributes_properties_item import ( + UpdateCatalogEntityDataAttributesPropertiesItem, + ) T = TypeVar("T", bound="UpdateCatalogEntityDataAttributes") @@ -16,39 +20,39 @@ class UpdateCatalogEntityDataAttributes: """ Attributes: - name (Union[Unset, str]): - description (Union[None, Unset, str]): - position (Union[None, Unset, int]): Default position of the item when displayed in a list. - fields (Union[Unset, list['UpdateCatalogEntityDataAttributesFieldsItem']]): Array of field values for this + name (str | Unset): + description (None | str | Unset): + position (int | None | Unset): Default position of the item when displayed in a list. + properties (list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset): Array of property values for this catalog entity """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - fields: Unset | list["UpdateCatalogEntityDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -59,50 +63,52 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.update_catalog_entity_data_attributes_fields_item import ( - UpdateCatalogEntityDataAttributesFieldsItem, + from ..models.update_catalog_entity_data_attributes_properties_item import ( + UpdateCatalogEntityDataAttributesPropertiesItem, ) d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateCatalogEntityDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateCatalogEntityDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_catalog_entity_data_attributes = cls( name=name, description=description, position=position, - fields=fields, + properties=properties, ) return update_catalog_entity_data_attributes diff --git a/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py b/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py new file mode 100644 index 00000000..06dcaffd --- /dev/null +++ b/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateCatalogEntityDataAttributesPropertiesItem") + + +@_attrs_define +class UpdateCatalogEntityDataAttributesPropertiesItem: + """ + Attributes: + catalog_property_id (str): Unique ID of the catalog property + value (str): The value for this property + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + update_catalog_entity_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + update_catalog_entity_data_attributes_properties_item.additional_properties = d + return update_catalog_entity_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_entity_property.py b/rootly_sdk/models/update_catalog_entity_property.py index 27f982f7..b8210f42 100644 --- a/rootly_sdk/models/update_catalog_entity_property.py +++ b/rootly_sdk/models/update_catalog_entity_property.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -20,7 +22,7 @@ class UpdateCatalogEntityProperty: data (UpdateCatalogEntityPropertyData): """ - data: "UpdateCatalogEntityPropertyData" + data: UpdateCatalogEntityPropertyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_entity_property_data.py b/rootly_sdk/models/update_catalog_entity_property_data.py index c1b43386..a6145a4c 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data.py +++ b/rootly_sdk/models/update_catalog_entity_property_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateCatalogEntityPropertyData: """ type_: UpdateCatalogEntityPropertyDataType - attributes: "UpdateCatalogEntityPropertyDataAttributes" + attributes: UpdateCatalogEntityPropertyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_entity_property_data_attributes.py b/rootly_sdk/models/update_catalog_entity_property_data_attributes.py index 82f8b56c..eb945add 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data_attributes.py +++ b/rootly_sdk/models/update_catalog_entity_property_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -16,15 +18,15 @@ class UpdateCatalogEntityPropertyDataAttributes: """ Attributes: - key (Union[Unset, UpdateCatalogEntityPropertyDataAttributesKey]): - value (Union[Unset, str]): + key (UpdateCatalogEntityPropertyDataAttributesKey | Unset): + value (str | Unset): """ - key: Unset | UpdateCatalogEntityPropertyDataAttributesKey = UNSET - value: Unset | str = UNSET + key: UpdateCatalogEntityPropertyDataAttributesKey | Unset = UNSET + value: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - key: Unset | str = UNSET + key: str | Unset = UNSET if not isinstance(self.key, Unset): key = self.key @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _key = d.pop("key", UNSET) - key: Unset | UpdateCatalogEntityPropertyDataAttributesKey + key: UpdateCatalogEntityPropertyDataAttributesKey | Unset if isinstance(_key, Unset): key = UNSET else: diff --git a/rootly_sdk/models/update_catalog_entity_property_data_attributes_key.py b/rootly_sdk/models/update_catalog_entity_property_data_attributes_key.py index bbf86f2c..d3115cb3 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data_attributes_key.py +++ b/rootly_sdk/models/update_catalog_entity_property_data_attributes_key.py @@ -1,9 +1,10 @@ from typing import Literal, cast -UpdateCatalogEntityPropertyDataAttributesKey = Literal["catalog_entity", "text"] +UpdateCatalogEntityPropertyDataAttributesKey = Literal["catalog_entity", "slack", "text"] UPDATE_CATALOG_ENTITY_PROPERTY_DATA_ATTRIBUTES_KEY_VALUES: set[UpdateCatalogEntityPropertyDataAttributesKey] = { "catalog_entity", + "slack", "text", } diff --git a/rootly_sdk/models/update_catalog_field.py b/rootly_sdk/models/update_catalog_field.py index 71d4aaf0..d44c367a 100644 --- a/rootly_sdk/models/update_catalog_field.py +++ b/rootly_sdk/models/update_catalog_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCatalogField: data (UpdateCatalogFieldData): """ - data: "UpdateCatalogFieldData" + data: UpdateCatalogFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_field_data.py b/rootly_sdk/models/update_catalog_field_data.py index 08e43274..a5eed9b6 100644 --- a/rootly_sdk/models/update_catalog_field_data.py +++ b/rootly_sdk/models/update_catalog_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateCatalogFieldData: """ type_: UpdateCatalogFieldDataType - attributes: "UpdateCatalogFieldDataAttributes" + attributes: UpdateCatalogFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_catalog_field_data_attributes.py b/rootly_sdk/models/update_catalog_field_data_attributes.py index 7fb2aa8e..b5cfb3a6 100644 --- a/rootly_sdk/models/update_catalog_field_data_attributes.py +++ b/rootly_sdk/models/update_catalog_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,36 +22,35 @@ class UpdateCatalogFieldDataAttributes: """ Attributes: - name (Union[Unset, str]): - kind (Union[Unset, UpdateCatalogFieldDataAttributesKind]): - kind_catalog_id (Union[None, Unset, str]): Restricts values to items of specified catalog. - position (Union[None, Unset, int]): Default position of the item when displayed in a list. - required (Union[Unset, bool]): Whether the field is required. - catalog_type (Union[Unset, UpdateCatalogFieldDataAttributesCatalogType]): The type of catalog the field belongs - to. + name (str | Unset): + kind (UpdateCatalogFieldDataAttributesKind | Unset): + kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. + position (int | None | Unset): Default position of the item when displayed in a list. + required (bool | Unset): Whether the field is required. + catalog_type (UpdateCatalogFieldDataAttributesCatalogType | Unset): The type of catalog the field belongs to. """ - name: Unset | str = UNSET - kind: Unset | UpdateCatalogFieldDataAttributesKind = UNSET - kind_catalog_id: None | Unset | str = UNSET - position: None | Unset | int = UNSET - required: Unset | bool = UNSET - catalog_type: Unset | UpdateCatalogFieldDataAttributesCatalogType = UNSET + name: str | Unset = UNSET + kind: UpdateCatalogFieldDataAttributesKind | Unset = UNSET + kind_catalog_id: None | str | Unset = UNSET + position: int | None | Unset = UNSET + required: bool | Unset = UNSET + catalog_type: UpdateCatalogFieldDataAttributesCatalogType | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - kind_catalog_id: None | Unset | str + kind_catalog_id: None | str | Unset if isinstance(self.kind_catalog_id, Unset): kind_catalog_id = UNSET else: kind_catalog_id = self.kind_catalog_id - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -57,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: required = self.required - catalog_type: Unset | str = UNSET + catalog_type: str | Unset = UNSET if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type @@ -85,34 +86,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateCatalogFieldDataAttributesKind + kind: UpdateCatalogFieldDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_update_catalog_field_data_attributes_kind(_kind) - def _parse_kind_catalog_id(data: object) -> None | Unset | str: + def _parse_kind_catalog_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kind_catalog_id = _parse_kind_catalog_id(d.pop("kind_catalog_id", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) required = d.pop("required", UNSET) _catalog_type = d.pop("catalog_type", UNSET) - catalog_type: Unset | UpdateCatalogFieldDataAttributesCatalogType + catalog_type: UpdateCatalogFieldDataAttributesCatalogType | Unset if isinstance(_catalog_type, Unset): catalog_type = UNSET else: diff --git a/rootly_sdk/models/update_catalog_field_data_type.py b/rootly_sdk/models/update_catalog_field_data_type.py index 82c320e6..5300317d 100644 --- a/rootly_sdk/models/update_catalog_field_data_type.py +++ b/rootly_sdk/models/update_catalog_field_data_type.py @@ -1,9 +1,9 @@ from typing import Literal, cast -UpdateCatalogFieldDataType = Literal["catalog_fields"] +UpdateCatalogFieldDataType = Literal["catalog_properties"] UPDATE_CATALOG_FIELD_DATA_TYPE_VALUES: set[UpdateCatalogFieldDataType] = { - "catalog_fields", + "catalog_properties", } diff --git a/rootly_sdk/models/update_catalog_property.py b/rootly_sdk/models/update_catalog_property.py new file mode 100644 index 00000000..cb0695ed --- /dev/null +++ b/rootly_sdk/models/update_catalog_property.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_catalog_property_data import UpdateCatalogPropertyData + + +T = TypeVar("T", bound="UpdateCatalogProperty") + + +@_attrs_define +class UpdateCatalogProperty: + """ + Attributes: + data (UpdateCatalogPropertyData): + """ + + data: UpdateCatalogPropertyData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_catalog_property_data import UpdateCatalogPropertyData + + d = dict(src_dict) + data = UpdateCatalogPropertyData.from_dict(d.pop("data")) + + update_catalog_property = cls( + data=data, + ) + + update_catalog_property.additional_properties = d + return update_catalog_property + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_property_data.py b/rootly_sdk/models/update_catalog_property_data.py new file mode 100644 index 00000000..91f2cfcd --- /dev/null +++ b/rootly_sdk/models/update_catalog_property_data.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_catalog_property_data_type import ( + UpdateCatalogPropertyDataType, + check_update_catalog_property_data_type, +) + +if TYPE_CHECKING: + from ..models.update_catalog_property_data_attributes import UpdateCatalogPropertyDataAttributes + + +T = TypeVar("T", bound="UpdateCatalogPropertyData") + + +@_attrs_define +class UpdateCatalogPropertyData: + """ + Attributes: + type_ (UpdateCatalogPropertyDataType): + attributes (UpdateCatalogPropertyDataAttributes): + """ + + type_: UpdateCatalogPropertyDataType + attributes: UpdateCatalogPropertyDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_catalog_property_data_attributes import UpdateCatalogPropertyDataAttributes + + d = dict(src_dict) + type_ = check_update_catalog_property_data_type(d.pop("type")) + + attributes = UpdateCatalogPropertyDataAttributes.from_dict(d.pop("attributes")) + + update_catalog_property_data = cls( + type_=type_, + attributes=attributes, + ) + + update_catalog_property_data.additional_properties = d + return update_catalog_property_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_catalog_property_data_attributes.py b/rootly_sdk/models/update_catalog_property_data_attributes.py new file mode 100644 index 00000000..40c72abb --- /dev/null +++ b/rootly_sdk/models/update_catalog_property_data_attributes.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.update_catalog_property_data_attributes_catalog_type import ( + UpdateCatalogPropertyDataAttributesCatalogType, + check_update_catalog_property_data_attributes_catalog_type, +) +from ..models.update_catalog_property_data_attributes_kind import ( + UpdateCatalogPropertyDataAttributesKind, + check_update_catalog_property_data_attributes_kind, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateCatalogPropertyDataAttributes") + + +@_attrs_define +class UpdateCatalogPropertyDataAttributes: + """ + Attributes: + name (str | Unset): + kind (UpdateCatalogPropertyDataAttributesKind | Unset): + kind_catalog_id (None | str | Unset): Restricts values to items of specified catalog. + position (int | None | Unset): Default position of the item when displayed in a list. + required (bool | Unset): Whether the property is required. + catalog_type (UpdateCatalogPropertyDataAttributesCatalogType | Unset): The type of catalog the property belongs + to. + """ + + name: str | Unset = UNSET + kind: UpdateCatalogPropertyDataAttributesKind | Unset = UNSET + kind_catalog_id: None | str | Unset = UNSET + position: int | None | Unset = UNSET + required: bool | Unset = UNSET + catalog_type: UpdateCatalogPropertyDataAttributesCatalogType | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + name = self.name + + kind: str | Unset = UNSET + if not isinstance(self.kind, Unset): + kind = self.kind + + kind_catalog_id: None | str | Unset + if isinstance(self.kind_catalog_id, Unset): + kind_catalog_id = UNSET + else: + kind_catalog_id = self.kind_catalog_id + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + required = self.required + + catalog_type: str | Unset = UNSET + if not isinstance(self.catalog_type, Unset): + catalog_type = self.catalog_type + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if kind is not UNSET: + field_dict["kind"] = kind + if kind_catalog_id is not UNSET: + field_dict["kind_catalog_id"] = kind_catalog_id + if position is not UNSET: + field_dict["position"] = position + if required is not UNSET: + field_dict["required"] = required + if catalog_type is not UNSET: + field_dict["catalog_type"] = catalog_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + _kind = d.pop("kind", UNSET) + kind: UpdateCatalogPropertyDataAttributesKind | Unset + if isinstance(_kind, Unset): + kind = UNSET + else: + kind = check_update_catalog_property_data_attributes_kind(_kind) + + def _parse_kind_catalog_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kind_catalog_id = _parse_kind_catalog_id(d.pop("kind_catalog_id", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + required = d.pop("required", UNSET) + + _catalog_type = d.pop("catalog_type", UNSET) + catalog_type: UpdateCatalogPropertyDataAttributesCatalogType | Unset + if isinstance(_catalog_type, Unset): + catalog_type = UNSET + else: + catalog_type = check_update_catalog_property_data_attributes_catalog_type(_catalog_type) + + update_catalog_property_data_attributes = cls( + name=name, + kind=kind, + kind_catalog_id=kind_catalog_id, + position=position, + required=required, + catalog_type=catalog_type, + ) + + return update_catalog_property_data_attributes diff --git a/rootly_sdk/models/update_catalog_property_data_attributes_catalog_type.py b/rootly_sdk/models/update_catalog_property_data_attributes_catalog_type.py new file mode 100644 index 00000000..7d20b14a --- /dev/null +++ b/rootly_sdk/models/update_catalog_property_data_attributes_catalog_type.py @@ -0,0 +1,27 @@ +from typing import Literal, cast + +UpdateCatalogPropertyDataAttributesCatalogType = Literal[ + "catalog", "cause", "environment", "functionality", "incident_type", "service", "team" +] + +UPDATE_CATALOG_PROPERTY_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES: set[UpdateCatalogPropertyDataAttributesCatalogType] = { + "catalog", + "cause", + "environment", + "functionality", + "incident_type", + "service", + "team", +} + + +def check_update_catalog_property_data_attributes_catalog_type( + value: str | None, +) -> UpdateCatalogPropertyDataAttributesCatalogType | None: + if value is None: + return None + if value in UPDATE_CATALOG_PROPERTY_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES: + return cast(UpdateCatalogPropertyDataAttributesCatalogType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_PROPERTY_DATA_ATTRIBUTES_CATALOG_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_catalog_property_data_attributes_kind.py b/rootly_sdk/models/update_catalog_property_data_attributes_kind.py new file mode 100644 index 00000000..9ddd1016 --- /dev/null +++ b/rootly_sdk/models/update_catalog_property_data_attributes_kind.py @@ -0,0 +1,30 @@ +from typing import Literal, cast + +UpdateCatalogPropertyDataAttributesKind = Literal[ + "boolean", "cause", "environment", "functionality", "group", "incident_type", "reference", "service", "text", "user" +] + +UPDATE_CATALOG_PROPERTY_DATA_ATTRIBUTES_KIND_VALUES: set[UpdateCatalogPropertyDataAttributesKind] = { + "boolean", + "cause", + "environment", + "functionality", + "group", + "incident_type", + "reference", + "service", + "text", + "user", +} + + +def check_update_catalog_property_data_attributes_kind( + value: str | None, +) -> UpdateCatalogPropertyDataAttributesKind | None: + if value is None: + return None + if value in UPDATE_CATALOG_PROPERTY_DATA_ATTRIBUTES_KIND_VALUES: + return cast(UpdateCatalogPropertyDataAttributesKind, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_PROPERTY_DATA_ATTRIBUTES_KIND_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_catalog_property_data_type.py b/rootly_sdk/models/update_catalog_property_data_type.py new file mode 100644 index 00000000..7d0180c7 --- /dev/null +++ b/rootly_sdk/models/update_catalog_property_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +UpdateCatalogPropertyDataType = Literal["catalog_properties"] + +UPDATE_CATALOG_PROPERTY_DATA_TYPE_VALUES: set[UpdateCatalogPropertyDataType] = { + "catalog_properties", +} + + +def check_update_catalog_property_data_type(value: str | None) -> UpdateCatalogPropertyDataType | None: + if value is None: + return None + if value in UPDATE_CATALOG_PROPERTY_DATA_TYPE_VALUES: + return cast(UpdateCatalogPropertyDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_CATALOG_PROPERTY_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/update_cause.py b/rootly_sdk/models/update_cause.py index ff36414d..b507866d 100644 --- a/rootly_sdk/models/update_cause.py +++ b/rootly_sdk/models/update_cause.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCause: data (UpdateCauseData): """ - data: "UpdateCauseData" + data: UpdateCauseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_cause_data.py b/rootly_sdk/models/update_cause_data.py index afcaf388..4149b62b 100644 --- a/rootly_sdk/models/update_cause_data.py +++ b/rootly_sdk/models/update_cause_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateCauseData: """ type_: UpdateCauseDataType - attributes: "UpdateCauseDataAttributes" + attributes: UpdateCauseDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_cause_data_attributes.py b/rootly_sdk/models/update_cause_data_attributes.py index 019577e3..98cdb545 100644 --- a/rootly_sdk/models/update_cause_data_attributes.py +++ b/rootly_sdk/models/update_cause_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_cause_data_attributes_fields_item import UpdateCauseDataAttributesFieldsItem + from ..models.update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem T = TypeVar("T", bound="UpdateCauseDataAttributes") @@ -16,38 +18,38 @@ class UpdateCauseDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the cause - description (Union[None, Unset, str]): The description of the cause - position (Union[None, Unset, int]): Position of the cause - fields (Union[Unset, list['UpdateCauseDataAttributesFieldsItem']]): Array of field values for this cause. + name (str | Unset): The name of the cause + description (None | str | Unset): The description of the cause + position (int | None | Unset): Position of the cause + properties (list[UpdateCauseDataAttributesPropertiesItem] | Unset): Array of property values for this cause. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - fields: Unset | list["UpdateCauseDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + properties: list[UpdateCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -58,48 +60,50 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.update_cause_data_attributes_fields_item import UpdateCauseDataAttributesFieldsItem + from ..models.update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateCauseDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateCauseDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateCauseDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_cause_data_attributes = cls( name=name, description=description, position=position, - fields=fields, + properties=properties, ) return update_cause_data_attributes diff --git a/rootly_sdk/models/new_incident_type_data_attributes_fields_item.py b/rootly_sdk/models/update_cause_data_attributes_properties_item.py similarity index 63% rename from rootly_sdk/models/new_incident_type_data_attributes_fields_item.py rename to rootly_sdk/models/update_cause_data_attributes_properties_item.py index 3a118a04..f551eb85 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes_fields_item.py +++ b/rootly_sdk/models/update_cause_data_attributes_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="NewIncidentTypeDataAttributesFieldsItem") +T = TypeVar("T", bound="UpdateCauseDataAttributesPropertiesItem") @_attrs_define -class NewIncidentTypeDataAttributesFieldsItem: - """Set a value for a catalog field +class UpdateCauseDataAttributesPropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - new_incident_type_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + update_cause_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - new_incident_type_data_attributes_fields_item.additional_properties = d - return new_incident_type_data_attributes_fields_item + update_cause_data_attributes_properties_item.additional_properties = d + return update_cause_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/update_clickup_task_task_params.py b/rootly_sdk/models/update_clickup_task_task_params.py index a1a7d6a6..d9bdbccb 100644 --- a/rootly_sdk/models/update_clickup_task_task_params.py +++ b/rootly_sdk/models/update_clickup_task_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,33 +24,33 @@ class UpdateClickupTaskTaskParams: """ Attributes: task_id (str): The task id - task_type (Union[Unset, UpdateClickupTaskTaskParamsTaskType]): - title (Union[Unset, str]): The task title - description (Union[Unset, str]): The task description - tags (Union[Unset, str]): The task tags - priority (Union[Unset, UpdateClickupTaskTaskParamsPriority]): The priority id and display name - due_date (Union[Unset, str]): The due date - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateClickupTaskTaskParamsTaskType | Unset): + title (str | Unset): The task title + description (str | Unset): The task description + tags (str | Unset): The task tags + priority (UpdateClickupTaskTaskParamsPriority | Unset): The priority id and display name + due_date (str | Unset): The due date + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - task_payload (Union[None, Unset, str]): Additional ClickUp task attributes. Will be merged into whatever was + task_payload (None | str | Unset): Additional ClickUp task attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON """ task_id: str - task_type: Unset | UpdateClickupTaskTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - tags: Unset | str = UNSET - priority: Union[Unset, "UpdateClickupTaskTaskParamsPriority"] = UNSET - due_date: Unset | str = UNSET - custom_fields_mapping: None | Unset | str = UNSET - task_payload: None | Unset | str = UNSET + task_type: UpdateClickupTaskTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + tags: str | Unset = UNSET + priority: UpdateClickupTaskTaskParamsPriority | Unset = UNSET + due_date: str | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + task_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: task_id = self.task_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -58,19 +60,19 @@ def to_dict(self) -> dict[str, Any]: tags = self.tags - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() due_date = self.due_date - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - task_payload: None | Unset | str + task_payload: None | str | Unset if isinstance(self.task_payload, Unset): task_payload = UNSET else: @@ -110,7 +112,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: task_id = d.pop("task_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateClickupTaskTaskParamsTaskType + task_type: UpdateClickupTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -123,7 +125,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: tags = d.pop("tags", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateClickupTaskTaskParamsPriority + priority: UpdateClickupTaskTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: @@ -131,21 +133,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_task_payload(data: object) -> None | Unset | str: + def _parse_task_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) task_payload = _parse_task_payload(d.pop("task_payload", UNSET)) diff --git a/rootly_sdk/models/update_clickup_task_task_params_priority.py b/rootly_sdk/models/update_clickup_task_task_params_priority.py index eb3024d0..bfae1358 100644 --- a/rootly_sdk/models/update_clickup_task_task_params_priority.py +++ b/rootly_sdk/models/update_clickup_task_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateClickupTaskTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_coda_page_task_params.py b/rootly_sdk/models/update_coda_page_task_params.py index f36a0719..9791bb83 100644 --- a/rootly_sdk/models/update_coda_page_task_params.py +++ b/rootly_sdk/models/update_coda_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,27 +24,27 @@ class UpdateCodaPageTaskParams: """ Attributes: page_id (str): The Coda page id - task_type (Union[Unset, UpdateCodaPageTaskParamsTaskType]): - doc_id (Union[Unset, str]): The Coda doc id - title (Union[Unset, str]): The Coda page title - subtitle (Union[Unset, str]): The Coda page subtitle - content (Union[Unset, str]): The Coda page content - template (Union[Unset, UpdateCodaPageTaskParamsTemplate]): + task_type (UpdateCodaPageTaskParamsTaskType | Unset): + doc_id (str | Unset): The Coda doc id + title (str | Unset): The Coda page title + subtitle (str | Unset): The Coda page subtitle + content (str | Unset): The Coda page content + template (UpdateCodaPageTaskParamsTemplate | Unset): """ page_id: str - task_type: Unset | UpdateCodaPageTaskParamsTaskType = UNSET - doc_id: Unset | str = UNSET - title: Unset | str = UNSET - subtitle: Unset | str = UNSET - content: Unset | str = UNSET - template: Union[Unset, "UpdateCodaPageTaskParamsTemplate"] = UNSET + task_type: UpdateCodaPageTaskParamsTaskType | Unset = UNSET + doc_id: str | Unset = UNSET + title: str | Unset = UNSET + subtitle: str | Unset = UNSET + content: str | Unset = UNSET + template: UpdateCodaPageTaskParamsTemplate | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: page_id = self.page_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -54,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: content = self.content - template: Unset | dict[str, Any] = UNSET + template: dict[str, Any] | Unset = UNSET if not isinstance(self.template, Unset): template = self.template.to_dict() @@ -88,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: page_id = d.pop("page_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateCodaPageTaskParamsTaskType + task_type: UpdateCodaPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -103,7 +105,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content", UNSET) _template = d.pop("template", UNSET) - template: Unset | UpdateCodaPageTaskParamsTemplate + template: UpdateCodaPageTaskParamsTemplate | Unset if isinstance(_template, Unset): template = UNSET else: diff --git a/rootly_sdk/models/update_coda_page_task_params_template.py b/rootly_sdk/models/update_coda_page_task_params_template.py index 267641e6..58a24acc 100644 --- a/rootly_sdk/models/update_coda_page_task_params_template.py +++ b/rootly_sdk/models/update_coda_page_task_params_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateCodaPageTaskParamsTemplate: """ Attributes: - id (Union[Unset, str]): Combined doc_id/page_id in format 'doc_id/page_id' - name (Union[Unset, str]): + id (str | Unset): Combined doc_id/page_id in format 'doc_id/page_id' + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_group.py b/rootly_sdk/models/update_communications_group.py index 01e5aa95..1bd58dc8 100644 --- a/rootly_sdk/models/update_communications_group.py +++ b/rootly_sdk/models/update_communications_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCommunicationsGroup: data (UpdateCommunicationsGroupData): """ - data: "UpdateCommunicationsGroupData" + data: UpdateCommunicationsGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_group_data.py b/rootly_sdk/models/update_communications_group_data.py index 0fee453c..7a07bbfb 100644 --- a/rootly_sdk/models/update_communications_group_data.py +++ b/rootly_sdk/models/update_communications_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateCommunicationsGroupData: """ type_: UpdateCommunicationsGroupDataType - attributes: "UpdateCommunicationsGroupDataAttributes" + attributes: UpdateCommunicationsGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_group_data_attributes.py b/rootly_sdk/models/update_communications_group_data_attributes.py index 65184abe..0599fcdb 100644 --- a/rootly_sdk/models/update_communications_group_data_attributes.py +++ b/rootly_sdk/models/update_communications_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -25,43 +27,43 @@ class UpdateCommunicationsGroupDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the communications group - description (Union[None, Unset, str]): The description of the communications group - communication_type_id (Union[Unset, str]): The communication type ID - is_private (Union[None, Unset, bool]): Whether the group is private - condition_type (Union[Unset, UpdateCommunicationsGroupDataAttributesConditionType]): Condition type - sms_channel (Union[None, Unset, bool]): SMS channel enabled - email_channel (Union[None, Unset, bool]): Email channel enabled - member_ids (Union[None, Unset, list[int]]): Array of member user IDs - slack_channel_ids (Union[None, Unset, list[str]]): Array of Slack channel IDs - communication_group_conditions (Union[None, Unset, - list['UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item']]): Group conditions - attributes - communication_external_group_members (Union[None, Unset, - list['UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item']]): External group - members attributes + name (str | Unset): The name of the communications group + description (None | str | Unset): The description of the communications group + communication_type_id (str | Unset): The communication type ID + is_private (bool | None | Unset): Whether the group is private + condition_type (UpdateCommunicationsGroupDataAttributesConditionType | Unset): Condition type + sms_channel (bool | None | Unset): SMS channel enabled + email_channel (bool | None | Unset): Email channel enabled + member_ids (list[int] | None | Unset): Array of member user IDs + slack_channel_ids (list[str] | None | Unset): Array of Slack channel IDs + communication_group_conditions + (list[UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset): Group + conditions attributes + communication_external_group_members + (list[UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset): + External group members attributes """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - communication_type_id: Unset | str = UNSET - is_private: None | Unset | bool = UNSET - condition_type: Unset | UpdateCommunicationsGroupDataAttributesConditionType = UNSET - sms_channel: None | Unset | bool = UNSET - email_channel: None | Unset | bool = UNSET - member_ids: None | Unset | list[int] = UNSET - slack_channel_ids: None | Unset | list[str] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + communication_type_id: str | Unset = UNSET + is_private: bool | None | Unset = UNSET + condition_type: UpdateCommunicationsGroupDataAttributesConditionType | Unset = UNSET + sms_channel: bool | None | Unset = UNSET + email_channel: bool | None | Unset = UNSET + member_ids: list[int] | None | Unset = UNSET + slack_channel_ids: list[str] | None | Unset = UNSET communication_group_conditions: ( - None | Unset | list["UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item"] + list[UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset ) = UNSET communication_external_group_members: ( - None | Unset | list["UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item"] + list[UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -69,29 +71,29 @@ def to_dict(self) -> dict[str, Any]: communication_type_id = self.communication_type_id - is_private: None | Unset | bool + is_private: bool | None | Unset if isinstance(self.is_private, Unset): is_private = UNSET else: is_private = self.is_private - condition_type: Unset | str = UNSET + condition_type: str | Unset = UNSET if not isinstance(self.condition_type, Unset): condition_type = self.condition_type - sms_channel: None | Unset | bool + sms_channel: bool | None | Unset if isinstance(self.sms_channel, Unset): sms_channel = UNSET else: sms_channel = self.sms_channel - email_channel: None | Unset | bool + email_channel: bool | None | Unset if isinstance(self.email_channel, Unset): email_channel = UNSET else: email_channel = self.email_channel - member_ids: None | Unset | list[int] + member_ids: list[int] | None | Unset if isinstance(self.member_ids, Unset): member_ids = UNSET elif isinstance(self.member_ids, list): @@ -100,7 +102,7 @@ def to_dict(self) -> dict[str, Any]: else: member_ids = self.member_ids - slack_channel_ids: None | Unset | list[str] + slack_channel_ids: list[str] | None | Unset if isinstance(self.slack_channel_ids, Unset): slack_channel_ids = UNSET elif isinstance(self.slack_channel_ids, list): @@ -109,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channel_ids = self.slack_channel_ids - communication_group_conditions: None | Unset | list[dict[str, Any]] + communication_group_conditions: list[dict[str, Any]] | None | Unset if isinstance(self.communication_group_conditions, Unset): communication_group_conditions = UNSET elif isinstance(self.communication_group_conditions, list): @@ -121,7 +123,7 @@ def to_dict(self) -> dict[str, Any]: else: communication_group_conditions = self.communication_group_conditions - communication_external_group_members: None | Unset | list[dict[str, Any]] + communication_external_group_members: list[dict[str, Any]] | None | Unset if isinstance(self.communication_external_group_members, Unset): communication_external_group_members = UNSET elif isinstance(self.communication_external_group_members, list): @@ -175,52 +177,52 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) communication_type_id = d.pop("communication_type_id", UNSET) - def _parse_is_private(data: object) -> None | Unset | bool: + def _parse_is_private(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) is_private = _parse_is_private(d.pop("is_private", UNSET)) _condition_type = d.pop("condition_type", UNSET) - condition_type: Unset | UpdateCommunicationsGroupDataAttributesConditionType + condition_type: UpdateCommunicationsGroupDataAttributesConditionType | Unset if isinstance(_condition_type, Unset): condition_type = UNSET else: condition_type = check_update_communications_group_data_attributes_condition_type(_condition_type) - def _parse_sms_channel(data: object) -> None | Unset | bool: + def _parse_sms_channel(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) sms_channel = _parse_sms_channel(d.pop("sms_channel", UNSET)) - def _parse_email_channel(data: object) -> None | Unset | bool: + def _parse_email_channel(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) email_channel = _parse_email_channel(d.pop("email_channel", UNSET)) - def _parse_member_ids(data: object) -> None | Unset | list[int]: + def _parse_member_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -231,13 +233,13 @@ def _parse_member_ids(data: object) -> None | Unset | list[int]: member_ids_type_0 = cast(list[int], data) return member_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) member_ids = _parse_member_ids(d.pop("member_ids", UNSET)) - def _parse_slack_channel_ids(data: object) -> None | Unset | list[str]: + def _parse_slack_channel_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -248,15 +250,15 @@ def _parse_slack_channel_ids(data: object) -> None | Unset | list[str]: slack_channel_ids_type_0 = cast(list[str], data) return slack_channel_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) slack_channel_ids = _parse_slack_channel_ids(d.pop("slack_channel_ids", UNSET)) def _parse_communication_group_conditions( data: object, - ) -> None | Unset | list["UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item"]: + ) -> list[UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -276,11 +278,10 @@ def _parse_communication_group_conditions( communication_group_conditions_type_0.append(communication_group_conditions_type_0_item) return communication_group_conditions_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - None | Unset | list["UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item"], - data, + list[UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item] | None | Unset, data ) communication_group_conditions = _parse_communication_group_conditions( @@ -289,7 +290,7 @@ def _parse_communication_group_conditions( def _parse_communication_external_group_members( data: object, - ) -> None | Unset | list["UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item"]: + ) -> list[UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -311,12 +312,10 @@ def _parse_communication_external_group_members( communication_external_group_members_type_0.append(communication_external_group_members_type_0_item) return communication_external_group_members_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - None - | Unset - | list["UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item"], + list[UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item] | None | Unset, data, ) diff --git a/rootly_sdk/models/update_communications_group_data_attributes_communication_external_group_members_type_0_item.py b/rootly_sdk/models/update_communications_group_data_attributes_communication_external_group_members_type_0_item.py index 8634430c..cafe7e7c 100644 --- a/rootly_sdk/models/update_communications_group_data_attributes_communication_external_group_members_type_0_item.py +++ b/rootly_sdk/models/update_communications_group_data_attributes_communication_external_group_members_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,20 +15,20 @@ class UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item: """ Attributes: - id (Union[None, Unset, str]): ID of the external group member - name (Union[Unset, str]): Name of the external member - email (Union[Unset, str]): Email of the external member - phone_number (Union[Unset, str]): Phone number of the external member + id (None | str | Unset): ID of the external group member + name (str | Unset): Name of the external member + email (str | Unset): Email of the external member + phone_number (str | Unset): Phone number of the external member """ - id: None | Unset | str = UNSET - name: Unset | str = UNSET - email: Unset | str = UNSET - phone_number: Unset | str = UNSET + id: None | str | Unset = UNSET + name: str | Unset = UNSET + email: str | Unset = UNSET + phone_number: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: None | Unset | str + id: None | str | Unset if isinstance(self.id, Unset): id = UNSET else: @@ -56,12 +58,12 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_id(data: object) -> None | Unset | str: + def _parse_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) id = _parse_id(d.pop("id", UNSET)) diff --git a/rootly_sdk/models/update_communications_group_data_attributes_communication_group_conditions_type_0_item.py b/rootly_sdk/models/update_communications_group_data_attributes_communication_group_conditions_type_0_item.py index 8de71c14..5cc8ccb1 100644 --- a/rootly_sdk/models/update_communications_group_data_attributes_communication_group_conditions_type_0_item.py +++ b/rootly_sdk/models/update_communications_group_data_attributes_communication_group_conditions_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,39 +19,39 @@ class UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item: """ Attributes: - id (Union[None, Unset, str]): ID of the condition - property_type (Union[Unset, - UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType]): Property type - service_ids (Union[None, Unset, list[str]]): Array of service IDs - severity_ids (Union[None, Unset, list[str]]): Array of severity IDs - functionality_ids (Union[None, Unset, list[str]]): Array of functionality IDs - group_ids (Union[None, Unset, list[str]]): Array of group IDs - incident_type_ids (Union[None, Unset, list[str]]): Array of incident type IDs + id (None | str | Unset): ID of the condition + property_type (UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType | + Unset): Property type + service_ids (list[str] | None | Unset): Array of service IDs + severity_ids (list[str] | None | Unset): Array of severity IDs + functionality_ids (list[str] | None | Unset): Array of functionality IDs + group_ids (list[str] | None | Unset): Array of group IDs + incident_type_ids (list[str] | None | Unset): Array of incident type IDs """ - id: None | Unset | str = UNSET - property_type: Unset | UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType = ( + id: None | str | Unset = UNSET + property_type: UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType | Unset = ( UNSET ) - service_ids: None | Unset | list[str] = UNSET - severity_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + service_ids: list[str] | None | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: None | Unset | str + id: None | str | Unset if isinstance(self.id, Unset): id = UNSET else: id = self.id - property_type: Unset | str = UNSET + property_type: str | Unset = UNSET if not isinstance(self.property_type, Unset): property_type = self.property_type - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -58,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -67,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -76,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -85,7 +87,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -118,17 +120,17 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_id(data: object) -> None | Unset | str: + def _parse_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) id = _parse_id(d.pop("id", UNSET)) _property_type = d.pop("property_type", UNSET) - property_type: Unset | UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType + property_type: UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType | Unset if isinstance(_property_type, Unset): property_type = UNSET else: @@ -136,7 +138,7 @@ def _parse_id(data: object) -> None | Unset | str: _property_type ) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -147,13 +149,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -164,13 +166,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -181,13 +183,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -198,13 +200,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -215,9 +217,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/update_communications_stage.py b/rootly_sdk/models/update_communications_stage.py index ce803372..2f890ab9 100644 --- a/rootly_sdk/models/update_communications_stage.py +++ b/rootly_sdk/models/update_communications_stage.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCommunicationsStage: data (UpdateCommunicationsStageData): """ - data: "UpdateCommunicationsStageData" + data: UpdateCommunicationsStageData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_stage_data.py b/rootly_sdk/models/update_communications_stage_data.py index e3ead90b..8e6b1961 100644 --- a/rootly_sdk/models/update_communications_stage_data.py +++ b/rootly_sdk/models/update_communications_stage_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateCommunicationsStageData: """ type_: UpdateCommunicationsStageDataType - attributes: "UpdateCommunicationsStageDataAttributes" + attributes: UpdateCommunicationsStageDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_stage_data_attributes.py b/rootly_sdk/models/update_communications_stage_data_attributes.py index 1b3721f4..a0a443e5 100644 --- a/rootly_sdk/models/update_communications_stage_data_attributes.py +++ b/rootly_sdk/models/update_communications_stage_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,25 +14,25 @@ class UpdateCommunicationsStageDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the communications stage - description (Union[None, Unset, str]): The description of the communications stage - position (Union[None, Unset, int]): Position of the communications stage + name (str | Unset): The name of the communications stage + description (None | str | Unset): The description of the communications stage + position (int | None | Unset): Position of the communications stage """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -53,21 +55,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_communications_template.py b/rootly_sdk/models/update_communications_template.py index e21c6f26..6e7cebd5 100644 --- a/rootly_sdk/models/update_communications_template.py +++ b/rootly_sdk/models/update_communications_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCommunicationsTemplate: data (UpdateCommunicationsTemplateData): """ - data: "UpdateCommunicationsTemplateData" + data: UpdateCommunicationsTemplateData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_template_data.py b/rootly_sdk/models/update_communications_template_data.py index 86dfa99c..75e50cb1 100644 --- a/rootly_sdk/models/update_communications_template_data.py +++ b/rootly_sdk/models/update_communications_template_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateCommunicationsTemplateData: """ type_: UpdateCommunicationsTemplateDataType - attributes: "UpdateCommunicationsTemplateDataAttributes" + attributes: UpdateCommunicationsTemplateDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_template_data_attributes.py b/rootly_sdk/models/update_communications_template_data_attributes.py index ceb94ac5..66fe1ee0 100644 --- a/rootly_sdk/models/update_communications_template_data_attributes.py +++ b/rootly_sdk/models/update_communications_template_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -18,27 +20,27 @@ class UpdateCommunicationsTemplateDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the communications template - description (Union[None, Unset, str]): The description of the communications template - communication_type_id (Union[Unset, str]): The communication type ID - position (Union[None, Unset, int]): Position of the communications template - communication_template_stages_attributes (Union[None, Unset, - list['UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item']]): Template - stages attributes + name (str | Unset): The name of the communications template + description (None | str | Unset): The description of the communications template + communication_type_id (str | Unset): The communication type ID + position (int | None | Unset): Position of the communications template + communication_template_stages_attributes + (list[UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] | None | Unset): + Template stages attributes """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - communication_type_id: Unset | str = UNSET - position: None | Unset | int = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + communication_type_id: str | Unset = UNSET + position: int | None | Unset = UNSET communication_template_stages_attributes: ( - None | Unset | list["UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item"] + list[UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -46,13 +48,13 @@ def to_dict(self) -> dict[str, Any]: communication_type_id = self.communication_type_id - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - communication_template_stages_attributes: None | Unset | list[dict[str, Any]] + communication_template_stages_attributes: list[dict[str, Any]] | None | Unset if isinstance(self.communication_template_stages_attributes, Unset): communication_template_stages_attributes = UNSET elif isinstance(self.communication_template_stages_attributes, list): @@ -93,32 +95,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) communication_type_id = d.pop("communication_type_id", UNSET) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) def _parse_communication_template_stages_attributes( data: object, ) -> ( - None + list[UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] + | None | Unset - | list["UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item"] ): if data is None: return data @@ -141,12 +143,12 @@ def _parse_communication_template_stages_attributes( ) return communication_template_stages_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - None - | Unset - | list["UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item"], + list[UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item] + | None + | Unset, data, ) diff --git a/rootly_sdk/models/update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py b/rootly_sdk/models/update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py index 70e273b7..f8491a27 100644 --- a/rootly_sdk/models/update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py +++ b/rootly_sdk/models/update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,46 +15,46 @@ class UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item: """ Attributes: - id (Union[None, Unset, str]): ID of the communication template stage - sms_content (Union[None, Unset, str]): SMS content for the stage - email_subject (Union[None, Unset, str]): Email subject for the stage - email_body (Union[None, Unset, str]): Email body for the stage - slack_content (Union[None, Unset, str]): Slack content for the stage + id (None | str | Unset): ID of the communication template stage + sms_content (None | str | Unset): SMS content for the stage + email_subject (None | str | Unset): Email subject for the stage + email_body (None | str | Unset): Email body for the stage + slack_content (None | str | Unset): Slack content for the stage """ - id: None | Unset | str = UNSET - sms_content: None | Unset | str = UNSET - email_subject: None | Unset | str = UNSET - email_body: None | Unset | str = UNSET - slack_content: None | Unset | str = UNSET + id: None | str | Unset = UNSET + sms_content: None | str | Unset = UNSET + email_subject: None | str | Unset = UNSET + email_body: None | str | Unset = UNSET + slack_content: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - id: None | Unset | str + id: None | str | Unset if isinstance(self.id, Unset): id = UNSET else: id = self.id - sms_content: None | Unset | str + sms_content: None | str | Unset if isinstance(self.sms_content, Unset): sms_content = UNSET else: sms_content = self.sms_content - email_subject: None | Unset | str + email_subject: None | str | Unset if isinstance(self.email_subject, Unset): email_subject = UNSET else: email_subject = self.email_subject - email_body: None | Unset | str + email_body: None | str | Unset if isinstance(self.email_body, Unset): email_body = UNSET else: email_body = self.email_body - slack_content: None | Unset | str + slack_content: None | str | Unset if isinstance(self.slack_content, Unset): slack_content = UNSET else: @@ -78,48 +80,48 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_id(data: object) -> None | Unset | str: + def _parse_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) id = _parse_id(d.pop("id", UNSET)) - def _parse_sms_content(data: object) -> None | Unset | str: + def _parse_sms_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) sms_content = _parse_sms_content(d.pop("sms_content", UNSET)) - def _parse_email_subject(data: object) -> None | Unset | str: + def _parse_email_subject(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_subject = _parse_email_subject(d.pop("email_subject", UNSET)) - def _parse_email_body(data: object) -> None | Unset | str: + def _parse_email_body(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) email_body = _parse_email_body(d.pop("email_body", UNSET)) - def _parse_slack_content(data: object) -> None | Unset | str: + def _parse_slack_content(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_content = _parse_slack_content(d.pop("slack_content", UNSET)) diff --git a/rootly_sdk/models/update_communications_type.py b/rootly_sdk/models/update_communications_type.py index 28420815..a788de66 100644 --- a/rootly_sdk/models/update_communications_type.py +++ b/rootly_sdk/models/update_communications_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCommunicationsType: data (UpdateCommunicationsTypeData): """ - data: "UpdateCommunicationsTypeData" + data: UpdateCommunicationsTypeData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_type_data.py b/rootly_sdk/models/update_communications_type_data.py index c34b23c4..470e7f66 100644 --- a/rootly_sdk/models/update_communications_type_data.py +++ b/rootly_sdk/models/update_communications_type_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateCommunicationsTypeData: """ type_: UpdateCommunicationsTypeDataType - attributes: "UpdateCommunicationsTypeDataAttributes" + attributes: UpdateCommunicationsTypeDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_communications_type_data_attributes.py b/rootly_sdk/models/update_communications_type_data_attributes.py index 10599946..9b78ebed 100644 --- a/rootly_sdk/models/update_communications_type_data_attributes.py +++ b/rootly_sdk/models/update_communications_type_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,33 +14,33 @@ class UpdateCommunicationsTypeDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the communications type - description (Union[None, Unset, str]): The description of the communications type - color (Union[None, Unset, str]): The color of the communications type - position (Union[None, Unset, int]): Position of the communications type + name (str | Unset): The name of the communications type + description (None | str | Unset): The description of the communications type + color (None | str | Unset): The color of the communications type + position (int | None | Unset): Position of the communications type """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -63,30 +65,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_confluence_page_task_params.py b/rootly_sdk/models/update_confluence_page_task_params.py index e6780aec..5cb8c995 100644 --- a/rootly_sdk/models/update_confluence_page_task_params.py +++ b/rootly_sdk/models/update_confluence_page_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,25 +24,25 @@ class UpdateConfluencePageTaskParams: """ Attributes: file_id (str): The Confluence page ID - task_type (Union[Unset, UpdateConfluencePageTaskParamsTaskType]): - title (Union[Unset, str]): The Confluence page title - content (Union[Unset, str]): The Confluence page content - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when updating page, if desired - template (Union[Unset, UpdateConfluencePageTaskParamsTemplate]): The Confluence template to use + task_type (UpdateConfluencePageTaskParamsTaskType | Unset): + title (str | Unset): The Confluence page title + content (str | Unset): The Confluence page content + post_mortem_template_id (str | Unset): Retrospective template to use when updating page, if desired + template (UpdateConfluencePageTaskParamsTemplate | Unset): The Confluence template to use """ file_id: str - task_type: Unset | UpdateConfluencePageTaskParamsTaskType = UNSET - title: Unset | str = UNSET - content: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET - template: Union[Unset, "UpdateConfluencePageTaskParamsTemplate"] = UNSET + task_type: UpdateConfluencePageTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + content: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + template: UpdateConfluencePageTaskParamsTemplate | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -50,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: post_mortem_template_id = self.post_mortem_template_id - template: Unset | dict[str, Any] = UNSET + template: dict[str, Any] | Unset = UNSET if not isinstance(self.template, Unset): template = self.template.to_dict() @@ -82,7 +84,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateConfluencePageTaskParamsTaskType + task_type: UpdateConfluencePageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -95,7 +97,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_mortem_template_id = d.pop("post_mortem_template_id", UNSET) _template = d.pop("template", UNSET) - template: Unset | UpdateConfluencePageTaskParamsTemplate + template: UpdateConfluencePageTaskParamsTemplate | Unset if isinstance(_template, Unset): template = UNSET else: diff --git a/rootly_sdk/models/update_confluence_page_task_params_template.py b/rootly_sdk/models/update_confluence_page_task_params_template.py index 92bc9f06..8ab06a92 100644 --- a/rootly_sdk/models/update_confluence_page_task_params_template.py +++ b/rootly_sdk/models/update_confluence_page_task_params_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateConfluencePageTaskParamsTemplate: """The Confluence template to use Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_field.py b/rootly_sdk/models/update_custom_field.py index bf4eb47c..9a9e7898 100644 --- a/rootly_sdk/models/update_custom_field.py +++ b/rootly_sdk/models/update_custom_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCustomField: data (UpdateCustomFieldData): """ - data: "UpdateCustomFieldData" + data: UpdateCustomFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_field_data.py b/rootly_sdk/models/update_custom_field_data.py index b67f174c..0baca8c1 100644 --- a/rootly_sdk/models/update_custom_field_data.py +++ b/rootly_sdk/models/update_custom_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateCustomFieldData: """ type_: UpdateCustomFieldDataType - attributes: "UpdateCustomFieldDataAttributes" + attributes: UpdateCustomFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_field_data_attributes.py b/rootly_sdk/models/update_custom_field_data_attributes.py index 0abc43ab..2eac8a3a 100644 --- a/rootly_sdk/models/update_custom_field_data_attributes.py +++ b/rootly_sdk/models/update_custom_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,38 +22,38 @@ class UpdateCustomFieldDataAttributes: """ Attributes: - label (Union[Unset, str]): The name of the custom_field - description (Union[None, Unset, str]): The description of the custom_field - shown (Union[Unset, list[UpdateCustomFieldDataAttributesShownItem]]): - required (Union[None, Unset, list[UpdateCustomFieldDataAttributesRequiredType0Item]]): - default (Union[None, Unset, str]): The default value for text field kinds - position (Union[Unset, int]): The position of the custom_field + label (str | Unset): The name of the custom_field + description (None | str | Unset): The description of the custom_field + shown (list[UpdateCustomFieldDataAttributesShownItem] | Unset): + required (list[UpdateCustomFieldDataAttributesRequiredType0Item] | None | Unset): + default (None | str | Unset): The default value for text field kinds + position (int | Unset): The position of the custom_field """ - label: Unset | str = UNSET - description: None | Unset | str = UNSET - shown: Unset | list[UpdateCustomFieldDataAttributesShownItem] = UNSET - required: None | Unset | list[UpdateCustomFieldDataAttributesRequiredType0Item] = UNSET - default: None | Unset | str = UNSET - position: Unset | int = UNSET + label: str | Unset = UNSET + description: None | str | Unset = UNSET + shown: list[UpdateCustomFieldDataAttributesShownItem] | Unset = UNSET + required: list[UpdateCustomFieldDataAttributesRequiredType0Item] | None | Unset = UNSET + default: None | str | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: label = self.label - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - shown: Unset | list[str] = UNSET + shown: list[str] | Unset = UNSET if not isinstance(self.shown, Unset): shown = [] for shown_item_data in self.shown: shown_item: str = shown_item_data shown.append(shown_item) - required: None | Unset | list[str] + required: list[str] | None | Unset if isinstance(self.required, Unset): required = UNSET elif isinstance(self.required, list): @@ -63,7 +65,7 @@ def to_dict(self) -> dict[str, Any]: else: required = self.required - default: None | Unset | str + default: None | str | Unset if isinstance(self.default, Unset): default = UNSET else: @@ -94,23 +96,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) label = d.pop("label", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - shown = [] _shown = d.pop("shown", UNSET) - for shown_item_data in _shown or []: - shown_item = check_update_custom_field_data_attributes_shown_item(shown_item_data) + shown: list[UpdateCustomFieldDataAttributesShownItem] | Unset = UNSET + if _shown is not UNSET: + shown = [] + for shown_item_data in _shown: + shown_item = check_update_custom_field_data_attributes_shown_item(shown_item_data) - shown.append(shown_item) + shown.append(shown_item) - def _parse_required(data: object) -> None | Unset | list[UpdateCustomFieldDataAttributesRequiredType0Item]: + def _parse_required(data: object) -> list[UpdateCustomFieldDataAttributesRequiredType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -128,18 +132,18 @@ def _parse_required(data: object) -> None | Unset | list[UpdateCustomFieldDataAt required_type_0.append(required_type_0_item) return required_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[UpdateCustomFieldDataAttributesRequiredType0Item], data) + return cast(list[UpdateCustomFieldDataAttributesRequiredType0Item] | None | Unset, data) required = _parse_required(d.pop("required", UNSET)) - def _parse_default(data: object) -> None | Unset | str: + def _parse_default(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) default = _parse_default(d.pop("default", UNSET)) diff --git a/rootly_sdk/models/update_custom_field_option.py b/rootly_sdk/models/update_custom_field_option.py index b1be8000..0ee9467b 100644 --- a/rootly_sdk/models/update_custom_field_option.py +++ b/rootly_sdk/models/update_custom_field_option.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCustomFieldOption: data (UpdateCustomFieldOptionData): """ - data: "UpdateCustomFieldOptionData" + data: UpdateCustomFieldOptionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_field_option_data.py b/rootly_sdk/models/update_custom_field_option_data.py index 3070ade9..599ea2d3 100644 --- a/rootly_sdk/models/update_custom_field_option_data.py +++ b/rootly_sdk/models/update_custom_field_option_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateCustomFieldOptionData: """ type_: UpdateCustomFieldOptionDataType - attributes: "UpdateCustomFieldOptionDataAttributes" + attributes: UpdateCustomFieldOptionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_field_option_data_attributes.py b/rootly_sdk/models/update_custom_field_option_data_attributes.py index b39881c6..72264d79 100644 --- a/rootly_sdk/models/update_custom_field_option_data_attributes.py +++ b/rootly_sdk/models/update_custom_field_option_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,16 +14,16 @@ class UpdateCustomFieldOptionDataAttributes: """ Attributes: - value (Union[Unset, str]): The value of the custom_field_option - color (Union[Unset, str]): The hex color of the custom_field_option - default (Union[Unset, bool]): - position (Union[Unset, int]): The position of the custom_field_option + value (str | Unset): The value of the custom_field_option + color (str | Unset): The hex color of the custom_field_option + default (bool | Unset): + position (int | Unset): The position of the custom_field_option """ - value: Unset | str = UNSET - color: Unset | str = UNSET - default: Unset | bool = UNSET - position: Unset | int = UNSET + value: str | Unset = UNSET + color: str | Unset = UNSET + default: bool | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: value = self.value diff --git a/rootly_sdk/models/update_custom_form.py b/rootly_sdk/models/update_custom_form.py index c207469d..74d00fd4 100644 --- a/rootly_sdk/models/update_custom_form.py +++ b/rootly_sdk/models/update_custom_form.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateCustomForm: data (UpdateCustomFormData): """ - data: "UpdateCustomFormData" + data: UpdateCustomFormData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_form_data.py b/rootly_sdk/models/update_custom_form_data.py index bc9577de..7345cab6 100644 --- a/rootly_sdk/models/update_custom_form_data.py +++ b/rootly_sdk/models/update_custom_form_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateCustomFormData: """ type_: UpdateCustomFormDataType - attributes: "UpdateCustomFormDataAttributes" + attributes: UpdateCustomFormDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_custom_form_data_attributes.py b/rootly_sdk/models/update_custom_form_data_attributes.py index 68210b89..72a3286c 100644 --- a/rootly_sdk/models/update_custom_form_data_attributes.py +++ b/rootly_sdk/models/update_custom_form_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,21 +14,21 @@ class UpdateCustomFormDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the custom form. - description (Union[None, Unset, str]): - enabled (Union[Unset, bool]): - command (Union[Unset, str]): The Slack command used to trigger this form. + name (str | Unset): The name of the custom form. + description (None | str | Unset): + enabled (bool | Unset): + command (str | Unset): The Slack command used to trigger this form. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - enabled: Unset | bool = UNSET - command: Unset | str = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + enabled: bool | Unset = UNSET + command: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -55,12 +57,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/update_dashboard.py b/rootly_sdk/models/update_dashboard.py index cef144c3..f54113b0 100644 --- a/rootly_sdk/models/update_dashboard.py +++ b/rootly_sdk/models/update_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateDashboard: data (UpdateDashboardData): """ - data: "UpdateDashboardData" + data: UpdateDashboardData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_dashboard_data.py b/rootly_sdk/models/update_dashboard_data.py index 849bda0a..a01aeaf6 100644 --- a/rootly_sdk/models/update_dashboard_data.py +++ b/rootly_sdk/models/update_dashboard_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class UpdateDashboardData: """ Attributes: - type_ (Union[Unset, UpdateDashboardDataType]): - attributes (Union[Unset, UpdateDashboardDataAttributes]): + type_ (UpdateDashboardDataType | Unset): + attributes (UpdateDashboardDataAttributes | Unset): """ - type_: Unset | UpdateDashboardDataType = UNSET - attributes: Union[Unset, "UpdateDashboardDataAttributes"] = UNSET + type_: UpdateDashboardDataType | Unset = UNSET + attributes: UpdateDashboardDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -51,14 +53,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _type_ = d.pop("type", UNSET) - type_: Unset | UpdateDashboardDataType + type_: UpdateDashboardDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_update_dashboard_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | UpdateDashboardDataAttributes + attributes: UpdateDashboardDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/update_dashboard_data_attributes.py b/rootly_sdk/models/update_dashboard_data_attributes.py index 148b4538..71ceb44b 100644 --- a/rootly_sdk/models/update_dashboard_data_attributes.py +++ b/rootly_sdk/models/update_dashboard_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -24,43 +26,43 @@ class UpdateDashboardDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the dashboard - description (Union[None, Unset, str]): The description of the dashboard - owner (Union[Unset, UpdateDashboardDataAttributesOwner]): The owner type of the dashboard - public (Union[Unset, bool]): Whether the dashboard is public - range_ (Union[None, Unset, str]): The date range for dashboard panel data - auto_refresh (Union[Unset, bool]): Whether the dashboard auto-updates the UI with new data. - color (Union[Unset, UpdateDashboardDataAttributesColor]): The hex color of the dashboard - icon (Union[Unset, str]): The emoji icon of the dashboard - period (Union[Unset, UpdateDashboardDataAttributesPeriod]): The grouping period for dashboard panel data + name (str | Unset): The name of the dashboard + description (None | str | Unset): The description of the dashboard + owner (UpdateDashboardDataAttributesOwner | Unset): The owner type of the dashboard + public (bool | Unset): Whether the dashboard is public + range_ (None | str | Unset): The date range for dashboard panel data + auto_refresh (bool | Unset): Whether the dashboard auto-updates the UI with new data. + color (UpdateDashboardDataAttributesColor | Unset): The hex color of the dashboard + icon (str | Unset): The emoji icon of the dashboard + period (UpdateDashboardDataAttributesPeriod | Unset): The grouping period for dashboard panel data """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - owner: Unset | UpdateDashboardDataAttributesOwner = UNSET - public: Unset | bool = UNSET - range_: None | Unset | str = UNSET - auto_refresh: Unset | bool = UNSET - color: Unset | UpdateDashboardDataAttributesColor = UNSET - icon: Unset | str = UNSET - period: Unset | UpdateDashboardDataAttributesPeriod = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + owner: UpdateDashboardDataAttributesOwner | Unset = UNSET + public: bool | Unset = UNSET + range_: None | str | Unset = UNSET + auto_refresh: bool | Unset = UNSET + color: UpdateDashboardDataAttributesColor | Unset = UNSET + icon: str | Unset = UNSET + period: UpdateDashboardDataAttributesPeriod | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - owner: Unset | str = UNSET + owner: str | Unset = UNSET if not isinstance(self.owner, Unset): owner = self.owner public = self.public - range_: None | Unset | str + range_: None | str | Unset if isinstance(self.range_, Unset): range_ = UNSET else: @@ -68,13 +70,13 @@ def to_dict(self) -> dict[str, Any]: auto_refresh = self.auto_refresh - color: Unset | str = UNSET + color: str | Unset = UNSET if not isinstance(self.color, Unset): color = self.color icon = self.icon - period: Unset | str = UNSET + period: str | Unset = UNSET if not isinstance(self.period, Unset): period = self.period @@ -107,17 +109,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _owner = d.pop("owner", UNSET) - owner: Unset | UpdateDashboardDataAttributesOwner + owner: UpdateDashboardDataAttributesOwner | Unset if isinstance(_owner, Unset): owner = UNSET else: @@ -125,19 +127,19 @@ def _parse_description(data: object) -> None | Unset | str: public = d.pop("public", UNSET) - def _parse_range_(data: object) -> None | Unset | str: + def _parse_range_(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) range_ = _parse_range_(d.pop("range", UNSET)) auto_refresh = d.pop("auto_refresh", UNSET) _color = d.pop("color", UNSET) - color: Unset | UpdateDashboardDataAttributesColor + color: UpdateDashboardDataAttributesColor | Unset if isinstance(_color, Unset): color = UNSET else: @@ -146,7 +148,7 @@ def _parse_range_(data: object) -> None | Unset | str: icon = d.pop("icon", UNSET) _period = d.pop("period", UNSET) - period: Unset | UpdateDashboardDataAttributesPeriod + period: UpdateDashboardDataAttributesPeriod | Unset if isinstance(_period, Unset): period = UNSET else: diff --git a/rootly_sdk/models/update_dashboard_panel.py b/rootly_sdk/models/update_dashboard_panel.py index 1d0634fc..ceacfca3 100644 --- a/rootly_sdk/models/update_dashboard_panel.py +++ b/rootly_sdk/models/update_dashboard_panel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateDashboardPanel: data (UpdateDashboardPanelData): """ - data: "UpdateDashboardPanelData" + data: UpdateDashboardPanelData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_dashboard_panel_data.py b/rootly_sdk/models/update_dashboard_panel_data.py index 31d0f4d5..22d0e1fa 100644 --- a/rootly_sdk/models/update_dashboard_panel_data.py +++ b/rootly_sdk/models/update_dashboard_panel_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,20 +23,20 @@ class UpdateDashboardPanelData: """ Attributes: - type_ (Union[Unset, UpdateDashboardPanelDataType]): - attributes (Union[Unset, UpdateDashboardPanelDataAttributes]): + type_ (UpdateDashboardPanelDataType | Unset): + attributes (UpdateDashboardPanelDataAttributes | Unset): """ - type_: Unset | UpdateDashboardPanelDataType = UNSET - attributes: Union[Unset, "UpdateDashboardPanelDataAttributes"] = UNSET + type_: UpdateDashboardPanelDataType | Unset = UNSET + attributes: UpdateDashboardPanelDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -54,14 +56,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _type_ = d.pop("type", UNSET) - type_: Unset | UpdateDashboardPanelDataType + type_: UpdateDashboardPanelDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: type_ = check_update_dashboard_panel_data_type(_type_) _attributes = d.pop("attributes", UNSET) - attributes: Unset | UpdateDashboardPanelDataAttributes + attributes: UpdateDashboardPanelDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes.py b/rootly_sdk/models/update_dashboard_panel_data_attributes.py index f59d99d7..6025a60e 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -19,31 +21,31 @@ class UpdateDashboardPanelDataAttributes: """ Attributes: - name (Union[None, Unset, str]): The name of the dashboard_panel - params (Union[Unset, UpdateDashboardPanelDataAttributesParams]): - position (Union['UpdateDashboardPanelDataAttributesPositionType0', None, Unset]): + name (None | str | Unset): The name of the dashboard_panel + params (UpdateDashboardPanelDataAttributesParams | Unset): + position (None | Unset | UpdateDashboardPanelDataAttributesPositionType0): """ - name: None | Unset | str = UNSET - params: Union[Unset, "UpdateDashboardPanelDataAttributesParams"] = UNSET - position: Union["UpdateDashboardPanelDataAttributesPositionType0", None, Unset] = UNSET + name: None | str | Unset = UNSET + params: UpdateDashboardPanelDataAttributesParams | Unset = UNSET + position: None | Unset | UpdateDashboardPanelDataAttributesPositionType0 = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_dashboard_panel_data_attributes_position_type_0 import ( UpdateDashboardPanelDataAttributesPositionType0, ) - name: None | Unset | str + name: None | str | Unset if isinstance(self.name, Unset): name = UNSET else: name = self.name - params: Unset | dict[str, Any] = UNSET + params: dict[str, Any] | Unset = UNSET if not isinstance(self.params, Unset): params = self.params.to_dict() - position: None | Unset | dict[str, Any] + position: dict[str, Any] | None | Unset if isinstance(self.position, Unset): position = UNSET elif isinstance(self.position, UpdateDashboardPanelDataAttributesPositionType0): @@ -72,23 +74,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_name(data: object) -> None | Unset | str: + def _parse_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) name = _parse_name(d.pop("name", UNSET)) _params = d.pop("params", UNSET) - params: Unset | UpdateDashboardPanelDataAttributesParams + params: UpdateDashboardPanelDataAttributesParams | Unset if isinstance(_params, Unset): params = UNSET else: params = UpdateDashboardPanelDataAttributesParams.from_dict(_params) - def _parse_position(data: object) -> Union["UpdateDashboardPanelDataAttributesPositionType0", None, Unset]: + def _parse_position(data: object) -> None | Unset | UpdateDashboardPanelDataAttributesPositionType0: if data is None: return data if isinstance(data, Unset): @@ -99,9 +101,9 @@ def _parse_position(data: object) -> Union["UpdateDashboardPanelDataAttributesPo position_type_0 = UpdateDashboardPanelDataAttributesPositionType0.from_dict(data) return position_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateDashboardPanelDataAttributesPositionType0", None, Unset], data) + return cast(None | Unset | UpdateDashboardPanelDataAttributesPositionType0, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py index 2cd1a381..7d2dc52d 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,42 +31,42 @@ class UpdateDashboardPanelDataAttributesParams: """ Attributes: - display (Union[Unset, UpdateDashboardPanelDataAttributesParamsDisplay]): - description (Union[Unset, str]): - table_fields (Union[Unset, list[str]]): - legend (Union[Unset, UpdateDashboardPanelDataAttributesParamsLegend]): - datalabels (Union[Unset, UpdateDashboardPanelDataAttributesParamsDatalabels]): - datasets (Union[Unset, list['UpdateDashboardPanelDataAttributesParamsDatasetsItem']]): + display (UpdateDashboardPanelDataAttributesParamsDisplay | Unset): + description (str | Unset): + table_fields (list[str] | Unset): + legend (UpdateDashboardPanelDataAttributesParamsLegend | Unset): + datalabels (UpdateDashboardPanelDataAttributesParamsDatalabels | Unset): + datasets (list[UpdateDashboardPanelDataAttributesParamsDatasetsItem] | Unset): """ - display: Unset | UpdateDashboardPanelDataAttributesParamsDisplay = UNSET - description: Unset | str = UNSET - table_fields: Unset | list[str] = UNSET - legend: Union[Unset, "UpdateDashboardPanelDataAttributesParamsLegend"] = UNSET - datalabels: Union[Unset, "UpdateDashboardPanelDataAttributesParamsDatalabels"] = UNSET - datasets: Unset | list["UpdateDashboardPanelDataAttributesParamsDatasetsItem"] = UNSET + display: UpdateDashboardPanelDataAttributesParamsDisplay | Unset = UNSET + description: str | Unset = UNSET + table_fields: list[str] | Unset = UNSET + legend: UpdateDashboardPanelDataAttributesParamsLegend | Unset = UNSET + datalabels: UpdateDashboardPanelDataAttributesParamsDatalabels | Unset = UNSET + datasets: list[UpdateDashboardPanelDataAttributesParamsDatasetsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - display: Unset | str = UNSET + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display description = self.description - table_fields: Unset | list[str] = UNSET + table_fields: list[str] | Unset = UNSET if not isinstance(self.table_fields, Unset): table_fields = self.table_fields - legend: Unset | dict[str, Any] = UNSET + legend: dict[str, Any] | Unset = UNSET if not isinstance(self.legend, Unset): legend = self.legend.to_dict() - datalabels: Unset | dict[str, Any] = UNSET + datalabels: dict[str, Any] | Unset = UNSET if not isinstance(self.datalabels, Unset): datalabels = self.datalabels.to_dict() - datasets: Unset | list[dict[str, Any]] = UNSET + datasets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.datasets, Unset): datasets = [] for datasets_item_data in self.datasets: @@ -103,7 +105,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _display = d.pop("display", UNSET) - display: Unset | UpdateDashboardPanelDataAttributesParamsDisplay + display: UpdateDashboardPanelDataAttributesParamsDisplay | Unset if isinstance(_display, Unset): display = UNSET else: @@ -114,25 +116,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: table_fields = cast(list[str], d.pop("table_fields", UNSET)) _legend = d.pop("legend", UNSET) - legend: Unset | UpdateDashboardPanelDataAttributesParamsLegend + legend: UpdateDashboardPanelDataAttributesParamsLegend | Unset if isinstance(_legend, Unset): legend = UNSET else: legend = UpdateDashboardPanelDataAttributesParamsLegend.from_dict(_legend) _datalabels = d.pop("datalabels", UNSET) - datalabels: Unset | UpdateDashboardPanelDataAttributesParamsDatalabels + datalabels: UpdateDashboardPanelDataAttributesParamsDatalabels | Unset if isinstance(_datalabels, Unset): datalabels = UNSET else: datalabels = UpdateDashboardPanelDataAttributesParamsDatalabels.from_dict(_datalabels) - datasets = [] _datasets = d.pop("datasets", UNSET) - for datasets_item_data in _datasets or []: - datasets_item = UpdateDashboardPanelDataAttributesParamsDatasetsItem.from_dict(datasets_item_data) + datasets: list[UpdateDashboardPanelDataAttributesParamsDatasetsItem] | Unset = UNSET + if _datasets is not UNSET: + datasets = [] + for datasets_item_data in _datasets: + datasets_item = UpdateDashboardPanelDataAttributesParamsDatasetsItem.from_dict(datasets_item_data) - datasets.append(datasets_item) + datasets.append(datasets_item) update_dashboard_panel_data_attributes_params = cls( display=display, diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datalabels.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datalabels.py index 91983f14..0c83750e 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datalabels.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datalabels.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,10 +15,10 @@ class UpdateDashboardPanelDataAttributesParamsDatalabels: """ Attributes: - enabled (Union[Unset, bool]): + enabled (bool | Unset): """ - enabled: Unset | bool = UNSET + enabled: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item.py index 0523caa2..49dd7014 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,18 +31,18 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItem: """ Attributes: - name (Union[None, Unset, str]): - collection (Union[Unset, UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection]): - filter_ (Union[Unset, list['UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem']]): - group_by (Union['UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0', None, Unset, str]): - aggregate (Union['UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0', None, Unset]): + name (None | str | Unset): + collection (UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection | Unset): + filter_ (list[UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem] | Unset): + group_by (None | str | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0): + aggregate (None | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0): """ - name: None | Unset | str = UNSET - collection: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection = UNSET - filter_: Unset | list["UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem"] = UNSET - group_by: Union["UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0", None, Unset, str] = UNSET - aggregate: Union["UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0", None, Unset] = UNSET + name: None | str | Unset = UNSET + collection: UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection | Unset = UNSET + filter_: list[UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem] | Unset = UNSET + group_by: None | str | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0 = UNSET + aggregate: None | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0 = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,24 +53,24 @@ def to_dict(self) -> dict[str, Any]: UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, ) - name: None | Unset | str + name: None | str | Unset if isinstance(self.name, Unset): name = UNSET else: name = self.name - collection: Unset | str = UNSET + collection: str | Unset = UNSET if not isinstance(self.collection, Unset): collection = self.collection - filter_: Unset | list[dict[str, Any]] = UNSET + filter_: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.filter_, Unset): filter_ = [] for filter_item_data in self.filter_: filter_item = filter_item_data.to_dict() filter_.append(filter_item) - group_by: None | Unset | dict[str, Any] | str + group_by: dict[str, Any] | None | str | Unset if isinstance(self.group_by, Unset): group_by = UNSET elif isinstance(self.group_by, UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0): @@ -76,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: else: group_by = self.group_by - aggregate: None | Unset | dict[str, Any] + aggregate: dict[str, Any] | None | Unset if isinstance(self.aggregate, Unset): aggregate = UNSET elif isinstance(self.aggregate, UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0): @@ -114,32 +116,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_name(data: object) -> None | Unset | str: + def _parse_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) name = _parse_name(d.pop("name", UNSET)) _collection = d.pop("collection", UNSET) - collection: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection + collection: UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection | Unset if isinstance(_collection, Unset): collection = UNSET else: collection = check_update_dashboard_panel_data_attributes_params_datasets_item_collection(_collection) - filter_ = [] _filter_ = d.pop("filter", UNSET) - for filter_item_data in _filter_ or []: - filter_item = UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem.from_dict(filter_item_data) + filter_: list[UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem] | Unset = UNSET + if _filter_ is not UNSET: + filter_ = [] + for filter_item_data in _filter_: + filter_item = UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem.from_dict(filter_item_data) - filter_.append(filter_item) + filter_.append(filter_item) def _parse_group_by( data: object, - ) -> Union["UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0", None, Unset, str]: + ) -> None | str | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0: if data is None: return data if isinstance(data, Unset): @@ -152,17 +156,17 @@ def _parse_group_by( ) return group_by_type_1_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - Union["UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0", None, Unset, str], data + None | str | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, data ) group_by = _parse_group_by(d.pop("group_by", UNSET)) def _parse_aggregate( data: object, - ) -> Union["UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0", None, Unset]: + ) -> None | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0: if data is None: return data if isinstance(data, Unset): @@ -173,9 +177,9 @@ def _parse_aggregate( aggregate_type_0 = UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0.from_dict(data) return aggregate_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0", None, Unset], data) + return cast(None | Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0, data) aggregate = _parse_aggregate(d.pop("aggregate", UNSET)) diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py index 2e1d3fbc..4b0c487d 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,28 +19,28 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0: """ Attributes: - operation (Union[Unset, UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation]): - key (Union[None, Unset, str]): - cumulative (Union[None, Unset, bool]): + operation (UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation | Unset): + key (None | str | Unset): + cumulative (bool | None | Unset): """ - operation: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation = UNSET - key: None | Unset | str = UNSET - cumulative: None | Unset | bool = UNSET + operation: UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation | Unset = UNSET + key: None | str | Unset = UNSET + cumulative: bool | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - key: None | Unset | str + key: None | str | Unset if isinstance(self.key, Unset): key = UNSET else: key = self.key - cumulative: None | Unset | bool + cumulative: bool | None | Unset if isinstance(self.cumulative, Unset): cumulative = UNSET else: @@ -60,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation + operation: UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation | Unset if isinstance(_operation, Unset): operation = UNSET else: @@ -68,21 +70,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _operation ) - def _parse_key(data: object) -> None | Unset | str: + def _parse_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) key = _parse_key(d.pop("key", UNSET)) - def _parse_cumulative(data: object) -> None | Unset | bool: + def _parse_cumulative(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) cumulative = _parse_cumulative(d.pop("cumulative", UNSET)) diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py index 7c091524..16b2ed1d 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,20 +25,20 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem: """ Attributes: - operation (Union[Unset, UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation]): - rules (Union[Unset, list['UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem']]): + operation (UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation | Unset): + rules (list[UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem] | Unset): """ - operation: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation = UNSET - rules: Unset | list["UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem"] = UNSET + operation: UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation | Unset = UNSET + rules: list[UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - rules: Unset | list[dict[str, Any]] = UNSET + rules: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: @@ -61,7 +63,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation + operation: UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation | Unset if isinstance(_operation, Unset): operation = UNSET else: @@ -69,14 +71,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _operation ) - rules = [] _rules = d.pop("rules", UNSET) - for rules_item_data in _rules or []: - rules_item = UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem.from_dict( - rules_item_data - ) + rules: list[UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem] | Unset = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + rules_item = UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem.from_dict( + rules_item_data + ) - rules.append(rules_item) + rules.append(rules_item) update_dashboard_panel_data_attributes_params_datasets_item_filter_item = cls( operation=operation, diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py index eaaf8471..982897f3 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -21,24 +23,24 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem: """ Attributes: - operation (Union[Unset, UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation]): - condition (Union[Unset, UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition]): - key (Union[Unset, str]): - value (Union[Unset, str]): + operation (UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation | Unset): + condition (UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition | Unset): + key (str | Unset): + value (str | Unset): """ - operation: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation = UNSET - condition: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition = UNSET - key: Unset | str = UNSET - value: Unset | str = UNSET + operation: UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation | Unset = UNSET + condition: UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition | Unset = UNSET + key: str | Unset = UNSET + value: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - operation: Unset | str = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation - condition: Unset | str = UNSET + condition: str | Unset = UNSET if not isinstance(self.condition, Unset): condition = self.condition @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _operation = d.pop("operation", UNSET) - operation: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation + operation: UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation | Unset if isinstance(_operation, Unset): operation = UNSET else: @@ -75,7 +77,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _condition = d.pop("condition", UNSET) - condition: Unset | UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition + condition: UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition | Unset if isinstance(_condition, Unset): condition = UNSET else: diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py index aaaba96d..b1641d09 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py index d388df01..0f922aa8 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key.py @@ -1,10 +1,13 @@ from typing import Literal, cast -UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key = Literal["custom_field", "incident_role"] +UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key = Literal[ + "alert_field", "custom_field", "incident_role" +] UPDATE_DASHBOARD_PANEL_DATA_ATTRIBUTES_PARAMS_DATASETS_ITEM_GROUP_BY_TYPE_1_TYPE_0_KEY_VALUES: set[ UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key ] = { + "alert_field", "custom_field", "incident_role", } diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_legend.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_legend.py index 24a0af4a..d9afacec 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params_legend.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params_legend.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,14 +19,14 @@ class UpdateDashboardPanelDataAttributesParamsLegend: """ Attributes: - groups (Union[Unset, UpdateDashboardPanelDataAttributesParamsLegendGroups]): Default: 'all'. + groups (UpdateDashboardPanelDataAttributesParamsLegendGroups | Unset): Default: 'all'. """ - groups: Unset | UpdateDashboardPanelDataAttributesParamsLegendGroups = "all" + groups: UpdateDashboardPanelDataAttributesParamsLegendGroups | Unset = "all" additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - groups: Unset | str = UNSET + groups: str | Unset = UNSET if not isinstance(self.groups, Unset): groups = self.groups @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _groups = d.pop("groups", UNSET) - groups: Unset | UpdateDashboardPanelDataAttributesParamsLegendGroups + groups: UpdateDashboardPanelDataAttributesParamsLegendGroups | Unset if isinstance(_groups, Unset): groups = UNSET else: diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes_position_type_0.py b/rootly_sdk/models/update_dashboard_panel_data_attributes_position_type_0.py index 2118c2c0..8ce15963 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_position_type_0.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_position_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_datadog_notebook_task_params.py b/rootly_sdk/models/update_datadog_notebook_task_params.py index d67ddc1b..afd34de5 100644 --- a/rootly_sdk/models/update_datadog_notebook_task_params.py +++ b/rootly_sdk/models/update_datadog_notebook_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,27 +28,27 @@ class UpdateDatadogNotebookTaskParams: """ Attributes: file_id (str): The Datadog notebook ID - task_type (Union[Unset, UpdateDatadogNotebookTaskParamsTaskType]): - title (Union[Unset, str]): The Datadog notebook title - content (Union[Unset, str]): The Datadog notebook content - kind (Union[Unset, UpdateDatadogNotebookTaskParamsKind]): The notebook type - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when updating notebook, if desired - template (Union[Unset, UpdateDatadogNotebookTaskParamsTemplate]): The Datadog notebook template to use + task_type (UpdateDatadogNotebookTaskParamsTaskType | Unset): + title (str | Unset): The Datadog notebook title + content (str | Unset): The Datadog notebook content + kind (UpdateDatadogNotebookTaskParamsKind | Unset): The notebook type + post_mortem_template_id (str | Unset): Retrospective template to use when updating notebook, if desired + template (UpdateDatadogNotebookTaskParamsTemplate | Unset): The Datadog notebook template to use """ file_id: str - task_type: Unset | UpdateDatadogNotebookTaskParamsTaskType = UNSET - title: Unset | str = UNSET - content: Unset | str = UNSET - kind: Unset | UpdateDatadogNotebookTaskParamsKind = UNSET - post_mortem_template_id: Unset | str = UNSET - template: Union[Unset, "UpdateDatadogNotebookTaskParamsTemplate"] = UNSET + task_type: UpdateDatadogNotebookTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + content: str | Unset = UNSET + kind: UpdateDatadogNotebookTaskParamsKind | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + template: UpdateDatadogNotebookTaskParamsTemplate | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -54,13 +56,13 @@ def to_dict(self) -> dict[str, Any]: content = self.content - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind post_mortem_template_id = self.post_mortem_template_id - template: Unset | dict[str, Any] = UNSET + template: dict[str, Any] | Unset = UNSET if not isinstance(self.template, Unset): template = self.template.to_dict() @@ -94,7 +96,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateDatadogNotebookTaskParamsTaskType + task_type: UpdateDatadogNotebookTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -105,7 +107,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content = d.pop("content", UNSET) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateDatadogNotebookTaskParamsKind + kind: UpdateDatadogNotebookTaskParamsKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -114,7 +116,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_mortem_template_id = d.pop("post_mortem_template_id", UNSET) _template = d.pop("template", UNSET) - template: Unset | UpdateDatadogNotebookTaskParamsTemplate + template: UpdateDatadogNotebookTaskParamsTemplate | Unset if isinstance(_template, Unset): template = UNSET else: diff --git a/rootly_sdk/models/update_datadog_notebook_task_params_template.py b/rootly_sdk/models/update_datadog_notebook_task_params_template.py index 8b3f916d..7946ae4c 100644 --- a/rootly_sdk/models/update_datadog_notebook_task_params_template.py +++ b/rootly_sdk/models/update_datadog_notebook_task_params_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateDatadogNotebookTaskParamsTemplate: """The Datadog notebook template to use Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_dropbox_paper_page_task_params.py b/rootly_sdk/models/update_dropbox_paper_page_task_params.py index 285ebb2c..9f31d59e 100644 --- a/rootly_sdk/models/update_dropbox_paper_page_task_params.py +++ b/rootly_sdk/models/update_dropbox_paper_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,23 +20,23 @@ class UpdateDropboxPaperPageTaskParams: """ Attributes: file_id (str): The Dropbox Paper document ID - task_type (Union[Unset, UpdateDropboxPaperPageTaskParamsTaskType]): - title (Union[Unset, str]): The Dropbox Paper document title - content (Union[Unset, str]): The Dropbox Paper document content - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when updating document, if desired + task_type (UpdateDropboxPaperPageTaskParamsTaskType | Unset): + title (str | Unset): The Dropbox Paper document title + content (str | Unset): The Dropbox Paper document content + post_mortem_template_id (str | Unset): Retrospective template to use when updating document, if desired """ file_id: str - task_type: Unset | UpdateDropboxPaperPageTaskParamsTaskType = UNSET - title: Unset | str = UNSET - content: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET + task_type: UpdateDropboxPaperPageTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + content: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateDropboxPaperPageTaskParamsTaskType + task_type: UpdateDropboxPaperPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector.py b/rootly_sdk/models/update_edge_connector.py index d3a49f74..1a0943b0 100644 --- a/rootly_sdk/models/update_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateEdgeConnector: edge_connector (UpdateEdgeConnectorEdgeConnector): """ - edge_connector: "UpdateEdgeConnectorEdgeConnector" + edge_connector: UpdateEdgeConnectorEdgeConnector additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_edge_connector_action.py b/rootly_sdk/models/update_edge_connector_action.py index 03595dc3..8f66a7e3 100644 --- a/rootly_sdk/models/update_edge_connector_action.py +++ b/rootly_sdk/models/update_edge_connector_action.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateEdgeConnectorAction: action (UpdateEdgeConnectorActionAction): """ - action: "UpdateEdgeConnectorActionAction" + action: UpdateEdgeConnectorActionAction additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_edge_connector_action_action.py b/rootly_sdk/models/update_edge_connector_action_action.py index 508ccc77..c15966c0 100644 --- a/rootly_sdk/models/update_edge_connector_action_action.py +++ b/rootly_sdk/models/update_edge_connector_action_action.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,24 +23,24 @@ class UpdateEdgeConnectorActionAction: """ Attributes: - name (Union[Unset, str]): - action_type (Union[Unset, UpdateEdgeConnectorActionActionActionType]): - metadata (Union[Unset, UpdateEdgeConnectorActionActionMetadata]): + name (str | Unset): + action_type (UpdateEdgeConnectorActionActionActionType | Unset): + metadata (UpdateEdgeConnectorActionActionMetadata | Unset): """ - name: Unset | str = UNSET - action_type: Unset | UpdateEdgeConnectorActionActionActionType = UNSET - metadata: Union[Unset, "UpdateEdgeConnectorActionActionMetadata"] = UNSET + name: str | Unset = UNSET + action_type: UpdateEdgeConnectorActionActionActionType | Unset = UNSET + metadata: UpdateEdgeConnectorActionActionMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - action_type: Unset | str = UNSET + action_type: str | Unset = UNSET if not isinstance(self.action_type, Unset): action_type = self.action_type - metadata: Unset | dict[str, Any] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -62,14 +64,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _action_type = d.pop("action_type", UNSET) - action_type: Unset | UpdateEdgeConnectorActionActionActionType + action_type: UpdateEdgeConnectorActionActionActionType | Unset if isinstance(_action_type, Unset): action_type = UNSET else: action_type = check_update_edge_connector_action_action_action_type(_action_type) _metadata = d.pop("metadata", UNSET) - metadata: Unset | UpdateEdgeConnectorActionActionMetadata + metadata: UpdateEdgeConnectorActionActionMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector_action_action_metadata.py b/rootly_sdk/models/update_edge_connector_action_action_metadata.py index 0f536a48..b1551783 100644 --- a/rootly_sdk/models/update_edge_connector_action_action_metadata.py +++ b/rootly_sdk/models/update_edge_connector_action_action_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class UpdateEdgeConnectorActionActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/update_edge_connector_action_body.py b/rootly_sdk/models/update_edge_connector_action_body.py index ab2138ac..0e199f8e 100644 --- a/rootly_sdk/models/update_edge_connector_action_body.py +++ b/rootly_sdk/models/update_edge_connector_action_body.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class UpdateEdgeConnectorActionBody: """ Attributes: - action (Union[Unset, UpdateEdgeConnectorActionBodyAction]): + action (UpdateEdgeConnectorActionBodyAction | Unset): """ - action: Union[Unset, "UpdateEdgeConnectorActionBodyAction"] = UNSET + action: UpdateEdgeConnectorActionBodyAction | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - action: Unset | dict[str, Any] = UNSET + action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): action = self.action.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _action = d.pop("action", UNSET) - action: Unset | UpdateEdgeConnectorActionBodyAction + action: UpdateEdgeConnectorActionBodyAction | Unset if isinstance(_action, Unset): action = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector_action_body_action.py b/rootly_sdk/models/update_edge_connector_action_body_action.py index 5b27c01f..d70768dd 100644 --- a/rootly_sdk/models/update_edge_connector_action_body_action.py +++ b/rootly_sdk/models/update_edge_connector_action_body_action.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,24 +23,24 @@ class UpdateEdgeConnectorActionBodyAction: """ Attributes: - name (Union[Unset, str]): - action_type (Union[Unset, UpdateEdgeConnectorActionBodyActionActionType]): - metadata (Union[Unset, UpdateEdgeConnectorActionBodyActionMetadata]): + name (str | Unset): + action_type (UpdateEdgeConnectorActionBodyActionActionType | Unset): + metadata (UpdateEdgeConnectorActionBodyActionMetadata | Unset): """ - name: Unset | str = UNSET - action_type: Unset | UpdateEdgeConnectorActionBodyActionActionType = UNSET - metadata: Union[Unset, "UpdateEdgeConnectorActionBodyActionMetadata"] = UNSET + name: str | Unset = UNSET + action_type: UpdateEdgeConnectorActionBodyActionActionType | Unset = UNSET + metadata: UpdateEdgeConnectorActionBodyActionMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - action_type: Unset | str = UNSET + action_type: str | Unset = UNSET if not isinstance(self.action_type, Unset): action_type = self.action_type - metadata: Unset | dict[str, Any] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -64,14 +66,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _action_type = d.pop("action_type", UNSET) - action_type: Unset | UpdateEdgeConnectorActionBodyActionActionType + action_type: UpdateEdgeConnectorActionBodyActionActionType | Unset if isinstance(_action_type, Unset): action_type = UNSET else: action_type = check_update_edge_connector_action_body_action_action_type(_action_type) _metadata = d.pop("metadata", UNSET) - metadata: Unset | UpdateEdgeConnectorActionBodyActionMetadata + metadata: UpdateEdgeConnectorActionBodyActionMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector_action_body_action_metadata.py b/rootly_sdk/models/update_edge_connector_action_body_action_metadata.py index 507c8764..091eb2e7 100644 --- a/rootly_sdk/models/update_edge_connector_action_body_action_metadata.py +++ b/rootly_sdk/models/update_edge_connector_action_body_action_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class UpdateEdgeConnectorActionBodyActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/update_edge_connector_body.py b/rootly_sdk/models/update_edge_connector_body.py index 996b1d4d..a10ff487 100644 --- a/rootly_sdk/models/update_edge_connector_body.py +++ b/rootly_sdk/models/update_edge_connector_body.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class UpdateEdgeConnectorBody: """ Attributes: - data (Union[Unset, UpdateEdgeConnectorBodyData]): + data (UpdateEdgeConnectorBodyData | Unset): """ - data: Union[Unset, "UpdateEdgeConnectorBodyData"] = UNSET + data: UpdateEdgeConnectorBodyData | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - data: Unset | dict[str, Any] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _data = d.pop("data", UNSET) - data: Unset | UpdateEdgeConnectorBodyData + data: UpdateEdgeConnectorBodyData | Unset if isinstance(_data, Unset): data = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector_body_data.py b/rootly_sdk/models/update_edge_connector_body_data.py index 7e203ba0..445e7799 100644 --- a/rootly_sdk/models/update_edge_connector_body_data.py +++ b/rootly_sdk/models/update_edge_connector_body_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,24 +23,24 @@ class UpdateEdgeConnectorBodyData: """ Attributes: - type_ (Union[Unset, UpdateEdgeConnectorBodyDataType]): - id (Union[Unset, str]): - attributes (Union[Unset, UpdateEdgeConnectorBodyDataAttributes]): + type_ (UpdateEdgeConnectorBodyDataType | Unset): + id (str | Unset): + attributes (UpdateEdgeConnectorBodyDataAttributes | Unset): """ - type_: Unset | UpdateEdgeConnectorBodyDataType = UNSET - id: Unset | str = UNSET - attributes: Union[Unset, "UpdateEdgeConnectorBodyDataAttributes"] = UNSET + type_: UpdateEdgeConnectorBodyDataType | Unset = UNSET + id: str | Unset = UNSET + attributes: UpdateEdgeConnectorBodyDataAttributes | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ id = self.id - attributes: Unset | dict[str, Any] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() @@ -60,7 +62,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _type_ = d.pop("type", UNSET) - type_: Unset | UpdateEdgeConnectorBodyDataType + type_: UpdateEdgeConnectorBodyDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: @@ -69,7 +71,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _attributes = d.pop("attributes", UNSET) - attributes: Unset | UpdateEdgeConnectorBodyDataAttributes + attributes: UpdateEdgeConnectorBodyDataAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector_body_data_attributes.py b/rootly_sdk/models/update_edge_connector_body_data_attributes.py index 3e2dcdd5..c076f696 100644 --- a/rootly_sdk/models/update_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,16 +19,16 @@ class UpdateEdgeConnectorBodyDataAttributes: """ Attributes: - name (Union[Unset, str]): - description (Union[Unset, str]): - status (Union[Unset, UpdateEdgeConnectorBodyDataAttributesStatus]): - subscriptions (Union[Unset, list[str]]): + name (str | Unset): + description (str | Unset): + status (UpdateEdgeConnectorBodyDataAttributesStatus | Unset): + subscriptions (list[str] | Unset): """ - name: Unset | str = UNSET - description: Unset | str = UNSET - status: Unset | UpdateEdgeConnectorBodyDataAttributesStatus = UNSET - subscriptions: Unset | list[str] = UNSET + name: str | Unset = UNSET + description: str | Unset = UNSET + status: UpdateEdgeConnectorBodyDataAttributesStatus | Unset = UNSET + subscriptions: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,11 +36,11 @@ def to_dict(self) -> dict[str, Any]: description = self.description - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - subscriptions: Unset | list[str] = UNSET + subscriptions: list[str] | Unset = UNSET if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions @@ -64,7 +66,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdateEdgeConnectorBodyDataAttributesStatus + status: UpdateEdgeConnectorBodyDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/rootly_sdk/models/update_edge_connector_edge_connector.py b/rootly_sdk/models/update_edge_connector_edge_connector.py index 3bbc9ead..a2accd57 100644 --- a/rootly_sdk/models/update_edge_connector_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector_edge_connector.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,16 +19,16 @@ class UpdateEdgeConnectorEdgeConnector: """ Attributes: - name (Union[Unset, str]): - description (Union[Unset, str]): - status (Union[Unset, UpdateEdgeConnectorEdgeConnectorStatus]): - subscriptions (Union[Unset, list[str]]): + name (str | Unset): + description (str | Unset): + status (UpdateEdgeConnectorEdgeConnectorStatus | Unset): + subscriptions (list[str] | Unset): """ - name: Unset | str = UNSET - description: Unset | str = UNSET - status: Unset | UpdateEdgeConnectorEdgeConnectorStatus = UNSET - subscriptions: Unset | list[str] = UNSET + name: str | Unset = UNSET + description: str | Unset = UNSET + status: UpdateEdgeConnectorEdgeConnectorStatus | Unset = UNSET + subscriptions: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,11 +36,11 @@ def to_dict(self) -> dict[str, Any]: description = self.description - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - subscriptions: Unset | list[str] = UNSET + subscriptions: list[str] | Unset = UNSET if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions @@ -64,7 +66,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdateEdgeConnectorEdgeConnectorStatus + status: UpdateEdgeConnectorEdgeConnectorStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/rootly_sdk/models/update_environment.py b/rootly_sdk/models/update_environment.py index 0af13434..3220c2cd 100644 --- a/rootly_sdk/models/update_environment.py +++ b/rootly_sdk/models/update_environment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateEnvironment: data (UpdateEnvironmentData): """ - data: "UpdateEnvironmentData" + data: UpdateEnvironmentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_environment_data.py b/rootly_sdk/models/update_environment_data.py index bb7f5c09..5eeba4d0 100644 --- a/rootly_sdk/models/update_environment_data.py +++ b/rootly_sdk/models/update_environment_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateEnvironmentData: """ type_: UpdateEnvironmentDataType - attributes: "UpdateEnvironmentDataAttributes" + attributes: UpdateEnvironmentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_environment_data_attributes.py b/rootly_sdk/models/update_environment_data_attributes.py index 00c4896c..8145cc3a 100644 --- a/rootly_sdk/models/update_environment_data_attributes.py +++ b/rootly_sdk/models/update_environment_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,9 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_environment_data_attributes_fields_item import UpdateEnvironmentDataAttributesFieldsItem + from ..models.update_environment_data_attributes_properties_item import ( + UpdateEnvironmentDataAttributesPropertiesItem, + ) from ..models.update_environment_data_attributes_slack_aliases_type_0_item import ( UpdateEnvironmentDataAttributesSlackAliasesType0Item, ) @@ -22,50 +26,50 @@ class UpdateEnvironmentDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the environment - description (Union[None, Unset, str]): The description of the environment - color (Union[None, Unset, str]): The hex color of the environment - position (Union[None, Unset, int]): Position of the environment - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the environment - slack_channels (Union[None, Unset, list['UpdateEnvironmentDataAttributesSlackChannelsType0Item']]): Slack - Channels associated with this environment - slack_aliases (Union[None, Unset, list['UpdateEnvironmentDataAttributesSlackAliasesType0Item']]): Slack Aliases + name (str | Unset): The name of the environment + description (None | str | Unset): The description of the environment + color (None | str | Unset): The hex color of the environment + position (int | None | Unset): Position of the environment + notify_emails (list[str] | None | Unset): Emails to attach to the environment + slack_channels (list[UpdateEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this environment - fields (Union[Unset, list['UpdateEnvironmentDataAttributesFieldsItem']]): Array of field values for this + slack_aliases (list[UpdateEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases + associated with this environment + properties (list[UpdateEnvironmentDataAttributesPropertiesItem] | Unset): Array of property values for this environment. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["UpdateEnvironmentDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["UpdateEnvironmentDataAttributesSlackAliasesType0Item"] = UNSET - fields: Unset | list["UpdateEnvironmentDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[UpdateEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[UpdateEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + properties: list[UpdateEnvironmentDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -74,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -86,7 +90,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -98,12 +102,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -122,14 +126,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.update_environment_data_attributes_fields_item import UpdateEnvironmentDataAttributesFieldsItem + from ..models.update_environment_data_attributes_properties_item import ( + UpdateEnvironmentDataAttributesPropertiesItem, + ) from ..models.update_environment_data_attributes_slack_aliases_type_0_item import ( UpdateEnvironmentDataAttributesSlackAliasesType0Item, ) @@ -140,34 +146,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -178,15 +184,15 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["UpdateEnvironmentDataAttributesSlackChannelsType0Item"]: + ) -> list[UpdateEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -204,15 +210,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateEnvironmentDataAttributesSlackChannelsType0Item"], data) + return cast(list[UpdateEnvironmentDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["UpdateEnvironmentDataAttributesSlackAliasesType0Item"]: + ) -> list[UpdateEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -230,18 +236,20 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateEnvironmentDataAttributesSlackAliasesType0Item"], data) + return cast(list[UpdateEnvironmentDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateEnvironmentDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateEnvironmentDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateEnvironmentDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_environment_data_attributes = cls( name=name, @@ -251,7 +259,7 @@ def _parse_slack_aliases( notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) return update_environment_data_attributes diff --git a/rootly_sdk/models/update_environment_data_attributes_properties_item.py b/rootly_sdk/models/update_environment_data_attributes_properties_item.py new file mode 100644 index 00000000..555c7a02 --- /dev/null +++ b/rootly_sdk/models/update_environment_data_attributes_properties_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateEnvironmentDataAttributesPropertiesItem") + + +@_attrs_define +class UpdateEnvironmentDataAttributesPropertiesItem: + """Set a value for a catalog property + + Attributes: + catalog_property_id (str): Catalog property ID + value (str): The property value + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + update_environment_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + update_environment_data_attributes_properties_item.additional_properties = d + return update_environment_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_environment_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/update_environment_data_attributes_slack_aliases_type_0_item.py index cfadccf4..fdc4f9b2 100644 --- a/rootly_sdk/models/update_environment_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/update_environment_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_environment_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/update_environment_data_attributes_slack_channels_type_0_item.py index ae4c9d1a..98c9e895 100644 --- a/rootly_sdk/models/update_environment_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/update_environment_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_escalation_policy.py b/rootly_sdk/models/update_escalation_policy.py index d64a1ba0..3290a36d 100644 --- a/rootly_sdk/models/update_escalation_policy.py +++ b/rootly_sdk/models/update_escalation_policy.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateEscalationPolicy: data (UpdateEscalationPolicyData): """ - data: "UpdateEscalationPolicyData" + data: UpdateEscalationPolicyData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_escalation_policy_data.py b/rootly_sdk/models/update_escalation_policy_data.py index 69dcce30..1e9bb59c 100644 --- a/rootly_sdk/models/update_escalation_policy_data.py +++ b/rootly_sdk/models/update_escalation_policy_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateEscalationPolicyData: """ type_: UpdateEscalationPolicyDataType - attributes: "UpdateEscalationPolicyDataAttributes" + attributes: UpdateEscalationPolicyDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_escalation_policy_data_attributes.py b/rootly_sdk/models/update_escalation_policy_data_attributes.py index aad07d04..9cf51994 100644 --- a/rootly_sdk/models/update_escalation_policy_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -18,21 +20,21 @@ class UpdateEscalationPolicyDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the escalation policy - description (Union[None, Unset, str]): The description of the escalation policy - repeat_count (Union[Unset, int]): The number of times this policy will be executed until someone acknowledges - the alert - group_ids (Union[Unset, list[str]]): Associated groups (alerting the group will trigger escalation policy) - service_ids (Union[Unset, list[str]]): Associated services (alerting the service will trigger escalation policy) - business_hours (Union['UpdateEscalationPolicyDataAttributesBusinessHoursType0', None, Unset]): + name (str | Unset): The name of the escalation policy + description (None | str | Unset): The description of the escalation policy + repeat_count (int | Unset): The number of times this policy will be executed until someone acknowledges the + alert + group_ids (list[str] | Unset): Associated groups (alerting the group will trigger escalation policy) + service_ids (list[str] | Unset): Associated services (alerting the service will trigger escalation policy) + business_hours (None | Unset | UpdateEscalationPolicyDataAttributesBusinessHoursType0): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - repeat_count: Unset | int = UNSET - group_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - business_hours: Union["UpdateEscalationPolicyDataAttributesBusinessHoursType0", None, Unset] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + repeat_count: int | Unset = UNSET + group_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + business_hours: None | Unset | UpdateEscalationPolicyDataAttributesBusinessHoursType0 = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_escalation_policy_data_attributes_business_hours_type_0 import ( @@ -41,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -49,15 +51,15 @@ def to_dict(self) -> dict[str, Any]: repeat_count = self.repeat_count - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - business_hours: None | Unset | dict[str, Any] + business_hours: dict[str, Any] | None | Unset if isinstance(self.business_hours, Unset): business_hours = UNSET elif isinstance(self.business_hours, UpdateEscalationPolicyDataAttributesBusinessHoursType0): @@ -92,12 +94,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -109,7 +111,7 @@ def _parse_description(data: object) -> None | Unset | str: def _parse_business_hours( data: object, - ) -> Union["UpdateEscalationPolicyDataAttributesBusinessHoursType0", None, Unset]: + ) -> None | Unset | UpdateEscalationPolicyDataAttributesBusinessHoursType0: if data is None: return data if isinstance(data, Unset): @@ -120,9 +122,9 @@ def _parse_business_hours( business_hours_type_0 = UpdateEscalationPolicyDataAttributesBusinessHoursType0.from_dict(data) return business_hours_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateEscalationPolicyDataAttributesBusinessHoursType0", None, Unset], data) + return cast(None | Unset | UpdateEscalationPolicyDataAttributesBusinessHoursType0, data) business_hours = _parse_business_hours(d.pop("business_hours", UNSET)) diff --git a/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0.py b/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0.py index 49ec4302..08e773d8 100644 --- a/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0.py +++ b/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,26 +23,24 @@ class UpdateEscalationPolicyDataAttributesBusinessHoursType0: """ Attributes: - time_zone (Union[Unset, UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone]): Time zone for business - hours - days (Union[None, Unset, list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item]]): Business - days - start_time (Union[None, Unset, str]): Start time for business hours (HH:MM) - end_time (Union[None, Unset, str]): End time for business hours (HH:MM) + time_zone (UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone | Unset): Time zone for business hours + days (list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset): Business days + start_time (None | str | Unset): Start time for business hours (HH:MM) + end_time (None | str | Unset): End time for business hours (HH:MM) """ - time_zone: Unset | UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone = UNSET - days: None | Unset | list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] = UNSET - start_time: None | Unset | str = UNSET - end_time: None | Unset | str = UNSET + time_zone: UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone | Unset = UNSET + days: list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset = UNSET + start_time: None | str | Unset = UNSET + end_time: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - time_zone: Unset | str = UNSET + time_zone: str | Unset = UNSET if not isinstance(self.time_zone, Unset): time_zone = self.time_zone - days: None | Unset | list[str] + days: list[str] | None | Unset if isinstance(self.days, Unset): days = UNSET elif isinstance(self.days, list): @@ -52,13 +52,13 @@ def to_dict(self) -> dict[str, Any]: else: days = self.days - start_time: None | Unset | str + start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET else: start_time = self.start_time - end_time: None | Unset | str + end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET else: @@ -82,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _time_zone = d.pop("time_zone", UNSET) - time_zone: Unset | UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone + time_zone: UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone | Unset if isinstance(_time_zone, Unset): time_zone = UNSET else: @@ -90,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_days( data: object, - ) -> None | Unset | list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item]: + ) -> list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -110,27 +110,27 @@ def _parse_days( days_type_0.append(days_type_0_item) return days_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item], data) + return cast(list[UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item] | None | Unset, data) days = _parse_days(d.pop("days", UNSET)) - def _parse_start_time(data: object) -> None | Unset | str: + def _parse_start_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | Unset | str: + def _parse_end_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) diff --git a/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py b/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py index e8f22177..46bc9d02 100644 --- a/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py +++ b/rootly_sdk/models/update_escalation_policy_data_attributes_business_hours_type_0_time_zone.py @@ -65,6 +65,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -146,6 +147,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -195,6 +197,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -245,6 +248,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", @@ -355,6 +359,7 @@ "Asia/Magadan", "Asia/Muscat", "Asia/Novosibirsk", + "Asia/Rangoon", "Asia/Riyadh", "Asia/Seoul", "Asia/Shanghai", @@ -436,6 +441,7 @@ "Europe/Helsinki", "Europe/Istanbul", "Europe/Kaliningrad", + "Europe/Kiev", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", @@ -485,6 +491,7 @@ "Krasnoyarsk", "Kuala Lumpur", "Kuwait", + "Kyiv", "La Paz", "Lima", "Lisbon", @@ -535,6 +542,7 @@ "Pretoria", "Puerto Rico", "Quito", + "Rangoon", "Riga", "Riyadh", "Rome", diff --git a/rootly_sdk/models/update_escalation_policy_level.py b/rootly_sdk/models/update_escalation_policy_level.py index 4d915225..9cfac065 100644 --- a/rootly_sdk/models/update_escalation_policy_level.py +++ b/rootly_sdk/models/update_escalation_policy_level.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateEscalationPolicyLevel: data (UpdateEscalationPolicyLevelData): """ - data: "UpdateEscalationPolicyLevelData" + data: UpdateEscalationPolicyLevelData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_escalation_policy_level_data.py b/rootly_sdk/models/update_escalation_policy_level_data.py index 93386fa0..1e4a47bc 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data.py +++ b/rootly_sdk/models/update_escalation_policy_level_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateEscalationPolicyLevelData: """ type_: UpdateEscalationPolicyLevelDataType - attributes: "UpdateEscalationPolicyLevelDataAttributes" + attributes: UpdateEscalationPolicyLevelDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_escalation_policy_level_data_attributes.py b/rootly_sdk/models/update_escalation_policy_level_data_attributes.py index 65c1e798..b19e19b3 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_level_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -26,31 +28,31 @@ class UpdateEscalationPolicyLevelDataAttributes: """ Attributes: - delay (Union[Unset, int]): Delay before notifying targets in the next Escalation Level. - position (Union[Unset, int]): Position of the escalation policy level - escalation_policy_path_id (Union[None, Unset, str]): The ID of the dynamic escalation policy path the level will + delay (int | Unset): Delay before notifying targets in the next Escalation Level. + position (int | Unset): Position of the escalation policy level + escalation_policy_path_id (None | str | Unset): The ID of the dynamic escalation policy path the level will belong to. If nothing is specified it will add the level to your default path. - paging_strategy_configuration_strategy (Union[Unset, - UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy]): Default: 'default'. - paging_strategy_configuration_schedule_strategy (Union[Unset, - UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy]): Default: + paging_strategy_configuration_strategy + (UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy | Unset): Default: 'default'. + paging_strategy_configuration_schedule_strategy + (UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy | Unset): Default: 'on_call_only'. - notification_target_params (Union[Unset, - list[Union['UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0', None]]]): Escalation - level's notification targets + notification_target_params (list[None | + UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0] | Unset): Escalation level's + notification targets """ - delay: Unset | int = UNSET - position: Unset | int = UNSET - escalation_policy_path_id: None | Unset | str = UNSET + delay: int | Unset = UNSET + position: int | Unset = UNSET + escalation_policy_path_id: None | str | Unset = UNSET paging_strategy_configuration_strategy: ( - Unset | UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy + UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy | Unset ) = "default" paging_strategy_configuration_schedule_strategy: ( - Unset | UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy + UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy | Unset ) = "on_call_only" notification_target_params: ( - Unset | list[Union["UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0", None]] + list[None | UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0] | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: @@ -62,25 +64,25 @@ def to_dict(self) -> dict[str, Any]: position = self.position - escalation_policy_path_id: None | Unset | str + escalation_policy_path_id: None | str | Unset if isinstance(self.escalation_policy_path_id, Unset): escalation_policy_path_id = UNSET else: escalation_policy_path_id = self.escalation_policy_path_id - paging_strategy_configuration_strategy: Unset | str = UNSET + paging_strategy_configuration_strategy: str | Unset = UNSET if not isinstance(self.paging_strategy_configuration_strategy, Unset): paging_strategy_configuration_strategy = self.paging_strategy_configuration_strategy - paging_strategy_configuration_schedule_strategy: Unset | str = UNSET + paging_strategy_configuration_schedule_strategy: str | Unset = UNSET if not isinstance(self.paging_strategy_configuration_schedule_strategy, Unset): paging_strategy_configuration_schedule_strategy = self.paging_strategy_configuration_schedule_strategy - notification_target_params: Unset | list[None | dict[str, Any]] = UNSET + notification_target_params: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.notification_target_params, Unset): notification_target_params = [] for notification_target_params_item_data in self.notification_target_params: - notification_target_params_item: None | dict[str, Any] + notification_target_params_item: dict[str, Any] | None if isinstance( notification_target_params_item_data, UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0, @@ -121,18 +123,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: position = d.pop("position", UNSET) - def _parse_escalation_policy_path_id(data: object) -> None | Unset | str: + def _parse_escalation_policy_path_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) escalation_policy_path_id = _parse_escalation_policy_path_id(d.pop("escalation_policy_path_id", UNSET)) _paging_strategy_configuration_strategy = d.pop("paging_strategy_configuration_strategy", UNSET) paging_strategy_configuration_strategy: ( - Unset | UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy + UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy | Unset ) if isinstance(_paging_strategy_configuration_strategy, Unset): paging_strategy_configuration_strategy = UNSET @@ -147,7 +149,7 @@ def _parse_escalation_policy_path_id(data: object) -> None | Unset | str: "paging_strategy_configuration_schedule_strategy", UNSET ) paging_strategy_configuration_schedule_strategy: ( - Unset | UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy + UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy | Unset ) if isinstance(_paging_strategy_configuration_schedule_strategy, Unset): paging_strategy_configuration_schedule_strategy = UNSET @@ -158,34 +160,36 @@ def _parse_escalation_policy_path_id(data: object) -> None | Unset | str: ) ) - notification_target_params = [] _notification_target_params = d.pop("notification_target_params", UNSET) - for notification_target_params_item_data in _notification_target_params or []: - - def _parse_notification_target_params_item( - data: object, - ) -> Union["UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - notification_target_params_item_type_0 = ( - UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0.from_dict(data) - ) - - return notification_target_params_item_type_0 - except: # noqa: E722 - pass - return cast( - Union["UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0", None], data + notification_target_params: ( + list[None | UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0] | Unset + ) = UNSET + if _notification_target_params is not UNSET: + notification_target_params = [] + for notification_target_params_item_data in _notification_target_params: + + def _parse_notification_target_params_item( + data: object, + ) -> None | UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + notification_target_params_item_type_0 = ( + UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0.from_dict(data) + ) + + return notification_target_params_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0, data) + + notification_target_params_item = _parse_notification_target_params_item( + notification_target_params_item_data ) - notification_target_params_item = _parse_notification_target_params_item( - notification_target_params_item_data - ) - - notification_target_params.append(notification_target_params_item) + notification_target_params.append(notification_target_params_item) update_escalation_policy_level_data_attributes = cls( delay=delay, diff --git a/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py b/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py index f9f312b1..79fdffe0 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py +++ b/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -24,14 +26,13 @@ class UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0 id (str): The ID of notification target type_ (UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type): The type of the notification target - team_members (Union[Unset, - UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers]): For targets with - type=team, controls whether to notify admins, all team members, or escalate to team EP. + team_members (UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset): + For targets with type=team, controls whether to notify admins, all team members, or escalate to team EP. """ id: str type_: UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type - team_members: Unset | UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers = UNSET + team_members: UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: type_: str = self.type_ - team_members: Unset | str = UNSET + team_members: str | Unset = UNSET if not isinstance(self.team_members, Unset): team_members = self.team_members @@ -66,7 +67,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _team_members = d.pop("team_members", UNSET) - team_members: Unset | UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers + team_members: UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset if isinstance(_team_members, Unset): team_members = UNSET else: diff --git a/rootly_sdk/models/update_form_field.py b/rootly_sdk/models/update_form_field.py index 0d06144e..c25d3344 100644 --- a/rootly_sdk/models/update_form_field.py +++ b/rootly_sdk/models/update_form_field.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormField: data (UpdateFormFieldData): """ - data: "UpdateFormFieldData" + data: UpdateFormFieldData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_data.py b/rootly_sdk/models/update_form_field_data.py index e404f75d..f512b069 100644 --- a/rootly_sdk/models/update_form_field_data.py +++ b/rootly_sdk/models/update_form_field_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateFormFieldData: """ type_: UpdateFormFieldDataType - attributes: "UpdateFormFieldDataAttributes" + attributes: UpdateFormFieldDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_data_attributes.py b/rootly_sdk/models/update_form_field_data_attributes.py index 2c923d41..b35324bf 100644 --- a/rootly_sdk/models/update_form_field_data_attributes.py +++ b/rootly_sdk/models/update_form_field_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -24,48 +26,48 @@ class UpdateFormFieldDataAttributes: """ Attributes: - kind (Union[Unset, UpdateFormFieldDataAttributesKind]): The kind of the form field - input_kind (Union[Unset, UpdateFormFieldDataAttributesInputKind]): The input kind of the form field - value_kind (Union[Unset, UpdateFormFieldDataAttributesValueKind]): The value kind of the form field - value_kind_catalog_id (Union[None, Unset, str]): The ID of the catalog used when value_kind is `catalog_entity` - name (Union[Unset, str]): The name of the form field - description (Union[None, Unset, str]): The description of the form field - shown (Union[Unset, list[str]]): - required (Union[Unset, list[str]]): - show_on_incident_details (Union[Unset, bool]): Whether the form field is shown on the incident details panel - enabled (Union[Unset, bool]): Whether the form field is enabled - default_values (Union[Unset, list[str]]): - auto_set_by_catalog_field_id (Union[None, Unset, str]): Catalog field ID to auto-set this form field. Only - reference-kind catalog fields are supported. + kind (UpdateFormFieldDataAttributesKind | Unset): The kind of the form field + input_kind (UpdateFormFieldDataAttributesInputKind | Unset): The input kind of the form field + value_kind (UpdateFormFieldDataAttributesValueKind | Unset): The value kind of the form field + value_kind_catalog_id (None | str | Unset): The ID of the catalog used when value_kind is `catalog_entity` + name (str | Unset): The name of the form field + description (None | str | Unset): The description of the form field + shown (list[str] | Unset): + required (list[str] | Unset): + show_on_incident_details (bool | Unset): Whether the form field is shown on the incident details panel + enabled (bool | Unset): Whether the form field is enabled + default_values (list[str] | Unset): + auto_set_by_catalog_property_id (None | str | Unset): Catalog property ID to auto-set this form field. Only + reference-kind catalog properties are supported. """ - kind: Unset | UpdateFormFieldDataAttributesKind = UNSET - input_kind: Unset | UpdateFormFieldDataAttributesInputKind = UNSET - value_kind: Unset | UpdateFormFieldDataAttributesValueKind = UNSET - value_kind_catalog_id: None | Unset | str = UNSET - name: Unset | str = UNSET - description: None | Unset | str = UNSET - shown: Unset | list[str] = UNSET - required: Unset | list[str] = UNSET - show_on_incident_details: Unset | bool = UNSET - enabled: Unset | bool = UNSET - default_values: Unset | list[str] = UNSET - auto_set_by_catalog_field_id: None | Unset | str = UNSET + kind: UpdateFormFieldDataAttributesKind | Unset = UNSET + input_kind: UpdateFormFieldDataAttributesInputKind | Unset = UNSET + value_kind: UpdateFormFieldDataAttributesValueKind | Unset = UNSET + value_kind_catalog_id: None | str | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + shown: list[str] | Unset = UNSET + required: list[str] | Unset = UNSET + show_on_incident_details: bool | Unset = UNSET + enabled: bool | Unset = UNSET + default_values: list[str] | Unset = UNSET + auto_set_by_catalog_property_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - input_kind: Unset | str = UNSET + input_kind: str | Unset = UNSET if not isinstance(self.input_kind, Unset): input_kind = self.input_kind - value_kind: Unset | str = UNSET + value_kind: str | Unset = UNSET if not isinstance(self.value_kind, Unset): value_kind = self.value_kind - value_kind_catalog_id: None | Unset | str + value_kind_catalog_id: None | str | Unset if isinstance(self.value_kind_catalog_id, Unset): value_kind_catalog_id = UNSET else: @@ -73,17 +75,17 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - shown: Unset | list[str] = UNSET + shown: list[str] | Unset = UNSET if not isinstance(self.shown, Unset): shown = self.shown - required: Unset | list[str] = UNSET + required: list[str] | Unset = UNSET if not isinstance(self.required, Unset): required = self.required @@ -91,15 +93,15 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - default_values: Unset | list[str] = UNSET + default_values: list[str] | Unset = UNSET if not isinstance(self.default_values, Unset): default_values = self.default_values - auto_set_by_catalog_field_id: None | Unset | str - if isinstance(self.auto_set_by_catalog_field_id, Unset): - auto_set_by_catalog_field_id = UNSET + auto_set_by_catalog_property_id: None | str | Unset + if isinstance(self.auto_set_by_catalog_property_id, Unset): + auto_set_by_catalog_property_id = UNSET else: - auto_set_by_catalog_field_id = self.auto_set_by_catalog_field_id + auto_set_by_catalog_property_id = self.auto_set_by_catalog_property_id field_dict: dict[str, Any] = {} @@ -126,8 +128,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["enabled"] = enabled if default_values is not UNSET: field_dict["default_values"] = default_values - if auto_set_by_catalog_field_id is not UNSET: - field_dict["auto_set_by_catalog_field_id"] = auto_set_by_catalog_field_id + if auto_set_by_catalog_property_id is not UNSET: + field_dict["auto_set_by_catalog_property_id"] = auto_set_by_catalog_property_id return field_dict @@ -135,43 +137,43 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateFormFieldDataAttributesKind + kind: UpdateFormFieldDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_update_form_field_data_attributes_kind(_kind) _input_kind = d.pop("input_kind", UNSET) - input_kind: Unset | UpdateFormFieldDataAttributesInputKind + input_kind: UpdateFormFieldDataAttributesInputKind | Unset if isinstance(_input_kind, Unset): input_kind = UNSET else: input_kind = check_update_form_field_data_attributes_input_kind(_input_kind) _value_kind = d.pop("value_kind", UNSET) - value_kind: Unset | UpdateFormFieldDataAttributesValueKind + value_kind: UpdateFormFieldDataAttributesValueKind | Unset if isinstance(_value_kind, Unset): value_kind = UNSET else: value_kind = check_update_form_field_data_attributes_value_kind(_value_kind) - def _parse_value_kind_catalog_id(data: object) -> None | Unset | str: + def _parse_value_kind_catalog_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value_kind_catalog_id = _parse_value_kind_catalog_id(d.pop("value_kind_catalog_id", UNSET)) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) @@ -185,14 +187,16 @@ def _parse_description(data: object) -> None | Unset | str: default_values = cast(list[str], d.pop("default_values", UNSET)) - def _parse_auto_set_by_catalog_field_id(data: object) -> None | Unset | str: + def _parse_auto_set_by_catalog_property_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) - auto_set_by_catalog_field_id = _parse_auto_set_by_catalog_field_id(d.pop("auto_set_by_catalog_field_id", UNSET)) + auto_set_by_catalog_property_id = _parse_auto_set_by_catalog_property_id( + d.pop("auto_set_by_catalog_property_id", UNSET) + ) update_form_field_data_attributes = cls( kind=kind, @@ -206,7 +210,7 @@ def _parse_auto_set_by_catalog_field_id(data: object) -> None | Unset | str: show_on_incident_details=show_on_incident_details, enabled=enabled, default_values=default_values, - auto_set_by_catalog_field_id=auto_set_by_catalog_field_id, + auto_set_by_catalog_property_id=auto_set_by_catalog_property_id, ) return update_form_field_data_attributes diff --git a/rootly_sdk/models/update_form_field_option.py b/rootly_sdk/models/update_form_field_option.py index 82cc645a..0ad11b4f 100644 --- a/rootly_sdk/models/update_form_field_option.py +++ b/rootly_sdk/models/update_form_field_option.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormFieldOption: data (UpdateFormFieldOptionData): """ - data: "UpdateFormFieldOptionData" + data: UpdateFormFieldOptionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_option_data.py b/rootly_sdk/models/update_form_field_option_data.py index 648a9210..cc5bfce6 100644 --- a/rootly_sdk/models/update_form_field_option_data.py +++ b/rootly_sdk/models/update_form_field_option_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateFormFieldOptionData: """ type_: UpdateFormFieldOptionDataType - attributes: "UpdateFormFieldOptionDataAttributes" + attributes: UpdateFormFieldOptionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_option_data_attributes.py b/rootly_sdk/models/update_form_field_option_data_attributes.py index 592e45ed..884652f0 100644 --- a/rootly_sdk/models/update_form_field_option_data_attributes.py +++ b/rootly_sdk/models/update_form_field_option_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,16 +14,16 @@ class UpdateFormFieldOptionDataAttributes: """ Attributes: - value (Union[Unset, str]): The value of the form field option - color (Union[Unset, str]): The hex color of the form field option - default (Union[Unset, bool]): - position (Union[Unset, int]): The position of the form field option + value (str | Unset): The value of the form field option + color (str | Unset): The hex color of the form field option + default (bool | Unset): + position (int | Unset): The position of the form field option """ - value: Unset | str = UNSET - color: Unset | str = UNSET - default: Unset | bool = UNSET - position: Unset | int = UNSET + value: str | Unset = UNSET + color: str | Unset = UNSET + default: bool | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: value = self.value diff --git a/rootly_sdk/models/update_form_field_placement.py b/rootly_sdk/models/update_form_field_placement.py index f9a2844c..43a5f88e 100644 --- a/rootly_sdk/models/update_form_field_placement.py +++ b/rootly_sdk/models/update_form_field_placement.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormFieldPlacement: data (UpdateFormFieldPlacementData): """ - data: "UpdateFormFieldPlacementData" + data: UpdateFormFieldPlacementData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_placement_condition.py b/rootly_sdk/models/update_form_field_placement_condition.py index 3788132c..2f9a4da3 100644 --- a/rootly_sdk/models/update_form_field_placement_condition.py +++ b/rootly_sdk/models/update_form_field_placement_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormFieldPlacementCondition: data (UpdateFormFieldPlacementConditionData): """ - data: "UpdateFormFieldPlacementConditionData" + data: UpdateFormFieldPlacementConditionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_placement_condition_data.py b/rootly_sdk/models/update_form_field_placement_condition_data.py index d01736b0..8ecd9eca 100644 --- a/rootly_sdk/models/update_form_field_placement_condition_data.py +++ b/rootly_sdk/models/update_form_field_placement_condition_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateFormFieldPlacementConditionData: """ type_: UpdateFormFieldPlacementConditionDataType - attributes: "UpdateFormFieldPlacementConditionDataAttributes" + attributes: UpdateFormFieldPlacementConditionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_placement_condition_data_attributes.py b/rootly_sdk/models/update_form_field_placement_condition_data_attributes.py index f7498f29..abca4c89 100644 --- a/rootly_sdk/models/update_form_field_placement_condition_data_attributes.py +++ b/rootly_sdk/models/update_form_field_placement_condition_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,22 +22,22 @@ class UpdateFormFieldPlacementConditionDataAttributes: """ Attributes: - conditioned (Union[Unset, UpdateFormFieldPlacementConditionDataAttributesConditioned]): The resource or - attribute the condition applies. - position (Union[Unset, int]): The condition position. - form_field_id (Union[Unset, str]): The condition field. - comparison (Union[Unset, UpdateFormFieldPlacementConditionDataAttributesComparison]): The condition comparison. - values (Union[Unset, list[str]]): The values for comparison. + conditioned (UpdateFormFieldPlacementConditionDataAttributesConditioned | Unset): The resource or attribute the + condition applies. + position (int | Unset): The condition position. + form_field_id (str | Unset): The condition field. + comparison (UpdateFormFieldPlacementConditionDataAttributesComparison | Unset): The condition comparison. + values (list[str] | Unset): The values for comparison. """ - conditioned: Unset | UpdateFormFieldPlacementConditionDataAttributesConditioned = UNSET - position: Unset | int = UNSET - form_field_id: Unset | str = UNSET - comparison: Unset | UpdateFormFieldPlacementConditionDataAttributesComparison = UNSET - values: Unset | list[str] = UNSET + conditioned: UpdateFormFieldPlacementConditionDataAttributesConditioned | Unset = UNSET + position: int | Unset = UNSET + form_field_id: str | Unset = UNSET + comparison: UpdateFormFieldPlacementConditionDataAttributesComparison | Unset = UNSET + values: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - conditioned: Unset | str = UNSET + conditioned: str | Unset = UNSET if not isinstance(self.conditioned, Unset): conditioned = self.conditioned @@ -43,11 +45,11 @@ def to_dict(self) -> dict[str, Any]: form_field_id = self.form_field_id - comparison: Unset | str = UNSET + comparison: str | Unset = UNSET if not isinstance(self.comparison, Unset): comparison = self.comparison - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values @@ -71,7 +73,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _conditioned = d.pop("conditioned", UNSET) - conditioned: Unset | UpdateFormFieldPlacementConditionDataAttributesConditioned + conditioned: UpdateFormFieldPlacementConditionDataAttributesConditioned | Unset if isinstance(_conditioned, Unset): conditioned = UNSET else: @@ -82,7 +84,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: form_field_id = d.pop("form_field_id", UNSET) _comparison = d.pop("comparison", UNSET) - comparison: Unset | UpdateFormFieldPlacementConditionDataAttributesComparison + comparison: UpdateFormFieldPlacementConditionDataAttributesComparison | Unset if isinstance(_comparison, Unset): comparison = UNSET else: diff --git a/rootly_sdk/models/update_form_field_placement_data.py b/rootly_sdk/models/update_form_field_placement_data.py index 63c89523..fa6336fc 100644 --- a/rootly_sdk/models/update_form_field_placement_data.py +++ b/rootly_sdk/models/update_form_field_placement_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateFormFieldPlacementData: """ type_: UpdateFormFieldPlacementDataType - attributes: "UpdateFormFieldPlacementDataAttributes" + attributes: UpdateFormFieldPlacementDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_placement_data_attributes.py b/rootly_sdk/models/update_form_field_placement_data_attributes.py index 103d9244..aebd8477 100644 --- a/rootly_sdk/models/update_form_field_placement_data_attributes.py +++ b/rootly_sdk/models/update_form_field_placement_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -20,24 +22,24 @@ class UpdateFormFieldPlacementDataAttributes: """ Attributes: - form_set_id (Union[Unset, str]): The form set this field is placed in. - form (Union[Unset, str]): The form this field is placed on. - position (Union[Unset, int]): The position of the field placement. - required (Union[Unset, bool]): Whether the field is unconditionally required on this form. - required_operator (Union[Unset, UpdateFormFieldPlacementDataAttributesRequiredOperator]): Logical operator when + form_set_id (str | Unset): The form set this field is placed in. + form (str | Unset): The form this field is placed on. + position (int | Unset): The position of the field placement. + required (bool | Unset): Whether the field is unconditionally required on this form. + required_operator (UpdateFormFieldPlacementDataAttributesRequiredOperator | Unset): Logical operator when evaluating multiple form_field_placement_conditions with conditioned=required - placement_operator (Union[Unset, UpdateFormFieldPlacementDataAttributesPlacementOperator]): Logical operator - when evaluating multiple form_field_placement_conditions with conditioned=placement - non_editable (Union[Unset, bool]): Whether the field is read-only and cannot be edited by users. + placement_operator (UpdateFormFieldPlacementDataAttributesPlacementOperator | Unset): Logical operator when + evaluating multiple form_field_placement_conditions with conditioned=placement + non_editable (bool | Unset): Whether the field is read-only and cannot be edited by users. """ - form_set_id: Unset | str = UNSET - form: Unset | str = UNSET - position: Unset | int = UNSET - required: Unset | bool = UNSET - required_operator: Unset | UpdateFormFieldPlacementDataAttributesRequiredOperator = UNSET - placement_operator: Unset | UpdateFormFieldPlacementDataAttributesPlacementOperator = UNSET - non_editable: Unset | bool = UNSET + form_set_id: str | Unset = UNSET + form: str | Unset = UNSET + position: int | Unset = UNSET + required: bool | Unset = UNSET + required_operator: UpdateFormFieldPlacementDataAttributesRequiredOperator | Unset = UNSET + placement_operator: UpdateFormFieldPlacementDataAttributesPlacementOperator | Unset = UNSET + non_editable: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: form_set_id = self.form_set_id @@ -48,11 +50,11 @@ def to_dict(self) -> dict[str, Any]: required = self.required - required_operator: Unset | str = UNSET + required_operator: str | Unset = UNSET if not isinstance(self.required_operator, Unset): required_operator = self.required_operator - placement_operator: Unset | str = UNSET + placement_operator: str | Unset = UNSET if not isinstance(self.placement_operator, Unset): placement_operator = self.placement_operator @@ -90,14 +92,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: required = d.pop("required", UNSET) _required_operator = d.pop("required_operator", UNSET) - required_operator: Unset | UpdateFormFieldPlacementDataAttributesRequiredOperator + required_operator: UpdateFormFieldPlacementDataAttributesRequiredOperator | Unset if isinstance(_required_operator, Unset): required_operator = UNSET else: required_operator = check_update_form_field_placement_data_attributes_required_operator(_required_operator) _placement_operator = d.pop("placement_operator", UNSET) - placement_operator: Unset | UpdateFormFieldPlacementDataAttributesPlacementOperator + placement_operator: UpdateFormFieldPlacementDataAttributesPlacementOperator | Unset if isinstance(_placement_operator, Unset): placement_operator = UNSET else: diff --git a/rootly_sdk/models/update_form_field_position.py b/rootly_sdk/models/update_form_field_position.py index e25ddb92..08767e29 100644 --- a/rootly_sdk/models/update_form_field_position.py +++ b/rootly_sdk/models/update_form_field_position.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormFieldPosition: data (UpdateFormFieldPositionData): """ - data: "UpdateFormFieldPositionData" + data: UpdateFormFieldPositionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_position_data.py b/rootly_sdk/models/update_form_field_position_data.py index 282ebd4d..6d2e5dc3 100644 --- a/rootly_sdk/models/update_form_field_position_data.py +++ b/rootly_sdk/models/update_form_field_position_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateFormFieldPositionData: """ type_: UpdateFormFieldPositionDataType - attributes: "UpdateFormFieldPositionDataAttributes" + attributes: UpdateFormFieldPositionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_field_position_data_attributes.py b/rootly_sdk/models/update_form_field_position_data_attributes.py index 11487ec7..bc7b1105 100644 --- a/rootly_sdk/models/update_form_field_position_data_attributes.py +++ b/rootly_sdk/models/update_form_field_position_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -16,19 +18,19 @@ class UpdateFormFieldPositionDataAttributes: """ Attributes: - form_field_id (Union[Unset, str]): The ID of the form field. - form (Union[Unset, UpdateFormFieldPositionDataAttributesForm]): The form for the position - position (Union[Unset, int]): The position of the form_field_position + form_field_id (str | Unset): The ID of the form field. + form (UpdateFormFieldPositionDataAttributesForm | Unset): The form for the position + position (int | Unset): The position of the form_field_position """ - form_field_id: Unset | str = UNSET - form: Unset | UpdateFormFieldPositionDataAttributesForm = UNSET - position: Unset | int = UNSET + form_field_id: str | Unset = UNSET + form: UpdateFormFieldPositionDataAttributesForm | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: form_field_id = self.form_field_id - form: Unset | str = UNSET + form: str | Unset = UNSET if not isinstance(self.form, Unset): form = self.form @@ -52,7 +54,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: form_field_id = d.pop("form_field_id", UNSET) _form = d.pop("form", UNSET) - form: Unset | UpdateFormFieldPositionDataAttributesForm + form: UpdateFormFieldPositionDataAttributesForm | Unset if isinstance(_form, Unset): form = UNSET else: diff --git a/rootly_sdk/models/update_form_set.py b/rootly_sdk/models/update_form_set.py index e0ff9a8b..693fa518 100644 --- a/rootly_sdk/models/update_form_set.py +++ b/rootly_sdk/models/update_form_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormSet: data (UpdateFormSetData): """ - data: "UpdateFormSetData" + data: UpdateFormSetData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_set_condition.py b/rootly_sdk/models/update_form_set_condition.py index 97080641..6dfd73a1 100644 --- a/rootly_sdk/models/update_form_set_condition.py +++ b/rootly_sdk/models/update_form_set_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFormSetCondition: data (UpdateFormSetConditionData): """ - data: "UpdateFormSetConditionData" + data: UpdateFormSetConditionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_set_condition_data.py b/rootly_sdk/models/update_form_set_condition_data.py index c95eb31c..b3db3ad4 100644 --- a/rootly_sdk/models/update_form_set_condition_data.py +++ b/rootly_sdk/models/update_form_set_condition_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateFormSetConditionData: """ type_: UpdateFormSetConditionDataType - attributes: "UpdateFormSetConditionDataAttributes" + attributes: UpdateFormSetConditionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_set_condition_data_attributes.py b/rootly_sdk/models/update_form_set_condition_data_attributes.py index 6a6f053b..cbaa334a 100644 --- a/rootly_sdk/models/update_form_set_condition_data_attributes.py +++ b/rootly_sdk/models/update_form_set_condition_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,23 +18,23 @@ class UpdateFormSetConditionDataAttributes: """ Attributes: - form_field_id (Union[Unset, str]): The form field this condition applies. - comparison (Union[Unset, UpdateFormSetConditionDataAttributesComparison]): The condition comparison. - values (Union[Unset, list[str]]): The values for comparison. + form_field_id (str | Unset): The form field this condition applies. + comparison (UpdateFormSetConditionDataAttributesComparison | Unset): The condition comparison. + values (list[str] | Unset): The values for comparison. """ - form_field_id: Unset | str = UNSET - comparison: Unset | UpdateFormSetConditionDataAttributesComparison = UNSET - values: Unset | list[str] = UNSET + form_field_id: str | Unset = UNSET + comparison: UpdateFormSetConditionDataAttributesComparison | Unset = UNSET + values: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: form_field_id = self.form_field_id - comparison: Unset | str = UNSET + comparison: str | Unset = UNSET if not isinstance(self.comparison, Unset): comparison = self.comparison - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values @@ -54,7 +56,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: form_field_id = d.pop("form_field_id", UNSET) _comparison = d.pop("comparison", UNSET) - comparison: Unset | UpdateFormSetConditionDataAttributesComparison + comparison: UpdateFormSetConditionDataAttributesComparison | Unset if isinstance(_comparison, Unset): comparison = UNSET else: diff --git a/rootly_sdk/models/update_form_set_data.py b/rootly_sdk/models/update_form_set_data.py index b22a2180..ae1032ab 100644 --- a/rootly_sdk/models/update_form_set_data.py +++ b/rootly_sdk/models/update_form_set_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateFormSetData: """ type_: UpdateFormSetDataType - attributes: "UpdateFormSetDataAttributes" + attributes: UpdateFormSetDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_form_set_data_attributes.py b/rootly_sdk/models/update_form_set_data_attributes.py index 5d9079c5..4aa62632 100644 --- a/rootly_sdk/models/update_form_set_data_attributes.py +++ b/rootly_sdk/models/update_form_set_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,9 +14,9 @@ class UpdateFormSetDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the form set - forms (Union[Unset, list[str]]): The forms included in the form set. Add custom forms using the custom form's - `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, + name (str | Unset): The name of the form set + forms (list[str] | Unset): The forms included in the form set. Add custom forms using the custom form's `slug` + field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, @@ -22,13 +24,13 @@ class UpdateFormSetDataAttributes: `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form` """ - name: Unset | str = UNSET - forms: Unset | list[str] = UNSET + name: str | Unset = UNSET + forms: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - forms: Unset | list[str] = UNSET + forms: list[str] | Unset = UNSET if not isinstance(self.forms, Unset): forms = self.forms diff --git a/rootly_sdk/models/update_functionality.py b/rootly_sdk/models/update_functionality.py index 501a15ac..edce75cd 100644 --- a/rootly_sdk/models/update_functionality.py +++ b/rootly_sdk/models/update_functionality.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateFunctionality: data (UpdateFunctionalityData): """ - data: "UpdateFunctionalityData" + data: UpdateFunctionalityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_functionality_data.py b/rootly_sdk/models/update_functionality_data.py index 3bd9d4e7..fb3d4038 100644 --- a/rootly_sdk/models/update_functionality_data.py +++ b/rootly_sdk/models/update_functionality_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateFunctionalityData: """ type_: UpdateFunctionalityDataType - attributes: "UpdateFunctionalityDataAttributes" + attributes: UpdateFunctionalityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_functionality_data_attributes.py b/rootly_sdk/models/update_functionality_data_attributes.py index 3b4e5171..1711ef2d 100644 --- a/rootly_sdk/models/update_functionality_data_attributes.py +++ b/rootly_sdk/models/update_functionality_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,9 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_functionality_data_attributes_fields_item import UpdateFunctionalityDataAttributesFieldsItem + from ..models.update_functionality_data_attributes_properties_item import ( + UpdateFunctionalityDataAttributesPropertiesItem, + ) from ..models.update_functionality_data_attributes_slack_aliases_type_0_item import ( UpdateFunctionalityDataAttributesSlackAliasesType0Item, ) @@ -22,69 +26,69 @@ class UpdateFunctionalityDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the functionality - description (Union[None, Unset, str]): The description of the functionality - public_description (Union[None, Unset, str]): The public description of the functionality - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the functionality - color (Union[None, Unset, str]): The hex color of the functionality - position (Union[None, Unset, int]): Position of the functionality - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this functionality. eg: + name (str | Unset): The name of the functionality + description (None | str | Unset): The description of the functionality + public_description (None | str | Unset): The public description of the functionality + notify_emails (list[str] | None | Unset): Emails to attach to the functionality + color (None | str | Unset): The hex color of the functionality + position (int | None | Unset): Position of the functionality + backstage_id (None | str | Unset): The Backstage entity id associated to this functionality. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this functionality - pagerduty_id (Union[None, Unset, str]): The PagerDuty service id associated to this functionality - opsgenie_id (Union[None, Unset, str]): The Opsgenie service id associated to this functionality - opsgenie_team_id (Union[None, Unset, str]): The Opsgenie team id associated to this functionality - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this functionality - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this functionality - environment_ids (Union[None, Unset, list[str]]): Environments associated with this functionality - service_ids (Union[None, Unset, list[str]]): Services associated with this functionality - owner_group_ids (Union[None, Unset, list[str]]): Owner Teams associated with this functionality - owner_user_ids (Union[None, Unset, list[int]]): Owner Users associated with this functionality - slack_channels (Union[None, Unset, list['UpdateFunctionalityDataAttributesSlackChannelsType0Item']]): Slack - Channels associated with this functionality - slack_aliases (Union[None, Unset, list['UpdateFunctionalityDataAttributesSlackAliasesType0Item']]): Slack - Aliases associated with this functionality - fields (Union[Unset, list['UpdateFunctionalityDataAttributesFieldsItem']]): Array of field values for this + external_id (None | str | Unset): The external id associated to this functionality + pagerduty_id (None | str | Unset): The PagerDuty service id associated to this functionality + opsgenie_id (None | str | Unset): The Opsgenie service id associated to this functionality + opsgenie_team_id (None | str | Unset): The Opsgenie team id associated to this functionality + cortex_id (None | str | Unset): The Cortex group id associated to this functionality + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this functionality + environment_ids (list[str] | None | Unset): Environments associated with this functionality + service_ids (list[str] | None | Unset): Services associated with this functionality + owner_group_ids (list[str] | None | Unset): Owner Teams associated with this functionality + owner_user_ids (list[int] | None | Unset): Owner Users associated with this functionality + slack_channels (list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels + associated with this functionality + slack_aliases (list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases + associated with this functionality + properties (list[UpdateFunctionalityDataAttributesPropertiesItem] | Unset): Array of property values for this functionality. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - opsgenie_team_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - owner_group_ids: None | Unset | list[str] = UNSET - owner_user_ids: None | Unset | list[int] = UNSET - slack_channels: None | Unset | list["UpdateFunctionalityDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["UpdateFunctionalityDataAttributesSlackAliasesType0Item"] = UNSET - fields: Unset | list["UpdateFunctionalityDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + owner_group_ids: list[str] | None | Unset = UNSET + owner_user_ids: list[int] | None | Unset = UNSET + slack_channels: list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + properties: list[UpdateFunctionalityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -93,61 +97,61 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - opsgenie_team_id: None | Unset | str + opsgenie_team_id: None | str | Unset if isinstance(self.opsgenie_team_id, Unset): opsgenie_team_id = UNSET else: opsgenie_team_id = self.opsgenie_team_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -156,7 +160,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -165,7 +169,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - owner_group_ids: None | Unset | list[str] + owner_group_ids: list[str] | None | Unset if isinstance(self.owner_group_ids, Unset): owner_group_ids = UNSET elif isinstance(self.owner_group_ids, list): @@ -174,7 +178,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_group_ids = self.owner_group_ids - owner_user_ids: None | Unset | list[int] + owner_user_ids: list[int] | None | Unset if isinstance(self.owner_user_ids, Unset): owner_user_ids = UNSET elif isinstance(self.owner_user_ids, list): @@ -183,7 +187,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -195,7 +199,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -207,12 +211,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -255,15 +259,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.update_functionality_data_attributes_fields_item import ( - UpdateFunctionalityDataAttributesFieldsItem, + from ..models.update_functionality_data_attributes_properties_item import ( + UpdateFunctionalityDataAttributesPropertiesItem, ) from ..models.update_functionality_data_attributes_slack_aliases_type_0_item import ( UpdateFunctionalityDataAttributesSlackAliasesType0Item, @@ -275,25 +279,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -304,94 +308,94 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_opsgenie_team_id(data: object) -> None | Unset | str: + def _parse_opsgenie_team_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -402,13 +406,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -419,13 +423,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: + def _parse_owner_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -436,13 +440,13 @@ def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: owner_group_ids_type_0 = cast(list[str], data) return owner_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) owner_group_ids = _parse_owner_group_ids(d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: + def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -453,15 +457,15 @@ def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: owner_user_ids_type_0 = cast(list[int], data) return owner_user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["UpdateFunctionalityDataAttributesSlackChannelsType0Item"]: + ) -> list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -479,15 +483,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateFunctionalityDataAttributesSlackChannelsType0Item"], data) + return cast(list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["UpdateFunctionalityDataAttributesSlackAliasesType0Item"]: + ) -> list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -505,18 +509,20 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateFunctionalityDataAttributesSlackAliasesType0Item"], data) + return cast(list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateFunctionalityDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateFunctionalityDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateFunctionalityDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_functionality_data_attributes = cls( name=name, @@ -538,7 +544,7 @@ def _parse_slack_aliases( owner_user_ids=owner_user_ids, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) return update_functionality_data_attributes diff --git a/rootly_sdk/models/update_functionality_data_attributes_properties_item.py b/rootly_sdk/models/update_functionality_data_attributes_properties_item.py new file mode 100644 index 00000000..8d1806bc --- /dev/null +++ b/rootly_sdk/models/update_functionality_data_attributes_properties_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateFunctionalityDataAttributesPropertiesItem") + + +@_attrs_define +class UpdateFunctionalityDataAttributesPropertiesItem: + """Set a value for a catalog property + + Attributes: + catalog_property_id (str): Catalog property ID + value (str): The property value + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + update_functionality_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + update_functionality_data_attributes_properties_item.additional_properties = d + return update_functionality_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_functionality_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/update_functionality_data_attributes_slack_aliases_type_0_item.py index 0570fa7e..b49afaf8 100644 --- a/rootly_sdk/models/update_functionality_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/update_functionality_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_functionality_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/update_functionality_data_attributes_slack_channels_type_0_item.py index 7c94915e..ef5557a9 100644 --- a/rootly_sdk/models/update_functionality_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/update_functionality_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_github_issue_task_params.py b/rootly_sdk/models/update_github_issue_task_params.py index 45067887..ba939888 100644 --- a/rootly_sdk/models/update_github_issue_task_params.py +++ b/rootly_sdk/models/update_github_issue_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -12,6 +14,9 @@ if TYPE_CHECKING: from ..models.update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion + from ..models.update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType + from ..models.update_github_issue_task_params_labels_item import UpdateGithubIssueTaskParamsLabelsItem + from ..models.update_github_issue_task_params_repository import UpdateGithubIssueTaskParamsRepository T = TypeVar("T", bound="UpdateGithubIssueTaskParams") @@ -23,16 +28,23 @@ class UpdateGithubIssueTaskParams: Attributes: issue_id (str): The issue id completion (UpdateGithubIssueTaskParamsCompletion): - task_type (Union[Unset, UpdateGithubIssueTaskParamsTaskType]): - title (Union[Unset, str]): The issue title - body (Union[Unset, str]): The issue body + task_type (UpdateGithubIssueTaskParamsTaskType | Unset): + repository (UpdateGithubIssueTaskParamsRepository | Unset): The repository (used for loading labels and issue + types) + title (str | Unset): The issue title + body (str | Unset): The issue body + labels (list[UpdateGithubIssueTaskParamsLabelsItem] | Unset): The issue labels + issue_type (UpdateGithubIssueTaskParamsIssueType | Unset): The issue type """ issue_id: str - completion: "UpdateGithubIssueTaskParamsCompletion" - task_type: Unset | UpdateGithubIssueTaskParamsTaskType = UNSET - title: Unset | str = UNSET - body: Unset | str = UNSET + completion: UpdateGithubIssueTaskParamsCompletion + task_type: UpdateGithubIssueTaskParamsTaskType | Unset = UNSET + repository: UpdateGithubIssueTaskParamsRepository | Unset = UNSET + title: str | Unset = UNSET + body: str | Unset = UNSET + labels: list[UpdateGithubIssueTaskParamsLabelsItem] | Unset = UNSET + issue_type: UpdateGithubIssueTaskParamsIssueType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,14 +52,29 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type + repository: dict[str, Any] | Unset = UNSET + if not isinstance(self.repository, Unset): + repository = self.repository.to_dict() + title = self.title body = self.body + labels: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.labels, Unset): + labels = [] + for labels_item_data in self.labels: + labels_item = labels_item_data.to_dict() + labels.append(labels_item) + + issue_type: dict[str, Any] | Unset = UNSET + if not isinstance(self.issue_type, Unset): + issue_type = self.issue_type.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -58,16 +85,25 @@ def to_dict(self) -> dict[str, Any]: ) if task_type is not UNSET: field_dict["task_type"] = task_type + if repository is not UNSET: + field_dict["repository"] = repository if title is not UNSET: field_dict["title"] = title if body is not UNSET: field_dict["body"] = body + if labels is not UNSET: + field_dict["labels"] = labels + if issue_type is not UNSET: + field_dict["issue_type"] = issue_type return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion + from ..models.update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType + from ..models.update_github_issue_task_params_labels_item import UpdateGithubIssueTaskParamsLabelsItem + from ..models.update_github_issue_task_params_repository import UpdateGithubIssueTaskParamsRepository d = dict(src_dict) issue_id = d.pop("issue_id") @@ -75,22 +111,48 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = UpdateGithubIssueTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateGithubIssueTaskParamsTaskType + task_type: UpdateGithubIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_update_github_issue_task_params_task_type(_task_type) + _repository = d.pop("repository", UNSET) + repository: UpdateGithubIssueTaskParamsRepository | Unset + if isinstance(_repository, Unset): + repository = UNSET + else: + repository = UpdateGithubIssueTaskParamsRepository.from_dict(_repository) + title = d.pop("title", UNSET) body = d.pop("body", UNSET) + _labels = d.pop("labels", UNSET) + labels: list[UpdateGithubIssueTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = UpdateGithubIssueTaskParamsLabelsItem.from_dict(labels_item_data) + + labels.append(labels_item) + + _issue_type = d.pop("issue_type", UNSET) + issue_type: UpdateGithubIssueTaskParamsIssueType | Unset + if isinstance(_issue_type, Unset): + issue_type = UNSET + else: + issue_type = UpdateGithubIssueTaskParamsIssueType.from_dict(_issue_type) + update_github_issue_task_params = cls( issue_id=issue_id, completion=completion, task_type=task_type, + repository=repository, title=title, body=body, + labels=labels, + issue_type=issue_type, ) update_github_issue_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_github_issue_task_params_completion.py b/rootly_sdk/models/update_github_issue_task_params_completion.py index 003e9917..2aaafc3b 100644 --- a/rootly_sdk/models/update_github_issue_task_params_completion.py +++ b/rootly_sdk/models/update_github_issue_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateGithubIssueTaskParamsCompletion: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_github_issue_task_params_issue_type.py b/rootly_sdk/models/update_github_issue_task_params_issue_type.py new file mode 100644 index 00000000..2699f2b5 --- /dev/null +++ b/rootly_sdk/models/update_github_issue_task_params_issue_type.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateGithubIssueTaskParamsIssueType") + + +@_attrs_define +class UpdateGithubIssueTaskParamsIssueType: + """The issue type + + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + update_github_issue_task_params_issue_type = cls( + id=id, + name=name, + ) + + update_github_issue_task_params_issue_type.additional_properties = d + return update_github_issue_task_params_issue_type + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_github_issue_task_params_labels_item.py b/rootly_sdk/models/update_github_issue_task_params_labels_item.py new file mode 100644 index 00000000..c905b808 --- /dev/null +++ b/rootly_sdk/models/update_github_issue_task_params_labels_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateGithubIssueTaskParamsLabelsItem") + + +@_attrs_define +class UpdateGithubIssueTaskParamsLabelsItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + name = d.pop("name", UNSET) + + update_github_issue_task_params_labels_item = cls( + id=id, + name=name, + ) + + update_github_issue_task_params_labels_item.additional_properties = d + return update_github_issue_task_params_labels_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_service_data_attributes_fields_item.py b/rootly_sdk/models/update_github_issue_task_params_repository.py similarity index 55% rename from rootly_sdk/models/update_service_data_attributes_fields_item.py rename to rootly_sdk/models/update_github_issue_task_params_repository.py index 050d99cc..541866c5 100644 --- a/rootly_sdk/models/update_service_data_attributes_fields_item.py +++ b/rootly_sdk/models/update_github_issue_task_params_repository.py @@ -1,55 +1,58 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="UpdateServiceDataAttributesFieldsItem") +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateGithubIssueTaskParamsRepository") @_attrs_define -class UpdateServiceDataAttributesFieldsItem: - """Set a value for a catalog field +class UpdateGithubIssueTaskParamsRepository: + """The repository (used for loading labels and issue types) Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + id (str | Unset): + name (str | Unset): """ - catalog_field_id: str - value: str + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + id = self.id - value = self.value + name = self.name field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update( - { - "catalog_field_id": catalog_field_id, - "value": value, - } - ) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if name is not UNSET: + field_dict["name"] = name return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + id = d.pop("id", UNSET) - value = d.pop("value") + name = d.pop("name", UNSET) - update_service_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, - value=value, + update_github_issue_task_params_repository = cls( + id=id, + name=name, ) - update_service_data_attributes_fields_item.additional_properties = d - return update_service_data_attributes_fields_item + update_github_issue_task_params_repository.additional_properties = d + return update_github_issue_task_params_repository @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/update_gitlab_issue_task_params.py b/rootly_sdk/models/update_gitlab_issue_task_params.py index 691d232a..7261e458 100644 --- a/rootly_sdk/models/update_gitlab_issue_task_params.py +++ b/rootly_sdk/models/update_gitlab_issue_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,22 +29,22 @@ class UpdateGitlabIssueTaskParams: Attributes: issue_id (str): The issue id completion (UpdateGitlabIssueTaskParamsCompletion): - task_type (Union[Unset, UpdateGitlabIssueTaskParamsTaskType]): - issue_type (Union[Unset, UpdateGitlabIssueTaskParamsIssueType]): The issue type - title (Union[Unset, str]): The issue title - description (Union[Unset, str]): The issue description - labels (Union[Unset, str]): The issue labels - due_date (Union[Unset, str]): The due date + task_type (UpdateGitlabIssueTaskParamsTaskType | Unset): + issue_type (UpdateGitlabIssueTaskParamsIssueType | Unset): The issue type + title (str | Unset): The issue title + description (str | Unset): The issue description + labels (str | Unset): The issue labels + due_date (str | Unset): The due date """ issue_id: str - completion: "UpdateGitlabIssueTaskParamsCompletion" - task_type: Unset | UpdateGitlabIssueTaskParamsTaskType = UNSET - issue_type: Unset | UpdateGitlabIssueTaskParamsIssueType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - labels: Unset | str = UNSET - due_date: Unset | str = UNSET + completion: UpdateGitlabIssueTaskParamsCompletion + task_type: UpdateGitlabIssueTaskParamsTaskType | Unset = UNSET + issue_type: UpdateGitlabIssueTaskParamsIssueType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + labels: str | Unset = UNSET + due_date: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,11 +52,11 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - issue_type: Unset | str = UNSET + issue_type: str | Unset = UNSET if not isinstance(self.issue_type, Unset): issue_type = self.issue_type @@ -99,14 +101,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = UpdateGitlabIssueTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateGitlabIssueTaskParamsTaskType + task_type: UpdateGitlabIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_update_gitlab_issue_task_params_task_type(_task_type) _issue_type = d.pop("issue_type", UNSET) - issue_type: Unset | UpdateGitlabIssueTaskParamsIssueType + issue_type: UpdateGitlabIssueTaskParamsIssueType | Unset if isinstance(_issue_type, Unset): issue_type = UNSET else: diff --git a/rootly_sdk/models/update_gitlab_issue_task_params_completion.py b/rootly_sdk/models/update_gitlab_issue_task_params_completion.py index c563e990..0fef7627 100644 --- a/rootly_sdk/models/update_gitlab_issue_task_params_completion.py +++ b/rootly_sdk/models/update_gitlab_issue_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateGitlabIssueTaskParamsCompletion: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_google_calendar_event_task_params.py b/rootly_sdk/models/update_google_calendar_event_task_params.py index 81eeceb0..d247ea44 100644 --- a/rootly_sdk/models/update_google_calendar_event_task_params.py +++ b/rootly_sdk/models/update_google_calendar_event_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -28,52 +30,52 @@ class UpdateGoogleCalendarEventTaskParams: """ Attributes: event_id (str): The event ID - task_type (Union[Unset, UpdateGoogleCalendarEventTaskParamsTaskType]): - calendar_id (Union[None, Unset, str]): Default: 'primary'. - summary (Union[Unset, str]): The event summary - description (Union[Unset, str]): The event description - adjustment_days (Union[Unset, int]): Days to adjust meeting by - time_of_meeting (Union[Unset, str]): Time of meeting in format HH:MM - meeting_duration (Union[Unset, str]): Meeting duration in format like '1 hour', '30 minutes' Example: 1 hour. - send_updates (Union[Unset, bool]): Send an email to the attendees notifying them of the event - can_guests_modify_event (Union[Unset, bool]): - can_guests_see_other_guests (Union[Unset, bool]): - can_guests_invite_others (Union[Unset, bool]): - attendees (Union[Unset, list[str]]): Emails of attendees - replace_attendees (Union[Unset, bool]): - conference_solution_key (Union[Unset, UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey]): Sets the video + task_type (UpdateGoogleCalendarEventTaskParamsTaskType | Unset): + calendar_id (None | str | Unset): Default: 'primary'. + summary (str | Unset): The event summary + description (str | Unset): The event description + adjustment_days (int | Unset): Days to adjust meeting by + time_of_meeting (str | Unset): Time of meeting in format HH:MM + meeting_duration (str | Unset): Meeting duration in format like '1 hour', '30 minutes' Example: 1 hour. + send_updates (bool | Unset): Send an email to the attendees notifying them of the event + can_guests_modify_event (bool | Unset): + can_guests_see_other_guests (bool | Unset): + can_guests_invite_others (bool | Unset): + attendees (list[str] | Unset): Emails of attendees + replace_attendees (bool | Unset): + conference_solution_key (UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey | Unset): Sets the video conference type attached to the meeting - post_to_incident_timeline (Union[Unset, bool]): - post_to_slack_channels (Union[Unset, list['UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem']]): + post_to_incident_timeline (bool | Unset): + post_to_slack_channels (list[UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem] | Unset): """ event_id: str - task_type: Unset | UpdateGoogleCalendarEventTaskParamsTaskType = UNSET - calendar_id: None | Unset | str = "primary" - summary: Unset | str = UNSET - description: Unset | str = UNSET - adjustment_days: Unset | int = UNSET - time_of_meeting: Unset | str = UNSET - meeting_duration: Unset | str = UNSET - send_updates: Unset | bool = UNSET - can_guests_modify_event: Unset | bool = UNSET - can_guests_see_other_guests: Unset | bool = UNSET - can_guests_invite_others: Unset | bool = UNSET - attendees: Unset | list[str] = UNSET - replace_attendees: Unset | bool = UNSET - conference_solution_key: Unset | UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey = UNSET - post_to_incident_timeline: Unset | bool = UNSET - post_to_slack_channels: Unset | list["UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem"] = UNSET + task_type: UpdateGoogleCalendarEventTaskParamsTaskType | Unset = UNSET + calendar_id: None | str | Unset = "primary" + summary: str | Unset = UNSET + description: str | Unset = UNSET + adjustment_days: int | Unset = UNSET + time_of_meeting: str | Unset = UNSET + meeting_duration: str | Unset = UNSET + send_updates: bool | Unset = UNSET + can_guests_modify_event: bool | Unset = UNSET + can_guests_see_other_guests: bool | Unset = UNSET + can_guests_invite_others: bool | Unset = UNSET + attendees: list[str] | Unset = UNSET + replace_attendees: bool | Unset = UNSET + conference_solution_key: UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey | Unset = UNSET + post_to_incident_timeline: bool | Unset = UNSET + post_to_slack_channels: list[UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: event_id = self.event_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - calendar_id: None | Unset | str + calendar_id: None | str | Unset if isinstance(self.calendar_id, Unset): calendar_id = UNSET else: @@ -97,19 +99,19 @@ def to_dict(self) -> dict[str, Any]: can_guests_invite_others = self.can_guests_invite_others - attendees: Unset | list[str] = UNSET + attendees: list[str] | Unset = UNSET if not isinstance(self.attendees, Unset): attendees = self.attendees replace_attendees = self.replace_attendees - conference_solution_key: Unset | str = UNSET + conference_solution_key: str | Unset = UNSET if not isinstance(self.conference_solution_key, Unset): conference_solution_key = self.conference_solution_key post_to_incident_timeline = self.post_to_incident_timeline - post_to_slack_channels: Unset | list[dict[str, Any]] = UNSET + post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.post_to_slack_channels, Unset): post_to_slack_channels = [] for post_to_slack_channels_item_data in self.post_to_slack_channels: @@ -168,18 +170,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: event_id = d.pop("event_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateGoogleCalendarEventTaskParamsTaskType + task_type: UpdateGoogleCalendarEventTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_update_google_calendar_event_task_params_task_type(_task_type) - def _parse_calendar_id(data: object) -> None | Unset | str: + def _parse_calendar_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) calendar_id = _parse_calendar_id(d.pop("calendar_id", UNSET)) @@ -206,7 +208,7 @@ def _parse_calendar_id(data: object) -> None | Unset | str: replace_attendees = d.pop("replace_attendees", UNSET) _conference_solution_key = d.pop("conference_solution_key", UNSET) - conference_solution_key: Unset | UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey + conference_solution_key: UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey | Unset if isinstance(_conference_solution_key, Unset): conference_solution_key = UNSET else: @@ -216,14 +218,16 @@ def _parse_calendar_id(data: object) -> None | Unset | str: post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) - post_to_slack_channels = [] _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) - for post_to_slack_channels_item_data in _post_to_slack_channels or []: - post_to_slack_channels_item = UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem.from_dict( - post_to_slack_channels_item_data - ) + post_to_slack_channels: list[UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem] | Unset = UNSET + if _post_to_slack_channels is not UNSET: + post_to_slack_channels = [] + for post_to_slack_channels_item_data in _post_to_slack_channels: + post_to_slack_channels_item = UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem.from_dict( + post_to_slack_channels_item_data + ) - post_to_slack_channels.append(post_to_slack_channels_item) + post_to_slack_channels.append(post_to_slack_channels_item) update_google_calendar_event_task_params = cls( event_id=event_id, diff --git a/rootly_sdk/models/update_google_calendar_event_task_params_post_to_slack_channels_item.py b/rootly_sdk/models/update_google_calendar_event_task_params_post_to_slack_channels_item.py index e92620d2..81404c8a 100644 --- a/rootly_sdk/models/update_google_calendar_event_task_params_post_to_slack_channels_item.py +++ b/rootly_sdk/models/update_google_calendar_event_task_params_post_to_slack_channels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_google_docs_page_task_params.py b/rootly_sdk/models/update_google_docs_page_task_params.py index b9a6d0f6..dda8547d 100644 --- a/rootly_sdk/models/update_google_docs_page_task_params.py +++ b/rootly_sdk/models/update_google_docs_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,25 +20,25 @@ class UpdateGoogleDocsPageTaskParams: """ Attributes: file_id (str): The Google Doc file ID - task_type (Union[Unset, UpdateGoogleDocsPageTaskParamsTaskType]): - title (Union[Unset, str]): The Google Doc title - content (Union[Unset, str]): The Google Doc content - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when updating page, if desired - template_id (Union[Unset, str]): The Google Doc file ID to use as a template. + task_type (UpdateGoogleDocsPageTaskParamsTaskType | Unset): + title (str | Unset): The Google Doc title + content (str | Unset): The Google Doc content + post_mortem_template_id (str | Unset): Retrospective template to use when updating page, if desired + template_id (str | Unset): The Google Doc file ID to use as a template. """ file_id: str - task_type: Unset | UpdateGoogleDocsPageTaskParamsTaskType = UNSET - title: Unset | str = UNSET - content: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET - template_id: Unset | str = UNSET + task_type: UpdateGoogleDocsPageTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + content: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + template_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -74,7 +76,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateGoogleDocsPageTaskParamsTaskType + task_type: UpdateGoogleDocsPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_heartbeat.py b/rootly_sdk/models/update_heartbeat.py index a8c09301..6dd22e4b 100644 --- a/rootly_sdk/models/update_heartbeat.py +++ b/rootly_sdk/models/update_heartbeat.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateHeartbeat: data (UpdateHeartbeatData): """ - data: "UpdateHeartbeatData" + data: UpdateHeartbeatData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_heartbeat_data.py b/rootly_sdk/models/update_heartbeat_data.py index b5696242..4d53bae8 100644 --- a/rootly_sdk/models/update_heartbeat_data.py +++ b/rootly_sdk/models/update_heartbeat_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateHeartbeatData: """ type_: UpdateHeartbeatDataType - attributes: "UpdateHeartbeatDataAttributes" + attributes: UpdateHeartbeatDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_heartbeat_data_attributes.py b/rootly_sdk/models/update_heartbeat_data_attributes.py index 389007de..e9d622cc 100644 --- a/rootly_sdk/models/update_heartbeat_data_attributes.py +++ b/rootly_sdk/models/update_heartbeat_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,33 +22,34 @@ class UpdateHeartbeatDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the heartbeat - description (Union[None, Unset, str]): The description of the heartbeat - alert_summary (Union[Unset, str]): Summary of alerts triggered when heartbeat expires. - alert_description (Union[None, Unset, str]): Description of alerts triggered when heartbeat expires. - alert_urgency_id (Union[None, Unset, str]): Urgency of alerts triggered when heartbeat expires. - interval (Union[Unset, int]): - interval_unit (Union[Unset, UpdateHeartbeatDataAttributesIntervalUnit]): - notification_target_id (Union[Unset, str]): - notification_target_type (Union[Unset, UpdateHeartbeatDataAttributesNotificationTargetType]): - enabled (Union[Unset, bool]): Whether to trigger alerts when heartbeat is expired. + name (str | Unset): The name of the heartbeat + description (None | str | Unset): The description of the heartbeat + alert_summary (str | Unset): Summary of alerts triggered when heartbeat expires. + alert_description (None | str | Unset): Description of alerts triggered when heartbeat expires. + alert_urgency_id (None | str | Unset): Urgency of alerts triggered when heartbeat expires. + interval (int | Unset): + interval_unit (UpdateHeartbeatDataAttributesIntervalUnit | Unset): + notification_target_id (str | Unset): + notification_target_type (UpdateHeartbeatDataAttributesNotificationTargetType | Unset): The type of the + notification target. Please contact support if you encounter issues using `Functionality` as a target type. + enabled (bool | Unset): Whether to trigger alerts when heartbeat is expired. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - alert_summary: Unset | str = UNSET - alert_description: None | Unset | str = UNSET - alert_urgency_id: None | Unset | str = UNSET - interval: Unset | int = UNSET - interval_unit: Unset | UpdateHeartbeatDataAttributesIntervalUnit = UNSET - notification_target_id: Unset | str = UNSET - notification_target_type: Unset | UpdateHeartbeatDataAttributesNotificationTargetType = UNSET - enabled: Unset | bool = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + alert_summary: str | Unset = UNSET + alert_description: None | str | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + interval: int | Unset = UNSET + interval_unit: UpdateHeartbeatDataAttributesIntervalUnit | Unset = UNSET + notification_target_id: str | Unset = UNSET + notification_target_type: UpdateHeartbeatDataAttributesNotificationTargetType | Unset = UNSET + enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -54,13 +57,13 @@ def to_dict(self) -> dict[str, Any]: alert_summary = self.alert_summary - alert_description: None | Unset | str + alert_description: None | str | Unset if isinstance(self.alert_description, Unset): alert_description = UNSET else: alert_description = self.alert_description - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: @@ -68,13 +71,13 @@ def to_dict(self) -> dict[str, Any]: interval = self.interval - interval_unit: Unset | str = UNSET + interval_unit: str | Unset = UNSET if not isinstance(self.interval_unit, Unset): interval_unit = self.interval_unit notification_target_id = self.notification_target_id - notification_target_type: Unset | str = UNSET + notification_target_type: str | Unset = UNSET if not isinstance(self.notification_target_type, Unset): notification_target_type = self.notification_target_type @@ -111,39 +114,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) alert_summary = d.pop("alert_summary", UNSET) - def _parse_alert_description(data: object) -> None | Unset | str: + def _parse_alert_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_description = _parse_alert_description(d.pop("alert_description", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) interval = d.pop("interval", UNSET) _interval_unit = d.pop("interval_unit", UNSET) - interval_unit: Unset | UpdateHeartbeatDataAttributesIntervalUnit + interval_unit: UpdateHeartbeatDataAttributesIntervalUnit | Unset if isinstance(_interval_unit, Unset): interval_unit = UNSET else: @@ -152,7 +155,7 @@ def _parse_alert_urgency_id(data: object) -> None | Unset | str: notification_target_id = d.pop("notification_target_id", UNSET) _notification_target_type = d.pop("notification_target_type", UNSET) - notification_target_type: Unset | UpdateHeartbeatDataAttributesNotificationTargetType + notification_target_type: UpdateHeartbeatDataAttributesNotificationTargetType | Unset if isinstance(_notification_target_type, Unset): notification_target_type = UNSET else: diff --git a/rootly_sdk/models/update_heartbeat_data_attributes_notification_target_type.py b/rootly_sdk/models/update_heartbeat_data_attributes_notification_target_type.py index b04789f3..a57400a6 100644 --- a/rootly_sdk/models/update_heartbeat_data_attributes_notification_target_type.py +++ b/rootly_sdk/models/update_heartbeat_data_attributes_notification_target_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UpdateHeartbeatDataAttributesNotificationTargetType = Literal["EscalationPolicy", "Group", "Service", "User"] +UpdateHeartbeatDataAttributesNotificationTargetType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service", "User" +] UPDATE_HEARTBEAT_DATA_ATTRIBUTES_NOTIFICATION_TARGET_TYPE_VALUES: set[ UpdateHeartbeatDataAttributesNotificationTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", "User", diff --git a/rootly_sdk/models/update_incident.py b/rootly_sdk/models/update_incident.py index 8539fba1..c828a305 100644 --- a/rootly_sdk/models/update_incident.py +++ b/rootly_sdk/models/update_incident.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncident: data (UpdateIncidentData): """ - data: "UpdateIncidentData" + data: UpdateIncidentData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_action_item.py b/rootly_sdk/models/update_incident_action_item.py index cd2fc2ac..6c08a393 100644 --- a/rootly_sdk/models/update_incident_action_item.py +++ b/rootly_sdk/models/update_incident_action_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentActionItem: data (UpdateIncidentActionItemData): """ - data: "UpdateIncidentActionItemData" + data: UpdateIncidentActionItemData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_action_item_data.py b/rootly_sdk/models/update_incident_action_item_data.py index 12a47e8c..3ba8f526 100644 --- a/rootly_sdk/models/update_incident_action_item_data.py +++ b/rootly_sdk/models/update_incident_action_item_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentActionItemData: """ type_: UpdateIncidentActionItemDataType - attributes: "UpdateIncidentActionItemDataAttributes" + attributes: UpdateIncidentActionItemDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_action_item_data_attributes.py b/rootly_sdk/models/update_incident_action_item_data_attributes.py index 30fb5801..e6ae6bd6 100644 --- a/rootly_sdk/models/update_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/update_incident_action_item_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -24,51 +26,51 @@ class UpdateIncidentActionItemDataAttributes: """ Attributes: - summary (Union[Unset, str]): The summary of the action item - description (Union[None, Unset, str]): The description of the action item - kind (Union[Unset, UpdateIncidentActionItemDataAttributesKind]): The kind of the action item - assigned_to_user_id (Union[None, Unset, int]): ID of user you wish to assign this action item - assigned_to_group_ids (Union[None, Unset, list[str]]): IDs of groups you wish to assign this action item - priority (Union[Unset, UpdateIncidentActionItemDataAttributesPriority]): The priority of the action item - status (Union[Unset, UpdateIncidentActionItemDataAttributesStatus]): The status of the action item - due_date (Union[None, Unset, str]): The due date of the action item - jira_issue_id (Union[None, Unset, str]): The Jira issue ID. - jira_issue_key (Union[None, Unset, str]): The Jira issue key. - jira_issue_url (Union[None, Unset, str]): The Jira issue URL. + summary (str | Unset): The summary of the action item + description (None | str | Unset): The description of the action item + kind (UpdateIncidentActionItemDataAttributesKind | Unset): The kind of the action item + assigned_to_user_id (int | None | Unset): ID of user you wish to assign this action item + assigned_to_group_ids (list[str] | None | Unset): IDs of groups you wish to assign this action item + priority (UpdateIncidentActionItemDataAttributesPriority | Unset): The priority of the action item + status (UpdateIncidentActionItemDataAttributesStatus | Unset): The status of the action item + due_date (None | str | Unset): The due date of the action item + jira_issue_id (None | str | Unset): The Jira issue ID. + jira_issue_key (None | str | Unset): The Jira issue key. + jira_issue_url (None | str | Unset): The Jira issue URL. """ - summary: Unset | str = UNSET - description: None | Unset | str = UNSET - kind: Unset | UpdateIncidentActionItemDataAttributesKind = UNSET - assigned_to_user_id: None | Unset | int = UNSET - assigned_to_group_ids: None | Unset | list[str] = UNSET - priority: Unset | UpdateIncidentActionItemDataAttributesPriority = UNSET - status: Unset | UpdateIncidentActionItemDataAttributesStatus = UNSET - due_date: None | Unset | str = UNSET - jira_issue_id: None | Unset | str = UNSET - jira_issue_key: None | Unset | str = UNSET - jira_issue_url: None | Unset | str = UNSET + summary: str | Unset = UNSET + description: None | str | Unset = UNSET + kind: UpdateIncidentActionItemDataAttributesKind | Unset = UNSET + assigned_to_user_id: int | None | Unset = UNSET + assigned_to_group_ids: list[str] | None | Unset = UNSET + priority: UpdateIncidentActionItemDataAttributesPriority | Unset = UNSET + status: UpdateIncidentActionItemDataAttributesStatus | Unset = UNSET + due_date: None | str | Unset = UNSET + jira_issue_id: None | str | Unset = UNSET + jira_issue_key: None | str | Unset = UNSET + jira_issue_url: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: summary = self.summary - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - assigned_to_user_id: None | Unset | int + assigned_to_user_id: int | None | Unset if isinstance(self.assigned_to_user_id, Unset): assigned_to_user_id = UNSET else: assigned_to_user_id = self.assigned_to_user_id - assigned_to_group_ids: None | Unset | list[str] + assigned_to_group_ids: list[str] | None | Unset if isinstance(self.assigned_to_group_ids, Unset): assigned_to_group_ids = UNSET elif isinstance(self.assigned_to_group_ids, list): @@ -77,33 +79,33 @@ def to_dict(self) -> dict[str, Any]: else: assigned_to_group_ids = self.assigned_to_group_ids - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - due_date: None | Unset | str + due_date: None | str | Unset if isinstance(self.due_date, Unset): due_date = UNSET else: due_date = self.due_date - jira_issue_id: None | Unset | str + jira_issue_id: None | str | Unset if isinstance(self.jira_issue_id, Unset): jira_issue_id = UNSET else: jira_issue_id = self.jira_issue_id - jira_issue_key: None | Unset | str + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET else: jira_issue_key = self.jira_issue_key - jira_issue_url: None | Unset | str + jira_issue_url: None | str | Unset if isinstance(self.jira_issue_url, Unset): jira_issue_url = UNSET else: @@ -142,32 +144,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) summary = d.pop("summary", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateIncidentActionItemDataAttributesKind + kind: UpdateIncidentActionItemDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_update_incident_action_item_data_attributes_kind(_kind) - def _parse_assigned_to_user_id(data: object) -> None | Unset | int: + def _parse_assigned_to_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) assigned_to_user_id = _parse_assigned_to_user_id(d.pop("assigned_to_user_id", UNSET)) - def _parse_assigned_to_group_ids(data: object) -> None | Unset | list[str]: + def _parse_assigned_to_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -178,59 +180,59 @@ def _parse_assigned_to_group_ids(data: object) -> None | Unset | list[str]: assigned_to_group_ids_type_0 = cast(list[str], data) return assigned_to_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) assigned_to_group_ids = _parse_assigned_to_group_ids(d.pop("assigned_to_group_ids", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateIncidentActionItemDataAttributesPriority + priority: UpdateIncidentActionItemDataAttributesPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = check_update_incident_action_item_data_attributes_priority(_priority) _status = d.pop("status", UNSET) - status: Unset | UpdateIncidentActionItemDataAttributesStatus + status: UpdateIncidentActionItemDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_update_incident_action_item_data_attributes_status(_status) - def _parse_due_date(data: object) -> None | Unset | str: + def _parse_due_date(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) due_date = _parse_due_date(d.pop("due_date", UNSET)) - def _parse_jira_issue_id(data: object) -> None | Unset | str: + def _parse_jira_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_id = _parse_jira_issue_id(d.pop("jira_issue_id", UNSET)) - def _parse_jira_issue_key(data: object) -> None | Unset | str: + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_key = _parse_jira_issue_key(d.pop("jira_issue_key", UNSET)) - def _parse_jira_issue_url(data: object) -> None | Unset | str: + def _parse_jira_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) diff --git a/rootly_sdk/models/update_incident_custom_field_selection.py b/rootly_sdk/models/update_incident_custom_field_selection.py index 3690992c..ef1e2eb9 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection.py +++ b/rootly_sdk/models/update_incident_custom_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentCustomFieldSelection: data (UpdateIncidentCustomFieldSelectionData): """ - data: "UpdateIncidentCustomFieldSelectionData" + data: UpdateIncidentCustomFieldSelectionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_custom_field_selection_data.py b/rootly_sdk/models/update_incident_custom_field_selection_data.py index a439389b..80553b9b 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/update_incident_custom_field_selection_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateIncidentCustomFieldSelectionData: """ type_: UpdateIncidentCustomFieldSelectionDataType - attributes: "UpdateIncidentCustomFieldSelectionDataAttributes" + attributes: UpdateIncidentCustomFieldSelectionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_custom_field_selection_data_attributes.py b/rootly_sdk/models/update_incident_custom_field_selection_data_attributes.py index ddd3fa07..04f6d0da 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection_data_attributes.py +++ b/rootly_sdk/models/update_incident_custom_field_selection_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,21 +14,21 @@ class UpdateIncidentCustomFieldSelectionDataAttributes: """ Attributes: - value (Union[None, Unset, str]): The selected value for text kind custom fields - selected_option_ids (Union[Unset, list[int]]): + value (None | str | Unset): The selected value for text kind custom fields + selected_option_ids (list[int] | Unset): """ - value: None | Unset | str = UNSET - selected_option_ids: Unset | list[int] = UNSET + value: None | str | Unset = UNSET + selected_option_ids: list[int] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - value: None | Unset | str + value: None | str | Unset if isinstance(self.value, Unset): value = UNSET else: value = self.value - selected_option_ids: Unset | list[int] = UNSET + selected_option_ids: list[int] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids @@ -44,12 +46,12 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_value(data: object) -> None | Unset | str: + def _parse_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value = _parse_value(d.pop("value", UNSET)) diff --git a/rootly_sdk/models/update_incident_data.py b/rootly_sdk/models/update_incident_data.py index 6f4da343..6281026a 100644 --- a/rootly_sdk/models/update_incident_data.py +++ b/rootly_sdk/models/update_incident_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateIncidentData: """ type_: UpdateIncidentDataType - attributes: "UpdateIncidentDataAttributes" + attributes: UpdateIncidentDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_data_attributes.py b/rootly_sdk/models/update_incident_data_attributes.py index 0d2246cf..b92c2028 100644 --- a/rootly_sdk/models/update_incident_data_attributes.py +++ b/rootly_sdk/models/update_incident_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -24,146 +26,146 @@ class UpdateIncidentDataAttributes: """ Attributes: - title (Union[None, Unset, str]): The title of the incident - kind (Union[Unset, UpdateIncidentDataAttributesKind]): The kind of the incident Default: 'normal'. - parent_incident_id (Union[None, Unset, str]): ID of parent incident - duplicate_incident_id (Union[None, Unset, str]): ID of duplicated incident - summary (Union[None, Unset, str]): The summary of the incident - status (Union[Unset, UpdateIncidentDataAttributesStatus]): The status of the incident - private (Union[None, Unset, bool]): Convert the incident as private. Once an incident is updated as private it - cannot be undone Default: False. - severity_id (Union[None, Unset, str]): The Severity ID to attach to the incident - public_title (Union[None, Unset, str]): The public title of the incident - alert_ids (Union[None, Unset, list[str]]): The Alert IDs to attach to the incident - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the incident - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the incident - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the incident - functionality_ids (Union[None, Unset, list[str]]): The Functionality IDs to attach to the incident - muted_service_ids (Union[None, Unset, list[str]]): The Service IDs to mute alerts for during maintenance. Alerts - for these services will still be triggered and attached to the incident, but won't page responders. - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the incident - cause_ids (Union[None, Unset, list[str]]): The Cause IDs to attach to the incident - labels (Union['UpdateIncidentDataAttributesLabelsType0', None, Unset]): Labels to attach to the incidents. eg: + title (None | str | Unset): The title of the incident + kind (UpdateIncidentDataAttributesKind | Unset): The kind of the incident Default: 'normal'. + parent_incident_id (None | str | Unset): ID of parent incident + duplicate_incident_id (None | str | Unset): ID of duplicated incident + summary (None | str | Unset): The summary of the incident + status (UpdateIncidentDataAttributesStatus | Unset): The status of the incident + private (bool | None | Unset): Convert the incident as private. Once an incident is updated as private it cannot + be undone Default: False. + severity_id (None | str | Unset): The Severity ID to attach to the incident + public_title (None | str | Unset): The public title of the incident + alert_ids (list[str] | None | Unset): The Alert IDs to attach to the incident + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the incident + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the incident + service_ids (list[str] | None | Unset): The Service IDs to attach to the incident + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the incident + muted_service_ids (list[str] | None | Unset): The Service IDs to mute alerts for during maintenance. Alerts for + these services will still be triggered and attached to the incident, but won't page responders. + group_ids (list[str] | None | Unset): The Team IDs to attach to the incident + cause_ids (list[str] | None | Unset): The Cause IDs to attach to the incident + labels (None | Unset | UpdateIncidentDataAttributesLabelsType0): Labels to attach to the incidents. eg: {"platform":"osx", "version": "1.29"} - slack_channel_id (Union[None, Unset, str]): Slack channel id - slack_channel_name (Union[None, Unset, str]): Slack channel name - slack_channel_url (Union[None, Unset, str]): Slack channel url - slack_channel_archived (Union[None, Unset, bool]): Whether the Slack channel is archived - google_drive_parent_id (Union[None, Unset, str]): Google Drive parent folder ID - google_drive_url (Union[None, Unset, str]): Google Drive URL - jira_issue_key (Union[None, Unset, str]): Jira issue key - jira_issue_id (Union[None, Unset, str]): Jira issue ID - jira_issue_url (Union[None, Unset, str]): Jira issue URL - scheduled_for (Union[None, Unset, str]): Date of when the maintenance begins - scheduled_until (Union[None, Unset, str]): Date of when the maintenance ends - in_triage_at (Union[None, Unset, str]): Date of triage - started_at (Union[None, Unset, str]): Date of start - detected_at (Union[None, Unset, str]): Date of detection - acknowledged_at (Union[None, Unset, str]): Date of acknowledgment - mitigated_at (Union[None, Unset, str]): Date of mitigation - resolved_at (Union[None, Unset, str]): Date of resolution - closed_at (Union[None, Unset, str]): Date of closure - cancelled_at (Union[None, Unset, str]): Date of cancellation - mitigation_message (Union[None, Unset, str]): How was the incident mitigated? - resolution_message (Union[None, Unset, str]): How was the incident resolved? - cancellation_message (Union[None, Unset, str]): Why was the incident cancelled? + slack_channel_id (None | str | Unset): Slack channel id + slack_channel_name (None | str | Unset): Slack channel name + slack_channel_url (None | str | Unset): Slack channel url + slack_channel_archived (bool | None | Unset): Whether the Slack channel is archived + google_drive_parent_id (None | str | Unset): Google Drive parent folder ID + google_drive_url (None | str | Unset): Google Drive URL + jira_issue_key (None | str | Unset): Jira issue key + jira_issue_id (None | str | Unset): Jira issue ID + jira_issue_url (None | str | Unset): Jira issue URL + scheduled_for (None | str | Unset): Date of when the maintenance begins + scheduled_until (None | str | Unset): Date of when the maintenance ends + in_triage_at (None | str | Unset): Date of triage + started_at (None | str | Unset): Date of start + detected_at (None | str | Unset): Date of detection + acknowledged_at (None | str | Unset): Date of acknowledgment + mitigated_at (None | str | Unset): Date of mitigation + resolved_at (None | str | Unset): Date of resolution + closed_at (None | str | Unset): Date of closure + cancelled_at (None | str | Unset): Date of cancellation + mitigation_message (None | str | Unset): How was the incident mitigated? + resolution_message (None | str | Unset): How was the incident resolved? + cancellation_message (None | str | Unset): Why was the incident cancelled? """ - title: None | Unset | str = UNSET - kind: Unset | UpdateIncidentDataAttributesKind = "normal" - parent_incident_id: None | Unset | str = UNSET - duplicate_incident_id: None | Unset | str = UNSET - summary: None | Unset | str = UNSET - status: Unset | UpdateIncidentDataAttributesStatus = UNSET - private: None | Unset | bool = False - severity_id: None | Unset | str = UNSET - public_title: None | Unset | str = UNSET - alert_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - muted_service_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - cause_ids: None | Unset | list[str] = UNSET - labels: Union["UpdateIncidentDataAttributesLabelsType0", None, Unset] = UNSET - slack_channel_id: None | Unset | str = UNSET - slack_channel_name: None | Unset | str = UNSET - slack_channel_url: None | Unset | str = UNSET - slack_channel_archived: None | Unset | bool = UNSET - google_drive_parent_id: None | Unset | str = UNSET - google_drive_url: None | Unset | str = UNSET - jira_issue_key: None | Unset | str = UNSET - jira_issue_id: None | Unset | str = UNSET - jira_issue_url: None | Unset | str = UNSET - scheduled_for: None | Unset | str = UNSET - scheduled_until: None | Unset | str = UNSET - in_triage_at: None | Unset | str = UNSET - started_at: None | Unset | str = UNSET - detected_at: None | Unset | str = UNSET - acknowledged_at: None | Unset | str = UNSET - mitigated_at: None | Unset | str = UNSET - resolved_at: None | Unset | str = UNSET - closed_at: None | Unset | str = UNSET - cancelled_at: None | Unset | str = UNSET - mitigation_message: None | Unset | str = UNSET - resolution_message: None | Unset | str = UNSET - cancellation_message: None | Unset | str = UNSET + title: None | str | Unset = UNSET + kind: UpdateIncidentDataAttributesKind | Unset = "normal" + parent_incident_id: None | str | Unset = UNSET + duplicate_incident_id: None | str | Unset = UNSET + summary: None | str | Unset = UNSET + status: UpdateIncidentDataAttributesStatus | Unset = UNSET + private: bool | None | Unset = False + severity_id: None | str | Unset = UNSET + public_title: None | str | Unset = UNSET + alert_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + muted_service_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + cause_ids: list[str] | None | Unset = UNSET + labels: None | Unset | UpdateIncidentDataAttributesLabelsType0 = UNSET + slack_channel_id: None | str | Unset = UNSET + slack_channel_name: None | str | Unset = UNSET + slack_channel_url: None | str | Unset = UNSET + slack_channel_archived: bool | None | Unset = UNSET + google_drive_parent_id: None | str | Unset = UNSET + google_drive_url: None | str | Unset = UNSET + jira_issue_key: None | str | Unset = UNSET + jira_issue_id: None | str | Unset = UNSET + jira_issue_url: None | str | Unset = UNSET + scheduled_for: None | str | Unset = UNSET + scheduled_until: None | str | Unset = UNSET + in_triage_at: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + detected_at: None | str | Unset = UNSET + acknowledged_at: None | str | Unset = UNSET + mitigated_at: None | str | Unset = UNSET + resolved_at: None | str | Unset = UNSET + closed_at: None | str | Unset = UNSET + cancelled_at: None | str | Unset = UNSET + mitigation_message: None | str | Unset = UNSET + resolution_message: None | str | Unset = UNSET + cancellation_message: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_incident_data_attributes_labels_type_0 import UpdateIncidentDataAttributesLabelsType0 - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - parent_incident_id: None | Unset | str + parent_incident_id: None | str | Unset if isinstance(self.parent_incident_id, Unset): parent_incident_id = UNSET else: parent_incident_id = self.parent_incident_id - duplicate_incident_id: None | Unset | str + duplicate_incident_id: None | str | Unset if isinstance(self.duplicate_incident_id, Unset): duplicate_incident_id = UNSET else: duplicate_incident_id = self.duplicate_incident_id - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - private: None | Unset | bool + private: bool | None | Unset if isinstance(self.private, Unset): private = UNSET else: private = self.private - severity_id: None | Unset | str + severity_id: None | str | Unset if isinstance(self.severity_id, Unset): severity_id = UNSET else: severity_id = self.severity_id - public_title: None | Unset | str + public_title: None | str | Unset if isinstance(self.public_title, Unset): public_title = UNSET else: public_title = self.public_title - alert_ids: None | Unset | list[str] + alert_ids: list[str] | None | Unset if isinstance(self.alert_ids, Unset): alert_ids = UNSET elif isinstance(self.alert_ids, list): @@ -172,7 +174,7 @@ def to_dict(self) -> dict[str, Any]: else: alert_ids = self.alert_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -181,7 +183,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -190,7 +192,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_type_ids = self.incident_type_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -199,7 +201,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -208,7 +210,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - muted_service_ids: None | Unset | list[str] + muted_service_ids: list[str] | None | Unset if isinstance(self.muted_service_ids, Unset): muted_service_ids = UNSET elif isinstance(self.muted_service_ids, list): @@ -217,7 +219,7 @@ def to_dict(self) -> dict[str, Any]: else: muted_service_ids = self.muted_service_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -226,7 +228,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - cause_ids: None | Unset | list[str] + cause_ids: list[str] | None | Unset if isinstance(self.cause_ids, Unset): cause_ids = UNSET elif isinstance(self.cause_ids, list): @@ -235,7 +237,7 @@ def to_dict(self) -> dict[str, Any]: else: cause_ids = self.cause_ids - labels: None | Unset | dict[str, Any] + labels: dict[str, Any] | None | Unset if isinstance(self.labels, Unset): labels = UNSET elif isinstance(self.labels, UpdateIncidentDataAttributesLabelsType0): @@ -243,133 +245,133 @@ def to_dict(self) -> dict[str, Any]: else: labels = self.labels - slack_channel_id: None | Unset | str + slack_channel_id: None | str | Unset if isinstance(self.slack_channel_id, Unset): slack_channel_id = UNSET else: slack_channel_id = self.slack_channel_id - slack_channel_name: None | Unset | str + slack_channel_name: None | str | Unset if isinstance(self.slack_channel_name, Unset): slack_channel_name = UNSET else: slack_channel_name = self.slack_channel_name - slack_channel_url: None | Unset | str + slack_channel_url: None | str | Unset if isinstance(self.slack_channel_url, Unset): slack_channel_url = UNSET else: slack_channel_url = self.slack_channel_url - slack_channel_archived: None | Unset | bool + slack_channel_archived: bool | None | Unset if isinstance(self.slack_channel_archived, Unset): slack_channel_archived = UNSET else: slack_channel_archived = self.slack_channel_archived - google_drive_parent_id: None | Unset | str + google_drive_parent_id: None | str | Unset if isinstance(self.google_drive_parent_id, Unset): google_drive_parent_id = UNSET else: google_drive_parent_id = self.google_drive_parent_id - google_drive_url: None | Unset | str + google_drive_url: None | str | Unset if isinstance(self.google_drive_url, Unset): google_drive_url = UNSET else: google_drive_url = self.google_drive_url - jira_issue_key: None | Unset | str + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET else: jira_issue_key = self.jira_issue_key - jira_issue_id: None | Unset | str + jira_issue_id: None | str | Unset if isinstance(self.jira_issue_id, Unset): jira_issue_id = UNSET else: jira_issue_id = self.jira_issue_id - jira_issue_url: None | Unset | str + jira_issue_url: None | str | Unset if isinstance(self.jira_issue_url, Unset): jira_issue_url = UNSET else: jira_issue_url = self.jira_issue_url - scheduled_for: None | Unset | str + scheduled_for: None | str | Unset if isinstance(self.scheduled_for, Unset): scheduled_for = UNSET else: scheduled_for = self.scheduled_for - scheduled_until: None | Unset | str + scheduled_until: None | str | Unset if isinstance(self.scheduled_until, Unset): scheduled_until = UNSET else: scheduled_until = self.scheduled_until - in_triage_at: None | Unset | str + in_triage_at: None | str | Unset if isinstance(self.in_triage_at, Unset): in_triage_at = UNSET else: in_triage_at = self.in_triage_at - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - detected_at: None | Unset | str + detected_at: None | str | Unset if isinstance(self.detected_at, Unset): detected_at = UNSET else: detected_at = self.detected_at - acknowledged_at: None | Unset | str + acknowledged_at: None | str | Unset if isinstance(self.acknowledged_at, Unset): acknowledged_at = UNSET else: acknowledged_at = self.acknowledged_at - mitigated_at: None | Unset | str + mitigated_at: None | str | Unset if isinstance(self.mitigated_at, Unset): mitigated_at = UNSET else: mitigated_at = self.mitigated_at - resolved_at: None | Unset | str + resolved_at: None | str | Unset if isinstance(self.resolved_at, Unset): resolved_at = UNSET else: resolved_at = self.resolved_at - closed_at: None | Unset | str + closed_at: None | str | Unset if isinstance(self.closed_at, Unset): closed_at = UNSET else: closed_at = self.closed_at - cancelled_at: None | Unset | str + cancelled_at: None | str | Unset if isinstance(self.cancelled_at, Unset): cancelled_at = UNSET else: cancelled_at = self.cancelled_at - mitigation_message: None | Unset | str + mitigation_message: None | str | Unset if isinstance(self.mitigation_message, Unset): mitigation_message = UNSET else: mitigation_message = self.mitigation_message - resolution_message: None | Unset | str + resolution_message: None | str | Unset if isinstance(self.resolution_message, Unset): resolution_message = UNSET else: resolution_message = self.resolution_message - cancellation_message: None | Unset | str + cancellation_message: None | str | Unset if isinstance(self.cancellation_message, Unset): cancellation_message = UNSET else: @@ -467,84 +469,84 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateIncidentDataAttributesKind + kind: UpdateIncidentDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_update_incident_data_attributes_kind(_kind) - def _parse_parent_incident_id(data: object) -> None | Unset | str: + def _parse_parent_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) parent_incident_id = _parse_parent_incident_id(d.pop("parent_incident_id", UNSET)) - def _parse_duplicate_incident_id(data: object) -> None | Unset | str: + def _parse_duplicate_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) duplicate_incident_id = _parse_duplicate_incident_id(d.pop("duplicate_incident_id", UNSET)) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) _status = d.pop("status", UNSET) - status: Unset | UpdateIncidentDataAttributesStatus + status: UpdateIncidentDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_update_incident_data_attributes_status(_status) - def _parse_private(data: object) -> None | Unset | bool: + def _parse_private(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) private = _parse_private(d.pop("private", UNSET)) - def _parse_severity_id(data: object) -> None | Unset | str: + def _parse_severity_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) severity_id = _parse_severity_id(d.pop("severity_id", UNSET)) - def _parse_public_title(data: object) -> None | Unset | str: + def _parse_public_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_title = _parse_public_title(d.pop("public_title", UNSET)) - def _parse_alert_ids(data: object) -> None | Unset | list[str]: + def _parse_alert_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -555,13 +557,13 @@ def _parse_alert_ids(data: object) -> None | Unset | list[str]: alert_ids_type_0 = cast(list[str], data) return alert_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) alert_ids = _parse_alert_ids(d.pop("alert_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -572,13 +574,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -589,13 +591,13 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -606,13 +608,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -623,13 +625,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_muted_service_ids(data: object) -> None | Unset | list[str]: + def _parse_muted_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -640,13 +642,13 @@ def _parse_muted_service_ids(data: object) -> None | Unset | list[str]: muted_service_ids_type_0 = cast(list[str], data) return muted_service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) muted_service_ids = _parse_muted_service_ids(d.pop("muted_service_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -657,13 +659,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_cause_ids(data: object) -> None | Unset | list[str]: + def _parse_cause_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -674,13 +676,13 @@ def _parse_cause_ids(data: object) -> None | Unset | list[str]: cause_ids_type_0 = cast(list[str], data) return cause_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) cause_ids = _parse_cause_ids(d.pop("cause_ids", UNSET)) - def _parse_labels(data: object) -> Union["UpdateIncidentDataAttributesLabelsType0", None, Unset]: + def _parse_labels(data: object) -> None | Unset | UpdateIncidentDataAttributesLabelsType0: if data is None: return data if isinstance(data, Unset): @@ -691,207 +693,207 @@ def _parse_labels(data: object) -> Union["UpdateIncidentDataAttributesLabelsType labels_type_0 = UpdateIncidentDataAttributesLabelsType0.from_dict(data) return labels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateIncidentDataAttributesLabelsType0", None, Unset], data) + return cast(None | Unset | UpdateIncidentDataAttributesLabelsType0, data) labels = _parse_labels(d.pop("labels", UNSET)) - def _parse_slack_channel_id(data: object) -> None | Unset | str: + def _parse_slack_channel_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_id = _parse_slack_channel_id(d.pop("slack_channel_id", UNSET)) - def _parse_slack_channel_name(data: object) -> None | Unset | str: + def _parse_slack_channel_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_name = _parse_slack_channel_name(d.pop("slack_channel_name", UNSET)) - def _parse_slack_channel_url(data: object) -> None | Unset | str: + def _parse_slack_channel_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) slack_channel_url = _parse_slack_channel_url(d.pop("slack_channel_url", UNSET)) - def _parse_slack_channel_archived(data: object) -> None | Unset | bool: + def _parse_slack_channel_archived(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) slack_channel_archived = _parse_slack_channel_archived(d.pop("slack_channel_archived", UNSET)) - def _parse_google_drive_parent_id(data: object) -> None | Unset | str: + def _parse_google_drive_parent_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_parent_id = _parse_google_drive_parent_id(d.pop("google_drive_parent_id", UNSET)) - def _parse_google_drive_url(data: object) -> None | Unset | str: + def _parse_google_drive_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) google_drive_url = _parse_google_drive_url(d.pop("google_drive_url", UNSET)) - def _parse_jira_issue_key(data: object) -> None | Unset | str: + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_key = _parse_jira_issue_key(d.pop("jira_issue_key", UNSET)) - def _parse_jira_issue_id(data: object) -> None | Unset | str: + def _parse_jira_issue_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_id = _parse_jira_issue_id(d.pop("jira_issue_id", UNSET)) - def _parse_jira_issue_url(data: object) -> None | Unset | str: + def _parse_jira_issue_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) - def _parse_scheduled_for(data: object) -> None | Unset | str: + def _parse_scheduled_for(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) scheduled_for = _parse_scheduled_for(d.pop("scheduled_for", UNSET)) - def _parse_scheduled_until(data: object) -> None | Unset | str: + def _parse_scheduled_until(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) scheduled_until = _parse_scheduled_until(d.pop("scheduled_until", UNSET)) - def _parse_in_triage_at(data: object) -> None | Unset | str: + def _parse_in_triage_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) in_triage_at = _parse_in_triage_at(d.pop("in_triage_at", UNSET)) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_detected_at(data: object) -> None | Unset | str: + def _parse_detected_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) detected_at = _parse_detected_at(d.pop("detected_at", UNSET)) - def _parse_acknowledged_at(data: object) -> None | Unset | str: + def _parse_acknowledged_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) acknowledged_at = _parse_acknowledged_at(d.pop("acknowledged_at", UNSET)) - def _parse_mitigated_at(data: object) -> None | Unset | str: + def _parse_mitigated_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigated_at = _parse_mitigated_at(d.pop("mitigated_at", UNSET)) - def _parse_resolved_at(data: object) -> None | Unset | str: + def _parse_resolved_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) - def _parse_closed_at(data: object) -> None | Unset | str: + def _parse_closed_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) closed_at = _parse_closed_at(d.pop("closed_at", UNSET)) - def _parse_cancelled_at(data: object) -> None | Unset | str: + def _parse_cancelled_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cancelled_at = _parse_cancelled_at(d.pop("cancelled_at", UNSET)) - def _parse_mitigation_message(data: object) -> None | Unset | str: + def _parse_mitigation_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigation_message = _parse_mitigation_message(d.pop("mitigation_message", UNSET)) - def _parse_resolution_message(data: object) -> None | Unset | str: + def _parse_resolution_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolution_message = _parse_resolution_message(d.pop("resolution_message", UNSET)) - def _parse_cancellation_message(data: object) -> None | Unset | str: + def _parse_cancellation_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cancellation_message = _parse_cancellation_message(d.pop("cancellation_message", UNSET)) diff --git a/rootly_sdk/models/update_incident_data_attributes_labels_type_0.py b/rootly_sdk/models/update_incident_data_attributes_labels_type_0.py index cd7027c9..3bbf882a 100644 --- a/rootly_sdk/models/update_incident_data_attributes_labels_type_0.py +++ b/rootly_sdk/models/update_incident_data_attributes_labels_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class UpdateIncidentDataAttributesLabelsType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/update_incident_event.py b/rootly_sdk/models/update_incident_event.py index ab56ae88..10c6307f 100644 --- a/rootly_sdk/models/update_incident_event.py +++ b/rootly_sdk/models/update_incident_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentEvent: data (UpdateIncidentEventData): """ - data: "UpdateIncidentEventData" + data: UpdateIncidentEventData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_event_data.py b/rootly_sdk/models/update_incident_event_data.py index cc26fc06..0c2e4971 100644 --- a/rootly_sdk/models/update_incident_event_data.py +++ b/rootly_sdk/models/update_incident_event_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateIncidentEventData: """ type_: UpdateIncidentEventDataType - attributes: "UpdateIncidentEventDataAttributes" + attributes: UpdateIncidentEventDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_event_data_attributes.py b/rootly_sdk/models/update_incident_event_data_attributes.py index 07151a8c..1d966e3c 100644 --- a/rootly_sdk/models/update_incident_event_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -16,18 +18,17 @@ class UpdateIncidentEventDataAttributes: """ Attributes: - event (Union[Unset, str]): The summary of the incident event - visibility (Union[Unset, UpdateIncidentEventDataAttributesVisibility]): The visibility of the incident action - item + event (str | Unset): The summary of the incident event + visibility (UpdateIncidentEventDataAttributesVisibility | Unset): The visibility of the incident action item """ - event: Unset | str = UNSET - visibility: Unset | UpdateIncidentEventDataAttributesVisibility = UNSET + event: str | Unset = UNSET + visibility: UpdateIncidentEventDataAttributesVisibility | Unset = UNSET def to_dict(self) -> dict[str, Any]: event = self.event - visibility: Unset | str = UNSET + visibility: str | Unset = UNSET if not isinstance(self.visibility, Unset): visibility = self.visibility @@ -47,7 +48,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: event = d.pop("event", UNSET) _visibility = d.pop("visibility", UNSET) - visibility: Unset | UpdateIncidentEventDataAttributesVisibility + visibility: UpdateIncidentEventDataAttributesVisibility | Unset if isinstance(_visibility, Unset): visibility = UNSET else: diff --git a/rootly_sdk/models/update_incident_event_functionality.py b/rootly_sdk/models/update_incident_event_functionality.py index 1991760e..4deb6dda 100644 --- a/rootly_sdk/models/update_incident_event_functionality.py +++ b/rootly_sdk/models/update_incident_event_functionality.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentEventFunctionality: data (UpdateIncidentEventFunctionalityData): """ - data: "UpdateIncidentEventFunctionalityData" + data: UpdateIncidentEventFunctionalityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_event_functionality_data.py b/rootly_sdk/models/update_incident_event_functionality_data.py index 66eacd0d..cf85c901 100644 --- a/rootly_sdk/models/update_incident_event_functionality_data.py +++ b/rootly_sdk/models/update_incident_event_functionality_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateIncidentEventFunctionalityData: """ type_: UpdateIncidentEventFunctionalityDataType - attributes: "UpdateIncidentEventFunctionalityDataAttributes" + attributes: UpdateIncidentEventFunctionalityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_event_functionality_data_attributes.py b/rootly_sdk/models/update_incident_event_functionality_data_attributes.py index e036a562..3dd37190 100644 --- a/rootly_sdk/models/update_incident_event_functionality_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_functionality_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_incident_event_service.py b/rootly_sdk/models/update_incident_event_service.py index 4c582722..23c734b4 100644 --- a/rootly_sdk/models/update_incident_event_service.py +++ b/rootly_sdk/models/update_incident_event_service.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentEventService: data (UpdateIncidentEventServiceData): """ - data: "UpdateIncidentEventServiceData" + data: UpdateIncidentEventServiceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_event_service_data.py b/rootly_sdk/models/update_incident_event_service_data.py index 39489ed7..1ea0d258 100644 --- a/rootly_sdk/models/update_incident_event_service_data.py +++ b/rootly_sdk/models/update_incident_event_service_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentEventServiceData: """ type_: UpdateIncidentEventServiceDataType - attributes: "UpdateIncidentEventServiceDataAttributes" + attributes: UpdateIncidentEventServiceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_event_service_data_attributes.py b/rootly_sdk/models/update_incident_event_service_data_attributes.py index 0d8cd5d6..d5f3207b 100644 --- a/rootly_sdk/models/update_incident_event_service_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_service_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_incident_feedback.py b/rootly_sdk/models/update_incident_feedback.py index c74c81a1..14ffe711 100644 --- a/rootly_sdk/models/update_incident_feedback.py +++ b/rootly_sdk/models/update_incident_feedback.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentFeedback: data (UpdateIncidentFeedbackData): """ - data: "UpdateIncidentFeedbackData" + data: UpdateIncidentFeedbackData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_feedback_data.py b/rootly_sdk/models/update_incident_feedback_data.py index d8e341a9..fcb15b1a 100644 --- a/rootly_sdk/models/update_incident_feedback_data.py +++ b/rootly_sdk/models/update_incident_feedback_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentFeedbackData: """ type_: UpdateIncidentFeedbackDataType - attributes: "UpdateIncidentFeedbackDataAttributes" + attributes: UpdateIncidentFeedbackDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_feedback_data_attributes.py b/rootly_sdk/models/update_incident_feedback_data_attributes.py index 952fc058..4d9558c6 100644 --- a/rootly_sdk/models/update_incident_feedback_data_attributes.py +++ b/rootly_sdk/models/update_incident_feedback_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -16,19 +18,19 @@ class UpdateIncidentFeedbackDataAttributes: """ Attributes: - feedback (Union[Unset, str]): The feedback of the incident feedback - rating (Union[Unset, UpdateIncidentFeedbackDataAttributesRating]): The rating of the incident feedback - anonymous (Union[Unset, bool]): Is the feedback anonymous? + feedback (str | Unset): The feedback of the incident feedback + rating (UpdateIncidentFeedbackDataAttributesRating | Unset): The rating of the incident feedback + anonymous (bool | Unset): Is the feedback anonymous? """ - feedback: Unset | str = UNSET - rating: Unset | UpdateIncidentFeedbackDataAttributesRating = UNSET - anonymous: Unset | bool = UNSET + feedback: str | Unset = UNSET + rating: UpdateIncidentFeedbackDataAttributesRating | Unset = UNSET + anonymous: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: feedback = self.feedback - rating: Unset | int = UNSET + rating: int | Unset = UNSET if not isinstance(self.rating, Unset): rating = self.rating @@ -52,7 +54,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: feedback = d.pop("feedback", UNSET) _rating = d.pop("rating", UNSET) - rating: Unset | UpdateIncidentFeedbackDataAttributesRating + rating: UpdateIncidentFeedbackDataAttributesRating | Unset if isinstance(_rating, Unset): rating = UNSET else: diff --git a/rootly_sdk/models/update_incident_form_field_selection.py b/rootly_sdk/models/update_incident_form_field_selection.py index d26e8ead..618bdb8b 100644 --- a/rootly_sdk/models/update_incident_form_field_selection.py +++ b/rootly_sdk/models/update_incident_form_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentFormFieldSelection: data (UpdateIncidentFormFieldSelectionData): """ - data: "UpdateIncidentFormFieldSelectionData" + data: UpdateIncidentFormFieldSelectionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_form_field_selection_data.py b/rootly_sdk/models/update_incident_form_field_selection_data.py index 863405d5..45e73e78 100644 --- a/rootly_sdk/models/update_incident_form_field_selection_data.py +++ b/rootly_sdk/models/update_incident_form_field_selection_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateIncidentFormFieldSelectionData: """ type_: UpdateIncidentFormFieldSelectionDataType - attributes: "UpdateIncidentFormFieldSelectionDataAttributes" + attributes: UpdateIncidentFormFieldSelectionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_form_field_selection_data_attributes.py b/rootly_sdk/models/update_incident_form_field_selection_data_attributes.py index 9f4884c4..db5ea2f0 100644 --- a/rootly_sdk/models/update_incident_form_field_selection_data_attributes.py +++ b/rootly_sdk/models/update_incident_form_field_selection_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,69 +14,69 @@ class UpdateIncidentFormFieldSelectionDataAttributes: """ Attributes: - value (Union[None, Unset, str]): The selected value for text kind custom fields - selected_catalog_entity_ids (Union[Unset, list[str]]): - selected_group_ids (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[str]]): - selected_service_ids (Union[Unset, list[str]]): - selected_functionality_ids (Union[Unset, list[str]]): - selected_user_ids (Union[Unset, list[int]]): - selected_environment_ids (Union[Unset, list[str]]): - selected_cause_ids (Union[Unset, list[str]]): - selected_incident_type_ids (Union[Unset, list[str]]): + value (None | str | Unset): The selected value for text kind custom fields + selected_catalog_entity_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_environment_ids (list[str] | Unset): + selected_cause_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): """ - value: None | Unset | str = UNSET - selected_catalog_entity_ids: Unset | list[str] = UNSET - selected_group_ids: Unset | list[str] = UNSET - selected_option_ids: Unset | list[str] = UNSET - selected_service_ids: Unset | list[str] = UNSET - selected_functionality_ids: Unset | list[str] = UNSET - selected_user_ids: Unset | list[int] = UNSET - selected_environment_ids: Unset | list[str] = UNSET - selected_cause_ids: Unset | list[str] = UNSET - selected_incident_type_ids: Unset | list[str] = UNSET + value: None | str | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - value: None | Unset | str + value: None | str | Unset if isinstance(self.value, Unset): value = UNSET else: value = self.value - selected_catalog_entity_ids: Unset | list[str] = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET if not isinstance(self.selected_catalog_entity_ids, Unset): selected_catalog_entity_ids = self.selected_catalog_entity_ids - selected_group_ids: Unset | list[str] = UNSET + selected_group_ids: list[str] | Unset = UNSET if not isinstance(self.selected_group_ids, Unset): selected_group_ids = self.selected_group_ids - selected_option_ids: Unset | list[str] = UNSET + selected_option_ids: list[str] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids - selected_service_ids: Unset | list[str] = UNSET + selected_service_ids: list[str] | Unset = UNSET if not isinstance(self.selected_service_ids, Unset): selected_service_ids = self.selected_service_ids - selected_functionality_ids: Unset | list[str] = UNSET + selected_functionality_ids: list[str] | Unset = UNSET if not isinstance(self.selected_functionality_ids, Unset): selected_functionality_ids = self.selected_functionality_ids - selected_user_ids: Unset | list[int] = UNSET + selected_user_ids: list[int] | Unset = UNSET if not isinstance(self.selected_user_ids, Unset): selected_user_ids = self.selected_user_ids - selected_environment_ids: Unset | list[str] = UNSET + selected_environment_ids: list[str] | Unset = UNSET if not isinstance(self.selected_environment_ids, Unset): selected_environment_ids = self.selected_environment_ids - selected_cause_ids: Unset | list[str] = UNSET + selected_cause_ids: list[str] | Unset = UNSET if not isinstance(self.selected_cause_ids, Unset): selected_cause_ids = self.selected_cause_ids - selected_incident_type_ids: Unset | list[str] = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.selected_incident_type_ids, Unset): selected_incident_type_ids = self.selected_incident_type_ids @@ -108,12 +110,12 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_value(data: object) -> None | Unset | str: + def _parse_value(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) value = _parse_value(d.pop("value", UNSET)) diff --git a/rootly_sdk/models/update_incident_permission_set.py b/rootly_sdk/models/update_incident_permission_set.py index 5632a471..01646aa5 100644 --- a/rootly_sdk/models/update_incident_permission_set.py +++ b/rootly_sdk/models/update_incident_permission_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentPermissionSet: data (UpdateIncidentPermissionSetData): """ - data: "UpdateIncidentPermissionSetData" + data: UpdateIncidentPermissionSetData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_permission_set_boolean.py b/rootly_sdk/models/update_incident_permission_set_boolean.py index d8a4cb37..6ae0bfb3 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentPermissionSetBoolean: data (UpdateIncidentPermissionSetBooleanData): """ - data: "UpdateIncidentPermissionSetBooleanData" + data: UpdateIncidentPermissionSetBooleanData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_permission_set_boolean_data.py b/rootly_sdk/models/update_incident_permission_set_boolean_data.py index 91b0126a..653d35ca 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateIncidentPermissionSetBooleanData: """ type_: UpdateIncidentPermissionSetBooleanDataType - attributes: "UpdateIncidentPermissionSetBooleanDataAttributes" + attributes: UpdateIncidentPermissionSetBooleanDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py b/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py index 09ba597e..51bc6a2a 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -22,19 +24,19 @@ class UpdateIncidentPermissionSetBooleanDataAttributes: """ Attributes: - kind (Union[Unset, UpdateIncidentPermissionSetBooleanDataAttributesKind]): - private (Union[Unset, bool]): - enabled (Union[Unset, bool]): - severity_params (Union[Unset, UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams]): + kind (UpdateIncidentPermissionSetBooleanDataAttributesKind | Unset): + private (bool | Unset): + enabled (bool | Unset): + severity_params (UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset): """ - kind: Unset | UpdateIncidentPermissionSetBooleanDataAttributesKind = UNSET - private: Unset | bool = UNSET - enabled: Unset | bool = UNSET - severity_params: Union[Unset, "UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams"] = UNSET + kind: UpdateIncidentPermissionSetBooleanDataAttributesKind | Unset = UNSET + private: bool | Unset = UNSET + enabled: bool | Unset = UNSET + severity_params: UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - severity_params: Unset | dict[str, Any] = UNSET + severity_params: dict[str, Any] | Unset = UNSET if not isinstance(self.severity_params, Unset): severity_params = self.severity_params.to_dict() @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateIncidentPermissionSetBooleanDataAttributesKind + kind: UpdateIncidentPermissionSetBooleanDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -79,7 +81,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _severity_params = d.pop("severity_params", UNSET) - severity_params: Unset | UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams + severity_params: UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset if isinstance(_severity_params, Unset): severity_params = UNSET else: diff --git a/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes_severity_params.py b/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes_severity_params.py index 1c6c224e..15818ae2 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes_severity_params.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data_attributes_severity_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,18 +15,18 @@ class UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams: """ Attributes: - fully_enabled (Union[Unset, bool]): Whether permissions are enabled for any severity incident Default: True. - applies_to_unassigned (Union[Unset, bool]): Whether permissions are enabled for incident without severity - Default: True. - create_enabled (Union[Unset, bool]): Whether permissions are enabled when creating incident Default: False. - severity_ids (Union[None, Unset, list[str]]): Severity ids that determine if an incident is permitted based on + fully_enabled (bool | Unset): Whether permissions are enabled for any severity incident Default: True. + applies_to_unassigned (bool | Unset): Whether permissions are enabled for incident without severity Default: + True. + create_enabled (bool | Unset): Whether permissions are enabled when creating incident Default: False. + severity_ids (list[str] | None | Unset): Severity ids that determine if an incident is permitted based on matching severity """ - fully_enabled: Unset | bool = True - applies_to_unassigned: Unset | bool = True - create_enabled: Unset | bool = False - severity_ids: None | Unset | list[str] = UNSET + fully_enabled: bool | Unset = True + applies_to_unassigned: bool | Unset = True + create_enabled: bool | Unset = False + severity_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: create_enabled = self.create_enabled - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -66,7 +68,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: create_enabled = d.pop("create_enabled", UNSET) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -77,9 +79,9 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) diff --git a/rootly_sdk/models/update_incident_permission_set_data.py b/rootly_sdk/models/update_incident_permission_set_data.py index 36c413c4..0b59cba4 100644 --- a/rootly_sdk/models/update_incident_permission_set_data.py +++ b/rootly_sdk/models/update_incident_permission_set_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentPermissionSetData: """ type_: UpdateIncidentPermissionSetDataType - attributes: "UpdateIncidentPermissionSetDataAttributes" + attributes: UpdateIncidentPermissionSetDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_permission_set_data_attributes.py b/rootly_sdk/models/update_incident_permission_set_data_attributes.py index 6cfcc9a7..f084f371 100644 --- a/rootly_sdk/models/update_incident_permission_set_data_attributes.py +++ b/rootly_sdk/models/update_incident_permission_set_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -20,40 +22,40 @@ class UpdateIncidentPermissionSetDataAttributes: """ Attributes: - name (Union[Unset, str]): The incident permission set name. - description (Union[None, Unset, str]): The incident permission set description. - private_incident_permissions (Union[Unset, - list[UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem]]): - public_incident_permissions (Union[Unset, - list[UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem]]): + name (str | Unset): The incident permission set name. + description (None | str | Unset): The incident permission set description. + private_incident_permissions (list[UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] | + Unset): + public_incident_permissions (list[UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] | + Unset): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET private_incident_permissions: ( - Unset | list[UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] + list[UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] | Unset ) = UNSET public_incident_permissions: ( - Unset | list[UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] + list[UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - private_incident_permissions: Unset | list[str] = UNSET + private_incident_permissions: list[str] | Unset = UNSET if not isinstance(self.private_incident_permissions, Unset): private_incident_permissions = [] for private_incident_permissions_item_data in self.private_incident_permissions: private_incident_permissions_item: str = private_incident_permissions_item_data private_incident_permissions.append(private_incident_permissions_item) - public_incident_permissions: Unset | list[str] = UNSET + public_incident_permissions: list[str] | Unset = UNSET if not isinstance(self.public_incident_permissions, Unset): public_incident_permissions = [] for public_incident_permissions_item_data in self.public_incident_permissions: @@ -79,36 +81,44 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - private_incident_permissions = [] _private_incident_permissions = d.pop("private_incident_permissions", UNSET) - for private_incident_permissions_item_data in _private_incident_permissions or []: - private_incident_permissions_item = ( - check_update_incident_permission_set_data_attributes_private_incident_permissions_item( - private_incident_permissions_item_data + private_incident_permissions: ( + list[UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem] | Unset + ) = UNSET + if _private_incident_permissions is not UNSET: + private_incident_permissions = [] + for private_incident_permissions_item_data in _private_incident_permissions: + private_incident_permissions_item = ( + check_update_incident_permission_set_data_attributes_private_incident_permissions_item( + private_incident_permissions_item_data + ) ) - ) - private_incident_permissions.append(private_incident_permissions_item) + private_incident_permissions.append(private_incident_permissions_item) - public_incident_permissions = [] _public_incident_permissions = d.pop("public_incident_permissions", UNSET) - for public_incident_permissions_item_data in _public_incident_permissions or []: - public_incident_permissions_item = ( - check_update_incident_permission_set_data_attributes_public_incident_permissions_item( - public_incident_permissions_item_data + public_incident_permissions: ( + list[UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem] | Unset + ) = UNSET + if _public_incident_permissions is not UNSET: + public_incident_permissions = [] + for public_incident_permissions_item_data in _public_incident_permissions: + public_incident_permissions_item = ( + check_update_incident_permission_set_data_attributes_public_incident_permissions_item( + public_incident_permissions_item_data + ) ) - ) - public_incident_permissions.append(public_incident_permissions_item) + public_incident_permissions.append(public_incident_permissions_item) update_incident_permission_set_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/update_incident_permission_set_resource.py b/rootly_sdk/models/update_incident_permission_set_resource.py index f0cec4e5..6d8dbb88 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource.py +++ b/rootly_sdk/models/update_incident_permission_set_resource.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentPermissionSetResource: data (UpdateIncidentPermissionSetResourceData): """ - data: "UpdateIncidentPermissionSetResourceData" + data: UpdateIncidentPermissionSetResourceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_permission_set_resource_data.py b/rootly_sdk/models/update_incident_permission_set_resource_data.py index 2f7048c5..23a5d8fc 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateIncidentPermissionSetResourceData: """ type_: UpdateIncidentPermissionSetResourceDataType - attributes: "UpdateIncidentPermissionSetResourceDataAttributes" + attributes: UpdateIncidentPermissionSetResourceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py b/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py index a1a06597..f47741a6 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -22,21 +24,21 @@ class UpdateIncidentPermissionSetResourceDataAttributes: """ Attributes: - kind (Union[Unset, UpdateIncidentPermissionSetResourceDataAttributesKind]): - private (Union[Unset, bool]): - resource_id (Union[Unset, str]): - resource_type (Union[Unset, str]): - severity_params (Union[Unset, UpdateIncidentPermissionSetResourceDataAttributesSeverityParams]): + kind (UpdateIncidentPermissionSetResourceDataAttributesKind | Unset): + private (bool | Unset): + resource_id (str | Unset): + resource_type (str | Unset): + severity_params (UpdateIncidentPermissionSetResourceDataAttributesSeverityParams | Unset): """ - kind: Unset | UpdateIncidentPermissionSetResourceDataAttributesKind = UNSET - private: Unset | bool = UNSET - resource_id: Unset | str = UNSET - resource_type: Unset | str = UNSET - severity_params: Union[Unset, "UpdateIncidentPermissionSetResourceDataAttributesSeverityParams"] = UNSET + kind: UpdateIncidentPermissionSetResourceDataAttributesKind | Unset = UNSET + private: bool | Unset = UNSET + resource_id: str | Unset = UNSET + resource_type: str | Unset = UNSET + severity_params: UpdateIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: resource_type = self.resource_type - severity_params: Unset | dict[str, Any] = UNSET + severity_params: dict[str, Any] | Unset = UNSET if not isinstance(self.severity_params, Unset): severity_params = self.severity_params.to_dict() @@ -74,7 +76,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateIncidentPermissionSetResourceDataAttributesKind + kind: UpdateIncidentPermissionSetResourceDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: resource_type = d.pop("resource_type", UNSET) _severity_params = d.pop("severity_params", UNSET) - severity_params: Unset | UpdateIncidentPermissionSetResourceDataAttributesSeverityParams + severity_params: UpdateIncidentPermissionSetResourceDataAttributesSeverityParams | Unset if isinstance(_severity_params, Unset): severity_params = UNSET else: diff --git a/rootly_sdk/models/update_incident_permission_set_resource_data_attributes_severity_params.py b/rootly_sdk/models/update_incident_permission_set_resource_data_attributes_severity_params.py index eb5ea221..68d171f5 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data_attributes_severity_params.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data_attributes_severity_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,18 +15,18 @@ class UpdateIncidentPermissionSetResourceDataAttributesSeverityParams: """ Attributes: - fully_enabled (Union[Unset, bool]): Whether permissions are enabled for any severity incident Default: True. - create_enabled (Union[Unset, bool]): Whether permissions are enabled when creating incident Default: False. - applies_to_unassigned (Union[Unset, bool]): Whether permissions are enabled for incident without severity - Default: True. - severity_ids (Union[None, Unset, list[str]]): Severity ids that determine if an incident is permitted based on + fully_enabled (bool | Unset): Whether permissions are enabled for any severity incident Default: True. + create_enabled (bool | Unset): Whether permissions are enabled when creating incident Default: False. + applies_to_unassigned (bool | Unset): Whether permissions are enabled for incident without severity Default: + True. + severity_ids (list[str] | None | Unset): Severity ids that determine if an incident is permitted based on matching severity """ - fully_enabled: Unset | bool = True - create_enabled: Unset | bool = False - applies_to_unassigned: Unset | bool = True - severity_ids: None | Unset | list[str] = UNSET + fully_enabled: bool | Unset = True + create_enabled: bool | Unset = False + applies_to_unassigned: bool | Unset = True + severity_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: applies_to_unassigned = self.applies_to_unassigned - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -66,7 +68,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: applies_to_unassigned = d.pop("applies_to_unassigned", UNSET) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -77,9 +79,9 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) diff --git a/rootly_sdk/models/update_incident_post_mortem.py b/rootly_sdk/models/update_incident_post_mortem.py index 72c00f08..8e6878f2 100644 --- a/rootly_sdk/models/update_incident_post_mortem.py +++ b/rootly_sdk/models/update_incident_post_mortem.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentPostMortem: data (UpdateIncidentPostMortemData): """ - data: "UpdateIncidentPostMortemData" + data: UpdateIncidentPostMortemData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_post_mortem_data.py b/rootly_sdk/models/update_incident_post_mortem_data.py index fd65235d..5db885c3 100644 --- a/rootly_sdk/models/update_incident_post_mortem_data.py +++ b/rootly_sdk/models/update_incident_post_mortem_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentPostMortemData: """ type_: UpdateIncidentPostMortemDataType - attributes: "UpdateIncidentPostMortemDataAttributes" + attributes: UpdateIncidentPostMortemDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_post_mortem_data_attributes.py b/rootly_sdk/models/update_incident_post_mortem_data_attributes.py index 231645bc..d251d7ec 100644 --- a/rootly_sdk/models/update_incident_post_mortem_data_attributes.py +++ b/rootly_sdk/models/update_incident_post_mortem_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,61 +18,61 @@ class UpdateIncidentPostMortemDataAttributes: """ Attributes: - title (Union[Unset, str]): The title of the incident retrospective - status (Union[Unset, UpdateIncidentPostMortemDataAttributesStatus]): The status of the incident retrospective - started_at (Union[None, Unset, str]): Date of started at - mitigated_at (Union[None, Unset, str]): Date of mitigation - resolved_at (Union[None, Unset, str]): Date of resolution - show_timeline (Union[Unset, bool]): Show events timeline of the incident retrospective - show_timeline_trail (Union[Unset, bool]): Show trail events in the timeline of the incident retrospective - show_timeline_genius (Union[Unset, bool]): Show workflow events in the timeline of the incident retrospective - show_timeline_tasks (Union[Unset, bool]): Show tasks in the timeline of the incident retrospective - show_timeline_action_items (Union[Unset, bool]): Show action items in the timeline of the incident retrospective - show_services_impacted (Union[Unset, bool]): Show functionalities impacted of the incident retrospective - show_functionalities_impacted (Union[Unset, bool]): Show services impacted of the incident retrospective - show_groups_impacted (Union[Unset, bool]): Show groups impacted of the incident retrospective - show_alerts_attached (Union[Unset, bool]): Show alerts attached to the incident - show_action_items (Union[Unset, bool]): Show action items (follow-ups) in the incident retrospective - cause_ids (Union[None, Unset, list[str]]): The Cause IDs to attach to the incident retrospective + title (str | Unset): The title of the incident retrospective + status (UpdateIncidentPostMortemDataAttributesStatus | Unset): The status of the incident retrospective + started_at (None | str | Unset): Date of started at + mitigated_at (None | str | Unset): Date of mitigation + resolved_at (None | str | Unset): Date of resolution + show_timeline (bool | Unset): Show events timeline of the incident retrospective + show_timeline_trail (bool | Unset): Show trail events in the timeline of the incident retrospective + show_timeline_genius (bool | Unset): Show workflow events in the timeline of the incident retrospective + show_timeline_tasks (bool | Unset): Show tasks in the timeline of the incident retrospective + show_timeline_action_items (bool | Unset): Show action items in the timeline of the incident retrospective + show_services_impacted (bool | Unset): Show functionalities impacted of the incident retrospective + show_functionalities_impacted (bool | Unset): Show services impacted of the incident retrospective + show_groups_impacted (bool | Unset): Show groups impacted of the incident retrospective + show_alerts_attached (bool | Unset): Show alerts attached to the incident + show_action_items (bool | Unset): Show action items (follow-ups) in the incident retrospective + cause_ids (list[str] | None | Unset): The Cause IDs to attach to the incident retrospective """ - title: Unset | str = UNSET - status: Unset | UpdateIncidentPostMortemDataAttributesStatus = UNSET - started_at: None | Unset | str = UNSET - mitigated_at: None | Unset | str = UNSET - resolved_at: None | Unset | str = UNSET - show_timeline: Unset | bool = UNSET - show_timeline_trail: Unset | bool = UNSET - show_timeline_genius: Unset | bool = UNSET - show_timeline_tasks: Unset | bool = UNSET - show_timeline_action_items: Unset | bool = UNSET - show_services_impacted: Unset | bool = UNSET - show_functionalities_impacted: Unset | bool = UNSET - show_groups_impacted: Unset | bool = UNSET - show_alerts_attached: Unset | bool = UNSET - show_action_items: Unset | bool = UNSET - cause_ids: None | Unset | list[str] = UNSET + title: str | Unset = UNSET + status: UpdateIncidentPostMortemDataAttributesStatus | Unset = UNSET + started_at: None | str | Unset = UNSET + mitigated_at: None | str | Unset = UNSET + resolved_at: None | str | Unset = UNSET + show_timeline: bool | Unset = UNSET + show_timeline_trail: bool | Unset = UNSET + show_timeline_genius: bool | Unset = UNSET + show_timeline_tasks: bool | Unset = UNSET + show_timeline_action_items: bool | Unset = UNSET + show_services_impacted: bool | Unset = UNSET + show_functionalities_impacted: bool | Unset = UNSET + show_groups_impacted: bool | Unset = UNSET + show_alerts_attached: bool | Unset = UNSET + show_action_items: bool | Unset = UNSET + cause_ids: list[str] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - mitigated_at: None | Unset | str + mitigated_at: None | str | Unset if isinstance(self.mitigated_at, Unset): mitigated_at = UNSET else: mitigated_at = self.mitigated_at - resolved_at: None | Unset | str + resolved_at: None | str | Unset if isinstance(self.resolved_at, Unset): resolved_at = UNSET else: @@ -96,7 +98,7 @@ def to_dict(self) -> dict[str, Any]: show_action_items = self.show_action_items - cause_ids: None | Unset | list[str] + cause_ids: list[str] | None | Unset if isinstance(self.cause_ids, Unset): cause_ids = UNSET elif isinstance(self.cause_ids, list): @@ -149,36 +151,36 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdateIncidentPostMortemDataAttributesStatus + status: UpdateIncidentPostMortemDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_update_incident_post_mortem_data_attributes_status(_status) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_mitigated_at(data: object) -> None | Unset | str: + def _parse_mitigated_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigated_at = _parse_mitigated_at(d.pop("mitigated_at", UNSET)) - def _parse_resolved_at(data: object) -> None | Unset | str: + def _parse_resolved_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) @@ -202,7 +204,7 @@ def _parse_resolved_at(data: object) -> None | Unset | str: show_action_items = d.pop("show_action_items", UNSET) - def _parse_cause_ids(data: object) -> None | Unset | list[str]: + def _parse_cause_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -213,9 +215,9 @@ def _parse_cause_ids(data: object) -> None | Unset | list[str]: cause_ids_type_0 = cast(list[str], data) return cause_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) cause_ids = _parse_cause_ids(d.pop("cause_ids", UNSET)) diff --git a/rootly_sdk/models/update_incident_postmortem_task_params.py b/rootly_sdk/models/update_incident_postmortem_task_params.py index 8d742a44..5a56484c 100644 --- a/rootly_sdk/models/update_incident_postmortem_task_params.py +++ b/rootly_sdk/models/update_incident_postmortem_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,31 +20,31 @@ class UpdateIncidentPostmortemTaskParams: """ Attributes: postmortem_id (str): UUID of the retrospective that needs to be updated - task_type (Union[Unset, UpdateIncidentPostmortemTaskParamsTaskType]): - title (Union[None, Unset, str]): The incident title - status (Union[None, Unset, str]): + task_type (UpdateIncidentPostmortemTaskParamsTaskType | Unset): + title (None | str | Unset): The incident title + status (None | str | Unset): """ postmortem_id: str - task_type: Unset | UpdateIncidentPostmortemTaskParamsTaskType = UNSET - title: None | Unset | str = UNSET - status: None | Unset | str = UNSET + task_type: UpdateIncidentPostmortemTaskParamsTaskType | Unset = UNSET + title: None | str | Unset = UNSET + status: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: postmortem_id = self.postmortem_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - status: None | Unset | str + status: None | str | Unset if isinstance(self.status, Unset): status = UNSET else: @@ -70,27 +72,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: postmortem_id = d.pop("postmortem_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateIncidentPostmortemTaskParamsTaskType + task_type: UpdateIncidentPostmortemTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_update_incident_postmortem_task_params_task_type(_task_type) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) - def _parse_status(data: object) -> None | Unset | str: + def _parse_status(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) status = _parse_status(d.pop("status", UNSET)) diff --git a/rootly_sdk/models/update_incident_retrospective_step.py b/rootly_sdk/models/update_incident_retrospective_step.py index 827c9e77..995c4650 100644 --- a/rootly_sdk/models/update_incident_retrospective_step.py +++ b/rootly_sdk/models/update_incident_retrospective_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentRetrospectiveStep: data (UpdateIncidentRetrospectiveStepData): """ - data: "UpdateIncidentRetrospectiveStepData" + data: UpdateIncidentRetrospectiveStepData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_retrospective_step_data.py b/rootly_sdk/models/update_incident_retrospective_step_data.py index 2f3cfdce..86de0c1f 100644 --- a/rootly_sdk/models/update_incident_retrospective_step_data.py +++ b/rootly_sdk/models/update_incident_retrospective_step_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateIncidentRetrospectiveStepData: """ type_: UpdateIncidentRetrospectiveStepDataType - attributes: "UpdateIncidentRetrospectiveStepDataAttributes" + attributes: UpdateIncidentRetrospectiveStepDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_retrospective_step_data_attributes.py b/rootly_sdk/models/update_incident_retrospective_step_data_attributes.py index 9b8c22d6..f9ada1a8 100644 --- a/rootly_sdk/models/update_incident_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/update_incident_retrospective_step_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,38 +18,37 @@ class UpdateIncidentRetrospectiveStepDataAttributes: """ Attributes: - title (Union[Unset, str]): The name of the incident retrospective step - description (Union[None, Unset, str]): The description of the incident retrospective step - due_date (Union[None, Unset, str]): Due date - position (Union[None, Unset, int]): Position of the step - skippable (Union[Unset, bool]): Is the step skippable? - status (Union[Unset, UpdateIncidentRetrospectiveStepDataAttributesStatus]): Status of the incident retrospective - step + title (str | Unset): The name of the incident retrospective step + description (None | str | Unset): The description of the incident retrospective step + due_date (None | str | Unset): Due date + position (int | None | Unset): Position of the step + skippable (bool | Unset): Is the step skippable? + status (UpdateIncidentRetrospectiveStepDataAttributesStatus | Unset): Status of the incident retrospective step """ - title: Unset | str = UNSET - description: None | Unset | str = UNSET - due_date: None | Unset | str = UNSET - position: None | Unset | int = UNSET - skippable: Unset | bool = UNSET - status: Unset | UpdateIncidentRetrospectiveStepDataAttributesStatus = UNSET + title: str | Unset = UNSET + description: None | str | Unset = UNSET + due_date: None | str | Unset = UNSET + position: int | None | Unset = UNSET + skippable: bool | Unset = UNSET + status: UpdateIncidentRetrospectiveStepDataAttributesStatus | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - due_date: None | Unset | str + due_date: None | str | Unset if isinstance(self.due_date, Unset): due_date = UNSET else: due_date = self.due_date - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -55,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: skippable = self.skippable - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status @@ -82,37 +83,37 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_due_date(data: object) -> None | Unset | str: + def _parse_due_date(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) due_date = _parse_due_date(d.pop("due_date", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) skippable = d.pop("skippable", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdateIncidentRetrospectiveStepDataAttributesStatus + status: UpdateIncidentRetrospectiveStepDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/rootly_sdk/models/update_incident_role.py b/rootly_sdk/models/update_incident_role.py index 49bef496..def8f62b 100644 --- a/rootly_sdk/models/update_incident_role.py +++ b/rootly_sdk/models/update_incident_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentRole: data (UpdateIncidentRoleData): """ - data: "UpdateIncidentRoleData" + data: UpdateIncidentRoleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_role_data.py b/rootly_sdk/models/update_incident_role_data.py index 7265f0ef..ceacc331 100644 --- a/rootly_sdk/models/update_incident_role_data.py +++ b/rootly_sdk/models/update_incident_role_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateIncidentRoleData: """ type_: UpdateIncidentRoleDataType - attributes: "UpdateIncidentRoleDataAttributes" + attributes: UpdateIncidentRoleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_role_data_attributes.py b/rootly_sdk/models/update_incident_role_data_attributes.py index 9b08ecf1..fdac0c55 100644 --- a/rootly_sdk/models/update_incident_role_data_attributes.py +++ b/rootly_sdk/models/update_incident_role_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,39 +14,39 @@ class UpdateIncidentRoleDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the incident role - summary (Union[None, Unset, str]): The summary of the incident role - description (Union[None, Unset, str]): The description of the incident role - position (Union[None, Unset, int]): Position of the incident role - optional (Union[Unset, bool]): - enabled (Union[Unset, bool]): - allow_multi_user_assignment (Union[Unset, bool]): + name (str | Unset): The name of the incident role + summary (None | str | Unset): The summary of the incident role + description (None | str | Unset): The description of the incident role + position (int | None | Unset): Position of the incident role + optional (bool | Unset): + enabled (bool | Unset): + allow_multi_user_assignment (bool | Unset): """ - name: Unset | str = UNSET - summary: None | Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET - optional: Unset | bool = UNSET - enabled: Unset | bool = UNSET - allow_multi_user_assignment: Unset | bool = UNSET + name: str | Unset = UNSET + summary: None | str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + optional: bool | Unset = UNSET + enabled: bool | Unset = UNSET + allow_multi_user_assignment: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -81,30 +83,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_incident_role_task.py b/rootly_sdk/models/update_incident_role_task.py index 4e894747..74a9c2ef 100644 --- a/rootly_sdk/models/update_incident_role_task.py +++ b/rootly_sdk/models/update_incident_role_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentRoleTask: data (UpdateIncidentRoleTaskData): """ - data: "UpdateIncidentRoleTaskData" + data: UpdateIncidentRoleTaskData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_role_task_data.py b/rootly_sdk/models/update_incident_role_task_data.py index e9c545b9..3ab56f62 100644 --- a/rootly_sdk/models/update_incident_role_task_data.py +++ b/rootly_sdk/models/update_incident_role_task_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentRoleTaskData: """ type_: UpdateIncidentRoleTaskDataType - attributes: "UpdateIncidentRoleTaskDataAttributes" + attributes: UpdateIncidentRoleTaskDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_role_task_data_attributes.py b/rootly_sdk/models/update_incident_role_task_data_attributes.py index 877ac36e..2fda2b91 100644 --- a/rootly_sdk/models/update_incident_role_task_data_attributes.py +++ b/rootly_sdk/models/update_incident_role_task_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,25 +18,25 @@ class UpdateIncidentRoleTaskDataAttributes: """ Attributes: - task (Union[Unset, str]): The task of the incident task - description (Union[None, Unset, str]): The description of the incident task - priority (Union[Unset, UpdateIncidentRoleTaskDataAttributesPriority]): The priority of the incident task + task (str | Unset): The task of the incident task + description (None | str | Unset): The description of the incident task + priority (UpdateIncidentRoleTaskDataAttributesPriority | Unset): The priority of the incident task """ - task: Unset | str = UNSET - description: None | Unset | str = UNSET - priority: Unset | UpdateIncidentRoleTaskDataAttributesPriority = UNSET + task: str | Unset = UNSET + description: None | str | Unset = UNSET + priority: UpdateIncidentRoleTaskDataAttributesPriority | Unset = UNSET def to_dict(self) -> dict[str, Any]: task = self.task - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority @@ -55,17 +57,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) task = d.pop("task", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateIncidentRoleTaskDataAttributesPriority + priority: UpdateIncidentRoleTaskDataAttributesPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/update_incident_status_page_event.py b/rootly_sdk/models/update_incident_status_page_event.py index a1a6fb34..8a46a60d 100644 --- a/rootly_sdk/models/update_incident_status_page_event.py +++ b/rootly_sdk/models/update_incident_status_page_event.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentStatusPageEvent: data (UpdateIncidentStatusPageEventData): """ - data: "UpdateIncidentStatusPageEventData" + data: UpdateIncidentStatusPageEventData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_status_page_event_data.py b/rootly_sdk/models/update_incident_status_page_event_data.py index 1d378c39..d0aaae07 100644 --- a/rootly_sdk/models/update_incident_status_page_event_data.py +++ b/rootly_sdk/models/update_incident_status_page_event_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentStatusPageEventData: """ type_: UpdateIncidentStatusPageEventDataType - attributes: "UpdateIncidentStatusPageEventDataAttributes" + attributes: UpdateIncidentStatusPageEventDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_status_page_event_data_attributes.py b/rootly_sdk/models/update_incident_status_page_event_data_attributes.py index 4a7a6832..9fd6247f 100644 --- a/rootly_sdk/models/update_incident_status_page_event_data_attributes.py +++ b/rootly_sdk/models/update_incident_status_page_event_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,36 +18,36 @@ class UpdateIncidentStatusPageEventDataAttributes: """ Attributes: - event (Union[Unset, str]): The summary of the incident event - status_page_id (Union[Unset, str]): Unique ID of the status page you wish to post the event to - status (Union[Unset, UpdateIncidentStatusPageEventDataAttributesStatus]): The status of the incident event - notify_subscribers (Union[None, Unset, bool]): Notify all status pages subscribers Default: False. - should_tweet (Union[None, Unset, bool]): For Statuspage.io integrated pages auto publishes a tweet for your - update Default: False. + event (str | Unset): The summary of the incident event + status_page_id (str | Unset): Unique ID of the status page you wish to post the event to + status (UpdateIncidentStatusPageEventDataAttributesStatus | Unset): The status of the incident event + notify_subscribers (bool | None | Unset): Notify all status pages subscribers Default: False. + should_tweet (bool | None | Unset): For Statuspage.io integrated pages auto publishes a tweet for your update + Default: False. """ - event: Unset | str = UNSET - status_page_id: Unset | str = UNSET - status: Unset | UpdateIncidentStatusPageEventDataAttributesStatus = UNSET - notify_subscribers: None | Unset | bool = False - should_tweet: None | Unset | bool = False + event: str | Unset = UNSET + status_page_id: str | Unset = UNSET + status: UpdateIncidentStatusPageEventDataAttributesStatus | Unset = UNSET + notify_subscribers: bool | None | Unset = False + should_tweet: bool | None | Unset = False def to_dict(self) -> dict[str, Any]: event = self.event status_page_id = self.status_page_id - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - notify_subscribers: None | Unset | bool + notify_subscribers: bool | None | Unset if isinstance(self.notify_subscribers, Unset): notify_subscribers = UNSET else: notify_subscribers = self.notify_subscribers - should_tweet: None | Unset | bool + should_tweet: bool | None | Unset if isinstance(self.should_tweet, Unset): should_tweet = UNSET else: @@ -75,27 +77,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_page_id = d.pop("status_page_id", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdateIncidentStatusPageEventDataAttributesStatus + status: UpdateIncidentStatusPageEventDataAttributesStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_update_incident_status_page_event_data_attributes_status(_status) - def _parse_notify_subscribers(data: object) -> None | Unset | bool: + def _parse_notify_subscribers(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) notify_subscribers = _parse_notify_subscribers(d.pop("notify_subscribers", UNSET)) - def _parse_should_tweet(data: object) -> None | Unset | bool: + def _parse_should_tweet(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) should_tweet = _parse_should_tweet(d.pop("should_tweet", UNSET)) diff --git a/rootly_sdk/models/update_incident_status_timestamp_task_params.py b/rootly_sdk/models/update_incident_status_timestamp_task_params.py index dca1d18e..552fe4a7 100644 --- a/rootly_sdk/models/update_incident_status_timestamp_task_params.py +++ b/rootly_sdk/models/update_incident_status_timestamp_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -19,12 +21,12 @@ class UpdateIncidentStatusTimestampTaskParams: Attributes: sub_status_id (str): Sub-status to update timestamp for assigned_at (str): Timestamp of when the sub-status was assigned - task_type (Union[Unset, UpdateIncidentStatusTimestampTaskParamsTaskType]): + task_type (UpdateIncidentStatusTimestampTaskParamsTaskType | Unset): """ sub_status_id: str assigned_at: str - task_type: Unset | UpdateIncidentStatusTimestampTaskParamsTaskType = UNSET + task_type: UpdateIncidentStatusTimestampTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: assigned_at = self.assigned_at - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -57,7 +59,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assigned_at = d.pop("assigned_at") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateIncidentStatusTimestampTaskParamsTaskType + task_type: UpdateIncidentStatusTimestampTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_incident_sub_status.py b/rootly_sdk/models/update_incident_sub_status.py index 1e107b9b..c78415a3 100644 --- a/rootly_sdk/models/update_incident_sub_status.py +++ b/rootly_sdk/models/update_incident_sub_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentSubStatus: data (UpdateIncidentSubStatusData): """ - data: "UpdateIncidentSubStatusData" + data: UpdateIncidentSubStatusData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_sub_status_data.py b/rootly_sdk/models/update_incident_sub_status_data.py index 36c0e79c..3ec4d4a2 100644 --- a/rootly_sdk/models/update_incident_sub_status_data.py +++ b/rootly_sdk/models/update_incident_sub_status_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateIncidentSubStatusData: """ type_: UpdateIncidentSubStatusDataType - attributes: "UpdateIncidentSubStatusDataAttributes" + attributes: UpdateIncidentSubStatusDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_sub_status_data_attributes.py b/rootly_sdk/models/update_incident_sub_status_data_attributes.py index bac58bb0..b3b42330 100644 --- a/rootly_sdk/models/update_incident_sub_status_data_attributes.py +++ b/rootly_sdk/models/update_incident_sub_status_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,23 +14,23 @@ class UpdateIncidentSubStatusDataAttributes: """ Attributes: - sub_status_id (Union[Unset, str]): Note: To change an incident's sub-status, use the PATCH /incidents/:id - endpoint and set the sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's - sub-status was assigned. - assigned_at (Union[Unset, str]): - assigned_by_user_id (Union[None, Unset, int]): + sub_status_id (str | Unset): Note: To change an incident's sub-status, use the PATCH /incidents/:id endpoint and + set the sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's sub-status + was assigned. + assigned_at (str | Unset): + assigned_by_user_id (int | None | Unset): """ - sub_status_id: Unset | str = UNSET - assigned_at: Unset | str = UNSET - assigned_by_user_id: None | Unset | int = UNSET + sub_status_id: str | Unset = UNSET + assigned_at: str | Unset = UNSET + assigned_by_user_id: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: sub_status_id = self.sub_status_id assigned_at = self.assigned_at - assigned_by_user_id: None | Unset | int + assigned_by_user_id: int | None | Unset if isinstance(self.assigned_by_user_id, Unset): assigned_by_user_id = UNSET else: @@ -53,12 +55,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assigned_at = d.pop("assigned_at", UNSET) - def _parse_assigned_by_user_id(data: object) -> None | Unset | int: + def _parse_assigned_by_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) assigned_by_user_id = _parse_assigned_by_user_id(d.pop("assigned_by_user_id", UNSET)) diff --git a/rootly_sdk/models/update_incident_task_params.py b/rootly_sdk/models/update_incident_task_params.py index 65baa1d0..e2d5cdc3 100644 --- a/rootly_sdk/models/update_incident_task_params.py +++ b/rootly_sdk/models/update_incident_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -22,84 +24,84 @@ class UpdateIncidentTaskParams: """ Attributes: incident_id (str): The incident id to update or id of any attribute on the incident - task_type (Union[Unset, UpdateIncidentTaskParamsTaskType]): - attribute_to_query_by (Union[Unset, UpdateIncidentTaskParamsAttributeToQueryBy]): Default: 'id'. - title (Union[None, Unset, str]): The incident title - summary (Union[None, Unset, str]): The incident summary - status (Union[None, Unset, str]): - severity_id (Union[None, Unset, str]): - incident_type_ids (Union[None, Unset, list[str]]): - service_ids (Union[None, Unset, list[str]]): Array of service UUIDs - functionality_ids (Union[None, Unset, list[str]]): Array of functionality UUIDs - environment_ids (Union[None, Unset, list[str]]): - group_ids (Union[None, Unset, list[str]]): Array of group/team UUIDs - started_at (Union[None, Unset, str]): - detected_at (Union[None, Unset, str]): - acknowledged_at (Union[None, Unset, str]): - mitigated_at (Union[None, Unset, str]): - resolved_at (Union[None, Unset, str]): - private (Union[Unset, bool]): - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateIncidentTaskParamsTaskType | Unset): + attribute_to_query_by (UpdateIncidentTaskParamsAttributeToQueryBy | Unset): Default: 'id'. + title (None | str | Unset): The incident title + summary (None | str | Unset): The incident summary + status (None | str | Unset): + severity_id (None | str | Unset): + incident_type_ids (list[str] | None | Unset): + service_ids (list[str] | None | Unset): Array of service UUIDs + functionality_ids (list[str] | None | Unset): Array of functionality UUIDs + environment_ids (list[str] | None | Unset): + group_ids (list[str] | None | Unset): Array of group/team UUIDs + started_at (None | str | Unset): + detected_at (None | str | Unset): + acknowledged_at (None | str | Unset): + mitigated_at (None | str | Unset): + resolved_at (None | str | Unset): + private (bool | Unset): + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON. Use 'services', 'functionalities', or 'groups' keys with arrays of names/slugs for name/slug lookup """ incident_id: str - task_type: Unset | UpdateIncidentTaskParamsTaskType = UNSET - attribute_to_query_by: Unset | UpdateIncidentTaskParamsAttributeToQueryBy = "id" - title: None | Unset | str = UNSET - summary: None | Unset | str = UNSET - status: None | Unset | str = UNSET - severity_id: None | Unset | str = UNSET - incident_type_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - started_at: None | Unset | str = UNSET - detected_at: None | Unset | str = UNSET - acknowledged_at: None | Unset | str = UNSET - mitigated_at: None | Unset | str = UNSET - resolved_at: None | Unset | str = UNSET - private: Unset | bool = UNSET - custom_fields_mapping: None | Unset | str = UNSET + task_type: UpdateIncidentTaskParamsTaskType | Unset = UNSET + attribute_to_query_by: UpdateIncidentTaskParamsAttributeToQueryBy | Unset = "id" + title: None | str | Unset = UNSET + summary: None | str | Unset = UNSET + status: None | str | Unset = UNSET + severity_id: None | str | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + started_at: None | str | Unset = UNSET + detected_at: None | str | Unset = UNSET + acknowledged_at: None | str | Unset = UNSET + mitigated_at: None | str | Unset = UNSET + resolved_at: None | str | Unset = UNSET + private: bool | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: incident_id = self.incident_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - attribute_to_query_by: Unset | str = UNSET + attribute_to_query_by: str | Unset = UNSET if not isinstance(self.attribute_to_query_by, Unset): attribute_to_query_by = self.attribute_to_query_by - title: None | Unset | str + title: None | str | Unset if isinstance(self.title, Unset): title = UNSET else: title = self.title - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - status: None | Unset | str + status: None | str | Unset if isinstance(self.status, Unset): status = UNSET else: status = self.status - severity_id: None | Unset | str + severity_id: None | str | Unset if isinstance(self.severity_id, Unset): severity_id = UNSET else: severity_id = self.severity_id - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -108,7 +110,7 @@ def to_dict(self) -> dict[str, Any]: else: incident_type_ids = self.incident_type_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -117,7 +119,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -126,7 +128,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -135,7 +137,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -144,31 +146,31 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - detected_at: None | Unset | str + detected_at: None | str | Unset if isinstance(self.detected_at, Unset): detected_at = UNSET else: detected_at = self.detected_at - acknowledged_at: None | Unset | str + acknowledged_at: None | str | Unset if isinstance(self.acknowledged_at, Unset): acknowledged_at = UNSET else: acknowledged_at = self.acknowledged_at - mitigated_at: None | Unset | str + mitigated_at: None | str | Unset if isinstance(self.mitigated_at, Unset): mitigated_at = UNSET else: mitigated_at = self.mitigated_at - resolved_at: None | Unset | str + resolved_at: None | str | Unset if isinstance(self.resolved_at, Unset): resolved_at = UNSET else: @@ -176,7 +178,7 @@ def to_dict(self) -> dict[str, Any]: private = self.private - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -234,56 +236,56 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_id = d.pop("incident_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateIncidentTaskParamsTaskType + task_type: UpdateIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: task_type = check_update_incident_task_params_task_type(_task_type) _attribute_to_query_by = d.pop("attribute_to_query_by", UNSET) - attribute_to_query_by: Unset | UpdateIncidentTaskParamsAttributeToQueryBy + attribute_to_query_by: UpdateIncidentTaskParamsAttributeToQueryBy | Unset if isinstance(_attribute_to_query_by, Unset): attribute_to_query_by = UNSET else: attribute_to_query_by = check_update_incident_task_params_attribute_to_query_by(_attribute_to_query_by) - def _parse_title(data: object) -> None | Unset | str: + def _parse_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) title = _parse_title(d.pop("title", UNSET)) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_status(data: object) -> None | Unset | str: + def _parse_status(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) status = _parse_status(d.pop("status", UNSET)) - def _parse_severity_id(data: object) -> None | Unset | str: + def _parse_severity_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) severity_id = _parse_severity_id(d.pop("severity_id", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -294,13 +296,13 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -311,13 +313,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -328,13 +330,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -345,13 +347,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -362,65 +364,65 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_detected_at(data: object) -> None | Unset | str: + def _parse_detected_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) detected_at = _parse_detected_at(d.pop("detected_at", UNSET)) - def _parse_acknowledged_at(data: object) -> None | Unset | str: + def _parse_acknowledged_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) acknowledged_at = _parse_acknowledged_at(d.pop("acknowledged_at", UNSET)) - def _parse_mitigated_at(data: object) -> None | Unset | str: + def _parse_mitigated_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) mitigated_at = _parse_mitigated_at(d.pop("mitigated_at", UNSET)) - def _parse_resolved_at(data: object) -> None | Unset | str: + def _parse_resolved_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) resolved_at = _parse_resolved_at(d.pop("resolved_at", UNSET)) private = d.pop("private", UNSET) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/update_incident_type.py b/rootly_sdk/models/update_incident_type.py index 5f929508..0afb154c 100644 --- a/rootly_sdk/models/update_incident_type.py +++ b/rootly_sdk/models/update_incident_type.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateIncidentType: data (UpdateIncidentTypeData): """ - data: "UpdateIncidentTypeData" + data: UpdateIncidentTypeData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_type_data.py b/rootly_sdk/models/update_incident_type_data.py index db52b409..a5b901e9 100644 --- a/rootly_sdk/models/update_incident_type_data.py +++ b/rootly_sdk/models/update_incident_type_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateIncidentTypeData: """ type_: UpdateIncidentTypeDataType - attributes: "UpdateIncidentTypeDataAttributes" + attributes: UpdateIncidentTypeDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_incident_type_data_attributes.py b/rootly_sdk/models/update_incident_type_data_attributes.py index 31406768..1330e5e2 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes.py +++ b/rootly_sdk/models/update_incident_type_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -6,7 +8,9 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.update_incident_type_data_attributes_fields_item import UpdateIncidentTypeDataAttributesFieldsItem + from ..models.update_incident_type_data_attributes_properties_item import ( + UpdateIncidentTypeDataAttributesPropertiesItem, + ) from ..models.update_incident_type_data_attributes_slack_aliases_type_0_item import ( UpdateIncidentTypeDataAttributesSlackAliasesType0Item, ) @@ -22,50 +26,50 @@ class UpdateIncidentTypeDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the incident type - description (Union[None, Unset, str]): The description of the incident type - color (Union[None, Unset, str]): The hex color of the incident type - position (Union[None, Unset, int]): Position of the incident type - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the incident type - slack_channels (Union[None, Unset, list['UpdateIncidentTypeDataAttributesSlackChannelsType0Item']]): Slack - Channels associated with this incident type - slack_aliases (Union[None, Unset, list['UpdateIncidentTypeDataAttributesSlackAliasesType0Item']]): Slack Aliases + name (str | Unset): The name of the incident type + description (None | str | Unset): The description of the incident type + color (None | str | Unset): The hex color of the incident type + position (int | None | Unset): Position of the incident type + notify_emails (list[str] | None | Unset): Emails to attach to the incident type + slack_channels (list[UpdateIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this incident type - fields (Union[Unset, list['UpdateIncidentTypeDataAttributesFieldsItem']]): Array of field values for this + slack_aliases (list[UpdateIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases + associated with this incident type + properties (list[UpdateIncidentTypeDataAttributesPropertiesItem] | Unset): Array of property values for this incident type. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["UpdateIncidentTypeDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["UpdateIncidentTypeDataAttributesSlackAliasesType0Item"] = UNSET - fields: Unset | list["UpdateIncidentTypeDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[UpdateIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[UpdateIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + properties: list[UpdateIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -74,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -86,7 +90,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -98,12 +102,12 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -122,14 +126,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: field_dict["slack_aliases"] = slack_aliases - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.update_incident_type_data_attributes_fields_item import UpdateIncidentTypeDataAttributesFieldsItem + from ..models.update_incident_type_data_attributes_properties_item import ( + UpdateIncidentTypeDataAttributesPropertiesItem, + ) from ..models.update_incident_type_data_attributes_slack_aliases_type_0_item import ( UpdateIncidentTypeDataAttributesSlackAliasesType0Item, ) @@ -140,34 +146,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -178,15 +184,15 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["UpdateIncidentTypeDataAttributesSlackChannelsType0Item"]: + ) -> list[UpdateIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -204,15 +210,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateIncidentTypeDataAttributesSlackChannelsType0Item"], data) + return cast(list[UpdateIncidentTypeDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["UpdateIncidentTypeDataAttributesSlackAliasesType0Item"]: + ) -> list[UpdateIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -230,18 +236,20 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateIncidentTypeDataAttributesSlackAliasesType0Item"], data) + return cast(list[UpdateIncidentTypeDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateIncidentTypeDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateIncidentTypeDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_incident_type_data_attributes = cls( name=name, @@ -251,7 +259,7 @@ def _parse_slack_aliases( notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, - fields=fields, + properties=properties, ) return update_incident_type_data_attributes diff --git a/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py b/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py new file mode 100644 index 00000000..b4e47094 --- /dev/null +++ b/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateIncidentTypeDataAttributesPropertiesItem") + + +@_attrs_define +class UpdateIncidentTypeDataAttributesPropertiesItem: + """Set a value for a catalog property + + Attributes: + catalog_property_id (str): Catalog property ID + value (str): The property value + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + update_incident_type_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + update_incident_type_data_attributes_properties_item.additional_properties = d + return update_incident_type_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_incident_type_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/update_incident_type_data_attributes_slack_aliases_type_0_item.py index 8d6b5b13..749e159c 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/update_incident_type_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_incident_type_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/update_incident_type_data_attributes_slack_channels_type_0_item.py index b62bba36..549b1658 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/update_incident_type_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_jira_issue_task_params.py b/rootly_sdk/models/update_jira_issue_task_params.py index 27a3ad18..e31d15c1 100644 --- a/rootly_sdk/models/update_jira_issue_task_params.py +++ b/rootly_sdk/models/update_jira_issue_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,33 +26,33 @@ class UpdateJiraIssueTaskParams: Attributes: issue_id (str): The issue id project_key (str): The project key - task_type (Union[Unset, UpdateJiraIssueTaskParamsTaskType]): - title (Union[Unset, str]): The issue title - description (Union[Unset, str]): The issue description - labels (Union[Unset, str]): The issue labels - assign_user_email (Union[Unset, str]): The assigned user's email - reporter_user_email (Union[Unset, str]): The reporter user's email - due_date (Union[Unset, str]): The due date - priority (Union[Unset, UpdateJiraIssueTaskParamsPriority]): The priority id and display name - status (Union[Unset, UpdateJiraIssueTaskParamsStatus]): The status id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateJiraIssueTaskParamsTaskType | Unset): + title (str | Unset): The issue title + description (str | Unset): The issue description + labels (str | Unset): The issue labels + assign_user_email (str | Unset): The assigned user's email + reporter_user_email (str | Unset): The reporter user's email + due_date (str | Unset): The due date + priority (UpdateJiraIssueTaskParamsPriority | Unset): The priority id and display name + status (UpdateJiraIssueTaskParamsStatus | Unset): The status id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - update_payload (Union[None, Unset, str]): Update payload. Can contain liquid markup and need to be valid JSON + update_payload (None | str | Unset): Update payload. Can contain liquid markup and need to be valid JSON """ issue_id: str project_key: str - task_type: Unset | UpdateJiraIssueTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - labels: Unset | str = UNSET - assign_user_email: Unset | str = UNSET - reporter_user_email: Unset | str = UNSET - due_date: Unset | str = UNSET - priority: Union[Unset, "UpdateJiraIssueTaskParamsPriority"] = UNSET - status: Union[Unset, "UpdateJiraIssueTaskParamsStatus"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET - update_payload: None | Unset | str = UNSET + task_type: UpdateJiraIssueTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + labels: str | Unset = UNSET + assign_user_email: str | Unset = UNSET + reporter_user_email: str | Unset = UNSET + due_date: str | Unset = UNSET + priority: UpdateJiraIssueTaskParamsPriority | Unset = UNSET + status: UpdateJiraIssueTaskParamsStatus | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + update_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -58,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: project_key = self.project_key - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -74,21 +76,21 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - status: Unset | dict[str, Any] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - update_payload: None | Unset | str + update_payload: None | str | Unset if isinstance(self.update_payload, Unset): update_payload = UNSET else: @@ -138,7 +140,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: project_key = d.pop("project_key") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateJiraIssueTaskParamsTaskType + task_type: UpdateJiraIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -157,34 +159,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateJiraIssueTaskParamsPriority + priority: UpdateJiraIssueTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = UpdateJiraIssueTaskParamsPriority.from_dict(_priority) _status = d.pop("status", UNSET) - status: Unset | UpdateJiraIssueTaskParamsStatus + status: UpdateJiraIssueTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = UpdateJiraIssueTaskParamsStatus.from_dict(_status) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_update_payload(data: object) -> None | Unset | str: + def _parse_update_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_payload = _parse_update_payload(d.pop("update_payload", UNSET)) diff --git a/rootly_sdk/models/update_jira_issue_task_params_priority.py b/rootly_sdk/models/update_jira_issue_task_params_priority.py index f932d3d4..da36b28e 100644 --- a/rootly_sdk/models/update_jira_issue_task_params_priority.py +++ b/rootly_sdk/models/update_jira_issue_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateJiraIssueTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_jira_issue_task_params_status.py b/rootly_sdk/models/update_jira_issue_task_params_status.py index f7e32704..83ca7fdf 100644 --- a/rootly_sdk/models/update_jira_issue_task_params_status.py +++ b/rootly_sdk/models/update_jira_issue_task_params_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateJiraIssueTaskParamsStatus: """The status id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_linear_issue_task_params.py b/rootly_sdk/models/update_linear_issue_task_params.py index 6b6b97bb..38885133 100644 --- a/rootly_sdk/models/update_linear_issue_task_params.py +++ b/rootly_sdk/models/update_linear_issue_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,25 +27,25 @@ class UpdateLinearIssueTaskParams: """ Attributes: issue_id (str): The issue id - task_type (Union[Unset, UpdateLinearIssueTaskParamsTaskType]): - title (Union[Unset, str]): The issue title - description (Union[Unset, str]): The issue description - state (Union['UpdateLinearIssueTaskParamsStateType0', None, Unset]): The state id and display name - project (Union[Unset, UpdateLinearIssueTaskParamsProject]): The project id and display name - labels (Union[Unset, list['UpdateLinearIssueTaskParamsLabelsItem']]): - priority (Union[Unset, UpdateLinearIssueTaskParamsPriority]): The priority id and display name - assign_user_email (Union[Unset, str]): The assigned user's email + task_type (UpdateLinearIssueTaskParamsTaskType | Unset): + title (str | Unset): The issue title + description (str | Unset): The issue description + state (None | Unset | UpdateLinearIssueTaskParamsStateType0): The state id and display name + project (UpdateLinearIssueTaskParamsProject | Unset): The project id and display name + labels (list[UpdateLinearIssueTaskParamsLabelsItem] | Unset): + priority (UpdateLinearIssueTaskParamsPriority | Unset): The priority id and display name + assign_user_email (str | Unset): The assigned user's email """ issue_id: str - task_type: Unset | UpdateLinearIssueTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - state: Union["UpdateLinearIssueTaskParamsStateType0", None, Unset] = UNSET - project: Union[Unset, "UpdateLinearIssueTaskParamsProject"] = UNSET - labels: Unset | list["UpdateLinearIssueTaskParamsLabelsItem"] = UNSET - priority: Union[Unset, "UpdateLinearIssueTaskParamsPriority"] = UNSET - assign_user_email: Unset | str = UNSET + task_type: UpdateLinearIssueTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + state: None | Unset | UpdateLinearIssueTaskParamsStateType0 = UNSET + project: UpdateLinearIssueTaskParamsProject | Unset = UNSET + labels: list[UpdateLinearIssueTaskParamsLabelsItem] | Unset = UNSET + priority: UpdateLinearIssueTaskParamsPriority | Unset = UNSET + assign_user_email: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: issue_id = self.issue_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -59,7 +61,7 @@ def to_dict(self) -> dict[str, Any]: description = self.description - state: None | Unset | dict[str, Any] + state: dict[str, Any] | None | Unset if isinstance(self.state, Unset): state = UNSET elif isinstance(self.state, UpdateLinearIssueTaskParamsStateType0): @@ -67,18 +69,18 @@ def to_dict(self) -> dict[str, Any]: else: state = self.state - project: Unset | dict[str, Any] = UNSET + project: dict[str, Any] | Unset = UNSET if not isinstance(self.project, Unset): project = self.project.to_dict() - labels: Unset | list[dict[str, Any]] = UNSET + labels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: labels_item = labels_item_data.to_dict() labels.append(labels_item) - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() @@ -121,7 +123,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: issue_id = d.pop("issue_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateLinearIssueTaskParamsTaskType + task_type: UpdateLinearIssueTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -131,7 +133,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) - def _parse_state(data: object) -> Union["UpdateLinearIssueTaskParamsStateType0", None, Unset]: + def _parse_state(data: object) -> None | Unset | UpdateLinearIssueTaskParamsStateType0: if data is None: return data if isinstance(data, Unset): @@ -142,28 +144,30 @@ def _parse_state(data: object) -> Union["UpdateLinearIssueTaskParamsStateType0", state_type_0 = UpdateLinearIssueTaskParamsStateType0.from_dict(data) return state_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateLinearIssueTaskParamsStateType0", None, Unset], data) + return cast(None | Unset | UpdateLinearIssueTaskParamsStateType0, data) state = _parse_state(d.pop("state", UNSET)) _project = d.pop("project", UNSET) - project: Unset | UpdateLinearIssueTaskParamsProject + project: UpdateLinearIssueTaskParamsProject | Unset if isinstance(_project, Unset): project = UNSET else: project = UpdateLinearIssueTaskParamsProject.from_dict(_project) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: - labels_item = UpdateLinearIssueTaskParamsLabelsItem.from_dict(labels_item_data) + labels: list[UpdateLinearIssueTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = UpdateLinearIssueTaskParamsLabelsItem.from_dict(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateLinearIssueTaskParamsPriority + priority: UpdateLinearIssueTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/update_linear_issue_task_params_labels_item.py b/rootly_sdk/models/update_linear_issue_task_params_labels_item.py index 244efd9a..79c23c9d 100644 --- a/rootly_sdk/models/update_linear_issue_task_params_labels_item.py +++ b/rootly_sdk/models/update_linear_issue_task_params_labels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateLinearIssueTaskParamsLabelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_linear_issue_task_params_priority.py b/rootly_sdk/models/update_linear_issue_task_params_priority.py index 4ca581ca..f4b9cfd4 100644 --- a/rootly_sdk/models/update_linear_issue_task_params_priority.py +++ b/rootly_sdk/models/update_linear_issue_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateLinearIssueTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_linear_issue_task_params_project.py b/rootly_sdk/models/update_linear_issue_task_params_project.py index 7bea360a..d10f9177 100644 --- a/rootly_sdk/models/update_linear_issue_task_params_project.py +++ b/rootly_sdk/models/update_linear_issue_task_params_project.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateLinearIssueTaskParamsProject: """The project id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_linear_issue_task_params_state_type_0.py b/rootly_sdk/models/update_linear_issue_task_params_state_type_0.py index b18324bb..e5b7c643 100644 --- a/rootly_sdk/models/update_linear_issue_task_params_state_type_0.py +++ b/rootly_sdk/models/update_linear_issue_task_params_state_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateLinearIssueTaskParamsStateType0: """The state id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_live_call_router.py b/rootly_sdk/models/update_live_call_router.py index ab09a49a..ec0c1cb7 100644 --- a/rootly_sdk/models/update_live_call_router.py +++ b/rootly_sdk/models/update_live_call_router.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateLiveCallRouter: data (UpdateLiveCallRouterData): """ - data: "UpdateLiveCallRouterData" + data: UpdateLiveCallRouterData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_live_call_router_data.py b/rootly_sdk/models/update_live_call_router_data.py index 1fdba004..f0abf0c8 100644 --- a/rootly_sdk/models/update_live_call_router_data.py +++ b/rootly_sdk/models/update_live_call_router_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateLiveCallRouterData: """ type_: UpdateLiveCallRouterDataType - attributes: "UpdateLiveCallRouterDataAttributes" + attributes: UpdateLiveCallRouterDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_live_call_router_data_attributes.py b/rootly_sdk/models/update_live_call_router_data_attributes.py index 71fa8919..d318ccdc 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define @@ -37,53 +39,47 @@ class UpdateLiveCallRouterDataAttributes: """ Attributes: - kind (Union[Unset, UpdateLiveCallRouterDataAttributesKind]): The kind of the live_call_router - enabled (Union[Unset, bool]): Whether the live_call_router is enabled - name (Union[Unset, str]): The name of the live_call_router - country_code (Union[Unset, UpdateLiveCallRouterDataAttributesCountryCode]): The country code of the + kind (UpdateLiveCallRouterDataAttributesKind | Unset): The kind of the live_call_router + enabled (bool | Unset): Whether the live_call_router is enabled + name (str | Unset): The name of the live_call_router + country_code (UpdateLiveCallRouterDataAttributesCountryCode | Unset): The country code of the live_call_router + phone_type (UpdateLiveCallRouterDataAttributesPhoneType | Unset): The phone type of the live_call_router + voicemail_greeting (str | Unset): The voicemail greeting of the live_call_router + caller_greeting (str | Unset): The caller greeting message of the live_call_router + waiting_music_url (UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset): The waiting music URL of the live_call_router - phone_type (Union[Unset, UpdateLiveCallRouterDataAttributesPhoneType]): The phone type of the live_call_router - voicemail_greeting (Union[Unset, str]): The voicemail greeting of the live_call_router - caller_greeting (Union[Unset, str]): The caller greeting message of the live_call_router - waiting_music_url (Union[Unset, UpdateLiveCallRouterDataAttributesWaitingMusicUrl]): The waiting music URL of - the live_call_router - sent_to_voicemail_delay (Union[Unset, int]): The delay (seconds) after which the caller in redirected to - voicemail - should_redirect_to_voicemail_on_no_answer (Union[Unset, bool]): This prompts the caller to choose voicemail or - connect live - escalation_level_delay_in_seconds (Union[Unset, int]): This overrides the delay (seconds) in escalation levels - should_auto_resolve_alert_on_call_end (Union[Unset, bool]): This overrides the delay (seconds) in escalation - levels - alert_urgency_id (Union[Unset, str]): This is used in escalation paths to determine who to page - calling_tree_prompt (Union[Unset, str]): The audio instructions callers will hear when they call this number, + sent_to_voicemail_delay (int | Unset): The delay (seconds) after which the caller in redirected to voicemail + should_redirect_to_voicemail_on_no_answer (bool | Unset): This prompts the caller to choose voicemail or connect + live + escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels + should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels + alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page + calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number, prompting them to select from available options to route their call - paging_targets (Union[Unset, list['UpdateLiveCallRouterDataAttributesPagingTargetsItem']]): Paging targets that - callers can select from when this live call router is configured as a phone tree. - escalation_policy_trigger_params (Union[Unset, - UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams]): + paging_targets (list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset): Paging targets that callers + can select from when this live call router is configured as a phone tree. + escalation_policy_trigger_params (UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset): """ - kind: Unset | UpdateLiveCallRouterDataAttributesKind = UNSET - enabled: Unset | bool = UNSET - name: Unset | str = UNSET - country_code: Unset | UpdateLiveCallRouterDataAttributesCountryCode = UNSET - phone_type: Unset | UpdateLiveCallRouterDataAttributesPhoneType = UNSET - voicemail_greeting: Unset | str = UNSET - caller_greeting: Unset | str = UNSET - waiting_music_url: Unset | UpdateLiveCallRouterDataAttributesWaitingMusicUrl = UNSET - sent_to_voicemail_delay: Unset | int = UNSET - should_redirect_to_voicemail_on_no_answer: Unset | bool = UNSET - escalation_level_delay_in_seconds: Unset | int = UNSET - should_auto_resolve_alert_on_call_end: Unset | bool = UNSET - alert_urgency_id: Unset | str = UNSET - calling_tree_prompt: Unset | str = UNSET - paging_targets: Unset | list["UpdateLiveCallRouterDataAttributesPagingTargetsItem"] = UNSET - escalation_policy_trigger_params: Union[ - Unset, "UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams" - ] = UNSET + kind: UpdateLiveCallRouterDataAttributesKind | Unset = UNSET + enabled: bool | Unset = UNSET + name: str | Unset = UNSET + country_code: UpdateLiveCallRouterDataAttributesCountryCode | Unset = UNSET + phone_type: UpdateLiveCallRouterDataAttributesPhoneType | Unset = UNSET + voicemail_greeting: str | Unset = UNSET + caller_greeting: str | Unset = UNSET + waiting_music_url: UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset = UNSET + sent_to_voicemail_delay: int | Unset = UNSET + should_redirect_to_voicemail_on_no_answer: bool | Unset = UNSET + escalation_level_delay_in_seconds: int | Unset = UNSET + should_auto_resolve_alert_on_call_end: bool | Unset = UNSET + alert_urgency_id: str | Unset = UNSET + calling_tree_prompt: str | Unset = UNSET + paging_targets: list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset = UNSET + escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -91,11 +87,11 @@ def to_dict(self) -> dict[str, Any]: name = self.name - country_code: Unset | str = UNSET + country_code: str | Unset = UNSET if not isinstance(self.country_code, Unset): country_code = self.country_code - phone_type: Unset | str = UNSET + phone_type: str | Unset = UNSET if not isinstance(self.phone_type, Unset): phone_type = self.phone_type @@ -103,7 +99,7 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting - waiting_music_url: Unset | str = UNSET + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -119,14 +115,14 @@ def to_dict(self) -> dict[str, Any]: calling_tree_prompt = self.calling_tree_prompt - paging_targets: Unset | list[dict[str, Any]] = UNSET + paging_targets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.paging_targets, Unset): paging_targets = [] for paging_targets_item_data in self.paging_targets: paging_targets_item = paging_targets_item_data.to_dict() paging_targets.append(paging_targets_item) - escalation_policy_trigger_params: Unset | dict[str, Any] = UNSET + escalation_policy_trigger_params: dict[str, Any] | Unset = UNSET if not isinstance(self.escalation_policy_trigger_params, Unset): escalation_policy_trigger_params = self.escalation_policy_trigger_params.to_dict() @@ -179,7 +175,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateLiveCallRouterDataAttributesKind + kind: UpdateLiveCallRouterDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -190,14 +186,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _country_code = d.pop("country_code", UNSET) - country_code: Unset | UpdateLiveCallRouterDataAttributesCountryCode + country_code: UpdateLiveCallRouterDataAttributesCountryCode | Unset if isinstance(_country_code, Unset): country_code = UNSET else: country_code = check_update_live_call_router_data_attributes_country_code(_country_code) _phone_type = d.pop("phone_type", UNSET) - phone_type: Unset | UpdateLiveCallRouterDataAttributesPhoneType + phone_type: UpdateLiveCallRouterDataAttributesPhoneType | Unset if isinstance(_phone_type, Unset): phone_type = UNSET else: @@ -208,7 +204,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) _waiting_music_url = d.pop("waiting_music_url", UNSET) - waiting_music_url: Unset | UpdateLiveCallRouterDataAttributesWaitingMusicUrl + waiting_music_url: UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): waiting_music_url = UNSET else: @@ -226,17 +222,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) - paging_targets = [] _paging_targets = d.pop("paging_targets", UNSET) - for paging_targets_item_data in _paging_targets or []: - paging_targets_item = UpdateLiveCallRouterDataAttributesPagingTargetsItem.from_dict( - paging_targets_item_data - ) + paging_targets: list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset = UNSET + if _paging_targets is not UNSET: + paging_targets = [] + for paging_targets_item_data in _paging_targets: + paging_targets_item = UpdateLiveCallRouterDataAttributesPagingTargetsItem.from_dict( + paging_targets_item_data + ) - paging_targets.append(paging_targets_item) + paging_targets.append(paging_targets_item) _escalation_policy_trigger_params = d.pop("escalation_policy_trigger_params", UNSET) - escalation_policy_trigger_params: Unset | UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams + escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset if isinstance(_escalation_policy_trigger_params, Unset): escalation_policy_trigger_params = UNSET else: diff --git a/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py b/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py index 0008709c..b8093f2e 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes_country_code.py @@ -1,6 +1,6 @@ from typing import Literal, cast -UpdateLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "US"] +UpdateLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] UPDATE_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_COUNTRY_CODE_VALUES: set[UpdateLiveCallRouterDataAttributesCountryCode] = { "AU", @@ -9,6 +9,7 @@ "GB", "NL", "NZ", + "SE", "US", } diff --git a/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params.py b/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params.py index 91fca527..319b895f 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,7 +19,8 @@ class UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams: """ Attributes: id (str): The ID of notification target - type_ (UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType): The type of the notification target + type_ (UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType): The type of the notification + target. Please contact support if you encounter issues using `Functionality` as a target type. """ id: str diff --git a/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params_type.py b/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params_type.py index 2f2fcb7d..e0e1500c 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params_type.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes_escalation_policy_trigger_params_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType = Literal["EscalationPolicy", "Group", "Service"] +UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service" +] UPDATE_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_ESCALATION_POLICY_TRIGGER_PARAMS_TYPE_VALUES: set[ UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item.py b/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item.py index 013b72a0..2fc7b043 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -17,7 +19,8 @@ class UpdateLiveCallRouterDataAttributesPagingTargetsItem: """ Attributes: id (str): The ID of paging target - type_ (UpdateLiveCallRouterDataAttributesPagingTargetsItemType): The type of the paging target + type_ (UpdateLiveCallRouterDataAttributesPagingTargetsItemType): The type of the paging target. Please contact + support if you encounter issues using `functionality` as a target type. alert_urgency_id (str): This is used in escalation paths to determine who to page """ diff --git a/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item_type.py b/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item_type.py index 839e7d81..4ba48f88 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item_type.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes_paging_targets_item_type.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UpdateLiveCallRouterDataAttributesPagingTargetsItemType = Literal["escalation_policy", "service", "team"] +UpdateLiveCallRouterDataAttributesPagingTargetsItemType = Literal[ + "escalation_policy", "functionality", "service", "team" +] UPDATE_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_PAGING_TARGETS_ITEM_TYPE_VALUES: set[ UpdateLiveCallRouterDataAttributesPagingTargetsItemType ] = { "escalation_policy", + "functionality", "service", "team", } diff --git a/rootly_sdk/models/update_motion_task_task_params.py b/rootly_sdk/models/update_motion_task_task_params.py index 47b708b5..35906759 100644 --- a/rootly_sdk/models/update_motion_task_task_params.py +++ b/rootly_sdk/models/update_motion_task_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,29 +24,29 @@ class UpdateMotionTaskTaskParams: """ Attributes: task_id (str): The task id - task_type (Union[Unset, UpdateMotionTaskTaskParamsTaskType]): - title (Union[Unset, str]): The task title - description (Union[Unset, str]): The task description - labels (Union[Unset, list[str]]): - priority (Union[Unset, UpdateMotionTaskTaskParamsPriority]): The priority id and display name - duration (Union[Unset, str]): The duration. Eg. "NONE", "REMINDER", or a integer greater than 0. - due_date (Union[Unset, str]): The due date + task_type (UpdateMotionTaskTaskParamsTaskType | Unset): + title (str | Unset): The task title + description (str | Unset): The task description + labels (list[str] | Unset): + priority (UpdateMotionTaskTaskParamsPriority | Unset): The priority id and display name + duration (str | Unset): The duration. Eg. "NONE", "REMINDER", or a integer greater than 0. + due_date (str | Unset): The due date """ task_id: str - task_type: Unset | UpdateMotionTaskTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - labels: Unset | list[str] = UNSET - priority: Union[Unset, "UpdateMotionTaskTaskParamsPriority"] = UNSET - duration: Unset | str = UNSET - due_date: Unset | str = UNSET + task_type: UpdateMotionTaskTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + labels: list[str] | Unset = UNSET + priority: UpdateMotionTaskTaskParamsPriority | Unset = UNSET + duration: str | Unset = UNSET + due_date: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: task_id = self.task_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -52,11 +54,11 @@ def to_dict(self) -> dict[str, Any]: description = self.description - labels: Unset | list[str] = UNSET + labels: list[str] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() @@ -96,7 +98,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: task_id = d.pop("task_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateMotionTaskTaskParamsTaskType + task_type: UpdateMotionTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -109,7 +111,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: labels = cast(list[str], d.pop("labels", UNSET)) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateMotionTaskTaskParamsPriority + priority: UpdateMotionTaskTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/update_motion_task_task_params_priority.py b/rootly_sdk/models/update_motion_task_task_params_priority.py index 54667733..20e79aec 100644 --- a/rootly_sdk/models/update_motion_task_task_params_priority.py +++ b/rootly_sdk/models/update_motion_task_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateMotionTaskTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_notion_page_task_params.py b/rootly_sdk/models/update_notion_page_task_params.py index bfc0e927..89bd9a23 100644 --- a/rootly_sdk/models/update_notion_page_task_params.py +++ b/rootly_sdk/models/update_notion_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,28 +20,28 @@ class UpdateNotionPageTaskParams: """ Attributes: file_id (str): The Notion page ID - task_type (Union[Unset, UpdateNotionPageTaskParamsTaskType]): - title (Union[Unset, str]): The Notion page title - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when creating page task, if desired - content (Union[Unset, str]): Custom page content with liquid templating support. When provided, only this - content will be rendered (no default sections) - show_timeline_as_table (Union[Unset, bool]): - show_action_items_as_table (Union[Unset, bool]): + task_type (UpdateNotionPageTaskParamsTaskType | Unset): + title (str | Unset): The Notion page title + post_mortem_template_id (str | Unset): Retrospective template to use when creating page task, if desired + content (str | Unset): Custom page content with liquid templating support. When provided, only this content will + be rendered (no default sections) + show_timeline_as_table (bool | Unset): + show_action_items_as_table (bool | Unset): """ file_id: str - task_type: Unset | UpdateNotionPageTaskParamsTaskType = UNSET - title: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET - content: Unset | str = UNSET - show_timeline_as_table: Unset | bool = UNSET - show_action_items_as_table: Unset | bool = UNSET + task_type: UpdateNotionPageTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + content: str | Unset = UNSET + show_timeline_as_table: bool | Unset = UNSET + show_action_items_as_table: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -81,7 +83,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateNotionPageTaskParamsTaskType + task_type: UpdateNotionPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_on_call_pay_report.py b/rootly_sdk/models/update_on_call_pay_report.py new file mode 100644 index 00000000..9c488458 --- /dev/null +++ b/rootly_sdk/models/update_on_call_pay_report.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_on_call_pay_report_data import UpdateOnCallPayReportData + + +T = TypeVar("T", bound="UpdateOnCallPayReport") + + +@_attrs_define +class UpdateOnCallPayReport: + """ + Attributes: + data (UpdateOnCallPayReportData): + """ + + data: UpdateOnCallPayReportData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_on_call_pay_report_data import UpdateOnCallPayReportData + + d = dict(src_dict) + data = UpdateOnCallPayReportData.from_dict(d.pop("data")) + + update_on_call_pay_report = cls( + data=data, + ) + + update_on_call_pay_report.additional_properties = d + return update_on_call_pay_report + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_on_call_pay_report_data.py b/rootly_sdk/models/update_on_call_pay_report_data.py new file mode 100644 index 00000000..cb905403 --- /dev/null +++ b/rootly_sdk/models/update_on_call_pay_report_data.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_on_call_pay_report_data_type import ( + UpdateOnCallPayReportDataType, + check_update_on_call_pay_report_data_type, +) + +if TYPE_CHECKING: + from ..models.update_on_call_pay_report_data_attributes import UpdateOnCallPayReportDataAttributes + + +T = TypeVar("T", bound="UpdateOnCallPayReportData") + + +@_attrs_define +class UpdateOnCallPayReportData: + """ + Attributes: + type_ (UpdateOnCallPayReportDataType): + attributes (UpdateOnCallPayReportDataAttributes): + """ + + type_: UpdateOnCallPayReportDataType + attributes: UpdateOnCallPayReportDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_on_call_pay_report_data_attributes import UpdateOnCallPayReportDataAttributes + + d = dict(src_dict) + type_ = check_update_on_call_pay_report_data_type(d.pop("type")) + + attributes = UpdateOnCallPayReportDataAttributes.from_dict(d.pop("attributes")) + + update_on_call_pay_report_data = cls( + type_=type_, + attributes=attributes, + ) + + update_on_call_pay_report_data.additional_properties = d + return update_on_call_pay_report_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_on_call_pay_report_data_attributes.py b/rootly_sdk/models/update_on_call_pay_report_data_attributes.py new file mode 100644 index 00000000..24eb3009 --- /dev/null +++ b/rootly_sdk/models/update_on_call_pay_report_data_attributes.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateOnCallPayReportDataAttributes") + + +@_attrs_define +class UpdateOnCallPayReportDataAttributes: + """ + Attributes: + start_date (datetime.date | Unset): The start date for the report period. + end_date (datetime.date | Unset): The end date for the report period. + schedule_ids (list[str] | Unset): List of schedule UUIDs to scope the report. + """ + + start_date: datetime.date | Unset = UNSET + end_date: datetime.date | Unset = UNSET + schedule_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + start_date: str | Unset = UNSET + if not isinstance(self.start_date, Unset): + start_date = self.start_date.isoformat() + + end_date: str | Unset = UNSET + if not isinstance(self.end_date, Unset): + end_date = self.end_date.isoformat() + + schedule_ids: list[str] | Unset = UNSET + if not isinstance(self.schedule_ids, Unset): + schedule_ids = self.schedule_ids + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if start_date is not UNSET: + field_dict["start_date"] = start_date + if end_date is not UNSET: + field_dict["end_date"] = end_date + if schedule_ids is not UNSET: + field_dict["schedule_ids"] = schedule_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _start_date = d.pop("start_date", UNSET) + start_date: datetime.date | Unset + if isinstance(_start_date, Unset): + start_date = UNSET + else: + start_date = isoparse(_start_date).date() + + _end_date = d.pop("end_date", UNSET) + end_date: datetime.date | Unset + if isinstance(_end_date, Unset): + end_date = UNSET + else: + end_date = isoparse(_end_date).date() + + schedule_ids = cast(list[str], d.pop("schedule_ids", UNSET)) + + update_on_call_pay_report_data_attributes = cls( + start_date=start_date, + end_date=end_date, + schedule_ids=schedule_ids, + ) + + return update_on_call_pay_report_data_attributes diff --git a/rootly_sdk/models/update_on_call_pay_report_data_type.py b/rootly_sdk/models/update_on_call_pay_report_data_type.py new file mode 100644 index 00000000..369a592f --- /dev/null +++ b/rootly_sdk/models/update_on_call_pay_report_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +UpdateOnCallPayReportDataType = Literal["on_call_pay_reports"] + +UPDATE_ON_CALL_PAY_REPORT_DATA_TYPE_VALUES: set[UpdateOnCallPayReportDataType] = { + "on_call_pay_reports", +} + + +def check_update_on_call_pay_report_data_type(value: str | None) -> UpdateOnCallPayReportDataType | None: + if value is None: + return None + if value in UPDATE_ON_CALL_PAY_REPORT_DATA_TYPE_VALUES: + return cast(UpdateOnCallPayReportDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_ON_CALL_PAY_REPORT_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/update_on_call_role.py b/rootly_sdk/models/update_on_call_role.py index ff9a0a38..05af9836 100644 --- a/rootly_sdk/models/update_on_call_role.py +++ b/rootly_sdk/models/update_on_call_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateOnCallRole: data (UpdateOnCallRoleData): """ - data: "UpdateOnCallRoleData" + data: UpdateOnCallRoleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_on_call_role_data.py b/rootly_sdk/models/update_on_call_role_data.py index 320a3c0d..26aa8597 100644 --- a/rootly_sdk/models/update_on_call_role_data.py +++ b/rootly_sdk/models/update_on_call_role_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateOnCallRoleData: """ type_: UpdateOnCallRoleDataType - attributes: "UpdateOnCallRoleDataAttributes" + attributes: UpdateOnCallRoleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_on_call_role_data_attributes.py b/rootly_sdk/models/update_on_call_role_data_attributes.py index ffa945f9..83503f81 100644 --- a/rootly_sdk/models/update_on_call_role_data_attributes.py +++ b/rootly_sdk/models/update_on_call_role_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -100,222 +102,217 @@ class UpdateOnCallRoleDataAttributes: """ Attributes: - name (Union[Unset, str]): The role name. - system_role (Union[Unset, str]): The kind of role (user and custom type roles are only editable) Default: - 'custom'. - alert_sources_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem]]): - alert_urgency_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem]]): - alert_fields_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem]]): - alert_groups_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem]]): - alert_routing_rules_permissions (Union[Unset, - list[UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem]]): - on_call_readiness_report_permissions (Union[Unset, - list[UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem]]): - on_call_roles_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem]]): - alerts_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesAlertsPermissionsItem]]): - api_keys_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesApiKeysPermissionsItem]]): - audits_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesAuditsPermissionsItem]]): - contacts_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesContactsPermissionsItem]]): - escalation_policies_permissions (Union[Unset, - list[UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem]]): - groups_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesGroupsPermissionsItem]]): - heartbeats_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem]]): - integrations_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem]]): - invitations_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesInvitationsPermissionsItem]]): - live_call_routing_permissions (Union[Unset, - list[UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem]]): - schedule_override_permissions (Union[Unset, - list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem]]): - schedules_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem]]): - services_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesServicesPermissionsItem]]): - webhooks_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem]]): - workflows_permissions (Union[Unset, list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem]]): + name (str | Unset): The role name. + system_role (str | Unset): The kind of role (user and custom type roles are only editable) Default: 'custom'. + alert_sources_permissions (list[UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem] | Unset): + alert_urgency_permissions (list[UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem] | Unset): + alert_fields_permissions (list[UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem] | Unset): + alert_groups_permissions (list[UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem] | Unset): + alert_routing_rules_permissions (list[UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] | Unset): + on_call_readiness_report_permissions (list[UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] | + Unset): + on_call_roles_permissions (list[UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem] | Unset): + alerts_permissions (list[UpdateOnCallRoleDataAttributesAlertsPermissionsItem] | Unset): + api_keys_permissions (list[UpdateOnCallRoleDataAttributesApiKeysPermissionsItem] | Unset): + audits_permissions (list[UpdateOnCallRoleDataAttributesAuditsPermissionsItem] | Unset): + contacts_permissions (list[UpdateOnCallRoleDataAttributesContactsPermissionsItem] | Unset): + escalation_policies_permissions (list[UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] | Unset): + groups_permissions (list[UpdateOnCallRoleDataAttributesGroupsPermissionsItem] | Unset): + heartbeats_permissions (list[UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem] | Unset): + integrations_permissions (list[UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem] | Unset): + invitations_permissions (list[UpdateOnCallRoleDataAttributesInvitationsPermissionsItem] | Unset): + live_call_routing_permissions (list[UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] | Unset): + schedule_override_permissions (list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset): + schedules_permissions (list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset): + services_permissions (list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset): + webhooks_permissions (list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset): + workflows_permissions (list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset): """ - name: Unset | str = UNSET - system_role: Unset | str = "custom" - alert_sources_permissions: Unset | list[UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem] = UNSET - alert_urgency_permissions: Unset | list[UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem] = UNSET - alert_fields_permissions: Unset | list[UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem] = UNSET - alert_groups_permissions: Unset | list[UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem] = UNSET - alert_routing_rules_permissions: Unset | list[UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] = ( + name: str | Unset = UNSET + system_role: str | Unset = "custom" + alert_sources_permissions: list[UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem] | Unset = UNSET + alert_urgency_permissions: list[UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem] | Unset = UNSET + alert_fields_permissions: list[UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem] | Unset = UNSET + alert_groups_permissions: list[UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem] | Unset = UNSET + alert_routing_rules_permissions: list[UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] | Unset = ( UNSET ) on_call_readiness_report_permissions: ( - Unset | list[UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] + list[UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] | Unset ) = UNSET - on_call_roles_permissions: Unset | list[UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem] = UNSET - alerts_permissions: Unset | list[UpdateOnCallRoleDataAttributesAlertsPermissionsItem] = UNSET - api_keys_permissions: Unset | list[UpdateOnCallRoleDataAttributesApiKeysPermissionsItem] = UNSET - audits_permissions: Unset | list[UpdateOnCallRoleDataAttributesAuditsPermissionsItem] = UNSET - contacts_permissions: Unset | list[UpdateOnCallRoleDataAttributesContactsPermissionsItem] = UNSET - escalation_policies_permissions: Unset | list[UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] = ( + on_call_roles_permissions: list[UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem] | Unset = UNSET + alerts_permissions: list[UpdateOnCallRoleDataAttributesAlertsPermissionsItem] | Unset = UNSET + api_keys_permissions: list[UpdateOnCallRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + audits_permissions: list[UpdateOnCallRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + contacts_permissions: list[UpdateOnCallRoleDataAttributesContactsPermissionsItem] | Unset = UNSET + escalation_policies_permissions: list[UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] | Unset = ( UNSET ) - groups_permissions: Unset | list[UpdateOnCallRoleDataAttributesGroupsPermissionsItem] = UNSET - heartbeats_permissions: Unset | list[UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem] = UNSET - integrations_permissions: Unset | list[UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem] = UNSET - invitations_permissions: Unset | list[UpdateOnCallRoleDataAttributesInvitationsPermissionsItem] = UNSET - live_call_routing_permissions: Unset | list[UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] = UNSET - schedule_override_permissions: Unset | list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] = UNSET - schedules_permissions: Unset | list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] = UNSET - services_permissions: Unset | list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] = UNSET - webhooks_permissions: Unset | list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] = UNSET - workflows_permissions: Unset | list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] = UNSET + groups_permissions: list[UpdateOnCallRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + heartbeats_permissions: list[UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem] | Unset = UNSET + integrations_permissions: list[UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + invitations_permissions: list[UpdateOnCallRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + live_call_routing_permissions: list[UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] | Unset = UNSET + schedule_override_permissions: list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET + schedules_permissions: list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET + services_permissions: list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + webhooks_permissions: list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + workflows_permissions: list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name system_role = self.system_role - alert_sources_permissions: Unset | list[str] = UNSET + alert_sources_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_sources_permissions, Unset): alert_sources_permissions = [] for alert_sources_permissions_item_data in self.alert_sources_permissions: alert_sources_permissions_item: str = alert_sources_permissions_item_data alert_sources_permissions.append(alert_sources_permissions_item) - alert_urgency_permissions: Unset | list[str] = UNSET + alert_urgency_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_urgency_permissions, Unset): alert_urgency_permissions = [] for alert_urgency_permissions_item_data in self.alert_urgency_permissions: alert_urgency_permissions_item: str = alert_urgency_permissions_item_data alert_urgency_permissions.append(alert_urgency_permissions_item) - alert_fields_permissions: Unset | list[str] = UNSET + alert_fields_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_fields_permissions, Unset): alert_fields_permissions = [] for alert_fields_permissions_item_data in self.alert_fields_permissions: alert_fields_permissions_item: str = alert_fields_permissions_item_data alert_fields_permissions.append(alert_fields_permissions_item) - alert_groups_permissions: Unset | list[str] = UNSET + alert_groups_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_groups_permissions, Unset): alert_groups_permissions = [] for alert_groups_permissions_item_data in self.alert_groups_permissions: alert_groups_permissions_item: str = alert_groups_permissions_item_data alert_groups_permissions.append(alert_groups_permissions_item) - alert_routing_rules_permissions: Unset | list[str] = UNSET + alert_routing_rules_permissions: list[str] | Unset = UNSET if not isinstance(self.alert_routing_rules_permissions, Unset): alert_routing_rules_permissions = [] for alert_routing_rules_permissions_item_data in self.alert_routing_rules_permissions: alert_routing_rules_permissions_item: str = alert_routing_rules_permissions_item_data alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) - on_call_readiness_report_permissions: Unset | list[str] = UNSET + on_call_readiness_report_permissions: list[str] | Unset = UNSET if not isinstance(self.on_call_readiness_report_permissions, Unset): on_call_readiness_report_permissions = [] for on_call_readiness_report_permissions_item_data in self.on_call_readiness_report_permissions: on_call_readiness_report_permissions_item: str = on_call_readiness_report_permissions_item_data on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) - on_call_roles_permissions: Unset | list[str] = UNSET + on_call_roles_permissions: list[str] | Unset = UNSET if not isinstance(self.on_call_roles_permissions, Unset): on_call_roles_permissions = [] for on_call_roles_permissions_item_data in self.on_call_roles_permissions: on_call_roles_permissions_item: str = on_call_roles_permissions_item_data on_call_roles_permissions.append(on_call_roles_permissions_item) - alerts_permissions: Unset | list[str] = UNSET + alerts_permissions: list[str] | Unset = UNSET if not isinstance(self.alerts_permissions, Unset): alerts_permissions = [] for alerts_permissions_item_data in self.alerts_permissions: alerts_permissions_item: str = alerts_permissions_item_data alerts_permissions.append(alerts_permissions_item) - api_keys_permissions: Unset | list[str] = UNSET + api_keys_permissions: list[str] | Unset = UNSET if not isinstance(self.api_keys_permissions, Unset): api_keys_permissions = [] for api_keys_permissions_item_data in self.api_keys_permissions: api_keys_permissions_item: str = api_keys_permissions_item_data api_keys_permissions.append(api_keys_permissions_item) - audits_permissions: Unset | list[str] = UNSET + audits_permissions: list[str] | Unset = UNSET if not isinstance(self.audits_permissions, Unset): audits_permissions = [] for audits_permissions_item_data in self.audits_permissions: audits_permissions_item: str = audits_permissions_item_data audits_permissions.append(audits_permissions_item) - contacts_permissions: Unset | list[str] = UNSET + contacts_permissions: list[str] | Unset = UNSET if not isinstance(self.contacts_permissions, Unset): contacts_permissions = [] for contacts_permissions_item_data in self.contacts_permissions: contacts_permissions_item: str = contacts_permissions_item_data contacts_permissions.append(contacts_permissions_item) - escalation_policies_permissions: Unset | list[str] = UNSET + escalation_policies_permissions: list[str] | Unset = UNSET if not isinstance(self.escalation_policies_permissions, Unset): escalation_policies_permissions = [] for escalation_policies_permissions_item_data in self.escalation_policies_permissions: escalation_policies_permissions_item: str = escalation_policies_permissions_item_data escalation_policies_permissions.append(escalation_policies_permissions_item) - groups_permissions: Unset | list[str] = UNSET + groups_permissions: list[str] | Unset = UNSET if not isinstance(self.groups_permissions, Unset): groups_permissions = [] for groups_permissions_item_data in self.groups_permissions: groups_permissions_item: str = groups_permissions_item_data groups_permissions.append(groups_permissions_item) - heartbeats_permissions: Unset | list[str] = UNSET + heartbeats_permissions: list[str] | Unset = UNSET if not isinstance(self.heartbeats_permissions, Unset): heartbeats_permissions = [] for heartbeats_permissions_item_data in self.heartbeats_permissions: heartbeats_permissions_item: str = heartbeats_permissions_item_data heartbeats_permissions.append(heartbeats_permissions_item) - integrations_permissions: Unset | list[str] = UNSET + integrations_permissions: list[str] | Unset = UNSET if not isinstance(self.integrations_permissions, Unset): integrations_permissions = [] for integrations_permissions_item_data in self.integrations_permissions: integrations_permissions_item: str = integrations_permissions_item_data integrations_permissions.append(integrations_permissions_item) - invitations_permissions: Unset | list[str] = UNSET + invitations_permissions: list[str] | Unset = UNSET if not isinstance(self.invitations_permissions, Unset): invitations_permissions = [] for invitations_permissions_item_data in self.invitations_permissions: invitations_permissions_item: str = invitations_permissions_item_data invitations_permissions.append(invitations_permissions_item) - live_call_routing_permissions: Unset | list[str] = UNSET + live_call_routing_permissions: list[str] | Unset = UNSET if not isinstance(self.live_call_routing_permissions, Unset): live_call_routing_permissions = [] for live_call_routing_permissions_item_data in self.live_call_routing_permissions: live_call_routing_permissions_item: str = live_call_routing_permissions_item_data live_call_routing_permissions.append(live_call_routing_permissions_item) - schedule_override_permissions: Unset | list[str] = UNSET + schedule_override_permissions: list[str] | Unset = UNSET if not isinstance(self.schedule_override_permissions, Unset): schedule_override_permissions = [] for schedule_override_permissions_item_data in self.schedule_override_permissions: schedule_override_permissions_item: str = schedule_override_permissions_item_data schedule_override_permissions.append(schedule_override_permissions_item) - schedules_permissions: Unset | list[str] = UNSET + schedules_permissions: list[str] | Unset = UNSET if not isinstance(self.schedules_permissions, Unset): schedules_permissions = [] for schedules_permissions_item_data in self.schedules_permissions: schedules_permissions_item: str = schedules_permissions_item_data schedules_permissions.append(schedules_permissions_item) - services_permissions: Unset | list[str] = UNSET + services_permissions: list[str] | Unset = UNSET if not isinstance(self.services_permissions, Unset): services_permissions = [] for services_permissions_item_data in self.services_permissions: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) - webhooks_permissions: Unset | list[str] = UNSET + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] for webhooks_permissions_item_data in self.webhooks_permissions: webhooks_permissions_item: str = webhooks_permissions_item_data webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions: Unset | list[str] = UNSET + workflows_permissions: list[str] | Unset = UNSET if not isinstance(self.workflows_permissions, Unset): workflows_permissions = [] for workflows_permissions_item_data in self.workflows_permissions: @@ -383,213 +380,273 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: system_role = d.pop("system_role", UNSET) - alert_sources_permissions = [] _alert_sources_permissions = d.pop("alert_sources_permissions", UNSET) - for alert_sources_permissions_item_data in _alert_sources_permissions or []: - alert_sources_permissions_item = check_update_on_call_role_data_attributes_alert_sources_permissions_item( - alert_sources_permissions_item_data - ) + alert_sources_permissions: list[UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem] | Unset = UNSET + if _alert_sources_permissions is not UNSET: + alert_sources_permissions = [] + for alert_sources_permissions_item_data in _alert_sources_permissions: + alert_sources_permissions_item = ( + check_update_on_call_role_data_attributes_alert_sources_permissions_item( + alert_sources_permissions_item_data + ) + ) - alert_sources_permissions.append(alert_sources_permissions_item) + alert_sources_permissions.append(alert_sources_permissions_item) - alert_urgency_permissions = [] _alert_urgency_permissions = d.pop("alert_urgency_permissions", UNSET) - for alert_urgency_permissions_item_data in _alert_urgency_permissions or []: - alert_urgency_permissions_item = check_update_on_call_role_data_attributes_alert_urgency_permissions_item( - alert_urgency_permissions_item_data - ) + alert_urgency_permissions: list[UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem] | Unset = UNSET + if _alert_urgency_permissions is not UNSET: + alert_urgency_permissions = [] + for alert_urgency_permissions_item_data in _alert_urgency_permissions: + alert_urgency_permissions_item = ( + check_update_on_call_role_data_attributes_alert_urgency_permissions_item( + alert_urgency_permissions_item_data + ) + ) - alert_urgency_permissions.append(alert_urgency_permissions_item) + alert_urgency_permissions.append(alert_urgency_permissions_item) - alert_fields_permissions = [] _alert_fields_permissions = d.pop("alert_fields_permissions", UNSET) - for alert_fields_permissions_item_data in _alert_fields_permissions or []: - alert_fields_permissions_item = check_update_on_call_role_data_attributes_alert_fields_permissions_item( - alert_fields_permissions_item_data - ) + alert_fields_permissions: list[UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem] | Unset = UNSET + if _alert_fields_permissions is not UNSET: + alert_fields_permissions = [] + for alert_fields_permissions_item_data in _alert_fields_permissions: + alert_fields_permissions_item = check_update_on_call_role_data_attributes_alert_fields_permissions_item( + alert_fields_permissions_item_data + ) - alert_fields_permissions.append(alert_fields_permissions_item) + alert_fields_permissions.append(alert_fields_permissions_item) - alert_groups_permissions = [] _alert_groups_permissions = d.pop("alert_groups_permissions", UNSET) - for alert_groups_permissions_item_data in _alert_groups_permissions or []: - alert_groups_permissions_item = check_update_on_call_role_data_attributes_alert_groups_permissions_item( - alert_groups_permissions_item_data - ) + alert_groups_permissions: list[UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem] | Unset = UNSET + if _alert_groups_permissions is not UNSET: + alert_groups_permissions = [] + for alert_groups_permissions_item_data in _alert_groups_permissions: + alert_groups_permissions_item = check_update_on_call_role_data_attributes_alert_groups_permissions_item( + alert_groups_permissions_item_data + ) - alert_groups_permissions.append(alert_groups_permissions_item) + alert_groups_permissions.append(alert_groups_permissions_item) - alert_routing_rules_permissions = [] _alert_routing_rules_permissions = d.pop("alert_routing_rules_permissions", UNSET) - for alert_routing_rules_permissions_item_data in _alert_routing_rules_permissions or []: - alert_routing_rules_permissions_item = ( - check_update_on_call_role_data_attributes_alert_routing_rules_permissions_item( - alert_routing_rules_permissions_item_data + alert_routing_rules_permissions: ( + list[UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem] | Unset + ) = UNSET + if _alert_routing_rules_permissions is not UNSET: + alert_routing_rules_permissions = [] + for alert_routing_rules_permissions_item_data in _alert_routing_rules_permissions: + alert_routing_rules_permissions_item = ( + check_update_on_call_role_data_attributes_alert_routing_rules_permissions_item( + alert_routing_rules_permissions_item_data + ) ) - ) - alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) + alert_routing_rules_permissions.append(alert_routing_rules_permissions_item) - on_call_readiness_report_permissions = [] _on_call_readiness_report_permissions = d.pop("on_call_readiness_report_permissions", UNSET) - for on_call_readiness_report_permissions_item_data in _on_call_readiness_report_permissions or []: - on_call_readiness_report_permissions_item = ( - check_update_on_call_role_data_attributes_on_call_readiness_report_permissions_item( - on_call_readiness_report_permissions_item_data + on_call_readiness_report_permissions: ( + list[UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem] | Unset + ) = UNSET + if _on_call_readiness_report_permissions is not UNSET: + on_call_readiness_report_permissions = [] + for on_call_readiness_report_permissions_item_data in _on_call_readiness_report_permissions: + on_call_readiness_report_permissions_item = ( + check_update_on_call_role_data_attributes_on_call_readiness_report_permissions_item( + on_call_readiness_report_permissions_item_data + ) ) - ) - on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) + on_call_readiness_report_permissions.append(on_call_readiness_report_permissions_item) - on_call_roles_permissions = [] _on_call_roles_permissions = d.pop("on_call_roles_permissions", UNSET) - for on_call_roles_permissions_item_data in _on_call_roles_permissions or []: - on_call_roles_permissions_item = check_update_on_call_role_data_attributes_on_call_roles_permissions_item( - on_call_roles_permissions_item_data - ) + on_call_roles_permissions: list[UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem] | Unset = UNSET + if _on_call_roles_permissions is not UNSET: + on_call_roles_permissions = [] + for on_call_roles_permissions_item_data in _on_call_roles_permissions: + on_call_roles_permissions_item = ( + check_update_on_call_role_data_attributes_on_call_roles_permissions_item( + on_call_roles_permissions_item_data + ) + ) - on_call_roles_permissions.append(on_call_roles_permissions_item) + on_call_roles_permissions.append(on_call_roles_permissions_item) - alerts_permissions = [] _alerts_permissions = d.pop("alerts_permissions", UNSET) - for alerts_permissions_item_data in _alerts_permissions or []: - alerts_permissions_item = check_update_on_call_role_data_attributes_alerts_permissions_item( - alerts_permissions_item_data - ) + alerts_permissions: list[UpdateOnCallRoleDataAttributesAlertsPermissionsItem] | Unset = UNSET + if _alerts_permissions is not UNSET: + alerts_permissions = [] + for alerts_permissions_item_data in _alerts_permissions: + alerts_permissions_item = check_update_on_call_role_data_attributes_alerts_permissions_item( + alerts_permissions_item_data + ) - alerts_permissions.append(alerts_permissions_item) + alerts_permissions.append(alerts_permissions_item) - api_keys_permissions = [] _api_keys_permissions = d.pop("api_keys_permissions", UNSET) - for api_keys_permissions_item_data in _api_keys_permissions or []: - api_keys_permissions_item = check_update_on_call_role_data_attributes_api_keys_permissions_item( - api_keys_permissions_item_data - ) + api_keys_permissions: list[UpdateOnCallRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + if _api_keys_permissions is not UNSET: + api_keys_permissions = [] + for api_keys_permissions_item_data in _api_keys_permissions: + api_keys_permissions_item = check_update_on_call_role_data_attributes_api_keys_permissions_item( + api_keys_permissions_item_data + ) - api_keys_permissions.append(api_keys_permissions_item) + api_keys_permissions.append(api_keys_permissions_item) - audits_permissions = [] _audits_permissions = d.pop("audits_permissions", UNSET) - for audits_permissions_item_data in _audits_permissions or []: - audits_permissions_item = check_update_on_call_role_data_attributes_audits_permissions_item( - audits_permissions_item_data - ) + audits_permissions: list[UpdateOnCallRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + if _audits_permissions is not UNSET: + audits_permissions = [] + for audits_permissions_item_data in _audits_permissions: + audits_permissions_item = check_update_on_call_role_data_attributes_audits_permissions_item( + audits_permissions_item_data + ) - audits_permissions.append(audits_permissions_item) + audits_permissions.append(audits_permissions_item) - contacts_permissions = [] _contacts_permissions = d.pop("contacts_permissions", UNSET) - for contacts_permissions_item_data in _contacts_permissions or []: - contacts_permissions_item = check_update_on_call_role_data_attributes_contacts_permissions_item( - contacts_permissions_item_data - ) + contacts_permissions: list[UpdateOnCallRoleDataAttributesContactsPermissionsItem] | Unset = UNSET + if _contacts_permissions is not UNSET: + contacts_permissions = [] + for contacts_permissions_item_data in _contacts_permissions: + contacts_permissions_item = check_update_on_call_role_data_attributes_contacts_permissions_item( + contacts_permissions_item_data + ) - contacts_permissions.append(contacts_permissions_item) + contacts_permissions.append(contacts_permissions_item) - escalation_policies_permissions = [] _escalation_policies_permissions = d.pop("escalation_policies_permissions", UNSET) - for escalation_policies_permissions_item_data in _escalation_policies_permissions or []: - escalation_policies_permissions_item = ( - check_update_on_call_role_data_attributes_escalation_policies_permissions_item( - escalation_policies_permissions_item_data + escalation_policies_permissions: ( + list[UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem] | Unset + ) = UNSET + if _escalation_policies_permissions is not UNSET: + escalation_policies_permissions = [] + for escalation_policies_permissions_item_data in _escalation_policies_permissions: + escalation_policies_permissions_item = ( + check_update_on_call_role_data_attributes_escalation_policies_permissions_item( + escalation_policies_permissions_item_data + ) ) - ) - escalation_policies_permissions.append(escalation_policies_permissions_item) + escalation_policies_permissions.append(escalation_policies_permissions_item) - groups_permissions = [] _groups_permissions = d.pop("groups_permissions", UNSET) - for groups_permissions_item_data in _groups_permissions or []: - groups_permissions_item = check_update_on_call_role_data_attributes_groups_permissions_item( - groups_permissions_item_data - ) + groups_permissions: list[UpdateOnCallRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + if _groups_permissions is not UNSET: + groups_permissions = [] + for groups_permissions_item_data in _groups_permissions: + groups_permissions_item = check_update_on_call_role_data_attributes_groups_permissions_item( + groups_permissions_item_data + ) - groups_permissions.append(groups_permissions_item) + groups_permissions.append(groups_permissions_item) - heartbeats_permissions = [] _heartbeats_permissions = d.pop("heartbeats_permissions", UNSET) - for heartbeats_permissions_item_data in _heartbeats_permissions or []: - heartbeats_permissions_item = check_update_on_call_role_data_attributes_heartbeats_permissions_item( - heartbeats_permissions_item_data - ) + heartbeats_permissions: list[UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem] | Unset = UNSET + if _heartbeats_permissions is not UNSET: + heartbeats_permissions = [] + for heartbeats_permissions_item_data in _heartbeats_permissions: + heartbeats_permissions_item = check_update_on_call_role_data_attributes_heartbeats_permissions_item( + heartbeats_permissions_item_data + ) - heartbeats_permissions.append(heartbeats_permissions_item) + heartbeats_permissions.append(heartbeats_permissions_item) - integrations_permissions = [] _integrations_permissions = d.pop("integrations_permissions", UNSET) - for integrations_permissions_item_data in _integrations_permissions or []: - integrations_permissions_item = check_update_on_call_role_data_attributes_integrations_permissions_item( - integrations_permissions_item_data - ) + integrations_permissions: list[UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + if _integrations_permissions is not UNSET: + integrations_permissions = [] + for integrations_permissions_item_data in _integrations_permissions: + integrations_permissions_item = check_update_on_call_role_data_attributes_integrations_permissions_item( + integrations_permissions_item_data + ) - integrations_permissions.append(integrations_permissions_item) + integrations_permissions.append(integrations_permissions_item) - invitations_permissions = [] _invitations_permissions = d.pop("invitations_permissions", UNSET) - for invitations_permissions_item_data in _invitations_permissions or []: - invitations_permissions_item = check_update_on_call_role_data_attributes_invitations_permissions_item( - invitations_permissions_item_data - ) + invitations_permissions: list[UpdateOnCallRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + if _invitations_permissions is not UNSET: + invitations_permissions = [] + for invitations_permissions_item_data in _invitations_permissions: + invitations_permissions_item = check_update_on_call_role_data_attributes_invitations_permissions_item( + invitations_permissions_item_data + ) - invitations_permissions.append(invitations_permissions_item) + invitations_permissions.append(invitations_permissions_item) - live_call_routing_permissions = [] _live_call_routing_permissions = d.pop("live_call_routing_permissions", UNSET) - for live_call_routing_permissions_item_data in _live_call_routing_permissions or []: - live_call_routing_permissions_item = ( - check_update_on_call_role_data_attributes_live_call_routing_permissions_item( - live_call_routing_permissions_item_data + live_call_routing_permissions: list[UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem] | Unset = ( + UNSET + ) + if _live_call_routing_permissions is not UNSET: + live_call_routing_permissions = [] + for live_call_routing_permissions_item_data in _live_call_routing_permissions: + live_call_routing_permissions_item = ( + check_update_on_call_role_data_attributes_live_call_routing_permissions_item( + live_call_routing_permissions_item_data + ) ) - ) - live_call_routing_permissions.append(live_call_routing_permissions_item) + live_call_routing_permissions.append(live_call_routing_permissions_item) - schedule_override_permissions = [] _schedule_override_permissions = d.pop("schedule_override_permissions", UNSET) - for schedule_override_permissions_item_data in _schedule_override_permissions or []: - schedule_override_permissions_item = ( - check_update_on_call_role_data_attributes_schedule_override_permissions_item( - schedule_override_permissions_item_data + schedule_override_permissions: list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = ( + UNSET + ) + if _schedule_override_permissions is not UNSET: + schedule_override_permissions = [] + for schedule_override_permissions_item_data in _schedule_override_permissions: + schedule_override_permissions_item = ( + check_update_on_call_role_data_attributes_schedule_override_permissions_item( + schedule_override_permissions_item_data + ) ) - ) - schedule_override_permissions.append(schedule_override_permissions_item) + schedule_override_permissions.append(schedule_override_permissions_item) - schedules_permissions = [] _schedules_permissions = d.pop("schedules_permissions", UNSET) - for schedules_permissions_item_data in _schedules_permissions or []: - schedules_permissions_item = check_update_on_call_role_data_attributes_schedules_permissions_item( - schedules_permissions_item_data - ) + schedules_permissions: list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET + if _schedules_permissions is not UNSET: + schedules_permissions = [] + for schedules_permissions_item_data in _schedules_permissions: + schedules_permissions_item = check_update_on_call_role_data_attributes_schedules_permissions_item( + schedules_permissions_item_data + ) - schedules_permissions.append(schedules_permissions_item) + schedules_permissions.append(schedules_permissions_item) - services_permissions = [] _services_permissions = d.pop("services_permissions", UNSET) - for services_permissions_item_data in _services_permissions or []: - services_permissions_item = check_update_on_call_role_data_attributes_services_permissions_item( - services_permissions_item_data - ) + services_permissions: list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + if _services_permissions is not UNSET: + services_permissions = [] + for services_permissions_item_data in _services_permissions: + services_permissions_item = check_update_on_call_role_data_attributes_services_permissions_item( + services_permissions_item_data + ) - services_permissions.append(services_permissions_item) + services_permissions.append(services_permissions_item) - webhooks_permissions = [] _webhooks_permissions = d.pop("webhooks_permissions", UNSET) - for webhooks_permissions_item_data in _webhooks_permissions or []: - webhooks_permissions_item = check_update_on_call_role_data_attributes_webhooks_permissions_item( - webhooks_permissions_item_data - ) + webhooks_permissions: list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + if _webhooks_permissions is not UNSET: + webhooks_permissions = [] + for webhooks_permissions_item_data in _webhooks_permissions: + webhooks_permissions_item = check_update_on_call_role_data_attributes_webhooks_permissions_item( + webhooks_permissions_item_data + ) - webhooks_permissions.append(webhooks_permissions_item) + webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions = [] _workflows_permissions = d.pop("workflows_permissions", UNSET) - for workflows_permissions_item_data in _workflows_permissions or []: - workflows_permissions_item = check_update_on_call_role_data_attributes_workflows_permissions_item( - workflows_permissions_item_data - ) + workflows_permissions: list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + if _workflows_permissions is not UNSET: + workflows_permissions = [] + for workflows_permissions_item_data in _workflows_permissions: + workflows_permissions_item = check_update_on_call_role_data_attributes_workflows_permissions_item( + workflows_permissions_item_data + ) - workflows_permissions.append(workflows_permissions_item) + workflows_permissions.append(workflows_permissions_item) update_on_call_role_data_attributes = cls( name=name, diff --git a/rootly_sdk/models/update_on_call_shadow.py b/rootly_sdk/models/update_on_call_shadow.py index 08575554..8a39a81e 100644 --- a/rootly_sdk/models/update_on_call_shadow.py +++ b/rootly_sdk/models/update_on_call_shadow.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateOnCallShadow: data (UpdateOnCallShadowData): """ - data: "UpdateOnCallShadowData" + data: UpdateOnCallShadowData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_on_call_shadow_data.py b/rootly_sdk/models/update_on_call_shadow_data.py index a31c2b12..3b15e40d 100644 --- a/rootly_sdk/models/update_on_call_shadow_data.py +++ b/rootly_sdk/models/update_on_call_shadow_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateOnCallShadowData: """ type_: UpdateOnCallShadowDataType - attributes: "UpdateOnCallShadowDataAttributes" + attributes: UpdateOnCallShadowDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_on_call_shadow_data_attributes.py b/rootly_sdk/models/update_on_call_shadow_data_attributes.py index 5f937250..82161c38 100644 --- a/rootly_sdk/models/update_on_call_shadow_data_attributes.py +++ b/rootly_sdk/models/update_on_call_shadow_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import Any, TypeVar @@ -18,25 +20,25 @@ class UpdateOnCallShadowDataAttributes: """ Attributes: - schedule_id (Union[Unset, str]): ID of schedule the shadow shift belongs to - shadowable_type (Union[Unset, UpdateOnCallShadowDataAttributesShadowableType]): - shadowable_id (Union[Unset, str]): ID of schedule or user the shadow user is shadowing - shadow_user_id (Union[Unset, int]): Which user the shadow shift belongs to. - starts_at (Union[Unset, datetime.datetime]): Start datetime of shadow shift - ends_at (Union[Unset, datetime.datetime]): End datetime for shadow shift + schedule_id (str | Unset): ID of schedule the shadow shift belongs to + shadowable_type (UpdateOnCallShadowDataAttributesShadowableType | Unset): + shadowable_id (str | Unset): ID of schedule or user the shadow user is shadowing + shadow_user_id (int | Unset): Which user the shadow shift belongs to. + starts_at (datetime.datetime | Unset): Start datetime of shadow shift + ends_at (datetime.datetime | Unset): End datetime for shadow shift """ - schedule_id: Unset | str = UNSET - shadowable_type: Unset | UpdateOnCallShadowDataAttributesShadowableType = UNSET - shadowable_id: Unset | str = UNSET - shadow_user_id: Unset | int = UNSET - starts_at: Unset | datetime.datetime = UNSET - ends_at: Unset | datetime.datetime = UNSET + schedule_id: str | Unset = UNSET + shadowable_type: UpdateOnCallShadowDataAttributesShadowableType | Unset = UNSET + shadowable_id: str | Unset = UNSET + shadow_user_id: int | Unset = UNSET + starts_at: datetime.datetime | Unset = UNSET + ends_at: datetime.datetime | Unset = UNSET def to_dict(self) -> dict[str, Any]: schedule_id = self.schedule_id - shadowable_type: Unset | str = UNSET + shadowable_type: str | Unset = UNSET if not isinstance(self.shadowable_type, Unset): shadowable_type = self.shadowable_type @@ -44,11 +46,11 @@ def to_dict(self) -> dict[str, Any]: shadow_user_id = self.shadow_user_id - starts_at: Unset | str = UNSET + starts_at: str | Unset = UNSET if not isinstance(self.starts_at, Unset): starts_at = self.starts_at.isoformat() - ends_at: Unset | str = UNSET + ends_at: str | Unset = UNSET if not isinstance(self.ends_at, Unset): ends_at = self.ends_at.isoformat() @@ -76,7 +78,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_id = d.pop("schedule_id", UNSET) _shadowable_type = d.pop("shadowable_type", UNSET) - shadowable_type: Unset | UpdateOnCallShadowDataAttributesShadowableType + shadowable_type: UpdateOnCallShadowDataAttributesShadowableType | Unset if isinstance(_shadowable_type, Unset): shadowable_type = UNSET else: @@ -87,14 +89,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: shadow_user_id = d.pop("shadow_user_id", UNSET) _starts_at = d.pop("starts_at", UNSET) - starts_at: Unset | datetime.datetime + starts_at: datetime.datetime | Unset if isinstance(_starts_at, Unset): starts_at = UNSET else: starts_at = isoparse(_starts_at) _ends_at = d.pop("ends_at", UNSET) - ends_at: Unset | datetime.datetime + ends_at: datetime.datetime | Unset if isinstance(_ends_at, Unset): ends_at = UNSET else: diff --git a/rootly_sdk/models/update_opsgenie_alert_task_params.py b/rootly_sdk/models/update_opsgenie_alert_task_params.py index 983c4f88..3c7dd2b8 100644 --- a/rootly_sdk/models/update_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/update_opsgenie_alert_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -28,18 +30,18 @@ class UpdateOpsgenieAlertTaskParams: alert_id (str): Opsgenie Alert ID priority (UpdateOpsgenieAlertTaskParamsPriority): completion (UpdateOpsgenieAlertTaskParamsCompletion): - task_type (Union[Unset, UpdateOpsgenieAlertTaskParamsTaskType]): - message (Union[Unset, str]): Message of the alert - description (Union[Unset, str]): Description field of the alert that is generally used to provide a detailed + task_type (UpdateOpsgenieAlertTaskParamsTaskType | Unset): + message (str | Unset): Message of the alert + description (str | Unset): Description field of the alert that is generally used to provide a detailed information about the alert """ alert_id: str priority: UpdateOpsgenieAlertTaskParamsPriority - completion: "UpdateOpsgenieAlertTaskParamsCompletion" - task_type: Unset | UpdateOpsgenieAlertTaskParamsTaskType = UNSET - message: Unset | str = UNSET - description: Unset | str = UNSET + completion: UpdateOpsgenieAlertTaskParamsCompletion + task_type: UpdateOpsgenieAlertTaskParamsTaskType | Unset = UNSET + message: str | Unset = UNSET + description: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -49,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = UpdateOpsgenieAlertTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateOpsgenieAlertTaskParamsTaskType + task_type: UpdateOpsgenieAlertTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_opsgenie_alert_task_params_completion.py b/rootly_sdk/models/update_opsgenie_alert_task_params_completion.py index 74ddc709..f1933281 100644 --- a/rootly_sdk/models/update_opsgenie_alert_task_params_completion.py +++ b/rootly_sdk/models/update_opsgenie_alert_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateOpsgenieAlertTaskParamsCompletion: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_opsgenie_incident_task_params.py b/rootly_sdk/models/update_opsgenie_incident_task_params.py index a7d8ec23..46b0c6ef 100644 --- a/rootly_sdk/models/update_opsgenie_incident_task_params.py +++ b/rootly_sdk/models/update_opsgenie_incident_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -27,26 +29,26 @@ class UpdateOpsgenieIncidentTaskParams: Attributes: opsgenie_incident_id (str): The Opsgenie incident ID, this can also be a Rootly incident variable ex. {{ incident.opsgenie_incident_id }} - task_type (Union[Unset, UpdateOpsgenieIncidentTaskParamsTaskType]): - message (Union[Unset, str]): Message of the alert - description (Union[Unset, str]): Description field of the alert that is generally used to provide a detailed + task_type (UpdateOpsgenieIncidentTaskParamsTaskType | Unset): + message (str | Unset): Message of the alert + description (str | Unset): Description field of the alert that is generally used to provide a detailed information about the alert - status (Union[Unset, UpdateOpsgenieIncidentTaskParamsStatus]): - priority (Union[Unset, UpdateOpsgenieIncidentTaskParamsPriority]): + status (UpdateOpsgenieIncidentTaskParamsStatus | Unset): + priority (UpdateOpsgenieIncidentTaskParamsPriority | Unset): """ opsgenie_incident_id: str - task_type: Unset | UpdateOpsgenieIncidentTaskParamsTaskType = UNSET - message: Unset | str = UNSET - description: Unset | str = UNSET - status: Unset | UpdateOpsgenieIncidentTaskParamsStatus = UNSET - priority: Unset | UpdateOpsgenieIncidentTaskParamsPriority = UNSET + task_type: UpdateOpsgenieIncidentTaskParamsTaskType | Unset = UNSET + message: str | Unset = UNSET + description: str | Unset = UNSET + status: UpdateOpsgenieIncidentTaskParamsStatus | Unset = UNSET + priority: UpdateOpsgenieIncidentTaskParamsPriority | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: opsgenie_incident_id = self.opsgenie_incident_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -54,11 +56,11 @@ def to_dict(self) -> dict[str, Any]: description = self.description - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status - priority: Unset | str = UNSET + priority: str | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority @@ -88,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: opsgenie_incident_id = d.pop("opsgenie_incident_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateOpsgenieIncidentTaskParamsTaskType + task_type: UpdateOpsgenieIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -99,14 +101,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdateOpsgenieIncidentTaskParamsStatus + status: UpdateOpsgenieIncidentTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = check_update_opsgenie_incident_task_params_status(_status) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateOpsgenieIncidentTaskParamsPriority + priority: UpdateOpsgenieIncidentTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: diff --git a/rootly_sdk/models/update_opsgenie_incident_task_params_priority.py b/rootly_sdk/models/update_opsgenie_incident_task_params_priority.py index 5cf476f8..9650c439 100644 --- a/rootly_sdk/models/update_opsgenie_incident_task_params_priority.py +++ b/rootly_sdk/models/update_opsgenie_incident_task_params_priority.py @@ -1,8 +1,9 @@ from typing import Literal, cast -UpdateOpsgenieIncidentTaskParamsPriority = Literal["auto", "P1", "P2", "P3", "P4", "P5"] +UpdateOpsgenieIncidentTaskParamsPriority = Literal["", "auto", "P1", "P2", "P3", "P4", "P5"] UPDATE_OPSGENIE_INCIDENT_TASK_PARAMS_PRIORITY_VALUES: set[UpdateOpsgenieIncidentTaskParamsPriority] = { + "", "auto", "P1", "P2", diff --git a/rootly_sdk/models/update_override_shift.py b/rootly_sdk/models/update_override_shift.py index 5ea83e20..766b15a4 100644 --- a/rootly_sdk/models/update_override_shift.py +++ b/rootly_sdk/models/update_override_shift.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateOverrideShift: data (UpdateOverrideShiftData): """ - data: "UpdateOverrideShiftData" + data: UpdateOverrideShiftData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_override_shift_data.py b/rootly_sdk/models/update_override_shift_data.py index e3af4213..295ece6a 100644 --- a/rootly_sdk/models/update_override_shift_data.py +++ b/rootly_sdk/models/update_override_shift_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateOverrideShiftData: """ type_: UpdateOverrideShiftDataType - attributes: "UpdateOverrideShiftDataAttributes" + attributes: UpdateOverrideShiftDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_override_shift_data_attributes.py b/rootly_sdk/models/update_override_shift_data_attributes.py index 2e7cc8df..2a34c48e 100644 --- a/rootly_sdk/models/update_override_shift_data_attributes.py +++ b/rootly_sdk/models/update_override_shift_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_pagerduty_incident_task_params.py b/rootly_sdk/models/update_pagerduty_incident_task_params.py index fc8753f0..3020e135 100644 --- a/rootly_sdk/models/update_pagerduty_incident_task_params.py +++ b/rootly_sdk/models/update_pagerduty_incident_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -26,37 +28,37 @@ class UpdatePagerdutyIncidentTaskParams: """ Attributes: pagerduty_incident_id (str): Pagerduty incident id - task_type (Union[Unset, UpdatePagerdutyIncidentTaskParamsTaskType]): - title (Union[Unset, str]): Title to update to - status (Union[Unset, UpdatePagerdutyIncidentTaskParamsStatus]): - resolution (Union[Unset, str]): A message outlining the incident's resolution in PagerDuty - escalation_level (Union[Unset, int]): Escalation level of policy attached to incident Example: 1. - urgency (Union[Unset, UpdatePagerdutyIncidentTaskParamsUrgency]): PagerDuty incident urgency, selecting auto - will let Rootly auto map our incident severity - priority (Union[Unset, str]): PagerDuty incident priority, selecting auto will let Rootly auto map our incident + task_type (UpdatePagerdutyIncidentTaskParamsTaskType | Unset): + title (str | Unset): Title to update to + status (UpdatePagerdutyIncidentTaskParamsStatus | Unset): + resolution (str | Unset): A message outlining the incident's resolution in PagerDuty + escalation_level (int | Unset): Escalation level of policy attached to incident Example: 1. + urgency (UpdatePagerdutyIncidentTaskParamsUrgency | Unset): PagerDuty incident urgency, selecting auto will let + Rootly auto map our incident severity + priority (str | Unset): PagerDuty incident priority, selecting auto will let Rootly auto map our incident severity """ pagerduty_incident_id: str - task_type: Unset | UpdatePagerdutyIncidentTaskParamsTaskType = UNSET - title: Unset | str = UNSET - status: Unset | UpdatePagerdutyIncidentTaskParamsStatus = UNSET - resolution: Unset | str = UNSET - escalation_level: Unset | int = UNSET - urgency: Unset | UpdatePagerdutyIncidentTaskParamsUrgency = UNSET - priority: Unset | str = UNSET + task_type: UpdatePagerdutyIncidentTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + status: UpdatePagerdutyIncidentTaskParamsStatus | Unset = UNSET + resolution: str | Unset = UNSET + escalation_level: int | Unset = UNSET + urgency: UpdatePagerdutyIncidentTaskParamsUrgency | Unset = UNSET + priority: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: pagerduty_incident_id = self.pagerduty_incident_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type title = self.title - status: Unset | str = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: escalation_level = self.escalation_level - urgency: Unset | str = UNSET + urgency: str | Unset = UNSET if not isinstance(self.urgency, Unset): urgency = self.urgency @@ -100,7 +102,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: pagerduty_incident_id = d.pop("pagerduty_incident_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdatePagerdutyIncidentTaskParamsTaskType + task_type: UpdatePagerdutyIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -109,7 +111,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title = d.pop("title", UNSET) _status = d.pop("status", UNSET) - status: Unset | UpdatePagerdutyIncidentTaskParamsStatus + status: UpdatePagerdutyIncidentTaskParamsStatus | Unset if isinstance(_status, Unset): status = UNSET else: @@ -120,7 +122,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: escalation_level = d.pop("escalation_level", UNSET) _urgency = d.pop("urgency", UNSET) - urgency: Unset | UpdatePagerdutyIncidentTaskParamsUrgency + urgency: UpdatePagerdutyIncidentTaskParamsUrgency | Unset if isinstance(_urgency, Unset): urgency = UNSET else: diff --git a/rootly_sdk/models/update_pagertree_alert_task_params.py b/rootly_sdk/models/update_pagertree_alert_task_params.py index b59eca40..75b8f2ae 100644 --- a/rootly_sdk/models/update_pagertree_alert_task_params.py +++ b/rootly_sdk/models/update_pagertree_alert_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -30,30 +32,30 @@ class UpdatePagertreeAlertTaskParams: """ Attributes: - task_type (Union[Unset, UpdatePagertreeAlertTaskParamsTaskType]): - pagertree_alert_id (Union[Unset, str]): The prefix ID of the Pagertree alert - title (Union[Unset, str]): Title of alert as text - description (Union[Unset, str]): Description of alert as text - urgency (Union[Unset, UpdatePagertreeAlertTaskParamsUrgency]): - severity (Union[Unset, UpdatePagertreeAlertTaskParamsSeverity]): - teams (Union[Unset, list['UpdatePagertreeAlertTaskParamsTeamsItem']]): - users (Union[Unset, list['UpdatePagertreeAlertTaskParamsUsersItem']]): - incident (Union[Unset, bool]): Setting to true makes an alert a Pagertree incident + task_type (UpdatePagertreeAlertTaskParamsTaskType | Unset): + pagertree_alert_id (str | Unset): The prefix ID of the Pagertree alert + title (str | Unset): Title of alert as text + description (str | Unset): Description of alert as text + urgency (UpdatePagertreeAlertTaskParamsUrgency | Unset): + severity (UpdatePagertreeAlertTaskParamsSeverity | Unset): + teams (list[UpdatePagertreeAlertTaskParamsTeamsItem] | Unset): + users (list[UpdatePagertreeAlertTaskParamsUsersItem] | Unset): + incident (bool | Unset): Setting to true makes an alert a Pagertree incident """ - task_type: Unset | UpdatePagertreeAlertTaskParamsTaskType = UNSET - pagertree_alert_id: Unset | str = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - urgency: Unset | UpdatePagertreeAlertTaskParamsUrgency = UNSET - severity: Unset | UpdatePagertreeAlertTaskParamsSeverity = UNSET - teams: Unset | list["UpdatePagertreeAlertTaskParamsTeamsItem"] = UNSET - users: Unset | list["UpdatePagertreeAlertTaskParamsUsersItem"] = UNSET - incident: Unset | bool = UNSET + task_type: UpdatePagertreeAlertTaskParamsTaskType | Unset = UNSET + pagertree_alert_id: str | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + urgency: UpdatePagertreeAlertTaskParamsUrgency | Unset = UNSET + severity: UpdatePagertreeAlertTaskParamsSeverity | Unset = UNSET + teams: list[UpdatePagertreeAlertTaskParamsTeamsItem] | Unset = UNSET + users: list[UpdatePagertreeAlertTaskParamsUsersItem] | Unset = UNSET + incident: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -63,22 +65,22 @@ def to_dict(self) -> dict[str, Any]: description = self.description - urgency: Unset | str = UNSET + urgency: str | Unset = UNSET if not isinstance(self.urgency, Unset): urgency = self.urgency - severity: Unset | str = UNSET + severity: str | Unset = UNSET if not isinstance(self.severity, Unset): severity = self.severity - teams: Unset | list[dict[str, Any]] = UNSET + teams: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.teams, Unset): teams = [] for teams_item_data in self.teams: teams_item = teams_item_data.to_dict() teams.append(teams_item) - users: Unset | list[dict[str, Any]] = UNSET + users: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.users, Unset): users = [] for users_item_data in self.users: @@ -118,7 +120,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdatePagertreeAlertTaskParamsTaskType + task_type: UpdatePagertreeAlertTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -131,32 +133,36 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _urgency = d.pop("urgency", UNSET) - urgency: Unset | UpdatePagertreeAlertTaskParamsUrgency + urgency: UpdatePagertreeAlertTaskParamsUrgency | Unset if isinstance(_urgency, Unset): urgency = UNSET else: urgency = check_update_pagertree_alert_task_params_urgency(_urgency) _severity = d.pop("severity", UNSET) - severity: Unset | UpdatePagertreeAlertTaskParamsSeverity + severity: UpdatePagertreeAlertTaskParamsSeverity | Unset if isinstance(_severity, Unset): severity = UNSET else: severity = check_update_pagertree_alert_task_params_severity(_severity) - teams = [] _teams = d.pop("teams", UNSET) - for teams_item_data in _teams or []: - teams_item = UpdatePagertreeAlertTaskParamsTeamsItem.from_dict(teams_item_data) + teams: list[UpdatePagertreeAlertTaskParamsTeamsItem] | Unset = UNSET + if _teams is not UNSET: + teams = [] + for teams_item_data in _teams: + teams_item = UpdatePagertreeAlertTaskParamsTeamsItem.from_dict(teams_item_data) - teams.append(teams_item) + teams.append(teams_item) - users = [] _users = d.pop("users", UNSET) - for users_item_data in _users or []: - users_item = UpdatePagertreeAlertTaskParamsUsersItem.from_dict(users_item_data) + users: list[UpdatePagertreeAlertTaskParamsUsersItem] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = UpdatePagertreeAlertTaskParamsUsersItem.from_dict(users_item_data) - users.append(users_item) + users.append(users_item) incident = d.pop("incident", UNSET) diff --git a/rootly_sdk/models/update_pagertree_alert_task_params_teams_item.py b/rootly_sdk/models/update_pagertree_alert_task_params_teams_item.py index 1c7a5f64..6bd86d6a 100644 --- a/rootly_sdk/models/update_pagertree_alert_task_params_teams_item.py +++ b/rootly_sdk/models/update_pagertree_alert_task_params_teams_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdatePagertreeAlertTaskParamsTeamsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_pagertree_alert_task_params_users_item.py b/rootly_sdk/models/update_pagertree_alert_task_params_users_item.py index fbf4cec1..8f9a0105 100644 --- a/rootly_sdk/models/update_pagertree_alert_task_params_users_item.py +++ b/rootly_sdk/models/update_pagertree_alert_task_params_users_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdatePagertreeAlertTaskParamsUsersItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_playbook.py b/rootly_sdk/models/update_playbook.py index 3155be8a..dacdebe3 100644 --- a/rootly_sdk/models/update_playbook.py +++ b/rootly_sdk/models/update_playbook.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdatePlaybook: data (UpdatePlaybookData): """ - data: "UpdatePlaybookData" + data: UpdatePlaybookData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_playbook_data.py b/rootly_sdk/models/update_playbook_data.py index 55556936..dcd2a4b9 100644 --- a/rootly_sdk/models/update_playbook_data.py +++ b/rootly_sdk/models/update_playbook_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdatePlaybookData: """ type_: UpdatePlaybookDataType - attributes: "UpdatePlaybookDataAttributes" + attributes: UpdatePlaybookDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_playbook_data_attributes.py b/rootly_sdk/models/update_playbook_data_attributes.py index 78d0a41a..c98736b1 100644 --- a/rootly_sdk/models/update_playbook_data_attributes.py +++ b/rootly_sdk/models/update_playbook_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,43 +14,43 @@ class UpdatePlaybookDataAttributes: """ Attributes: - title (Union[Unset, str]): The title of the playbook - summary (Union[None, Unset, str]): The summary of the playbook - external_url (Union[None, Unset, str]): The external url of the playbook - severity_ids (Union[None, Unset, list[str]]): The Severity IDs to attach to the incident - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the incident - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the incident - functionality_ids (Union[None, Unset, list[str]]): The Functionality IDs to attach to the incident - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the incident - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the incident + title (str | Unset): The title of the playbook + summary (None | str | Unset): The summary of the playbook + external_url (None | str | Unset): The external url of the playbook + severity_ids (list[str] | None | Unset): The Severity IDs to attach to the incident + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the incident + service_ids (list[str] | None | Unset): The Service IDs to attach to the incident + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the incident + group_ids (list[str] | None | Unset): The Team IDs to attach to the incident + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the incident """ - title: Unset | str = UNSET - summary: None | Unset | str = UNSET - external_url: None | Unset | str = UNSET - severity_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - functionality_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + title: str | Unset = UNSET + summary: None | str | Unset = UNSET + external_url: None | str | Unset = UNSET + severity_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + functionality_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - summary: None | Unset | str + summary: None | str | Unset if isinstance(self.summary, Unset): summary = UNSET else: summary = self.summary - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -57,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -66,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -75,7 +77,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - functionality_ids: None | Unset | list[str] + functionality_ids: list[str] | None | Unset if isinstance(self.functionality_ids, Unset): functionality_ids = UNSET elif isinstance(self.functionality_ids, list): @@ -84,7 +86,7 @@ def to_dict(self) -> dict[str, Any]: else: functionality_ids = self.functionality_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -93,7 +95,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -131,25 +133,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title", UNSET) - def _parse_summary(data: object) -> None | Unset | str: + def _parse_summary(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) summary = _parse_summary(d.pop("summary", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -160,13 +162,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -177,13 +179,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -194,13 +196,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_functionality_ids(data: object) -> None | Unset | list[str]: + def _parse_functionality_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -211,13 +213,13 @@ def _parse_functionality_ids(data: object) -> None | Unset | list[str]: functionality_ids_type_0 = cast(list[str], data) return functionality_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -228,13 +230,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -245,9 +247,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/update_playbook_task.py b/rootly_sdk/models/update_playbook_task.py index 56544842..33210449 100644 --- a/rootly_sdk/models/update_playbook_task.py +++ b/rootly_sdk/models/update_playbook_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdatePlaybookTask: data (UpdatePlaybookTaskData): """ - data: "UpdatePlaybookTaskData" + data: UpdatePlaybookTaskData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_playbook_task_data.py b/rootly_sdk/models/update_playbook_task_data.py index 0eb8ab5f..5fabc110 100644 --- a/rootly_sdk/models/update_playbook_task_data.py +++ b/rootly_sdk/models/update_playbook_task_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdatePlaybookTaskData: """ type_: UpdatePlaybookTaskDataType - attributes: "UpdatePlaybookTaskDataAttributes" + attributes: UpdatePlaybookTaskDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_playbook_task_data_attributes.py b/rootly_sdk/models/update_playbook_task_data_attributes.py index 858224cb..a8ef0615 100644 --- a/rootly_sdk/models/update_playbook_task_data_attributes.py +++ b/rootly_sdk/models/update_playbook_task_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,25 +14,25 @@ class UpdatePlaybookTaskDataAttributes: """ Attributes: - task (Union[Unset, str]): The task of the task - description (Union[None, Unset, str]): The description of the task - position (Union[None, Unset, int]): The position of the task + task (str | Unset): The task of the task + description (None | str | Unset): The description of the task + position (int | None | Unset): The position of the task """ - task: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + task: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: task = self.task - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -53,21 +55,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) task = d.pop("task", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_post_mortem_template.py b/rootly_sdk/models/update_post_mortem_template.py index 2ef52623..f54f9f01 100644 --- a/rootly_sdk/models/update_post_mortem_template.py +++ b/rootly_sdk/models/update_post_mortem_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdatePostMortemTemplate: data (UpdatePostMortemTemplateData): """ - data: "UpdatePostMortemTemplateData" + data: UpdatePostMortemTemplateData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_post_mortem_template_data.py b/rootly_sdk/models/update_post_mortem_template_data.py index b7139ea7..21b139e3 100644 --- a/rootly_sdk/models/update_post_mortem_template_data.py +++ b/rootly_sdk/models/update_post_mortem_template_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdatePostMortemTemplateData: """ type_: UpdatePostMortemTemplateDataType - attributes: "UpdatePostMortemTemplateDataAttributes" + attributes: UpdatePostMortemTemplateDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_post_mortem_template_data_attributes.py b/rootly_sdk/models/update_post_mortem_template_data_attributes.py index 1ab06cd6..25c498be 100644 --- a/rootly_sdk/models/update_post_mortem_template_data_attributes.py +++ b/rootly_sdk/models/update_post_mortem_template_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,22 +18,22 @@ class UpdatePostMortemTemplateDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the postmortem template - default (Union[None, Unset, bool]): Default selected template when editing a postmortem - content (Union[Unset, str]): The postmortem template. Supports TipTap blocks (followup and timeline components), + name (str | Unset): The name of the postmortem template + default (bool | None | Unset): Default selected template when editing a postmortem + content (str | Unset): The postmortem template. Supports TipTap blocks (followup and timeline components), Liquid syntax, and HTML. Will be sanitized and applied to both content and content_html fields. - format_ (Union[Unset, UpdatePostMortemTemplateDataAttributesFormat]): The format of the input Default: 'html'. + format_ (UpdatePostMortemTemplateDataAttributesFormat | Unset): The format of the input Default: 'html'. """ - name: Unset | str = UNSET - default: None | Unset | bool = UNSET - content: Unset | str = UNSET - format_: Unset | UpdatePostMortemTemplateDataAttributesFormat = "html" + name: str | Unset = UNSET + default: bool | None | Unset = UNSET + content: str | Unset = UNSET + format_: UpdatePostMortemTemplateDataAttributesFormat | Unset = "html" def to_dict(self) -> dict[str, Any]: name = self.name - default: None | Unset | bool + default: bool | None | Unset if isinstance(self.default, Unset): default = UNSET else: @@ -39,7 +41,7 @@ def to_dict(self) -> dict[str, Any]: content = self.content - format_: Unset | str = UNSET + format_: str | Unset = UNSET if not isinstance(self.format_, Unset): format_ = self.format_ @@ -62,19 +64,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_default(data: object) -> None | Unset | bool: + def _parse_default(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) default = _parse_default(d.pop("default", UNSET)) content = d.pop("content", UNSET) _format_ = d.pop("format", UNSET) - format_: Unset | UpdatePostMortemTemplateDataAttributesFormat + format_: UpdatePostMortemTemplateDataAttributesFormat | Unset if isinstance(_format_, Unset): format_ = UNSET else: diff --git a/rootly_sdk/models/update_pulse.py b/rootly_sdk/models/update_pulse.py index 8f92ec5b..611a581c 100644 --- a/rootly_sdk/models/update_pulse.py +++ b/rootly_sdk/models/update_pulse.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdatePulse: data (UpdatePulseData): """ - data: "UpdatePulseData" + data: UpdatePulseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_pulse_data.py b/rootly_sdk/models/update_pulse_data.py index e8c69108..3fd6a551 100644 --- a/rootly_sdk/models/update_pulse_data.py +++ b/rootly_sdk/models/update_pulse_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -19,17 +21,17 @@ class UpdatePulseData: """ Attributes: attributes (UpdatePulseDataAttributes): - type_ (Union[Unset, UpdatePulseDataType]): + type_ (UpdatePulseDataType | Unset): """ - attributes: "UpdatePulseDataAttributes" - type_: Unset | UpdatePulseDataType = UNSET + attributes: UpdatePulseDataAttributes + type_: UpdatePulseDataType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - type_: Unset | str = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ @@ -53,7 +55,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = UpdatePulseDataAttributes.from_dict(d.pop("attributes")) _type_ = d.pop("type", UNSET) - type_: Unset | UpdatePulseDataType + type_: UpdatePulseDataType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/rootly_sdk/models/update_pulse_data_attributes.py b/rootly_sdk/models/update_pulse_data_attributes.py index 8451d755..0defb512 100644 --- a/rootly_sdk/models/update_pulse_data_attributes.py +++ b/rootly_sdk/models/update_pulse_data_attributes.py @@ -1,6 +1,8 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from dateutil.parser import isoparse @@ -20,35 +22,35 @@ class UpdatePulseDataAttributes: """ Attributes: - source (Union[None, Unset, str]): The source of the pulse (eg: k8s) - summary (Union[Unset, str]): The summary of the pulse - service_ids (Union[None, Unset, list[str]]): The Service IDs to attach to the pulse - environment_ids (Union[None, Unset, list[str]]): The Environment IDs to attach to the pulse - started_at (Union[None, Unset, datetime.datetime]): Pulse start datetime - ended_at (Union[None, Unset, datetime.datetime]): Pulse end datetime - external_url (Union[None, Unset, str]): The external url of the pulse - labels (Union[Unset, list[Union['UpdatePulseDataAttributesLabelsItemType0', None]]]): - refs (Union[Unset, list[Union['UpdatePulseDataAttributesRefsItemType0', None]]]): - data (Union['UpdatePulseDataAttributesDataType0', None, Unset]): Additional data + source (None | str | Unset): The source of the pulse (eg: k8s) + summary (str | Unset): The summary of the pulse + service_ids (list[str] | None | Unset): The Service IDs to attach to the pulse + environment_ids (list[str] | None | Unset): The Environment IDs to attach to the pulse + started_at (datetime.datetime | None | Unset): Pulse start datetime + ended_at (datetime.datetime | None | Unset): Pulse end datetime + external_url (None | str | Unset): The external url of the pulse + labels (list[None | UpdatePulseDataAttributesLabelsItemType0] | Unset): + refs (list[None | UpdatePulseDataAttributesRefsItemType0] | Unset): + data (None | Unset | UpdatePulseDataAttributesDataType0): Additional data """ - source: None | Unset | str = UNSET - summary: Unset | str = UNSET - service_ids: None | Unset | list[str] = UNSET - environment_ids: None | Unset | list[str] = UNSET - started_at: None | Unset | datetime.datetime = UNSET - ended_at: None | Unset | datetime.datetime = UNSET - external_url: None | Unset | str = UNSET - labels: Unset | list[Union["UpdatePulseDataAttributesLabelsItemType0", None]] = UNSET - refs: Unset | list[Union["UpdatePulseDataAttributesRefsItemType0", None]] = UNSET - data: Union["UpdatePulseDataAttributesDataType0", None, Unset] = UNSET + source: None | str | Unset = UNSET + summary: str | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + external_url: None | str | Unset = UNSET + labels: list[None | UpdatePulseDataAttributesLabelsItemType0] | Unset = UNSET + refs: list[None | UpdatePulseDataAttributesRefsItemType0] | Unset = UNSET + data: None | Unset | UpdatePulseDataAttributesDataType0 = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_pulse_data_attributes_data_type_0 import UpdatePulseDataAttributesDataType0 from ..models.update_pulse_data_attributes_labels_item_type_0 import UpdatePulseDataAttributesLabelsItemType0 from ..models.update_pulse_data_attributes_refs_item_type_0 import UpdatePulseDataAttributesRefsItemType0 - source: None | Unset | str + source: None | str | Unset if isinstance(self.source, Unset): source = UNSET else: @@ -56,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: summary = self.summary - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -65,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET elif isinstance(self.started_at, datetime.datetime): @@ -82,7 +84,7 @@ def to_dict(self) -> dict[str, Any]: else: started_at = self.started_at - ended_at: None | Unset | str + ended_at: None | str | Unset if isinstance(self.ended_at, Unset): ended_at = UNSET elif isinstance(self.ended_at, datetime.datetime): @@ -90,35 +92,35 @@ def to_dict(self) -> dict[str, Any]: else: ended_at = self.ended_at - external_url: None | Unset | str + external_url: None | str | Unset if isinstance(self.external_url, Unset): external_url = UNSET else: external_url = self.external_url - labels: Unset | list[None | dict[str, Any]] = UNSET + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: - labels_item: None | dict[str, Any] + labels_item: dict[str, Any] | None if isinstance(labels_item_data, UpdatePulseDataAttributesLabelsItemType0): labels_item = labels_item_data.to_dict() else: labels_item = labels_item_data labels.append(labels_item) - refs: Unset | list[None | dict[str, Any]] = UNSET + refs: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.refs, Unset): refs = [] for refs_item_data in self.refs: - refs_item: None | dict[str, Any] + refs_item: dict[str, Any] | None if isinstance(refs_item_data, UpdatePulseDataAttributesRefsItemType0): refs_item = refs_item_data.to_dict() else: refs_item = refs_item_data refs.append(refs_item) - data: None | Unset | dict[str, Any] + data: dict[str, Any] | None | Unset if isinstance(self.data, Unset): data = UNSET elif isinstance(self.data, UpdatePulseDataAttributesDataType0): @@ -160,18 +162,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_source(data: object) -> None | Unset | str: + def _parse_source(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) source = _parse_source(d.pop("source", UNSET)) summary = d.pop("summary", UNSET) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -182,13 +184,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -199,13 +201,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_started_at(data: object) -> None | Unset | datetime.datetime: + def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -216,13 +218,13 @@ def _parse_started_at(data: object) -> None | Unset | datetime.datetime: started_at_type_0 = isoparse(data) return started_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: + def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -233,64 +235,68 @@ def _parse_ended_at(data: object) -> None | Unset | datetime.datetime: ended_at_type_0 = isoparse(data) return ended_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) ended_at = _parse_ended_at(d.pop("ended_at", UNSET)) - def _parse_external_url(data: object) -> None | Unset | str: + def _parse_external_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_url = _parse_external_url(d.pop("external_url", UNSET)) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: + labels: list[None | UpdatePulseDataAttributesLabelsItemType0] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: - def _parse_labels_item(data: object) -> Union["UpdatePulseDataAttributesLabelsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - labels_item_type_0 = UpdatePulseDataAttributesLabelsItemType0.from_dict(data) + def _parse_labels_item(data: object) -> None | UpdatePulseDataAttributesLabelsItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + labels_item_type_0 = UpdatePulseDataAttributesLabelsItemType0.from_dict(data) - return labels_item_type_0 - except: # noqa: E722 - pass - return cast(Union["UpdatePulseDataAttributesLabelsItemType0", None], data) + return labels_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UpdatePulseDataAttributesLabelsItemType0, data) - labels_item = _parse_labels_item(labels_item_data) + labels_item = _parse_labels_item(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) - refs = [] _refs = d.pop("refs", UNSET) - for refs_item_data in _refs or []: + refs: list[None | UpdatePulseDataAttributesRefsItemType0] | Unset = UNSET + if _refs is not UNSET: + refs = [] + for refs_item_data in _refs: - def _parse_refs_item(data: object) -> Union["UpdatePulseDataAttributesRefsItemType0", None]: - if data is None: - return data - try: - if not isinstance(data, dict): - raise TypeError() - refs_item_type_0 = UpdatePulseDataAttributesRefsItemType0.from_dict(data) + def _parse_refs_item(data: object) -> None | UpdatePulseDataAttributesRefsItemType0: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + refs_item_type_0 = UpdatePulseDataAttributesRefsItemType0.from_dict(data) - return refs_item_type_0 - except: # noqa: E722 - pass - return cast(Union["UpdatePulseDataAttributesRefsItemType0", None], data) + return refs_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | UpdatePulseDataAttributesRefsItemType0, data) - refs_item = _parse_refs_item(refs_item_data) + refs_item = _parse_refs_item(refs_item_data) - refs.append(refs_item) + refs.append(refs_item) - def _parse_data(data: object) -> Union["UpdatePulseDataAttributesDataType0", None, Unset]: + def _parse_data(data: object) -> None | Unset | UpdatePulseDataAttributesDataType0: if data is None: return data if isinstance(data, Unset): @@ -301,9 +307,9 @@ def _parse_data(data: object) -> Union["UpdatePulseDataAttributesDataType0", Non data_type_0 = UpdatePulseDataAttributesDataType0.from_dict(data) return data_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdatePulseDataAttributesDataType0", None, Unset], data) + return cast(None | Unset | UpdatePulseDataAttributesDataType0, data) data = _parse_data(d.pop("data", UNSET)) diff --git a/rootly_sdk/models/update_pulse_data_attributes_data_type_0.py b/rootly_sdk/models/update_pulse_data_attributes_data_type_0.py index 06fff96b..30981982 100644 --- a/rootly_sdk/models/update_pulse_data_attributes_data_type_0.py +++ b/rootly_sdk/models/update_pulse_data_attributes_data_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class UpdatePulseDataAttributesDataType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/update_pulse_data_attributes_labels_item_type_0.py b/rootly_sdk/models/update_pulse_data_attributes_labels_item_type_0.py index 9c825e31..f677ef10 100644 --- a/rootly_sdk/models/update_pulse_data_attributes_labels_item_type_0.py +++ b/rootly_sdk/models/update_pulse_data_attributes_labels_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_pulse_data_attributes_refs_item_type_0.py b/rootly_sdk/models/update_pulse_data_attributes_refs_item_type_0.py index ceff1b7a..8d76f43b 100644 --- a/rootly_sdk/models/update_pulse_data_attributes_refs_item_type_0.py +++ b/rootly_sdk/models/update_pulse_data_attributes_refs_item_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_quip_page_task_params.py b/rootly_sdk/models/update_quip_page_task_params.py index de4bf983..3de18173 100644 --- a/rootly_sdk/models/update_quip_page_task_params.py +++ b/rootly_sdk/models/update_quip_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,25 +20,25 @@ class UpdateQuipPageTaskParams: """ Attributes: file_id (str): The Quip page ID - task_type (Union[Unset, UpdateQuipPageTaskParamsTaskType]): - title (Union[Unset, str]): The Quip page title - content (Union[Unset, str]): The Quip page content - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when updating page, if desired - template_id (Union[Unset, str]): The Quip file ID to use as a template + task_type (UpdateQuipPageTaskParamsTaskType | Unset): + title (str | Unset): The Quip page title + content (str | Unset): The Quip page content + post_mortem_template_id (str | Unset): Retrospective template to use when updating page, if desired + template_id (str | Unset): The Quip file ID to use as a template """ file_id: str - task_type: Unset | UpdateQuipPageTaskParamsTaskType = UNSET - title: Unset | str = UNSET - content: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET - template_id: Unset | str = UNSET + task_type: UpdateQuipPageTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + content: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET + template_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -74,7 +76,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateQuipPageTaskParamsTaskType + task_type: UpdateQuipPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_retrospective_configuration.py b/rootly_sdk/models/update_retrospective_configuration.py index b193a418..f38dfde6 100644 --- a/rootly_sdk/models/update_retrospective_configuration.py +++ b/rootly_sdk/models/update_retrospective_configuration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateRetrospectiveConfiguration: data (UpdateRetrospectiveConfigurationData): """ - data: "UpdateRetrospectiveConfigurationData" + data: UpdateRetrospectiveConfigurationData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_configuration_data.py b/rootly_sdk/models/update_retrospective_configuration_data.py index 35842ed6..78848b1a 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data.py +++ b/rootly_sdk/models/update_retrospective_configuration_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateRetrospectiveConfigurationData: """ type_: UpdateRetrospectiveConfigurationDataType - attributes: "UpdateRetrospectiveConfigurationDataAttributes" + attributes: UpdateRetrospectiveConfigurationDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_configuration_data_attributes.py b/rootly_sdk/models/update_retrospective_configuration_data_attributes.py index 318b73d8..969dbf0b 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_configuration_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,18 +14,17 @@ class UpdateRetrospectiveConfigurationDataAttributes: """ Attributes: - severity_ids (Union[None, Unset, list[str]]): The Severity IDs to attach to the retrospective configuration - group_ids (Union[None, Unset, list[str]]): The Team IDs to attach to the retrospective configuration - incident_type_ids (Union[None, Unset, list[str]]): The Incident Type IDs to attach to the retrospective - configuration + severity_ids (list[str] | None | Unset): The Severity IDs to attach to the retrospective configuration + group_ids (list[str] | None | Unset): The Team IDs to attach to the retrospective configuration + incident_type_ids (list[str] | None | Unset): The Incident Type IDs to attach to the retrospective configuration """ - severity_ids: None | Unset | list[str] = UNSET - group_ids: None | Unset | list[str] = UNSET - incident_type_ids: None | Unset | list[str] = UNSET + severity_ids: list[str] | None | Unset = UNSET + group_ids: list[str] | None | Unset = UNSET + incident_type_ids: list[str] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: - severity_ids: None | Unset | list[str] + severity_ids: list[str] | None | Unset if isinstance(self.severity_ids, Unset): severity_ids = UNSET elif isinstance(self.severity_ids, list): @@ -32,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: else: severity_ids = self.severity_ids - group_ids: None | Unset | list[str] + group_ids: list[str] | None | Unset if isinstance(self.group_ids, Unset): group_ids = UNSET elif isinstance(self.group_ids, list): @@ -41,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids - incident_type_ids: None | Unset | list[str] + incident_type_ids: list[str] | None | Unset if isinstance(self.incident_type_ids, Unset): incident_type_ids = UNSET elif isinstance(self.incident_type_ids, list): @@ -66,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_severity_ids(data: object) -> None | Unset | list[str]: + def _parse_severity_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -77,13 +78,13 @@ def _parse_severity_ids(data: object) -> None | Unset | list[str]: severity_ids_type_0 = cast(list[str], data) return severity_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) severity_ids = _parse_severity_ids(d.pop("severity_ids", UNSET)) - def _parse_group_ids(data: object) -> None | Unset | list[str]: + def _parse_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -94,13 +95,13 @@ def _parse_group_ids(data: object) -> None | Unset | list[str]: group_ids_type_0 = cast(list[str], data) return group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) - def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: + def _parse_incident_type_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -111,9 +112,9 @@ def _parse_incident_type_ids(data: object) -> None | Unset | list[str]: incident_type_ids_type_0 = cast(list[str], data) return incident_type_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) incident_type_ids = _parse_incident_type_ids(d.pop("incident_type_ids", UNSET)) diff --git a/rootly_sdk/models/update_retrospective_process.py b/rootly_sdk/models/update_retrospective_process.py index b5e48c48..20d10cf0 100644 --- a/rootly_sdk/models/update_retrospective_process.py +++ b/rootly_sdk/models/update_retrospective_process.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateRetrospectiveProcess: data (UpdateRetrospectiveProcessData): """ - data: "UpdateRetrospectiveProcessData" + data: UpdateRetrospectiveProcessData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_process_data.py b/rootly_sdk/models/update_retrospective_process_data.py index 592d517b..a221364c 100644 --- a/rootly_sdk/models/update_retrospective_process_data.py +++ b/rootly_sdk/models/update_retrospective_process_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateRetrospectiveProcessData: """ type_: UpdateRetrospectiveProcessDataType - attributes: "UpdateRetrospectiveProcessDataAttributes" + attributes: UpdateRetrospectiveProcessDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_process_data_attributes.py b/rootly_sdk/models/update_retrospective_process_data_attributes.py index 36f56c48..2627b37f 100644 --- a/rootly_sdk/models/update_retrospective_process_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_process_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -24,22 +26,22 @@ class UpdateRetrospectiveProcessDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the retrospective process - description (Union[None, Unset, str]): The description of the retrospective process - retrospective_process_matching_criteria - (Union['UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0', - 'UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1', - 'UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2', Unset]): + name (str | Unset): The name of the retrospective process + description (None | str | Unset): The description of the retrospective process + retrospective_process_matching_criteria (Unset | + UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0 | + UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1 | + UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - retrospective_process_matching_criteria: Union[ - "UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0", - "UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1", - "UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2", - Unset, - ] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + retrospective_process_matching_criteria: ( + Unset + | UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0 + | UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1 + | UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2 + ) = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( @@ -51,13 +53,13 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - retrospective_process_matching_criteria: Unset | dict[str, Any] + retrospective_process_matching_criteria: dict[str, Any] | Unset if isinstance(self.retrospective_process_matching_criteria, Unset): retrospective_process_matching_criteria = UNSET elif isinstance( @@ -100,23 +102,23 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) def _parse_retrospective_process_matching_criteria( data: object, - ) -> Union[ - "UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0", - "UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1", - "UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2", - Unset, - ]: + ) -> ( + Unset + | UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0 + | UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1 + | UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2 + ): if isinstance(data, Unset): return data try: @@ -127,7 +129,7 @@ def _parse_retrospective_process_matching_criteria( ) return retrospective_process_matching_criteria_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -137,7 +139,7 @@ def _parse_retrospective_process_matching_criteria( ) return retrospective_process_matching_criteria_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py b/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py index 59823a93..5fe8b8ec 100644 --- a/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py +++ b/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py b/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py index 0ccf8f66..51a20fd7 100644 --- a/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py +++ b/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py b/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py index 4f61a7b2..f8c3eab1 100644 --- a/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py +++ b/rootly_sdk/models/update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast diff --git a/rootly_sdk/models/update_retrospective_process_group.py b/rootly_sdk/models/update_retrospective_process_group.py index 95e59d85..5f6e1847 100644 --- a/rootly_sdk/models/update_retrospective_process_group.py +++ b/rootly_sdk/models/update_retrospective_process_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateRetrospectiveProcessGroup: data (UpdateRetrospectiveProcessGroupData): """ - data: "UpdateRetrospectiveProcessGroupData" + data: UpdateRetrospectiveProcessGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_process_group_data.py b/rootly_sdk/models/update_retrospective_process_group_data.py index 8a9b04c0..f3f057ca 100644 --- a/rootly_sdk/models/update_retrospective_process_group_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateRetrospectiveProcessGroupData: """ type_: UpdateRetrospectiveProcessGroupDataType - attributes: "UpdateRetrospectiveProcessGroupDataAttributes" + attributes: UpdateRetrospectiveProcessGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_process_group_data_attributes.py b/rootly_sdk/models/update_retrospective_process_group_data_attributes.py index 6c573ac5..b34d1eac 100644 --- a/rootly_sdk/models/update_retrospective_process_group_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_process_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,12 +14,12 @@ class UpdateRetrospectiveProcessGroupDataAttributes: """ Attributes: - sub_status_id (Union[Unset, str]): - position (Union[Unset, int]): + sub_status_id (str | Unset): + position (int | Unset): """ - sub_status_id: Unset | str = UNSET - position: Unset | int = UNSET + sub_status_id: str | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: sub_status_id = self.sub_status_id diff --git a/rootly_sdk/models/update_retrospective_process_group_step.py b/rootly_sdk/models/update_retrospective_process_group_step.py index 59c0725f..196c2b45 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step.py +++ b/rootly_sdk/models/update_retrospective_process_group_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateRetrospectiveProcessGroupStep: data (UpdateRetrospectiveProcessGroupStepData): """ - data: "UpdateRetrospectiveProcessGroupStepData" + data: UpdateRetrospectiveProcessGroupStepData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_process_group_step_data.py b/rootly_sdk/models/update_retrospective_process_group_step_data.py index 72ecd8b3..82f7502b 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_step_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateRetrospectiveProcessGroupStepData: """ type_: UpdateRetrospectiveProcessGroupStepDataType - attributes: "UpdateRetrospectiveProcessGroupStepDataAttributes" + attributes: UpdateRetrospectiveProcessGroupStepDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_process_group_step_data_attributes.py b/rootly_sdk/models/update_retrospective_process_group_step_data_attributes.py index 2568f90e..76b6e3c0 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_process_group_step_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,10 +14,10 @@ class UpdateRetrospectiveProcessGroupStepDataAttributes: """ Attributes: - position (Union[Unset, int]): + position (int | Unset): """ - position: Unset | int = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: position = self.position diff --git a/rootly_sdk/models/update_retrospective_step.py b/rootly_sdk/models/update_retrospective_step.py index bc6d3b12..611bb37a 100644 --- a/rootly_sdk/models/update_retrospective_step.py +++ b/rootly_sdk/models/update_retrospective_step.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateRetrospectiveStep: data (UpdateRetrospectiveStepData): """ - data: "UpdateRetrospectiveStepData" + data: UpdateRetrospectiveStepData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_step_data.py b/rootly_sdk/models/update_retrospective_step_data.py index 1034ebad..6d5b1471 100644 --- a/rootly_sdk/models/update_retrospective_step_data.py +++ b/rootly_sdk/models/update_retrospective_step_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateRetrospectiveStepData: """ type_: UpdateRetrospectiveStepDataType - attributes: "UpdateRetrospectiveStepDataAttributes" + attributes: UpdateRetrospectiveStepDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_retrospective_step_data_attributes.py b/rootly_sdk/models/update_retrospective_step_data_attributes.py index a811e2a6..421a8240 100644 --- a/rootly_sdk/models/update_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_step_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,44 +14,44 @@ class UpdateRetrospectiveStepDataAttributes: """ Attributes: - title (Union[Unset, str]): The name of the step - description (Union[None, Unset, str]): The description of the step - incident_role_id (Union[None, Unset, str]): Users assigned to the selected incident role will be the default - owners for this step - due_after_days (Union[None, Unset, int]): Due date in days - position (Union[None, Unset, int]): Position of the step - skippable (Union[Unset, bool]): Is the step skippable? + title (str | Unset): The name of the step + description (None | str | Unset): The description of the step + incident_role_id (None | str | Unset): Users assigned to the selected incident role will be the default owners + for this step + due_after_days (int | None | Unset): Due date in days + position (int | None | Unset): Position of the step + skippable (bool | Unset): Is the step skippable? """ - title: Unset | str = UNSET - description: None | Unset | str = UNSET - incident_role_id: None | Unset | str = UNSET - due_after_days: None | Unset | int = UNSET - position: None | Unset | int = UNSET - skippable: Unset | bool = UNSET + title: str | Unset = UNSET + description: None | str | Unset = UNSET + incident_role_id: None | str | Unset = UNSET + due_after_days: int | None | Unset = UNSET + position: int | None | Unset = UNSET + skippable: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - incident_role_id: None | Unset | str + incident_role_id: None | str | Unset if isinstance(self.incident_role_id, Unset): incident_role_id = UNSET else: incident_role_id = self.incident_role_id - due_after_days: None | Unset | int + due_after_days: int | None | Unset if isinstance(self.due_after_days, Unset): due_after_days = UNSET else: due_after_days = self.due_after_days - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -80,39 +82,39 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_incident_role_id(data: object) -> None | Unset | str: + def _parse_incident_role_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_role_id = _parse_incident_role_id(d.pop("incident_role_id", UNSET)) - def _parse_due_after_days(data: object) -> None | Unset | int: + def _parse_due_after_days(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) due_after_days = _parse_due_after_days(d.pop("due_after_days", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_role.py b/rootly_sdk/models/update_role.py index 0e36ba39..4e0f5815 100644 --- a/rootly_sdk/models/update_role.py +++ b/rootly_sdk/models/update_role.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateRole: data (UpdateRoleData): """ - data: "UpdateRoleData" + data: UpdateRoleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_role_data.py b/rootly_sdk/models/update_role_data.py index c334e4fe..3252ed3f 100644 --- a/rootly_sdk/models/update_role_data.py +++ b/rootly_sdk/models/update_role_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateRoleData: """ type_: UpdateRoleDataType - attributes: "UpdateRoleDataAttributes" + attributes: UpdateRoleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_role_data_attributes.py b/rootly_sdk/models/update_role_data_attributes.py index ca07e603..07ecec3c 100644 --- a/rootly_sdk/models/update_role_data_attributes.py +++ b/rootly_sdk/models/update_role_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -15,6 +17,18 @@ UpdateRoleDataAttributesBillingPermissionsItem, check_update_role_data_attributes_billing_permissions_item, ) +from ..models.update_role_data_attributes_catalogs_permissions_item import ( + UpdateRoleDataAttributesCatalogsPermissionsItem, + check_update_role_data_attributes_catalogs_permissions_item, +) +from ..models.update_role_data_attributes_communication_permissions_item import ( + UpdateRoleDataAttributesCommunicationPermissionsItem, + check_update_role_data_attributes_communication_permissions_item, +) +from ..models.update_role_data_attributes_edge_connector_permissions_item import ( + UpdateRoleDataAttributesEdgeConnectorPermissionsItem, + check_update_role_data_attributes_edge_connector_permissions_item, +) from ..models.update_role_data_attributes_environments_permissions_item import ( UpdateRoleDataAttributesEnvironmentsPermissionsItem, check_update_role_data_attributes_environments_permissions_item, @@ -35,6 +49,10 @@ UpdateRoleDataAttributesIncidentCausesPermissionsItem, check_update_role_data_attributes_incident_causes_permissions_item, ) +from ..models.update_role_data_attributes_incident_communication_permissions_item import ( + UpdateRoleDataAttributesIncidentCommunicationPermissionsItem, + check_update_role_data_attributes_incident_communication_permissions_item, +) from ..models.update_role_data_attributes_incident_feedbacks_permissions_item import ( UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem, check_update_role_data_attributes_incident_feedbacks_permissions_item, @@ -59,6 +77,10 @@ UpdateRoleDataAttributesInvitationsPermissionsItem, check_update_role_data_attributes_invitations_permissions_item, ) +from ..models.update_role_data_attributes_paging_permissions_item import ( + UpdateRoleDataAttributesPagingPermissionsItem, + check_update_role_data_attributes_paging_permissions_item, +) from ..models.update_role_data_attributes_playbooks_permissions_item import ( UpdateRoleDataAttributesPlaybooksPermissionsItem, check_update_role_data_attributes_playbooks_permissions_item, @@ -87,10 +109,18 @@ UpdateRoleDataAttributesSeveritiesPermissionsItem, check_update_role_data_attributes_severities_permissions_item, ) +from ..models.update_role_data_attributes_slas_permissions_item import ( + UpdateRoleDataAttributesSlasPermissionsItem, + check_update_role_data_attributes_slas_permissions_item, +) from ..models.update_role_data_attributes_status_pages_permissions_item import ( UpdateRoleDataAttributesStatusPagesPermissionsItem, check_update_role_data_attributes_status_pages_permissions_item, ) +from ..models.update_role_data_attributes_sub_statuses_permissions_item import ( + UpdateRoleDataAttributesSubStatusesPermissionsItem, + check_update_role_data_attributes_sub_statuses_permissions_item, +) from ..models.update_role_data_attributes_webhooks_permissions_item import ( UpdateRoleDataAttributesWebhooksPermissionsItem, check_update_role_data_attributes_webhooks_permissions_item, @@ -108,69 +138,85 @@ class UpdateRoleDataAttributes: """ Attributes: - name (Union[Unset, str]): The role name. - incident_permission_set_id (Union[None, Unset, str]): Associated incident permissions set. - is_deletable (Union[Unset, bool]): Whether the role can be deleted. - is_editable (Union[Unset, bool]): Whether the role can be edited. - api_keys_permissions (Union[Unset, list[UpdateRoleDataAttributesApiKeysPermissionsItem]]): - audits_permissions (Union[Unset, list[UpdateRoleDataAttributesAuditsPermissionsItem]]): - billing_permissions (Union[Unset, list[UpdateRoleDataAttributesBillingPermissionsItem]]): - environments_permissions (Union[Unset, list[UpdateRoleDataAttributesEnvironmentsPermissionsItem]]): - form_fields_permissions (Union[Unset, list[UpdateRoleDataAttributesFormFieldsPermissionsItem]]): - functionalities_permissions (Union[Unset, list[UpdateRoleDataAttributesFunctionalitiesPermissionsItem]]): - groups_permissions (Union[Unset, list[UpdateRoleDataAttributesGroupsPermissionsItem]]): - incident_causes_permissions (Union[Unset, list[UpdateRoleDataAttributesIncidentCausesPermissionsItem]]): - incident_feedbacks_permissions (Union[Unset, list[UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem]]): - incident_roles_permissions (Union[Unset, list[UpdateRoleDataAttributesIncidentRolesPermissionsItem]]): - incident_types_permissions (Union[Unset, list[UpdateRoleDataAttributesIncidentTypesPermissionsItem]]): - incidents_permissions (Union[Unset, list[UpdateRoleDataAttributesIncidentsPermissionsItem]]): - integrations_permissions (Union[Unset, list[UpdateRoleDataAttributesIntegrationsPermissionsItem]]): - invitations_permissions (Union[Unset, list[UpdateRoleDataAttributesInvitationsPermissionsItem]]): - playbooks_permissions (Union[Unset, list[UpdateRoleDataAttributesPlaybooksPermissionsItem]]): - private_incidents_permissions (Union[Unset, list[UpdateRoleDataAttributesPrivateIncidentsPermissionsItem]]): - retrospective_permissions (Union[Unset, list[UpdateRoleDataAttributesRetrospectivePermissionsItem]]): - roles_permissions (Union[Unset, list[UpdateRoleDataAttributesRolesPermissionsItem]]): - secrets_permissions (Union[Unset, list[UpdateRoleDataAttributesSecretsPermissionsItem]]): - services_permissions (Union[Unset, list[UpdateRoleDataAttributesServicesPermissionsItem]]): - severities_permissions (Union[Unset, list[UpdateRoleDataAttributesSeveritiesPermissionsItem]]): - status_pages_permissions (Union[Unset, list[UpdateRoleDataAttributesStatusPagesPermissionsItem]]): - webhooks_permissions (Union[Unset, list[UpdateRoleDataAttributesWebhooksPermissionsItem]]): - workflows_permissions (Union[Unset, list[UpdateRoleDataAttributesWorkflowsPermissionsItem]]): + name (str | Unset): The role name. + incident_permission_set_id (None | str | Unset): Associated incident permissions set. + is_deletable (bool | Unset): Whether the role can be deleted. + is_editable (bool | Unset): Whether the role can be edited. + api_keys_permissions (list[UpdateRoleDataAttributesApiKeysPermissionsItem] | Unset): + audits_permissions (list[UpdateRoleDataAttributesAuditsPermissionsItem] | Unset): + billing_permissions (list[UpdateRoleDataAttributesBillingPermissionsItem] | Unset): + environments_permissions (list[UpdateRoleDataAttributesEnvironmentsPermissionsItem] | Unset): + form_fields_permissions (list[UpdateRoleDataAttributesFormFieldsPermissionsItem] | Unset): + functionalities_permissions (list[UpdateRoleDataAttributesFunctionalitiesPermissionsItem] | Unset): + groups_permissions (list[UpdateRoleDataAttributesGroupsPermissionsItem] | Unset): + incident_causes_permissions (list[UpdateRoleDataAttributesIncidentCausesPermissionsItem] | Unset): + incident_feedbacks_permissions (list[UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem] | Unset): + incident_roles_permissions (list[UpdateRoleDataAttributesIncidentRolesPermissionsItem] | Unset): + incident_types_permissions (list[UpdateRoleDataAttributesIncidentTypesPermissionsItem] | Unset): + incidents_permissions (list[UpdateRoleDataAttributesIncidentsPermissionsItem] | Unset): + integrations_permissions (list[UpdateRoleDataAttributesIntegrationsPermissionsItem] | Unset): + invitations_permissions (list[UpdateRoleDataAttributesInvitationsPermissionsItem] | Unset): + playbooks_permissions (list[UpdateRoleDataAttributesPlaybooksPermissionsItem] | Unset): + private_incidents_permissions (list[UpdateRoleDataAttributesPrivateIncidentsPermissionsItem] | Unset): + retrospective_permissions (list[UpdateRoleDataAttributesRetrospectivePermissionsItem] | Unset): + roles_permissions (list[UpdateRoleDataAttributesRolesPermissionsItem] | Unset): + secrets_permissions (list[UpdateRoleDataAttributesSecretsPermissionsItem] | Unset): + services_permissions (list[UpdateRoleDataAttributesServicesPermissionsItem] | Unset): + severities_permissions (list[UpdateRoleDataAttributesSeveritiesPermissionsItem] | Unset): + status_pages_permissions (list[UpdateRoleDataAttributesStatusPagesPermissionsItem] | Unset): + webhooks_permissions (list[UpdateRoleDataAttributesWebhooksPermissionsItem] | Unset): + workflows_permissions (list[UpdateRoleDataAttributesWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[UpdateRoleDataAttributesCatalogsPermissionsItem] | Unset): + sub_statuses_permissions (list[UpdateRoleDataAttributesSubStatusesPermissionsItem] | Unset): + edge_connector_permissions (list[UpdateRoleDataAttributesEdgeConnectorPermissionsItem] | Unset): + slas_permissions (list[UpdateRoleDataAttributesSlasPermissionsItem] | Unset): + paging_permissions (list[UpdateRoleDataAttributesPagingPermissionsItem] | Unset): + incident_communication_permissions (list[UpdateRoleDataAttributesIncidentCommunicationPermissionsItem] | Unset): + communication_permissions (list[UpdateRoleDataAttributesCommunicationPermissionsItem] | Unset): """ - name: Unset | str = UNSET - incident_permission_set_id: None | Unset | str = UNSET - is_deletable: Unset | bool = UNSET - is_editable: Unset | bool = UNSET - api_keys_permissions: Unset | list[UpdateRoleDataAttributesApiKeysPermissionsItem] = UNSET - audits_permissions: Unset | list[UpdateRoleDataAttributesAuditsPermissionsItem] = UNSET - billing_permissions: Unset | list[UpdateRoleDataAttributesBillingPermissionsItem] = UNSET - environments_permissions: Unset | list[UpdateRoleDataAttributesEnvironmentsPermissionsItem] = UNSET - form_fields_permissions: Unset | list[UpdateRoleDataAttributesFormFieldsPermissionsItem] = UNSET - functionalities_permissions: Unset | list[UpdateRoleDataAttributesFunctionalitiesPermissionsItem] = UNSET - groups_permissions: Unset | list[UpdateRoleDataAttributesGroupsPermissionsItem] = UNSET - incident_causes_permissions: Unset | list[UpdateRoleDataAttributesIncidentCausesPermissionsItem] = UNSET - incident_feedbacks_permissions: Unset | list[UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem] = UNSET - incident_roles_permissions: Unset | list[UpdateRoleDataAttributesIncidentRolesPermissionsItem] = UNSET - incident_types_permissions: Unset | list[UpdateRoleDataAttributesIncidentTypesPermissionsItem] = UNSET - incidents_permissions: Unset | list[UpdateRoleDataAttributesIncidentsPermissionsItem] = UNSET - integrations_permissions: Unset | list[UpdateRoleDataAttributesIntegrationsPermissionsItem] = UNSET - invitations_permissions: Unset | list[UpdateRoleDataAttributesInvitationsPermissionsItem] = UNSET - playbooks_permissions: Unset | list[UpdateRoleDataAttributesPlaybooksPermissionsItem] = UNSET - private_incidents_permissions: Unset | list[UpdateRoleDataAttributesPrivateIncidentsPermissionsItem] = UNSET - retrospective_permissions: Unset | list[UpdateRoleDataAttributesRetrospectivePermissionsItem] = UNSET - roles_permissions: Unset | list[UpdateRoleDataAttributesRolesPermissionsItem] = UNSET - secrets_permissions: Unset | list[UpdateRoleDataAttributesSecretsPermissionsItem] = UNSET - services_permissions: Unset | list[UpdateRoleDataAttributesServicesPermissionsItem] = UNSET - severities_permissions: Unset | list[UpdateRoleDataAttributesSeveritiesPermissionsItem] = UNSET - status_pages_permissions: Unset | list[UpdateRoleDataAttributesStatusPagesPermissionsItem] = UNSET - webhooks_permissions: Unset | list[UpdateRoleDataAttributesWebhooksPermissionsItem] = UNSET - workflows_permissions: Unset | list[UpdateRoleDataAttributesWorkflowsPermissionsItem] = UNSET + name: str | Unset = UNSET + incident_permission_set_id: None | str | Unset = UNSET + is_deletable: bool | Unset = UNSET + is_editable: bool | Unset = UNSET + api_keys_permissions: list[UpdateRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + audits_permissions: list[UpdateRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + billing_permissions: list[UpdateRoleDataAttributesBillingPermissionsItem] | Unset = UNSET + environments_permissions: list[UpdateRoleDataAttributesEnvironmentsPermissionsItem] | Unset = UNSET + form_fields_permissions: list[UpdateRoleDataAttributesFormFieldsPermissionsItem] | Unset = UNSET + functionalities_permissions: list[UpdateRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + groups_permissions: list[UpdateRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + incident_causes_permissions: list[UpdateRoleDataAttributesIncidentCausesPermissionsItem] | Unset = UNSET + incident_feedbacks_permissions: list[UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem] | Unset = UNSET + incident_roles_permissions: list[UpdateRoleDataAttributesIncidentRolesPermissionsItem] | Unset = UNSET + incident_types_permissions: list[UpdateRoleDataAttributesIncidentTypesPermissionsItem] | Unset = UNSET + incidents_permissions: list[UpdateRoleDataAttributesIncidentsPermissionsItem] | Unset = UNSET + integrations_permissions: list[UpdateRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + invitations_permissions: list[UpdateRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + playbooks_permissions: list[UpdateRoleDataAttributesPlaybooksPermissionsItem] | Unset = UNSET + private_incidents_permissions: list[UpdateRoleDataAttributesPrivateIncidentsPermissionsItem] | Unset = UNSET + retrospective_permissions: list[UpdateRoleDataAttributesRetrospectivePermissionsItem] | Unset = UNSET + roles_permissions: list[UpdateRoleDataAttributesRolesPermissionsItem] | Unset = UNSET + secrets_permissions: list[UpdateRoleDataAttributesSecretsPermissionsItem] | Unset = UNSET + services_permissions: list[UpdateRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + severities_permissions: list[UpdateRoleDataAttributesSeveritiesPermissionsItem] | Unset = UNSET + status_pages_permissions: list[UpdateRoleDataAttributesStatusPagesPermissionsItem] | Unset = UNSET + webhooks_permissions: list[UpdateRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + workflows_permissions: list[UpdateRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[UpdateRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + sub_statuses_permissions: list[UpdateRoleDataAttributesSubStatusesPermissionsItem] | Unset = UNSET + edge_connector_permissions: list[UpdateRoleDataAttributesEdgeConnectorPermissionsItem] | Unset = UNSET + slas_permissions: list[UpdateRoleDataAttributesSlasPermissionsItem] | Unset = UNSET + paging_permissions: list[UpdateRoleDataAttributesPagingPermissionsItem] | Unset = UNSET + incident_communication_permissions: list[UpdateRoleDataAttributesIncidentCommunicationPermissionsItem] | Unset = ( + UNSET + ) + communication_permissions: list[UpdateRoleDataAttributesCommunicationPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - incident_permission_set_id: None | Unset | str + incident_permission_set_id: None | str | Unset if isinstance(self.incident_permission_set_id, Unset): incident_permission_set_id = UNSET else: @@ -180,174 +226,223 @@ def to_dict(self) -> dict[str, Any]: is_editable = self.is_editable - api_keys_permissions: Unset | list[str] = UNSET + api_keys_permissions: list[str] | Unset = UNSET if not isinstance(self.api_keys_permissions, Unset): api_keys_permissions = [] for api_keys_permissions_item_data in self.api_keys_permissions: api_keys_permissions_item: str = api_keys_permissions_item_data api_keys_permissions.append(api_keys_permissions_item) - audits_permissions: Unset | list[str] = UNSET + audits_permissions: list[str] | Unset = UNSET if not isinstance(self.audits_permissions, Unset): audits_permissions = [] for audits_permissions_item_data in self.audits_permissions: audits_permissions_item: str = audits_permissions_item_data audits_permissions.append(audits_permissions_item) - billing_permissions: Unset | list[str] = UNSET + billing_permissions: list[str] | Unset = UNSET if not isinstance(self.billing_permissions, Unset): billing_permissions = [] for billing_permissions_item_data in self.billing_permissions: billing_permissions_item: str = billing_permissions_item_data billing_permissions.append(billing_permissions_item) - environments_permissions: Unset | list[str] = UNSET + environments_permissions: list[str] | Unset = UNSET if not isinstance(self.environments_permissions, Unset): environments_permissions = [] for environments_permissions_item_data in self.environments_permissions: environments_permissions_item: str = environments_permissions_item_data environments_permissions.append(environments_permissions_item) - form_fields_permissions: Unset | list[str] = UNSET + form_fields_permissions: list[str] | Unset = UNSET if not isinstance(self.form_fields_permissions, Unset): form_fields_permissions = [] for form_fields_permissions_item_data in self.form_fields_permissions: form_fields_permissions_item: str = form_fields_permissions_item_data form_fields_permissions.append(form_fields_permissions_item) - functionalities_permissions: Unset | list[str] = UNSET + functionalities_permissions: list[str] | Unset = UNSET if not isinstance(self.functionalities_permissions, Unset): functionalities_permissions = [] for functionalities_permissions_item_data in self.functionalities_permissions: functionalities_permissions_item: str = functionalities_permissions_item_data functionalities_permissions.append(functionalities_permissions_item) - groups_permissions: Unset | list[str] = UNSET + groups_permissions: list[str] | Unset = UNSET if not isinstance(self.groups_permissions, Unset): groups_permissions = [] for groups_permissions_item_data in self.groups_permissions: groups_permissions_item: str = groups_permissions_item_data groups_permissions.append(groups_permissions_item) - incident_causes_permissions: Unset | list[str] = UNSET + incident_causes_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_causes_permissions, Unset): incident_causes_permissions = [] for incident_causes_permissions_item_data in self.incident_causes_permissions: incident_causes_permissions_item: str = incident_causes_permissions_item_data incident_causes_permissions.append(incident_causes_permissions_item) - incident_feedbacks_permissions: Unset | list[str] = UNSET + incident_feedbacks_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_feedbacks_permissions, Unset): incident_feedbacks_permissions = [] for incident_feedbacks_permissions_item_data in self.incident_feedbacks_permissions: incident_feedbacks_permissions_item: str = incident_feedbacks_permissions_item_data incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) - incident_roles_permissions: Unset | list[str] = UNSET + incident_roles_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_roles_permissions, Unset): incident_roles_permissions = [] for incident_roles_permissions_item_data in self.incident_roles_permissions: incident_roles_permissions_item: str = incident_roles_permissions_item_data incident_roles_permissions.append(incident_roles_permissions_item) - incident_types_permissions: Unset | list[str] = UNSET + incident_types_permissions: list[str] | Unset = UNSET if not isinstance(self.incident_types_permissions, Unset): incident_types_permissions = [] for incident_types_permissions_item_data in self.incident_types_permissions: incident_types_permissions_item: str = incident_types_permissions_item_data incident_types_permissions.append(incident_types_permissions_item) - incidents_permissions: Unset | list[str] = UNSET + incidents_permissions: list[str] | Unset = UNSET if not isinstance(self.incidents_permissions, Unset): incidents_permissions = [] for incidents_permissions_item_data in self.incidents_permissions: incidents_permissions_item: str = incidents_permissions_item_data incidents_permissions.append(incidents_permissions_item) - integrations_permissions: Unset | list[str] = UNSET + integrations_permissions: list[str] | Unset = UNSET if not isinstance(self.integrations_permissions, Unset): integrations_permissions = [] for integrations_permissions_item_data in self.integrations_permissions: integrations_permissions_item: str = integrations_permissions_item_data integrations_permissions.append(integrations_permissions_item) - invitations_permissions: Unset | list[str] = UNSET + invitations_permissions: list[str] | Unset = UNSET if not isinstance(self.invitations_permissions, Unset): invitations_permissions = [] for invitations_permissions_item_data in self.invitations_permissions: invitations_permissions_item: str = invitations_permissions_item_data invitations_permissions.append(invitations_permissions_item) - playbooks_permissions: Unset | list[str] = UNSET + playbooks_permissions: list[str] | Unset = UNSET if not isinstance(self.playbooks_permissions, Unset): playbooks_permissions = [] for playbooks_permissions_item_data in self.playbooks_permissions: playbooks_permissions_item: str = playbooks_permissions_item_data playbooks_permissions.append(playbooks_permissions_item) - private_incidents_permissions: Unset | list[str] = UNSET + private_incidents_permissions: list[str] | Unset = UNSET if not isinstance(self.private_incidents_permissions, Unset): private_incidents_permissions = [] for private_incidents_permissions_item_data in self.private_incidents_permissions: private_incidents_permissions_item: str = private_incidents_permissions_item_data private_incidents_permissions.append(private_incidents_permissions_item) - retrospective_permissions: Unset | list[str] = UNSET + retrospective_permissions: list[str] | Unset = UNSET if not isinstance(self.retrospective_permissions, Unset): retrospective_permissions = [] for retrospective_permissions_item_data in self.retrospective_permissions: retrospective_permissions_item: str = retrospective_permissions_item_data retrospective_permissions.append(retrospective_permissions_item) - roles_permissions: Unset | list[str] = UNSET + roles_permissions: list[str] | Unset = UNSET if not isinstance(self.roles_permissions, Unset): roles_permissions = [] for roles_permissions_item_data in self.roles_permissions: roles_permissions_item: str = roles_permissions_item_data roles_permissions.append(roles_permissions_item) - secrets_permissions: Unset | list[str] = UNSET + secrets_permissions: list[str] | Unset = UNSET if not isinstance(self.secrets_permissions, Unset): secrets_permissions = [] for secrets_permissions_item_data in self.secrets_permissions: secrets_permissions_item: str = secrets_permissions_item_data secrets_permissions.append(secrets_permissions_item) - services_permissions: Unset | list[str] = UNSET + services_permissions: list[str] | Unset = UNSET if not isinstance(self.services_permissions, Unset): services_permissions = [] for services_permissions_item_data in self.services_permissions: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) - severities_permissions: Unset | list[str] = UNSET + severities_permissions: list[str] | Unset = UNSET if not isinstance(self.severities_permissions, Unset): severities_permissions = [] for severities_permissions_item_data in self.severities_permissions: severities_permissions_item: str = severities_permissions_item_data severities_permissions.append(severities_permissions_item) - status_pages_permissions: Unset | list[str] = UNSET + status_pages_permissions: list[str] | Unset = UNSET if not isinstance(self.status_pages_permissions, Unset): status_pages_permissions = [] for status_pages_permissions_item_data in self.status_pages_permissions: status_pages_permissions_item: str = status_pages_permissions_item_data status_pages_permissions.append(status_pages_permissions_item) - webhooks_permissions: Unset | list[str] = UNSET + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] for webhooks_permissions_item_data in self.webhooks_permissions: webhooks_permissions_item: str = webhooks_permissions_item_data webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions: Unset | list[str] = UNSET + workflows_permissions: list[str] | Unset = UNSET if not isinstance(self.workflows_permissions, Unset): workflows_permissions = [] for workflows_permissions_item_data in self.workflows_permissions: workflows_permissions_item: str = workflows_permissions_item_data workflows_permissions.append(workflows_permissions_item) + catalogs_permissions: list[str] | Unset = UNSET + if not isinstance(self.catalogs_permissions, Unset): + catalogs_permissions = [] + for catalogs_permissions_item_data in self.catalogs_permissions: + catalogs_permissions_item: str = catalogs_permissions_item_data + catalogs_permissions.append(catalogs_permissions_item) + + sub_statuses_permissions: list[str] | Unset = UNSET + if not isinstance(self.sub_statuses_permissions, Unset): + sub_statuses_permissions = [] + for sub_statuses_permissions_item_data in self.sub_statuses_permissions: + sub_statuses_permissions_item: str = sub_statuses_permissions_item_data + sub_statuses_permissions.append(sub_statuses_permissions_item) + + edge_connector_permissions: list[str] | Unset = UNSET + if not isinstance(self.edge_connector_permissions, Unset): + edge_connector_permissions = [] + for edge_connector_permissions_item_data in self.edge_connector_permissions: + edge_connector_permissions_item: str = edge_connector_permissions_item_data + edge_connector_permissions.append(edge_connector_permissions_item) + + slas_permissions: list[str] | Unset = UNSET + if not isinstance(self.slas_permissions, Unset): + slas_permissions = [] + for slas_permissions_item_data in self.slas_permissions: + slas_permissions_item: str = slas_permissions_item_data + slas_permissions.append(slas_permissions_item) + + paging_permissions: list[str] | Unset = UNSET + if not isinstance(self.paging_permissions, Unset): + paging_permissions = [] + for paging_permissions_item_data in self.paging_permissions: + paging_permissions_item: str = paging_permissions_item_data + paging_permissions.append(paging_permissions_item) + + incident_communication_permissions: list[str] | Unset = UNSET + if not isinstance(self.incident_communication_permissions, Unset): + incident_communication_permissions = [] + for incident_communication_permissions_item_data in self.incident_communication_permissions: + incident_communication_permissions_item: str = incident_communication_permissions_item_data + incident_communication_permissions.append(incident_communication_permissions_item) + + communication_permissions: list[str] | Unset = UNSET + if not isinstance(self.communication_permissions, Unset): + communication_permissions = [] + for communication_permissions_item_data in self.communication_permissions: + communication_permissions_item: str = communication_permissions_item_data + communication_permissions.append(communication_permissions_item) + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -407,6 +502,20 @@ def to_dict(self) -> dict[str, Any]: field_dict["webhooks_permissions"] = webhooks_permissions if workflows_permissions is not UNSET: field_dict["workflows_permissions"] = workflows_permissions + if catalogs_permissions is not UNSET: + field_dict["catalogs_permissions"] = catalogs_permissions + if sub_statuses_permissions is not UNSET: + field_dict["sub_statuses_permissions"] = sub_statuses_permissions + if edge_connector_permissions is not UNSET: + field_dict["edge_connector_permissions"] = edge_connector_permissions + if slas_permissions is not UNSET: + field_dict["slas_permissions"] = slas_permissions + if paging_permissions is not UNSET: + field_dict["paging_permissions"] = paging_permissions + if incident_communication_permissions is not UNSET: + field_dict["incident_communication_permissions"] = incident_communication_permissions + if communication_permissions is not UNSET: + field_dict["communication_permissions"] = communication_permissions return field_dict @@ -415,12 +524,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_incident_permission_set_id(data: object) -> None | Unset | str: + def _parse_incident_permission_set_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_permission_set_id = _parse_incident_permission_set_id(d.pop("incident_permission_set_id", UNSET)) @@ -428,221 +537,354 @@ def _parse_incident_permission_set_id(data: object) -> None | Unset | str: is_editable = d.pop("is_editable", UNSET) - api_keys_permissions = [] _api_keys_permissions = d.pop("api_keys_permissions", UNSET) - for api_keys_permissions_item_data in _api_keys_permissions or []: - api_keys_permissions_item = check_update_role_data_attributes_api_keys_permissions_item( - api_keys_permissions_item_data - ) + api_keys_permissions: list[UpdateRoleDataAttributesApiKeysPermissionsItem] | Unset = UNSET + if _api_keys_permissions is not UNSET: + api_keys_permissions = [] + for api_keys_permissions_item_data in _api_keys_permissions: + api_keys_permissions_item = check_update_role_data_attributes_api_keys_permissions_item( + api_keys_permissions_item_data + ) - api_keys_permissions.append(api_keys_permissions_item) + api_keys_permissions.append(api_keys_permissions_item) - audits_permissions = [] _audits_permissions = d.pop("audits_permissions", UNSET) - for audits_permissions_item_data in _audits_permissions or []: - audits_permissions_item = check_update_role_data_attributes_audits_permissions_item( - audits_permissions_item_data - ) + audits_permissions: list[UpdateRoleDataAttributesAuditsPermissionsItem] | Unset = UNSET + if _audits_permissions is not UNSET: + audits_permissions = [] + for audits_permissions_item_data in _audits_permissions: + audits_permissions_item = check_update_role_data_attributes_audits_permissions_item( + audits_permissions_item_data + ) - audits_permissions.append(audits_permissions_item) + audits_permissions.append(audits_permissions_item) - billing_permissions = [] _billing_permissions = d.pop("billing_permissions", UNSET) - for billing_permissions_item_data in _billing_permissions or []: - billing_permissions_item = check_update_role_data_attributes_billing_permissions_item( - billing_permissions_item_data - ) + billing_permissions: list[UpdateRoleDataAttributesBillingPermissionsItem] | Unset = UNSET + if _billing_permissions is not UNSET: + billing_permissions = [] + for billing_permissions_item_data in _billing_permissions: + billing_permissions_item = check_update_role_data_attributes_billing_permissions_item( + billing_permissions_item_data + ) - billing_permissions.append(billing_permissions_item) + billing_permissions.append(billing_permissions_item) - environments_permissions = [] _environments_permissions = d.pop("environments_permissions", UNSET) - for environments_permissions_item_data in _environments_permissions or []: - environments_permissions_item = check_update_role_data_attributes_environments_permissions_item( - environments_permissions_item_data - ) + environments_permissions: list[UpdateRoleDataAttributesEnvironmentsPermissionsItem] | Unset = UNSET + if _environments_permissions is not UNSET: + environments_permissions = [] + for environments_permissions_item_data in _environments_permissions: + environments_permissions_item = check_update_role_data_attributes_environments_permissions_item( + environments_permissions_item_data + ) - environments_permissions.append(environments_permissions_item) + environments_permissions.append(environments_permissions_item) - form_fields_permissions = [] _form_fields_permissions = d.pop("form_fields_permissions", UNSET) - for form_fields_permissions_item_data in _form_fields_permissions or []: - form_fields_permissions_item = check_update_role_data_attributes_form_fields_permissions_item( - form_fields_permissions_item_data - ) + form_fields_permissions: list[UpdateRoleDataAttributesFormFieldsPermissionsItem] | Unset = UNSET + if _form_fields_permissions is not UNSET: + form_fields_permissions = [] + for form_fields_permissions_item_data in _form_fields_permissions: + form_fields_permissions_item = check_update_role_data_attributes_form_fields_permissions_item( + form_fields_permissions_item_data + ) - form_fields_permissions.append(form_fields_permissions_item) + form_fields_permissions.append(form_fields_permissions_item) - functionalities_permissions = [] _functionalities_permissions = d.pop("functionalities_permissions", UNSET) - for functionalities_permissions_item_data in _functionalities_permissions or []: - functionalities_permissions_item = check_update_role_data_attributes_functionalities_permissions_item( - functionalities_permissions_item_data - ) + functionalities_permissions: list[UpdateRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = check_update_role_data_attributes_functionalities_permissions_item( + functionalities_permissions_item_data + ) - functionalities_permissions.append(functionalities_permissions_item) + functionalities_permissions.append(functionalities_permissions_item) - groups_permissions = [] _groups_permissions = d.pop("groups_permissions", UNSET) - for groups_permissions_item_data in _groups_permissions or []: - groups_permissions_item = check_update_role_data_attributes_groups_permissions_item( - groups_permissions_item_data - ) + groups_permissions: list[UpdateRoleDataAttributesGroupsPermissionsItem] | Unset = UNSET + if _groups_permissions is not UNSET: + groups_permissions = [] + for groups_permissions_item_data in _groups_permissions: + groups_permissions_item = check_update_role_data_attributes_groups_permissions_item( + groups_permissions_item_data + ) - groups_permissions.append(groups_permissions_item) + groups_permissions.append(groups_permissions_item) - incident_causes_permissions = [] _incident_causes_permissions = d.pop("incident_causes_permissions", UNSET) - for incident_causes_permissions_item_data in _incident_causes_permissions or []: - incident_causes_permissions_item = check_update_role_data_attributes_incident_causes_permissions_item( - incident_causes_permissions_item_data - ) + incident_causes_permissions: list[UpdateRoleDataAttributesIncidentCausesPermissionsItem] | Unset = UNSET + if _incident_causes_permissions is not UNSET: + incident_causes_permissions = [] + for incident_causes_permissions_item_data in _incident_causes_permissions: + incident_causes_permissions_item = check_update_role_data_attributes_incident_causes_permissions_item( + incident_causes_permissions_item_data + ) - incident_causes_permissions.append(incident_causes_permissions_item) + incident_causes_permissions.append(incident_causes_permissions_item) - incident_feedbacks_permissions = [] _incident_feedbacks_permissions = d.pop("incident_feedbacks_permissions", UNSET) - for incident_feedbacks_permissions_item_data in _incident_feedbacks_permissions or []: - incident_feedbacks_permissions_item = check_update_role_data_attributes_incident_feedbacks_permissions_item( - incident_feedbacks_permissions_item_data - ) + incident_feedbacks_permissions: list[UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem] | Unset = UNSET + if _incident_feedbacks_permissions is not UNSET: + incident_feedbacks_permissions = [] + for incident_feedbacks_permissions_item_data in _incident_feedbacks_permissions: + incident_feedbacks_permissions_item = ( + check_update_role_data_attributes_incident_feedbacks_permissions_item( + incident_feedbacks_permissions_item_data + ) + ) - incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) + incident_feedbacks_permissions.append(incident_feedbacks_permissions_item) - incident_roles_permissions = [] _incident_roles_permissions = d.pop("incident_roles_permissions", UNSET) - for incident_roles_permissions_item_data in _incident_roles_permissions or []: - incident_roles_permissions_item = check_update_role_data_attributes_incident_roles_permissions_item( - incident_roles_permissions_item_data - ) + incident_roles_permissions: list[UpdateRoleDataAttributesIncidentRolesPermissionsItem] | Unset = UNSET + if _incident_roles_permissions is not UNSET: + incident_roles_permissions = [] + for incident_roles_permissions_item_data in _incident_roles_permissions: + incident_roles_permissions_item = check_update_role_data_attributes_incident_roles_permissions_item( + incident_roles_permissions_item_data + ) - incident_roles_permissions.append(incident_roles_permissions_item) + incident_roles_permissions.append(incident_roles_permissions_item) - incident_types_permissions = [] _incident_types_permissions = d.pop("incident_types_permissions", UNSET) - for incident_types_permissions_item_data in _incident_types_permissions or []: - incident_types_permissions_item = check_update_role_data_attributes_incident_types_permissions_item( - incident_types_permissions_item_data - ) + incident_types_permissions: list[UpdateRoleDataAttributesIncidentTypesPermissionsItem] | Unset = UNSET + if _incident_types_permissions is not UNSET: + incident_types_permissions = [] + for incident_types_permissions_item_data in _incident_types_permissions: + incident_types_permissions_item = check_update_role_data_attributes_incident_types_permissions_item( + incident_types_permissions_item_data + ) - incident_types_permissions.append(incident_types_permissions_item) + incident_types_permissions.append(incident_types_permissions_item) - incidents_permissions = [] _incidents_permissions = d.pop("incidents_permissions", UNSET) - for incidents_permissions_item_data in _incidents_permissions or []: - incidents_permissions_item = check_update_role_data_attributes_incidents_permissions_item( - incidents_permissions_item_data - ) + incidents_permissions: list[UpdateRoleDataAttributesIncidentsPermissionsItem] | Unset = UNSET + if _incidents_permissions is not UNSET: + incidents_permissions = [] + for incidents_permissions_item_data in _incidents_permissions: + incidents_permissions_item = check_update_role_data_attributes_incidents_permissions_item( + incidents_permissions_item_data + ) - incidents_permissions.append(incidents_permissions_item) + incidents_permissions.append(incidents_permissions_item) - integrations_permissions = [] _integrations_permissions = d.pop("integrations_permissions", UNSET) - for integrations_permissions_item_data in _integrations_permissions or []: - integrations_permissions_item = check_update_role_data_attributes_integrations_permissions_item( - integrations_permissions_item_data - ) + integrations_permissions: list[UpdateRoleDataAttributesIntegrationsPermissionsItem] | Unset = UNSET + if _integrations_permissions is not UNSET: + integrations_permissions = [] + for integrations_permissions_item_data in _integrations_permissions: + integrations_permissions_item = check_update_role_data_attributes_integrations_permissions_item( + integrations_permissions_item_data + ) - integrations_permissions.append(integrations_permissions_item) + integrations_permissions.append(integrations_permissions_item) - invitations_permissions = [] _invitations_permissions = d.pop("invitations_permissions", UNSET) - for invitations_permissions_item_data in _invitations_permissions or []: - invitations_permissions_item = check_update_role_data_attributes_invitations_permissions_item( - invitations_permissions_item_data - ) + invitations_permissions: list[UpdateRoleDataAttributesInvitationsPermissionsItem] | Unset = UNSET + if _invitations_permissions is not UNSET: + invitations_permissions = [] + for invitations_permissions_item_data in _invitations_permissions: + invitations_permissions_item = check_update_role_data_attributes_invitations_permissions_item( + invitations_permissions_item_data + ) - invitations_permissions.append(invitations_permissions_item) + invitations_permissions.append(invitations_permissions_item) - playbooks_permissions = [] _playbooks_permissions = d.pop("playbooks_permissions", UNSET) - for playbooks_permissions_item_data in _playbooks_permissions or []: - playbooks_permissions_item = check_update_role_data_attributes_playbooks_permissions_item( - playbooks_permissions_item_data - ) + playbooks_permissions: list[UpdateRoleDataAttributesPlaybooksPermissionsItem] | Unset = UNSET + if _playbooks_permissions is not UNSET: + playbooks_permissions = [] + for playbooks_permissions_item_data in _playbooks_permissions: + playbooks_permissions_item = check_update_role_data_attributes_playbooks_permissions_item( + playbooks_permissions_item_data + ) - playbooks_permissions.append(playbooks_permissions_item) + playbooks_permissions.append(playbooks_permissions_item) - private_incidents_permissions = [] _private_incidents_permissions = d.pop("private_incidents_permissions", UNSET) - for private_incidents_permissions_item_data in _private_incidents_permissions or []: - private_incidents_permissions_item = check_update_role_data_attributes_private_incidents_permissions_item( - private_incidents_permissions_item_data - ) + private_incidents_permissions: list[UpdateRoleDataAttributesPrivateIncidentsPermissionsItem] | Unset = UNSET + if _private_incidents_permissions is not UNSET: + private_incidents_permissions = [] + for private_incidents_permissions_item_data in _private_incidents_permissions: + private_incidents_permissions_item = ( + check_update_role_data_attributes_private_incidents_permissions_item( + private_incidents_permissions_item_data + ) + ) - private_incidents_permissions.append(private_incidents_permissions_item) + private_incidents_permissions.append(private_incidents_permissions_item) - retrospective_permissions = [] _retrospective_permissions = d.pop("retrospective_permissions", UNSET) - for retrospective_permissions_item_data in _retrospective_permissions or []: - retrospective_permissions_item = check_update_role_data_attributes_retrospective_permissions_item( - retrospective_permissions_item_data - ) + retrospective_permissions: list[UpdateRoleDataAttributesRetrospectivePermissionsItem] | Unset = UNSET + if _retrospective_permissions is not UNSET: + retrospective_permissions = [] + for retrospective_permissions_item_data in _retrospective_permissions: + retrospective_permissions_item = check_update_role_data_attributes_retrospective_permissions_item( + retrospective_permissions_item_data + ) - retrospective_permissions.append(retrospective_permissions_item) + retrospective_permissions.append(retrospective_permissions_item) - roles_permissions = [] _roles_permissions = d.pop("roles_permissions", UNSET) - for roles_permissions_item_data in _roles_permissions or []: - roles_permissions_item = check_update_role_data_attributes_roles_permissions_item( - roles_permissions_item_data - ) + roles_permissions: list[UpdateRoleDataAttributesRolesPermissionsItem] | Unset = UNSET + if _roles_permissions is not UNSET: + roles_permissions = [] + for roles_permissions_item_data in _roles_permissions: + roles_permissions_item = check_update_role_data_attributes_roles_permissions_item( + roles_permissions_item_data + ) - roles_permissions.append(roles_permissions_item) + roles_permissions.append(roles_permissions_item) - secrets_permissions = [] _secrets_permissions = d.pop("secrets_permissions", UNSET) - for secrets_permissions_item_data in _secrets_permissions or []: - secrets_permissions_item = check_update_role_data_attributes_secrets_permissions_item( - secrets_permissions_item_data - ) + secrets_permissions: list[UpdateRoleDataAttributesSecretsPermissionsItem] | Unset = UNSET + if _secrets_permissions is not UNSET: + secrets_permissions = [] + for secrets_permissions_item_data in _secrets_permissions: + secrets_permissions_item = check_update_role_data_attributes_secrets_permissions_item( + secrets_permissions_item_data + ) - secrets_permissions.append(secrets_permissions_item) + secrets_permissions.append(secrets_permissions_item) - services_permissions = [] _services_permissions = d.pop("services_permissions", UNSET) - for services_permissions_item_data in _services_permissions or []: - services_permissions_item = check_update_role_data_attributes_services_permissions_item( - services_permissions_item_data - ) + services_permissions: list[UpdateRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + if _services_permissions is not UNSET: + services_permissions = [] + for services_permissions_item_data in _services_permissions: + services_permissions_item = check_update_role_data_attributes_services_permissions_item( + services_permissions_item_data + ) - services_permissions.append(services_permissions_item) + services_permissions.append(services_permissions_item) - severities_permissions = [] _severities_permissions = d.pop("severities_permissions", UNSET) - for severities_permissions_item_data in _severities_permissions or []: - severities_permissions_item = check_update_role_data_attributes_severities_permissions_item( - severities_permissions_item_data - ) + severities_permissions: list[UpdateRoleDataAttributesSeveritiesPermissionsItem] | Unset = UNSET + if _severities_permissions is not UNSET: + severities_permissions = [] + for severities_permissions_item_data in _severities_permissions: + severities_permissions_item = check_update_role_data_attributes_severities_permissions_item( + severities_permissions_item_data + ) - severities_permissions.append(severities_permissions_item) + severities_permissions.append(severities_permissions_item) - status_pages_permissions = [] _status_pages_permissions = d.pop("status_pages_permissions", UNSET) - for status_pages_permissions_item_data in _status_pages_permissions or []: - status_pages_permissions_item = check_update_role_data_attributes_status_pages_permissions_item( - status_pages_permissions_item_data - ) + status_pages_permissions: list[UpdateRoleDataAttributesStatusPagesPermissionsItem] | Unset = UNSET + if _status_pages_permissions is not UNSET: + status_pages_permissions = [] + for status_pages_permissions_item_data in _status_pages_permissions: + status_pages_permissions_item = check_update_role_data_attributes_status_pages_permissions_item( + status_pages_permissions_item_data + ) - status_pages_permissions.append(status_pages_permissions_item) + status_pages_permissions.append(status_pages_permissions_item) - webhooks_permissions = [] _webhooks_permissions = d.pop("webhooks_permissions", UNSET) - for webhooks_permissions_item_data in _webhooks_permissions or []: - webhooks_permissions_item = check_update_role_data_attributes_webhooks_permissions_item( - webhooks_permissions_item_data - ) + webhooks_permissions: list[UpdateRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET + if _webhooks_permissions is not UNSET: + webhooks_permissions = [] + for webhooks_permissions_item_data in _webhooks_permissions: + webhooks_permissions_item = check_update_role_data_attributes_webhooks_permissions_item( + webhooks_permissions_item_data + ) - webhooks_permissions.append(webhooks_permissions_item) + webhooks_permissions.append(webhooks_permissions_item) - workflows_permissions = [] _workflows_permissions = d.pop("workflows_permissions", UNSET) - for workflows_permissions_item_data in _workflows_permissions or []: - workflows_permissions_item = check_update_role_data_attributes_workflows_permissions_item( - workflows_permissions_item_data - ) + workflows_permissions: list[UpdateRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + if _workflows_permissions is not UNSET: + workflows_permissions = [] + for workflows_permissions_item_data in _workflows_permissions: + workflows_permissions_item = check_update_role_data_attributes_workflows_permissions_item( + workflows_permissions_item_data + ) + + workflows_permissions.append(workflows_permissions_item) - workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[UpdateRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_update_role_data_attributes_catalogs_permissions_item( + catalogs_permissions_item_data + ) + + catalogs_permissions.append(catalogs_permissions_item) + + _sub_statuses_permissions = d.pop("sub_statuses_permissions", UNSET) + sub_statuses_permissions: list[UpdateRoleDataAttributesSubStatusesPermissionsItem] | Unset = UNSET + if _sub_statuses_permissions is not UNSET: + sub_statuses_permissions = [] + for sub_statuses_permissions_item_data in _sub_statuses_permissions: + sub_statuses_permissions_item = check_update_role_data_attributes_sub_statuses_permissions_item( + sub_statuses_permissions_item_data + ) + + sub_statuses_permissions.append(sub_statuses_permissions_item) + + _edge_connector_permissions = d.pop("edge_connector_permissions", UNSET) + edge_connector_permissions: list[UpdateRoleDataAttributesEdgeConnectorPermissionsItem] | Unset = UNSET + if _edge_connector_permissions is not UNSET: + edge_connector_permissions = [] + for edge_connector_permissions_item_data in _edge_connector_permissions: + edge_connector_permissions_item = check_update_role_data_attributes_edge_connector_permissions_item( + edge_connector_permissions_item_data + ) + + edge_connector_permissions.append(edge_connector_permissions_item) + + _slas_permissions = d.pop("slas_permissions", UNSET) + slas_permissions: list[UpdateRoleDataAttributesSlasPermissionsItem] | Unset = UNSET + if _slas_permissions is not UNSET: + slas_permissions = [] + for slas_permissions_item_data in _slas_permissions: + slas_permissions_item = check_update_role_data_attributes_slas_permissions_item( + slas_permissions_item_data + ) + + slas_permissions.append(slas_permissions_item) + + _paging_permissions = d.pop("paging_permissions", UNSET) + paging_permissions: list[UpdateRoleDataAttributesPagingPermissionsItem] | Unset = UNSET + if _paging_permissions is not UNSET: + paging_permissions = [] + for paging_permissions_item_data in _paging_permissions: + paging_permissions_item = check_update_role_data_attributes_paging_permissions_item( + paging_permissions_item_data + ) + + paging_permissions.append(paging_permissions_item) + + _incident_communication_permissions = d.pop("incident_communication_permissions", UNSET) + incident_communication_permissions: ( + list[UpdateRoleDataAttributesIncidentCommunicationPermissionsItem] | Unset + ) = UNSET + if _incident_communication_permissions is not UNSET: + incident_communication_permissions = [] + for incident_communication_permissions_item_data in _incident_communication_permissions: + incident_communication_permissions_item = ( + check_update_role_data_attributes_incident_communication_permissions_item( + incident_communication_permissions_item_data + ) + ) + + incident_communication_permissions.append(incident_communication_permissions_item) + + _communication_permissions = d.pop("communication_permissions", UNSET) + communication_permissions: list[UpdateRoleDataAttributesCommunicationPermissionsItem] | Unset = UNSET + if _communication_permissions is not UNSET: + communication_permissions = [] + for communication_permissions_item_data in _communication_permissions: + communication_permissions_item = check_update_role_data_attributes_communication_permissions_item( + communication_permissions_item_data + ) + + communication_permissions.append(communication_permissions_item) update_role_data_attributes = cls( name=name, @@ -673,6 +915,13 @@ def _parse_incident_permission_set_id(data: object) -> None | Unset | str: status_pages_permissions=status_pages_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, + sub_statuses_permissions=sub_statuses_permissions, + edge_connector_permissions=edge_connector_permissions, + slas_permissions=slas_permissions, + paging_permissions=paging_permissions, + incident_communication_permissions=incident_communication_permissions, + communication_permissions=communication_permissions, ) return update_role_data_attributes diff --git a/rootly_sdk/models/update_role_data_attributes_catalogs_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_catalogs_permissions_item.py new file mode 100644 index 00000000..b5e0a260 --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_catalogs_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: set[UpdateRoleDataAttributesCatalogsPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_role_data_attributes_catalogs_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesCatalogsPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesCatalogsPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_role_data_attributes_communication_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_communication_permissions_item.py new file mode 100644 index 00000000..ae3bc0a4 --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_communication_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesCommunicationPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_COMMUNICATION_PERMISSIONS_ITEM_VALUES: set[ + UpdateRoleDataAttributesCommunicationPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_role_data_attributes_communication_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesCommunicationPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_COMMUNICATION_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesCommunicationPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_COMMUNICATION_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_role_data_attributes_edge_connector_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_edge_connector_permissions_item.py new file mode 100644 index 00000000..2b251f19 --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_edge_connector_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesEdgeConnectorPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES: set[ + UpdateRoleDataAttributesEdgeConnectorPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_role_data_attributes_edge_connector_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesEdgeConnectorPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesEdgeConnectorPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_EDGE_CONNECTOR_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_role_data_attributes_incident_communication_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_incident_communication_permissions_item.py new file mode 100644 index 00000000..2b853a53 --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_incident_communication_permissions_item.py @@ -0,0 +1,25 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesIncidentCommunicationPermissionsItem = Literal["create", "delete", "read", "send", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES: set[ + UpdateRoleDataAttributesIncidentCommunicationPermissionsItem +] = { + "create", + "delete", + "read", + "send", + "update", +} + + +def check_update_role_data_attributes_incident_communication_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesIncidentCommunicationPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesIncidentCommunicationPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_INCIDENT_COMMUNICATION_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_role_data_attributes_paging_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_paging_permissions_item.py new file mode 100644 index 00000000..d60e2a5b --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_paging_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesPagingPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_PAGING_PERMISSIONS_ITEM_VALUES: set[UpdateRoleDataAttributesPagingPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_role_data_attributes_paging_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesPagingPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_PAGING_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesPagingPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_PAGING_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_role_data_attributes_slas_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_slas_permissions_item.py new file mode 100644 index 00000000..c6505182 --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_slas_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesSlasPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_SLAS_PERMISSIONS_ITEM_VALUES: set[UpdateRoleDataAttributesSlasPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_role_data_attributes_slas_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesSlasPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_SLAS_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesSlasPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_SLAS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_role_data_attributes_sub_statuses_permissions_item.py b/rootly_sdk/models/update_role_data_attributes_sub_statuses_permissions_item.py new file mode 100644 index 00000000..f1be3424 --- /dev/null +++ b/rootly_sdk/models/update_role_data_attributes_sub_statuses_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateRoleDataAttributesSubStatusesPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ROLE_DATA_ATTRIBUTES_SUB_STATUSES_PERMISSIONS_ITEM_VALUES: set[ + UpdateRoleDataAttributesSubStatusesPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_role_data_attributes_sub_statuses_permissions_item( + value: str | None, +) -> UpdateRoleDataAttributesSubStatusesPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ROLE_DATA_ATTRIBUTES_SUB_STATUSES_PERMISSIONS_ITEM_VALUES: + return cast(UpdateRoleDataAttributesSubStatusesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ROLE_DATA_ATTRIBUTES_SUB_STATUSES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_schedule.py b/rootly_sdk/models/update_schedule.py index 102bd7ae..514b68b3 100644 --- a/rootly_sdk/models/update_schedule.py +++ b/rootly_sdk/models/update_schedule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateSchedule: data (UpdateScheduleData): """ - data: "UpdateScheduleData" + data: UpdateScheduleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_data.py b/rootly_sdk/models/update_schedule_data.py index 58501025..6c5069e5 100644 --- a/rootly_sdk/models/update_schedule_data.py +++ b/rootly_sdk/models/update_schedule_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateScheduleData: """ type_: UpdateScheduleDataType - attributes: "UpdateScheduleDataAttributes" + attributes: UpdateScheduleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_data_attributes.py b/rootly_sdk/models/update_schedule_data_attributes.py index aa7797da..6880b0a2 100644 --- a/rootly_sdk/models/update_schedule_data_attributes.py +++ b/rootly_sdk/models/update_schedule_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -19,22 +21,22 @@ class UpdateScheduleDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the schedule - description (Union[None, Unset, str]): The description of the schedule - all_time_coverage (Union[None, Unset, bool]): 24/7 coverage of the schedule - slack_user_group (Union[Unset, UpdateScheduleDataAttributesSlackUserGroup]): - slack_channel (Union['UpdateScheduleDataAttributesSlackChannelType0', None, Unset]): - owner_group_ids (Union[Unset, list[str]]): Owning teams. - owner_user_id (Union[None, Unset, int]): ID of the owner of the schedule + name (str | Unset): The name of the schedule + description (None | str | Unset): The description of the schedule + all_time_coverage (bool | None | Unset): 24/7 coverage of the schedule + slack_user_group (UpdateScheduleDataAttributesSlackUserGroup | Unset): + slack_channel (None | Unset | UpdateScheduleDataAttributesSlackChannelType0): + owner_group_ids (list[str] | Unset): Owning teams. + owner_user_id (int | None | Unset): ID of the owner of the schedule """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - all_time_coverage: None | Unset | bool = UNSET - slack_user_group: Union[Unset, "UpdateScheduleDataAttributesSlackUserGroup"] = UNSET - slack_channel: Union["UpdateScheduleDataAttributesSlackChannelType0", None, Unset] = UNSET - owner_group_ids: Unset | list[str] = UNSET - owner_user_id: None | Unset | int = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + all_time_coverage: bool | None | Unset = UNSET + slack_user_group: UpdateScheduleDataAttributesSlackUserGroup | Unset = UNSET + slack_channel: None | Unset | UpdateScheduleDataAttributesSlackChannelType0 = UNSET + owner_group_ids: list[str] | Unset = UNSET + owner_user_id: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_schedule_data_attributes_slack_channel_type_0 import ( @@ -43,23 +45,23 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - all_time_coverage: None | Unset | bool + all_time_coverage: bool | None | Unset if isinstance(self.all_time_coverage, Unset): all_time_coverage = UNSET else: all_time_coverage = self.all_time_coverage - slack_user_group: Unset | dict[str, Any] = UNSET + slack_user_group: dict[str, Any] | Unset = UNSET if not isinstance(self.slack_user_group, Unset): slack_user_group = self.slack_user_group.to_dict() - slack_channel: None | Unset | dict[str, Any] + slack_channel: dict[str, Any] | None | Unset if isinstance(self.slack_channel, Unset): slack_channel = UNSET elif isinstance(self.slack_channel, UpdateScheduleDataAttributesSlackChannelType0): @@ -67,11 +69,11 @@ def to_dict(self) -> dict[str, Any]: else: slack_channel = self.slack_channel - owner_group_ids: Unset | list[str] = UNSET + owner_group_ids: list[str] | Unset = UNSET if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids - owner_user_id: None | Unset | int + owner_user_id: int | None | Unset if isinstance(self.owner_user_id, Unset): owner_user_id = UNSET else: @@ -107,32 +109,32 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_all_time_coverage(data: object) -> None | Unset | bool: + def _parse_all_time_coverage(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) all_time_coverage = _parse_all_time_coverage(d.pop("all_time_coverage", UNSET)) _slack_user_group = d.pop("slack_user_group", UNSET) - slack_user_group: Unset | UpdateScheduleDataAttributesSlackUserGroup + slack_user_group: UpdateScheduleDataAttributesSlackUserGroup | Unset if isinstance(_slack_user_group, Unset): slack_user_group = UNSET else: slack_user_group = UpdateScheduleDataAttributesSlackUserGroup.from_dict(_slack_user_group) - def _parse_slack_channel(data: object) -> Union["UpdateScheduleDataAttributesSlackChannelType0", None, Unset]: + def _parse_slack_channel(data: object) -> None | Unset | UpdateScheduleDataAttributesSlackChannelType0: if data is None: return data if isinstance(data, Unset): @@ -143,20 +145,20 @@ def _parse_slack_channel(data: object) -> Union["UpdateScheduleDataAttributesSla slack_channel_type_0 = UpdateScheduleDataAttributesSlackChannelType0.from_dict(data) return slack_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateScheduleDataAttributesSlackChannelType0", None, Unset], data) + return cast(None | Unset | UpdateScheduleDataAttributesSlackChannelType0, data) slack_channel = _parse_slack_channel(d.pop("slack_channel", UNSET)) owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_id(data: object) -> None | Unset | int: + def _parse_owner_user_id(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) owner_user_id = _parse_owner_user_id(d.pop("owner_user_id", UNSET)) diff --git a/rootly_sdk/models/update_schedule_data_attributes_slack_channel_type_0.py b/rootly_sdk/models/update_schedule_data_attributes_slack_channel_type_0.py index 46ca63e0..3c23e5e9 100644 --- a/rootly_sdk/models/update_schedule_data_attributes_slack_channel_type_0.py +++ b/rootly_sdk/models/update_schedule_data_attributes_slack_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateScheduleDataAttributesSlackChannelType0: """ Attributes: - id (Union[Unset, str]): Slack channel ID - name (Union[Unset, str]): Slack channel name + id (str | Unset): Slack channel ID + name (str | Unset): Slack channel name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_data_attributes_slack_user_group.py b/rootly_sdk/models/update_schedule_data_attributes_slack_user_group.py index 23c6060f..c8444389 100644 --- a/rootly_sdk/models/update_schedule_data_attributes_slack_user_group.py +++ b/rootly_sdk/models/update_schedule_data_attributes_slack_user_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateScheduleDataAttributesSlackUserGroup: """ Attributes: - id (Union[Unset, str]): Slack user group ID - name (Union[Unset, str]): Slack user group name + id (str | Unset): Slack user group ID + name (str | Unset): Slack user group name """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation.py b/rootly_sdk/models/update_schedule_rotation.py index 921f3797..e74ab544 100644 --- a/rootly_sdk/models/update_schedule_rotation.py +++ b/rootly_sdk/models/update_schedule_rotation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateScheduleRotation: data (UpdateScheduleRotationData): """ - data: "UpdateScheduleRotationData" + data: UpdateScheduleRotationData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_active_day.py b/rootly_sdk/models/update_schedule_rotation_active_day.py index e76df6e6..c7878b81 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateScheduleRotationActiveDay: data (UpdateScheduleRotationActiveDayData): """ - data: "UpdateScheduleRotationActiveDayData" + data: UpdateScheduleRotationActiveDayData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_active_day_data.py b/rootly_sdk/models/update_schedule_rotation_active_day_data.py index 515b3780..16f0083c 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateScheduleRotationActiveDayData: """ type_: UpdateScheduleRotationActiveDayDataType - attributes: "UpdateScheduleRotationActiveDayDataAttributes" + attributes: UpdateScheduleRotationActiveDayDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py index 90525656..668118fe 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,24 +24,21 @@ class UpdateScheduleRotationActiveDayDataAttributes: """ Attributes: - day_name (Union[Unset, UpdateScheduleRotationActiveDayDataAttributesDayName]): Schedule rotation day name for - which active times to be created - active_time_attributes (Union[Unset, - list['UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem']]): Schedule rotation active times - per day + day_name (UpdateScheduleRotationActiveDayDataAttributesDayName | Unset): Schedule rotation day name for which + active times to be created + active_time_attributes (list[UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] | Unset): + Schedule rotation active times per day """ - day_name: Unset | UpdateScheduleRotationActiveDayDataAttributesDayName = UNSET - active_time_attributes: Unset | list["UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem"] = ( - UNSET - ) + day_name: UpdateScheduleRotationActiveDayDataAttributesDayName | Unset = UNSET + active_time_attributes: list[UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - day_name: Unset | str = UNSET + day_name: str | Unset = UNSET if not isinstance(self.day_name, Unset): day_name = self.day_name - active_time_attributes: Unset | list[dict[str, Any]] = UNSET + active_time_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.active_time_attributes, Unset): active_time_attributes = [] for active_time_attributes_item_data in self.active_time_attributes: @@ -64,22 +63,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _day_name = d.pop("day_name", UNSET) - day_name: Unset | UpdateScheduleRotationActiveDayDataAttributesDayName + day_name: UpdateScheduleRotationActiveDayDataAttributesDayName | Unset if isinstance(_day_name, Unset): day_name = UNSET else: day_name = check_update_schedule_rotation_active_day_data_attributes_day_name(_day_name) - active_time_attributes = [] _active_time_attributes = d.pop("active_time_attributes", UNSET) - for active_time_attributes_item_data in _active_time_attributes or []: - active_time_attributes_item = ( - UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem.from_dict( - active_time_attributes_item_data + active_time_attributes: list[UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] | Unset = ( + UNSET + ) + if _active_time_attributes is not UNSET: + active_time_attributes = [] + for active_time_attributes_item_data in _active_time_attributes: + active_time_attributes_item = ( + UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem.from_dict( + active_time_attributes_item_data + ) ) - ) - active_time_attributes.append(active_time_attributes_item) + active_time_attributes.append(active_time_attributes_item) update_schedule_rotation_active_day_data_attributes = cls( day_name=day_name, diff --git a/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py b/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py index 1c322623..2b671883 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data_attributes_active_time_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem: """ Attributes: - start_time (Union[Unset, str]): Start time for schedule rotation active time - end_time (Union[Unset, str]): End time for schedule rotation active time + start_time (str | Unset): Start time for schedule rotation active time + end_time (str | Unset): End time for schedule rotation active time """ - start_time: Unset | str = UNSET - end_time: Unset | str = UNSET + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_data.py b/rootly_sdk/models/update_schedule_rotation_data.py index 4e9691fc..ac3edd76 100644 --- a/rootly_sdk/models/update_schedule_rotation_data.py +++ b/rootly_sdk/models/update_schedule_rotation_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateScheduleRotationData: """ type_: UpdateScheduleRotationDataType - attributes: "UpdateScheduleRotationDataAttributes" + attributes: UpdateScheduleRotationDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_data_attributes.py index d998a233..c1076835 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -43,47 +45,46 @@ class UpdateScheduleRotationDataAttributes: Attributes: schedule_rotationable_type (UpdateScheduleRotationDataAttributesScheduleRotationableType): Schedule rotation type - name (Union[Unset, str]): The name of the schedule rotation - position (Union[Unset, int]): Position of the schedule rotation - active_all_week (Union[Unset, bool]): Schedule rotation active all week? Default: True. - active_days (Union[Unset, list[UpdateScheduleRotationDataAttributesActiveDaysItem]]): - active_time_type (Union[Unset, str]): - active_time_attributes (Union[Unset, list['UpdateScheduleRotationDataAttributesActiveTimeAttributesItem']]): - Schedule rotation's active times - time_zone (Union[Unset, str]): A valid IANA time zone name. Default: 'Etc/UTC'. - schedule_rotationable_attributes - (Union['UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0', - 'UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1', - 'UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2', - 'UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3', Unset]): - start_time (Union[None, Unset, str]): ISO8601 date and time when rotation starts. Shifts will only be created - after this time. - end_time (Union[None, Unset, str]): ISO8601 date and time when rotation ends. Shifts will only be created before + name (str | Unset): The name of the schedule rotation + position (int | Unset): Position of the schedule rotation + active_all_week (bool | Unset): Schedule rotation active all week? Default: True. + active_days (list[UpdateScheduleRotationDataAttributesActiveDaysItem] | Unset): + active_time_type (str | Unset): + active_time_attributes (list[UpdateScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset): Schedule + rotation's active times + time_zone (str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. + schedule_rotationable_attributes (Unset | + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0 | + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1 | + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 | + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3): + start_time (None | str | Unset): ISO8601 date and time when rotation starts. Shifts will only be created after this time. - schedule_rotation_members (Union[None, Unset, - list['UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item']]): You can only update schedule - rotation members if your account has schedule nesting feature enabled + end_time (None | str | Unset): ISO8601 date and time when rotation ends. Shifts will only be created before this + time. + schedule_rotation_members (list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | + Unset): You can only update schedule rotation members if your account has schedule nesting feature enabled """ schedule_rotationable_type: UpdateScheduleRotationDataAttributesScheduleRotationableType - name: Unset | str = UNSET - position: Unset | int = UNSET - active_all_week: Unset | bool = True - active_days: Unset | list[UpdateScheduleRotationDataAttributesActiveDaysItem] = UNSET - active_time_type: Unset | str = UNSET - active_time_attributes: Unset | list["UpdateScheduleRotationDataAttributesActiveTimeAttributesItem"] = UNSET - time_zone: Unset | str = "Etc/UTC" - schedule_rotationable_attributes: Union[ - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0", - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1", - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2", - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3", - Unset, - ] = UNSET - start_time: None | Unset | str = UNSET - end_time: None | Unset | str = UNSET + name: str | Unset = UNSET + position: int | Unset = UNSET + active_all_week: bool | Unset = True + active_days: list[UpdateScheduleRotationDataAttributesActiveDaysItem] | Unset = UNSET + active_time_type: str | Unset = UNSET + active_time_attributes: list[UpdateScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset = UNSET + time_zone: str | Unset = "Etc/UTC" + schedule_rotationable_attributes: ( + Unset + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0 + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1 + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3 + ) = UNSET + start_time: None | str | Unset = UNSET + end_time: None | str | Unset = UNSET schedule_rotation_members: ( - None | Unset | list["UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item"] + list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: @@ -105,7 +106,7 @@ def to_dict(self) -> dict[str, Any]: active_all_week = self.active_all_week - active_days: Unset | list[str] = UNSET + active_days: list[str] | Unset = UNSET if not isinstance(self.active_days, Unset): active_days = [] for active_days_item_data in self.active_days: @@ -114,7 +115,7 @@ def to_dict(self) -> dict[str, Any]: active_time_type = self.active_time_type - active_time_attributes: Unset | list[dict[str, Any]] = UNSET + active_time_attributes: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.active_time_attributes, Unset): active_time_attributes = [] for active_time_attributes_item_data in self.active_time_attributes: @@ -123,7 +124,7 @@ def to_dict(self) -> dict[str, Any]: time_zone = self.time_zone - schedule_rotationable_attributes: Unset | dict[str, Any] + schedule_rotationable_attributes: dict[str, Any] | Unset if isinstance(self.schedule_rotationable_attributes, Unset): schedule_rotationable_attributes = UNSET elif isinstance( @@ -144,19 +145,19 @@ def to_dict(self) -> dict[str, Any]: else: schedule_rotationable_attributes = self.schedule_rotationable_attributes.to_dict() - start_time: None | Unset | str + start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET else: start_time = self.start_time - end_time: None | Unset | str + end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET else: end_time = self.end_time - schedule_rotation_members: None | Unset | list[dict[str, Any]] + schedule_rotation_members: list[dict[str, Any]] | None | Unset if isinstance(self.schedule_rotation_members, Unset): schedule_rotation_members = UNSET elif isinstance(self.schedule_rotation_members, list): @@ -232,35 +233,41 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: active_all_week = d.pop("active_all_week", UNSET) - active_days = [] _active_days = d.pop("active_days", UNSET) - for active_days_item_data in _active_days or []: - active_days_item = check_update_schedule_rotation_data_attributes_active_days_item(active_days_item_data) + active_days: list[UpdateScheduleRotationDataAttributesActiveDaysItem] | Unset = UNSET + if _active_days is not UNSET: + active_days = [] + for active_days_item_data in _active_days: + active_days_item = check_update_schedule_rotation_data_attributes_active_days_item( + active_days_item_data + ) - active_days.append(active_days_item) + active_days.append(active_days_item) active_time_type = d.pop("active_time_type", UNSET) - active_time_attributes = [] _active_time_attributes = d.pop("active_time_attributes", UNSET) - for active_time_attributes_item_data in _active_time_attributes or []: - active_time_attributes_item = UpdateScheduleRotationDataAttributesActiveTimeAttributesItem.from_dict( - active_time_attributes_item_data - ) + active_time_attributes: list[UpdateScheduleRotationDataAttributesActiveTimeAttributesItem] | Unset = UNSET + if _active_time_attributes is not UNSET: + active_time_attributes = [] + for active_time_attributes_item_data in _active_time_attributes: + active_time_attributes_item = UpdateScheduleRotationDataAttributesActiveTimeAttributesItem.from_dict( + active_time_attributes_item_data + ) - active_time_attributes.append(active_time_attributes_item) + active_time_attributes.append(active_time_attributes_item) time_zone = d.pop("time_zone", UNSET) def _parse_schedule_rotationable_attributes( data: object, - ) -> Union[ - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0", - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1", - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2", - "UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3", - Unset, - ]: + ) -> ( + Unset + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0 + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1 + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 + | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3 + ): if isinstance(data, Unset): return data try: @@ -271,7 +278,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -281,7 +288,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -291,7 +298,7 @@ def _parse_schedule_rotationable_attributes( ) return schedule_rotationable_attributes_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() @@ -305,27 +312,27 @@ def _parse_schedule_rotationable_attributes( d.pop("schedule_rotationable_attributes", UNSET) ) - def _parse_start_time(data: object) -> None | Unset | str: + def _parse_start_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | Unset | str: + def _parse_end_time(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) end_time = _parse_end_time(d.pop("end_time", UNSET)) def _parse_schedule_rotation_members( data: object, - ) -> None | Unset | list["UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item"]: + ) -> list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -345,11 +352,9 @@ def _parse_schedule_rotation_members( schedule_rotation_members_type_0.append(schedule_rotation_members_type_0_item) return schedule_rotation_members_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - None | Unset | list["UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item"], data - ) + return cast(list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset, data) schedule_rotation_members = _parse_schedule_rotation_members(d.pop("schedule_rotation_members", UNSET)) diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes_active_time_attributes_item.py b/rootly_sdk/models/update_schedule_rotation_data_attributes_active_time_attributes_item.py index d2f97054..16999eca 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes_active_time_attributes_item.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes_active_time_attributes_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py index 26bb8869..fd3c09dc 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -19,12 +21,12 @@ class UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item: Attributes: member_type (UpdateScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType): Type of member member_id (str): ID of the member - position (Union[Unset, int]): Position of the member in rotation + position (int | Unset): Position of the member in rotation """ member_type: UpdateScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType member_id: str - position: Unset | int = UNSET + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py index d43b06fc..252cbab7 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py index 389f8b8b..dd465bea 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py index 451c364f..b9b2c88f 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py index b36bed23..53f98ff3 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_schedule_rotation_user.py b/rootly_sdk/models/update_schedule_rotation_user.py index 2d3d11c9..57accee1 100644 --- a/rootly_sdk/models/update_schedule_rotation_user.py +++ b/rootly_sdk/models/update_schedule_rotation_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateScheduleRotationUser: data (UpdateScheduleRotationUserData): """ - data: "UpdateScheduleRotationUserData" + data: UpdateScheduleRotationUserData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_user_data.py b/rootly_sdk/models/update_schedule_rotation_user_data.py index 69217cc6..36fc2342 100644 --- a/rootly_sdk/models/update_schedule_rotation_user_data.py +++ b/rootly_sdk/models/update_schedule_rotation_user_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateScheduleRotationUserData: """ type_: UpdateScheduleRotationUserDataType - attributes: "UpdateScheduleRotationUserDataAttributes" + attributes: UpdateScheduleRotationUserDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_schedule_rotation_user_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_user_data_attributes.py index 7861c6a9..7b8c2006 100644 --- a/rootly_sdk/models/update_schedule_rotation_user_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_user_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,12 +14,12 @@ class UpdateScheduleRotationUserDataAttributes: """ Attributes: - user_id (Union[Unset, int]): Schedule rotation user - position (Union[Unset, int]): Position of the user inside rotation + user_id (int | Unset): Schedule rotation user + position (int | Unset): Position of the user inside rotation """ - user_id: Unset | int = UNSET - position: Unset | int = UNSET + user_id: int | Unset = UNSET + position: int | Unset = UNSET def to_dict(self) -> dict[str, Any]: user_id = self.user_id diff --git a/rootly_sdk/models/update_secret.py b/rootly_sdk/models/update_secret.py index cb35d785..457fff7a 100644 --- a/rootly_sdk/models/update_secret.py +++ b/rootly_sdk/models/update_secret.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateSecret: data (UpdateSecretData): """ - data: "UpdateSecretData" + data: UpdateSecretData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_secret_data.py b/rootly_sdk/models/update_secret_data.py index cebfeff5..4ecbf3dd 100644 --- a/rootly_sdk/models/update_secret_data.py +++ b/rootly_sdk/models/update_secret_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateSecretData: """ type_: UpdateSecretDataType - attributes: "UpdateSecretDataAttributes" + attributes: UpdateSecretDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_secret_data_attributes.py b/rootly_sdk/models/update_secret_data_attributes.py index 58b2ee38..9aaed46f 100644 --- a/rootly_sdk/models/update_secret_data_attributes.py +++ b/rootly_sdk/models/update_secret_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,36 +15,36 @@ class UpdateSecretDataAttributes: """ Attributes: name (str): The name of the secret - secret (Union[Unset, str]): The secret - hashicorp_vault_mount (Union[None, Unset, str]): The HashiCorp Vault secret mount path Default: 'secret'. - hashicorp_vault_path (Union[None, Unset, str]): The HashiCorp Vault secret path - hashicorp_vault_version (Union[None, Unset, int]): The HashiCorp Vault secret version Default: 0. + secret (str | Unset): The secret + hashicorp_vault_mount (None | str | Unset): The HashiCorp Vault secret mount path Default: 'secret'. + hashicorp_vault_path (None | str | Unset): The HashiCorp Vault secret path + hashicorp_vault_version (int | None | Unset): The HashiCorp Vault secret version Default: 0. """ name: str - secret: Unset | str = UNSET - hashicorp_vault_mount: None | Unset | str = "secret" - hashicorp_vault_path: None | Unset | str = UNSET - hashicorp_vault_version: None | Unset | int = 0 + secret: str | Unset = UNSET + hashicorp_vault_mount: None | str | Unset = "secret" + hashicorp_vault_path: None | str | Unset = UNSET + hashicorp_vault_version: int | None | Unset = 0 def to_dict(self) -> dict[str, Any]: name = self.name secret = self.secret - hashicorp_vault_mount: None | Unset | str + hashicorp_vault_mount: None | str | Unset if isinstance(self.hashicorp_vault_mount, Unset): hashicorp_vault_mount = UNSET else: hashicorp_vault_mount = self.hashicorp_vault_mount - hashicorp_vault_path: None | Unset | str + hashicorp_vault_path: None | str | Unset if isinstance(self.hashicorp_vault_path, Unset): hashicorp_vault_path = UNSET else: hashicorp_vault_path = self.hashicorp_vault_path - hashicorp_vault_version: None | Unset | int + hashicorp_vault_version: int | None | Unset if isinstance(self.hashicorp_vault_version, Unset): hashicorp_vault_version = UNSET else: @@ -73,30 +75,30 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: secret = d.pop("secret", UNSET) - def _parse_hashicorp_vault_mount(data: object) -> None | Unset | str: + def _parse_hashicorp_vault_mount(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) hashicorp_vault_mount = _parse_hashicorp_vault_mount(d.pop("hashicorp_vault_mount", UNSET)) - def _parse_hashicorp_vault_path(data: object) -> None | Unset | str: + def _parse_hashicorp_vault_path(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) hashicorp_vault_path = _parse_hashicorp_vault_path(d.pop("hashicorp_vault_path", UNSET)) - def _parse_hashicorp_vault_version(data: object) -> None | Unset | int: + def _parse_hashicorp_vault_version(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) hashicorp_vault_version = _parse_hashicorp_vault_version(d.pop("hashicorp_vault_version", UNSET)) diff --git a/rootly_sdk/models/update_service.py b/rootly_sdk/models/update_service.py index e1c9b8af..9aac9b12 100644 --- a/rootly_sdk/models/update_service.py +++ b/rootly_sdk/models/update_service.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateService: data (UpdateServiceData): """ - data: "UpdateServiceData" + data: UpdateServiceData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_service_data.py b/rootly_sdk/models/update_service_data.py index 66ba895b..f879f9fa 100644 --- a/rootly_sdk/models/update_service_data.py +++ b/rootly_sdk/models/update_service_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateServiceData: """ type_: UpdateServiceDataType - attributes: "UpdateServiceDataAttributes" + attributes: UpdateServiceDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_service_data_attributes.py b/rootly_sdk/models/update_service_data_attributes.py index 39494e64..2f07c2ad 100644 --- a/rootly_sdk/models/update_service_data_attributes.py +++ b/rootly_sdk/models/update_service_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -9,10 +11,10 @@ from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.update_service_data_attributes_fields_item import UpdateServiceDataAttributesFieldsItem from ..models.update_service_data_attributes_incident_broadcast_channel_type_0 import ( UpdateServiceDataAttributesIncidentBroadcastChannelType0, ) + from ..models.update_service_data_attributes_properties_item import UpdateServiceDataAttributesPropertiesItem from ..models.update_service_data_attributes_slack_aliases_type_0_item import ( UpdateServiceDataAttributesSlackAliasesType0Item, ) @@ -28,80 +30,78 @@ class UpdateServiceDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the service - description (Union[None, Unset, str]): The description of the service - public_description (Union[None, Unset, str]): The public description of the service - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the service - color (Union[None, Unset, str]): The hex color of the service - position (Union[None, Unset, int]): Position of the service - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this service. eg: + name (str | Unset): The name of the service + description (None | str | Unset): The description of the service + public_description (None | str | Unset): The public description of the service + notify_emails (list[str] | None | Unset): Emails to attach to the service + color (None | str | Unset): The hex color of the service + position (int | None | Unset): Position of the service + backstage_id (None | str | Unset): The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this service - pagerduty_id (Union[None, Unset, str]): The PagerDuty service id associated to this service - opsgenie_id (Union[None, Unset, str]): The Opsgenie service id associated to this service - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this service - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this service - github_repository_name (Union[None, Unset, str]): The GitHub repository name associated to this service. eg: + external_id (None | str | Unset): The external id associated to this service + pagerduty_id (None | str | Unset): The PagerDuty service id associated to this service + opsgenie_id (None | str | Unset): The Opsgenie service id associated to this service + cortex_id (None | str | Unset): The Cortex group id associated to this service + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this service + github_repository_name (None | str | Unset): The GitHub repository name associated to this service. eg: rootlyhq/my-service - github_repository_branch (Union[None, Unset, str]): The GitHub repository branch associated to this service. eg: - main - gitlab_repository_name (Union[None, Unset, str]): The GitLab repository name associated to this service. eg: + github_repository_branch (None | str | Unset): The GitHub repository branch associated to this service. eg: main + gitlab_repository_name (None | str | Unset): The GitLab repository name associated to this service. eg: rootlyhq/my-service - gitlab_repository_branch (Union[None, Unset, str]): The GitLab repository branch associated to this service. eg: - main - environment_ids (Union[None, Unset, list[str]]): Environments associated with this service - service_ids (Union[None, Unset, list[str]]): Services dependent on this service - owner_group_ids (Union[None, Unset, list[str]]): Owner Teams associated with this service - owner_user_ids (Union[None, Unset, list[int]]): Owner Users associated with this service - alerts_email_enabled (Union[None, Unset, bool]): Enable alerts through email - alert_urgency_id (Union[None, Unset, str]): The alert urgency id of the service - escalation_policy_id (Union[None, Unset, str]): The escalation policy id of the service - kubernetes_deployment_name (Union[None, Unset, str]): The Kubernetes deployment name associated to this service. - eg: namespace/deployment-name - slack_channels (Union[None, Unset, list['UpdateServiceDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this service - slack_aliases (Union[None, Unset, list['UpdateServiceDataAttributesSlackAliasesType0Item']]): Slack Aliases + gitlab_repository_branch (None | str | Unset): The GitLab repository branch associated to this service. eg: main + environment_ids (list[str] | None | Unset): Environments associated with this service + service_ids (list[str] | None | Unset): Services dependent on this service + owner_group_ids (list[str] | None | Unset): Owner Teams associated with this service + owner_user_ids (list[int] | None | Unset): Owner Users associated with this service + alerts_email_enabled (bool | None | Unset): Enable alerts through email + alert_urgency_id (None | str | Unset): The alert urgency id of the service + escalation_policy_id (None | str | Unset): The escalation policy id of the service + kubernetes_deployment_name (None | str | Unset): The Kubernetes deployment name associated to this service. eg: + namespace/deployment-name + slack_channels (list[UpdateServiceDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this service - alert_broadcast_enabled (Union[None, Unset, bool]): Enable alerts to be broadcasted to a specific channel - alert_broadcast_channel (Union['UpdateServiceDataAttributesAlertBroadcastChannelType0', None, Unset]): Slack - channel to broadcast alerts to - incident_broadcast_enabled (Union[None, Unset, bool]): Enable incidents to be broadcasted to a specific channel - incident_broadcast_channel (Union['UpdateServiceDataAttributesIncidentBroadcastChannelType0', None, Unset]): - Slack channel to broadcast incidents to - fields (Union[Unset, list['UpdateServiceDataAttributesFieldsItem']]): Array of field values for this service. + slack_aliases (list[UpdateServiceDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated + with this service + alert_broadcast_enabled (bool | None | Unset): Enable alerts to be broadcasted to a specific channel + alert_broadcast_channel (None | Unset | UpdateServiceDataAttributesAlertBroadcastChannelType0): Slack channel to + broadcast alerts to + incident_broadcast_enabled (bool | None | Unset): Enable incidents to be broadcasted to a specific channel + incident_broadcast_channel (None | Unset | UpdateServiceDataAttributesIncidentBroadcastChannelType0): Slack + channel to broadcast incidents to + properties (list[UpdateServiceDataAttributesPropertiesItem] | Unset): Array of property values for this service. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - github_repository_name: None | Unset | str = UNSET - github_repository_branch: None | Unset | str = UNSET - gitlab_repository_name: None | Unset | str = UNSET - gitlab_repository_branch: None | Unset | str = UNSET - environment_ids: None | Unset | list[str] = UNSET - service_ids: None | Unset | list[str] = UNSET - owner_group_ids: None | Unset | list[str] = UNSET - owner_user_ids: None | Unset | list[int] = UNSET - alerts_email_enabled: None | Unset | bool = UNSET - alert_urgency_id: None | Unset | str = UNSET - escalation_policy_id: None | Unset | str = UNSET - kubernetes_deployment_name: None | Unset | str = UNSET - slack_channels: None | Unset | list["UpdateServiceDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["UpdateServiceDataAttributesSlackAliasesType0Item"] = UNSET - alert_broadcast_enabled: None | Unset | bool = UNSET - alert_broadcast_channel: Union["UpdateServiceDataAttributesAlertBroadcastChannelType0", None, Unset] = UNSET - incident_broadcast_enabled: None | Unset | bool = UNSET - incident_broadcast_channel: Union["UpdateServiceDataAttributesIncidentBroadcastChannelType0", None, Unset] = UNSET - fields: Unset | list["UpdateServiceDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + github_repository_name: None | str | Unset = UNSET + github_repository_branch: None | str | Unset = UNSET + gitlab_repository_name: None | str | Unset = UNSET + gitlab_repository_branch: None | str | Unset = UNSET + environment_ids: list[str] | None | Unset = UNSET + service_ids: list[str] | None | Unset = UNSET + owner_group_ids: list[str] | None | Unset = UNSET + owner_user_ids: list[int] | None | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + escalation_policy_id: None | str | Unset = UNSET + kubernetes_deployment_name: None | str | Unset = UNSET + slack_channels: list[UpdateServiceDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[UpdateServiceDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + alert_broadcast_enabled: bool | None | Unset = UNSET + alert_broadcast_channel: None | Unset | UpdateServiceDataAttributesAlertBroadcastChannelType0 = UNSET + incident_broadcast_enabled: bool | None | Unset = UNSET + incident_broadcast_channel: None | Unset | UpdateServiceDataAttributesIncidentBroadcastChannelType0 = UNSET + properties: list[UpdateServiceDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( @@ -113,19 +113,19 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -134,79 +134,79 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - github_repository_name: None | Unset | str + github_repository_name: None | str | Unset if isinstance(self.github_repository_name, Unset): github_repository_name = UNSET else: github_repository_name = self.github_repository_name - github_repository_branch: None | Unset | str + github_repository_branch: None | str | Unset if isinstance(self.github_repository_branch, Unset): github_repository_branch = UNSET else: github_repository_branch = self.github_repository_branch - gitlab_repository_name: None | Unset | str + gitlab_repository_name: None | str | Unset if isinstance(self.gitlab_repository_name, Unset): gitlab_repository_name = UNSET else: gitlab_repository_name = self.gitlab_repository_name - gitlab_repository_branch: None | Unset | str + gitlab_repository_branch: None | str | Unset if isinstance(self.gitlab_repository_branch, Unset): gitlab_repository_branch = UNSET else: gitlab_repository_branch = self.gitlab_repository_branch - environment_ids: None | Unset | list[str] + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET elif isinstance(self.environment_ids, list): @@ -215,7 +215,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_ids = self.environment_ids - service_ids: None | Unset | list[str] + service_ids: list[str] | None | Unset if isinstance(self.service_ids, Unset): service_ids = UNSET elif isinstance(self.service_ids, list): @@ -224,7 +224,7 @@ def to_dict(self) -> dict[str, Any]: else: service_ids = self.service_ids - owner_group_ids: None | Unset | list[str] + owner_group_ids: list[str] | None | Unset if isinstance(self.owner_group_ids, Unset): owner_group_ids = UNSET elif isinstance(self.owner_group_ids, list): @@ -233,7 +233,7 @@ def to_dict(self) -> dict[str, Any]: else: owner_group_ids = self.owner_group_ids - owner_user_ids: None | Unset | list[int] + owner_user_ids: list[int] | None | Unset if isinstance(self.owner_user_ids, Unset): owner_user_ids = UNSET elif isinstance(self.owner_user_ids, list): @@ -242,31 +242,31 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids - alerts_email_enabled: None | Unset | bool + alerts_email_enabled: bool | None | Unset if isinstance(self.alerts_email_enabled, Unset): alerts_email_enabled = UNSET else: alerts_email_enabled = self.alerts_email_enabled - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - escalation_policy_id: None | Unset | str + escalation_policy_id: None | str | Unset if isinstance(self.escalation_policy_id, Unset): escalation_policy_id = UNSET else: escalation_policy_id = self.escalation_policy_id - kubernetes_deployment_name: None | Unset | str + kubernetes_deployment_name: None | str | Unset if isinstance(self.kubernetes_deployment_name, Unset): kubernetes_deployment_name = UNSET else: kubernetes_deployment_name = self.kubernetes_deployment_name - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -278,7 +278,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -290,13 +290,13 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - alert_broadcast_enabled: None | Unset | bool + alert_broadcast_enabled: bool | None | Unset if isinstance(self.alert_broadcast_enabled, Unset): alert_broadcast_enabled = UNSET else: alert_broadcast_enabled = self.alert_broadcast_enabled - alert_broadcast_channel: None | Unset | dict[str, Any] + alert_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.alert_broadcast_channel, Unset): alert_broadcast_channel = UNSET elif isinstance(self.alert_broadcast_channel, UpdateServiceDataAttributesAlertBroadcastChannelType0): @@ -304,13 +304,13 @@ def to_dict(self) -> dict[str, Any]: else: alert_broadcast_channel = self.alert_broadcast_channel - incident_broadcast_enabled: None | Unset | bool + incident_broadcast_enabled: bool | None | Unset if isinstance(self.incident_broadcast_enabled, Unset): incident_broadcast_enabled = UNSET else: incident_broadcast_enabled = self.incident_broadcast_enabled - incident_broadcast_channel: None | Unset | dict[str, Any] + incident_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.incident_broadcast_channel, Unset): incident_broadcast_channel = UNSET elif isinstance(self.incident_broadcast_channel, UpdateServiceDataAttributesIncidentBroadcastChannelType0): @@ -318,12 +318,12 @@ def to_dict(self) -> dict[str, Any]: else: incident_broadcast_channel = self.incident_broadcast_channel - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -388,8 +388,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_enabled"] = incident_broadcast_enabled if incident_broadcast_channel is not UNSET: field_dict["incident_broadcast_channel"] = incident_broadcast_channel - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @@ -398,10 +398,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.update_service_data_attributes_fields_item import UpdateServiceDataAttributesFieldsItem from ..models.update_service_data_attributes_incident_broadcast_channel_type_0 import ( UpdateServiceDataAttributesIncidentBroadcastChannelType0, ) + from ..models.update_service_data_attributes_properties_item import UpdateServiceDataAttributesPropertiesItem from ..models.update_service_data_attributes_slack_aliases_type_0_item import ( UpdateServiceDataAttributesSlackAliasesType0Item, ) @@ -412,25 +412,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -441,121 +441,121 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_github_repository_name(data: object) -> None | Unset | str: + def _parse_github_repository_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_repository_name = _parse_github_repository_name(d.pop("github_repository_name", UNSET)) - def _parse_github_repository_branch(data: object) -> None | Unset | str: + def _parse_github_repository_branch(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) github_repository_branch = _parse_github_repository_branch(d.pop("github_repository_branch", UNSET)) - def _parse_gitlab_repository_name(data: object) -> None | Unset | str: + def _parse_gitlab_repository_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_repository_name = _parse_gitlab_repository_name(d.pop("gitlab_repository_name", UNSET)) - def _parse_gitlab_repository_branch(data: object) -> None | Unset | str: + def _parse_gitlab_repository_branch(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) gitlab_repository_branch = _parse_gitlab_repository_branch(d.pop("gitlab_repository_branch", UNSET)) - def _parse_environment_ids(data: object) -> None | Unset | list[str]: + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -566,13 +566,13 @@ def _parse_environment_ids(data: object) -> None | Unset | list[str]: environment_ids_type_0 = cast(list[str], data) return environment_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) environment_ids = _parse_environment_ids(d.pop("environment_ids", UNSET)) - def _parse_service_ids(data: object) -> None | Unset | list[str]: + def _parse_service_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -583,13 +583,13 @@ def _parse_service_ids(data: object) -> None | Unset | list[str]: service_ids_type_0 = cast(list[str], data) return service_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) service_ids = _parse_service_ids(d.pop("service_ids", UNSET)) - def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: + def _parse_owner_group_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -600,13 +600,13 @@ def _parse_owner_group_ids(data: object) -> None | Unset | list[str]: owner_group_ids_type_0 = cast(list[str], data) return owner_group_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) owner_group_ids = _parse_owner_group_ids(d.pop("owner_group_ids", UNSET)) - def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: + def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -617,51 +617,51 @@ def _parse_owner_user_ids(data: object) -> None | Unset | list[int]: owner_user_ids_type_0 = cast(list[int], data) return owner_user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) - def _parse_alerts_email_enabled(data: object) -> None | Unset | bool: + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_escalation_policy_id(data: object) -> None | Unset | str: + def _parse_escalation_policy_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) - def _parse_kubernetes_deployment_name(data: object) -> None | Unset | str: + def _parse_kubernetes_deployment_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) kubernetes_deployment_name = _parse_kubernetes_deployment_name(d.pop("kubernetes_deployment_name", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["UpdateServiceDataAttributesSlackChannelsType0Item"]: + ) -> list[UpdateServiceDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -679,15 +679,13 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateServiceDataAttributesSlackChannelsType0Item"], data) + return cast(list[UpdateServiceDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases( - data: object, - ) -> None | Unset | list["UpdateServiceDataAttributesSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[UpdateServiceDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -705,24 +703,24 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateServiceDataAttributesSlackAliasesType0Item"], data) + return cast(list[UpdateServiceDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_alert_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_alert_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alert_broadcast_enabled = _parse_alert_broadcast_enabled(d.pop("alert_broadcast_enabled", UNSET)) def _parse_alert_broadcast_channel( data: object, - ) -> Union["UpdateServiceDataAttributesAlertBroadcastChannelType0", None, Unset]: + ) -> None | Unset | UpdateServiceDataAttributesAlertBroadcastChannelType0: if data is None: return data if isinstance(data, Unset): @@ -733,24 +731,24 @@ def _parse_alert_broadcast_channel( alert_broadcast_channel_type_0 = UpdateServiceDataAttributesAlertBroadcastChannelType0.from_dict(data) return alert_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateServiceDataAttributesAlertBroadcastChannelType0", None, Unset], data) + return cast(None | Unset | UpdateServiceDataAttributesAlertBroadcastChannelType0, data) alert_broadcast_channel = _parse_alert_broadcast_channel(d.pop("alert_broadcast_channel", UNSET)) - def _parse_incident_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_incident_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) incident_broadcast_enabled = _parse_incident_broadcast_enabled(d.pop("incident_broadcast_enabled", UNSET)) def _parse_incident_broadcast_channel( data: object, - ) -> Union["UpdateServiceDataAttributesIncidentBroadcastChannelType0", None, Unset]: + ) -> None | Unset | UpdateServiceDataAttributesIncidentBroadcastChannelType0: if data is None: return data if isinstance(data, Unset): @@ -763,18 +761,20 @@ def _parse_incident_broadcast_channel( ) return incident_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateServiceDataAttributesIncidentBroadcastChannelType0", None, Unset], data) + return cast(None | Unset | UpdateServiceDataAttributesIncidentBroadcastChannelType0, data) incident_broadcast_channel = _parse_incident_broadcast_channel(d.pop("incident_broadcast_channel", UNSET)) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateServiceDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateServiceDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateServiceDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_service_data_attributes = cls( name=name, @@ -807,7 +807,7 @@ def _parse_incident_broadcast_channel( alert_broadcast_channel=alert_broadcast_channel, incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, - fields=fields, + properties=properties, ) return update_service_data_attributes diff --git a/rootly_sdk/models/update_service_data_attributes_alert_broadcast_channel_type_0.py b/rootly_sdk/models/update_service_data_attributes_alert_broadcast_channel_type_0.py index d153a8a6..ec637d7b 100644 --- a/rootly_sdk/models/update_service_data_attributes_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/update_service_data_attributes_alert_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class UpdateServiceDataAttributesAlertBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_service_data_attributes_incident_broadcast_channel_type_0.py b/rootly_sdk/models/update_service_data_attributes_incident_broadcast_channel_type_0.py index 8de96ac0..aff0a0b6 100644 --- a/rootly_sdk/models/update_service_data_attributes_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/update_service_data_attributes_incident_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class UpdateServiceDataAttributesIncidentBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_environment_data_attributes_fields_item.py b/rootly_sdk/models/update_service_data_attributes_properties_item.py similarity index 63% rename from rootly_sdk/models/update_environment_data_attributes_fields_item.py rename to rootly_sdk/models/update_service_data_attributes_properties_item.py index 2d167466..ed866804 100644 --- a/rootly_sdk/models/update_environment_data_attributes_fields_item.py +++ b/rootly_sdk/models/update_service_data_attributes_properties_item.py @@ -1,27 +1,29 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="UpdateEnvironmentDataAttributesFieldsItem") +T = TypeVar("T", bound="UpdateServiceDataAttributesPropertiesItem") @_attrs_define -class UpdateEnvironmentDataAttributesFieldsItem: - """Set a value for a catalog field +class UpdateServiceDataAttributesPropertiesItem: + """Set a value for a catalog property Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value + catalog_property_id (str): Catalog property ID + value (str): The property value """ - catalog_field_id: str + catalog_property_id: str value: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id + catalog_property_id = self.catalog_property_id value = self.value @@ -29,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "catalog_field_id": catalog_field_id, + "catalog_property_id": catalog_property_id, "value": value, } ) @@ -39,17 +41,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") + catalog_property_id = d.pop("catalog_property_id") value = d.pop("value") - update_environment_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, + update_service_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, value=value, ) - update_environment_data_attributes_fields_item.additional_properties = d - return update_environment_data_attributes_fields_item + update_service_data_attributes_properties_item.additional_properties = d + return update_service_data_attributes_properties_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/update_service_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/update_service_data_attributes_slack_aliases_type_0_item.py index fda97fed..1f0653e1 100644 --- a/rootly_sdk/models/update_service_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/update_service_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_service_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/update_service_data_attributes_slack_channels_type_0_item.py index fb934d04..42f2f67c 100644 --- a/rootly_sdk/models/update_service_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/update_service_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_service_now_incident_task_params.py b/rootly_sdk/models/update_service_now_incident_task_params.py index 2b6e9bdc..dfb6002f 100644 --- a/rootly_sdk/models/update_service_now_incident_task_params.py +++ b/rootly_sdk/models/update_service_now_incident_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,28 +25,28 @@ class UpdateServiceNowIncidentTaskParams: """ Attributes: incident_id (str): The incident id - task_type (Union[Unset, UpdateServiceNowIncidentTaskParamsTaskType]): - title (Union[Unset, str]): The incident title - description (Union[Unset, str]): The incident description - priority (Union[Unset, UpdateServiceNowIncidentTaskParamsPriority]): The priority id and display name - completion (Union[Unset, UpdateServiceNowIncidentTaskParamsCompletion]): The completion id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateServiceNowIncidentTaskParamsTaskType | Unset): + title (str | Unset): The incident title + description (str | Unset): The incident description + priority (UpdateServiceNowIncidentTaskParamsPriority | Unset): The priority id and display name + completion (UpdateServiceNowIncidentTaskParamsCompletion | Unset): The completion id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON """ incident_id: str - task_type: Unset | UpdateServiceNowIncidentTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - priority: Union[Unset, "UpdateServiceNowIncidentTaskParamsPriority"] = UNSET - completion: Union[Unset, "UpdateServiceNowIncidentTaskParamsCompletion"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET + task_type: UpdateServiceNowIncidentTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + priority: UpdateServiceNowIncidentTaskParamsPriority | Unset = UNSET + completion: UpdateServiceNowIncidentTaskParamsCompletion | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: incident_id = self.incident_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -52,15 +54,15 @@ def to_dict(self) -> dict[str, Any]: description = self.description - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - completion: Unset | dict[str, Any] = UNSET + completion: dict[str, Any] | Unset = UNSET if not isinstance(self.completion, Unset): completion = self.completion.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: @@ -99,7 +101,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: incident_id = d.pop("incident_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateServiceNowIncidentTaskParamsTaskType + task_type: UpdateServiceNowIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -110,25 +112,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: description = d.pop("description", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateServiceNowIncidentTaskParamsPriority + priority: UpdateServiceNowIncidentTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = UpdateServiceNowIncidentTaskParamsPriority.from_dict(_priority) _completion = d.pop("completion", UNSET) - completion: Unset | UpdateServiceNowIncidentTaskParamsCompletion + completion: UpdateServiceNowIncidentTaskParamsCompletion | Unset if isinstance(_completion, Unset): completion = UNSET else: completion = UpdateServiceNowIncidentTaskParamsCompletion.from_dict(_completion) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) diff --git a/rootly_sdk/models/update_service_now_incident_task_params_completion.py b/rootly_sdk/models/update_service_now_incident_task_params_completion.py index 8c295c19..f88a1164 100644 --- a/rootly_sdk/models/update_service_now_incident_task_params_completion.py +++ b/rootly_sdk/models/update_service_now_incident_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateServiceNowIncidentTaskParamsCompletion: """The completion id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_service_now_incident_task_params_priority.py b/rootly_sdk/models/update_service_now_incident_task_params_priority.py index f71ab86f..a48fa9a6 100644 --- a/rootly_sdk/models/update_service_now_incident_task_params_priority.py +++ b/rootly_sdk/models/update_service_now_incident_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateServiceNowIncidentTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_severity.py b/rootly_sdk/models/update_severity.py index eea36150..3916bc02 100644 --- a/rootly_sdk/models/update_severity.py +++ b/rootly_sdk/models/update_severity.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateSeverity: data (UpdateSeverityData): """ - data: "UpdateSeverityData" + data: UpdateSeverityData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_severity_data.py b/rootly_sdk/models/update_severity_data.py index 3e607d77..f52d5a14 100644 --- a/rootly_sdk/models/update_severity_data.py +++ b/rootly_sdk/models/update_severity_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateSeverityData: """ type_: UpdateSeverityDataType - attributes: "UpdateSeverityDataAttributes" + attributes: UpdateSeverityDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_severity_data_attributes.py b/rootly_sdk/models/update_severity_data_attributes.py index fb330390..52735b8e 100644 --- a/rootly_sdk/models/update_severity_data_attributes.py +++ b/rootly_sdk/models/update_severity_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar, cast @@ -25,53 +27,53 @@ class UpdateSeverityDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the severity - description (Union[None, Unset, str]): The description of the severity - severity (Union[Unset, UpdateSeverityDataAttributesSeverity]): The severity of the severity - color (Union[None, Unset, str]): The hex color of the severity - position (Union[None, Unset, int]): Position of the severity - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the severity - slack_channels (Union[None, Unset, list['UpdateSeverityDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this severity - slack_aliases (Union[None, Unset, list['UpdateSeverityDataAttributesSlackAliasesType0Item']]): Slack Aliases + name (str | Unset): The name of the severity + description (None | str | Unset): The description of the severity + severity (UpdateSeverityDataAttributesSeverity | Unset): The severity of the severity + color (None | str | Unset): The hex color of the severity + position (int | None | Unset): Position of the severity + notify_emails (list[str] | None | Unset): Emails to attach to the severity + slack_channels (list[UpdateSeverityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this severity + slack_aliases (list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated + with this severity """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - severity: Unset | UpdateSeverityDataAttributesSeverity = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - notify_emails: None | Unset | list[str] = UNSET - slack_channels: None | Unset | list["UpdateSeverityDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["UpdateSeverityDataAttributesSlackAliasesType0Item"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + severity: UpdateSeverityDataAttributesSeverity | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + slack_channels: list[UpdateSeverityDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - severity: Unset | str = UNSET + severity: str | Unset = UNSET if not isinstance(self.severity, Unset): severity = self.severity - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -80,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -92,7 +94,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -138,41 +140,41 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) _severity = d.pop("severity", UNSET) - severity: Unset | UpdateSeverityDataAttributesSeverity + severity: UpdateSeverityDataAttributesSeverity | Unset if isinstance(_severity, Unset): severity = UNSET else: severity = check_update_severity_data_attributes_severity(_severity) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -183,15 +185,15 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) def _parse_slack_channels( data: object, - ) -> None | Unset | list["UpdateSeverityDataAttributesSlackChannelsType0Item"]: + ) -> list[UpdateSeverityDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -209,15 +211,15 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateSeverityDataAttributesSlackChannelsType0Item"], data) + return cast(list[UpdateSeverityDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) def _parse_slack_aliases( data: object, - ) -> None | Unset | list["UpdateSeverityDataAttributesSlackAliasesType0Item"]: + ) -> list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -235,9 +237,9 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateSeverityDataAttributesSlackAliasesType0Item"], data) + return cast(list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) diff --git a/rootly_sdk/models/update_severity_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/update_severity_data_attributes_slack_aliases_type_0_item.py index bfe51d70..ac383ddc 100644 --- a/rootly_sdk/models/update_severity_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/update_severity_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_severity_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/update_severity_data_attributes_slack_channels_type_0_item.py index f429bb07..e4b47c5e 100644 --- a/rootly_sdk/models/update_severity_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/update_severity_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_sharepoint_page_task_params.py b/rootly_sdk/models/update_sharepoint_page_task_params.py index 280b8bbb..c8af9115 100644 --- a/rootly_sdk/models/update_sharepoint_page_task_params.py +++ b/rootly_sdk/models/update_sharepoint_page_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -18,23 +20,23 @@ class UpdateSharepointPageTaskParams: """ Attributes: file_id (str): The SharePoint file ID - task_type (Union[Unset, UpdateSharepointPageTaskParamsTaskType]): - title (Union[Unset, str]): The SharePoint document title - content (Union[Unset, str]): The SharePoint document content - post_mortem_template_id (Union[Unset, str]): Retrospective template to use when updating document, if desired + task_type (UpdateSharepointPageTaskParamsTaskType | Unset): + title (str | Unset): The SharePoint document title + content (str | Unset): The SharePoint document content + post_mortem_template_id (str | Unset): Retrospective template to use when updating document, if desired """ file_id: str - task_type: Unset | UpdateSharepointPageTaskParamsTaskType = UNSET - title: Unset | str = UNSET - content: Unset | str = UNSET - post_mortem_template_id: Unset | str = UNSET + task_type: UpdateSharepointPageTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + content: str | Unset = UNSET + post_mortem_template_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: file_id = self.file_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: file_id = d.pop("file_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateSharepointPageTaskParamsTaskType + task_type: UpdateSharepointPageTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_shortcut_story_task_params.py b/rootly_sdk/models/update_shortcut_story_task_params.py index 96ad23fa..e313e0ac 100644 --- a/rootly_sdk/models/update_shortcut_story_task_params.py +++ b/rootly_sdk/models/update_shortcut_story_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,20 +25,20 @@ class UpdateShortcutStoryTaskParams: Attributes: story_id (str): The story id archivation (UpdateShortcutStoryTaskParamsArchivation): The archivation id and display name - task_type (Union[Unset, UpdateShortcutStoryTaskParamsTaskType]): - title (Union[Unset, str]): The incident title - description (Union[Unset, str]): The incident description - labels (Union[Unset, str]): The story labels - due_date (Union[Unset, str]): The due date + task_type (UpdateShortcutStoryTaskParamsTaskType | Unset): + title (str | Unset): The incident title + description (str | Unset): The incident description + labels (str | Unset): The story labels + due_date (str | Unset): The due date """ story_id: str - archivation: "UpdateShortcutStoryTaskParamsArchivation" - task_type: Unset | UpdateShortcutStoryTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - labels: Unset | str = UNSET - due_date: Unset | str = UNSET + archivation: UpdateShortcutStoryTaskParamsArchivation + task_type: UpdateShortcutStoryTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + labels: str | Unset = UNSET + due_date: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: archivation = self.archivation.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -87,7 +89,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: archivation = UpdateShortcutStoryTaskParamsArchivation.from_dict(d.pop("archivation")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateShortcutStoryTaskParamsTaskType + task_type: UpdateShortcutStoryTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_shortcut_story_task_params_archivation.py b/rootly_sdk/models/update_shortcut_story_task_params_archivation.py index 95ac2aae..faabfdc3 100644 --- a/rootly_sdk/models/update_shortcut_story_task_params_archivation.py +++ b/rootly_sdk/models/update_shortcut_story_task_params_archivation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateShortcutStoryTaskParamsArchivation: """The archivation id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_shortcut_task_task_params.py b/rootly_sdk/models/update_shortcut_task_task_params.py index e1168caf..d0085575 100644 --- a/rootly_sdk/models/update_shortcut_task_task_params.py +++ b/rootly_sdk/models/update_shortcut_task_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,15 +26,15 @@ class UpdateShortcutTaskTaskParams: task_id (str): The task id parent_story_id (str): The parent story completion (UpdateShortcutTaskTaskParamsCompletion): The completion id and display name - task_type (Union[Unset, UpdateShortcutTaskTaskParamsTaskType]): - description (Union[Unset, str]): The task description + task_type (UpdateShortcutTaskTaskParamsTaskType | Unset): + description (str | Unset): The task description """ task_id: str parent_story_id: str - completion: "UpdateShortcutTaskTaskParamsCompletion" - task_type: Unset | UpdateShortcutTaskTaskParamsTaskType = UNSET - description: Unset | str = UNSET + completion: UpdateShortcutTaskTaskParamsCompletion + task_type: UpdateShortcutTaskTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: completion = self.completion.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -76,7 +78,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion = UpdateShortcutTaskTaskParamsCompletion.from_dict(d.pop("completion")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateShortcutTaskTaskParamsTaskType + task_type: UpdateShortcutTaskTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_shortcut_task_task_params_completion.py b/rootly_sdk/models/update_shortcut_task_task_params_completion.py index fed6aadd..1d7d80bf 100644 --- a/rootly_sdk/models/update_shortcut_task_task_params_completion.py +++ b/rootly_sdk/models/update_shortcut_task_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateShortcutTaskTaskParamsCompletion: """The completion id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_sla.py b/rootly_sdk/models/update_sla.py new file mode 100644 index 00000000..6eb58431 --- /dev/null +++ b/rootly_sdk/models/update_sla.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_sla_data import UpdateSlaData + + +T = TypeVar("T", bound="UpdateSla") + + +@_attrs_define +class UpdateSla: + """ + Attributes: + data (UpdateSlaData): + """ + + data: UpdateSlaData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_sla_data import UpdateSlaData + + d = dict(src_dict) + data = UpdateSlaData.from_dict(d.pop("data")) + + update_sla = cls( + data=data, + ) + + update_sla.additional_properties = d + return update_sla + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_sla_data.py b/rootly_sdk/models/update_sla_data.py new file mode 100644 index 00000000..b09170b1 --- /dev/null +++ b/rootly_sdk/models/update_sla_data.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_sla_data_type import UpdateSlaDataType, check_update_sla_data_type + +if TYPE_CHECKING: + from ..models.update_sla_data_attributes import UpdateSlaDataAttributes + + +T = TypeVar("T", bound="UpdateSlaData") + + +@_attrs_define +class UpdateSlaData: + """ + Attributes: + type_ (UpdateSlaDataType): + attributes (UpdateSlaDataAttributes): + """ + + type_: UpdateSlaDataType + attributes: UpdateSlaDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_sla_data_attributes import UpdateSlaDataAttributes + + d = dict(src_dict) + type_ = check_update_sla_data_type(d.pop("type")) + + attributes = UpdateSlaDataAttributes.from_dict(d.pop("attributes")) + + update_sla_data = cls( + type_=type_, + attributes=attributes, + ) + + update_sla_data.additional_properties = d + return update_sla_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_sla_data_attributes.py b/rootly_sdk/models/update_sla_data_attributes.py new file mode 100644 index 00000000..40d8ef7a --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes.py @@ -0,0 +1,386 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define + +from ..models.update_sla_data_attributes_assignment_deadline_days import ( + UpdateSlaDataAttributesAssignmentDeadlineDays, + check_update_sla_data_attributes_assignment_deadline_days, +) +from ..models.update_sla_data_attributes_assignment_deadline_parent_status import ( + UpdateSlaDataAttributesAssignmentDeadlineParentStatus, + check_update_sla_data_attributes_assignment_deadline_parent_status, +) +from ..models.update_sla_data_attributes_completion_deadline_days import ( + UpdateSlaDataAttributesCompletionDeadlineDays, + check_update_sla_data_attributes_completion_deadline_days, +) +from ..models.update_sla_data_attributes_completion_deadline_parent_status import ( + UpdateSlaDataAttributesCompletionDeadlineParentStatus, + check_update_sla_data_attributes_completion_deadline_parent_status, +) +from ..models.update_sla_data_attributes_condition_match_type import ( + UpdateSlaDataAttributesConditionMatchType, + check_update_sla_data_attributes_condition_match_type, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem + from ..models.update_sla_data_attributes_notification_configurations_item import ( + UpdateSlaDataAttributesNotificationConfigurationsItem, + ) + + +T = TypeVar("T", bound="UpdateSlaDataAttributes") + + +@_attrs_define +class UpdateSlaDataAttributes: + """ + Attributes: + name (str | Unset): The name of the SLA + description (None | str | Unset): A description of the SLA + position (int | None | Unset): Position of the SLA for ordering + condition_match_type (UpdateSlaDataAttributesConditionMatchType | Unset): Whether all or any conditions must + match + manager_role_id (None | Unset | UUID): The ID of the incident role responsible for this SLA + manager_user_id (int | None | Unset): The ID of the user responsible for this SLA + assignment_deadline_days (UpdateSlaDataAttributesAssignmentDeadlineDays | Unset): Number of days for the + assignment deadline + assignment_deadline_parent_status (UpdateSlaDataAttributesAssignmentDeadlineParentStatus | Unset): The incident + parent status that triggers the assignment deadline + assignment_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the assignment deadline + assignment_skip_weekends (bool | Unset): Whether to skip weekends when calculating the assignment deadline + completion_deadline_days (UpdateSlaDataAttributesCompletionDeadlineDays | Unset): Number of days for the + completion deadline + completion_deadline_parent_status (UpdateSlaDataAttributesCompletionDeadlineParentStatus | Unset): The incident + parent status that triggers the completion deadline + completion_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the completion deadline + completion_skip_weekends (bool | Unset): Whether to skip weekends when calculating the completion deadline + conditions (list[UpdateSlaDataAttributesConditionsItem] | Unset): Conditions that determine which incidents this + SLA applies to. Replaces all existing conditions. + notification_configurations (list[UpdateSlaDataAttributesNotificationConfigurationsItem] | Unset): Notification + timing configurations. Replaces all existing configurations. + """ + + name: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET + condition_match_type: UpdateSlaDataAttributesConditionMatchType | Unset = UNSET + manager_role_id: None | Unset | UUID = UNSET + manager_user_id: int | None | Unset = UNSET + assignment_deadline_days: UpdateSlaDataAttributesAssignmentDeadlineDays | Unset = UNSET + assignment_deadline_parent_status: UpdateSlaDataAttributesAssignmentDeadlineParentStatus | Unset = UNSET + assignment_deadline_sub_status_id: None | Unset | UUID = UNSET + assignment_skip_weekends: bool | Unset = UNSET + completion_deadline_days: UpdateSlaDataAttributesCompletionDeadlineDays | Unset = UNSET + completion_deadline_parent_status: UpdateSlaDataAttributesCompletionDeadlineParentStatus | Unset = UNSET + completion_deadline_sub_status_id: None | Unset | UUID = UNSET + completion_skip_weekends: bool | Unset = UNSET + conditions: list[UpdateSlaDataAttributesConditionsItem] | Unset = UNSET + notification_configurations: list[UpdateSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + condition_match_type: str | Unset = UNSET + if not isinstance(self.condition_match_type, Unset): + condition_match_type = self.condition_match_type + + manager_role_id: None | str | Unset + if isinstance(self.manager_role_id, Unset): + manager_role_id = UNSET + elif isinstance(self.manager_role_id, UUID): + manager_role_id = str(self.manager_role_id) + else: + manager_role_id = self.manager_role_id + + manager_user_id: int | None | Unset + if isinstance(self.manager_user_id, Unset): + manager_user_id = UNSET + else: + manager_user_id = self.manager_user_id + + assignment_deadline_days: int | Unset = UNSET + if not isinstance(self.assignment_deadline_days, Unset): + assignment_deadline_days = self.assignment_deadline_days + + assignment_deadline_parent_status: str | Unset = UNSET + if not isinstance(self.assignment_deadline_parent_status, Unset): + assignment_deadline_parent_status = self.assignment_deadline_parent_status + + assignment_deadline_sub_status_id: None | str | Unset + if isinstance(self.assignment_deadline_sub_status_id, Unset): + assignment_deadline_sub_status_id = UNSET + elif isinstance(self.assignment_deadline_sub_status_id, UUID): + assignment_deadline_sub_status_id = str(self.assignment_deadline_sub_status_id) + else: + assignment_deadline_sub_status_id = self.assignment_deadline_sub_status_id + + assignment_skip_weekends = self.assignment_skip_weekends + + completion_deadline_days: int | Unset = UNSET + if not isinstance(self.completion_deadline_days, Unset): + completion_deadline_days = self.completion_deadline_days + + completion_deadline_parent_status: str | Unset = UNSET + if not isinstance(self.completion_deadline_parent_status, Unset): + completion_deadline_parent_status = self.completion_deadline_parent_status + + completion_deadline_sub_status_id: None | str | Unset + if isinstance(self.completion_deadline_sub_status_id, Unset): + completion_deadline_sub_status_id = UNSET + elif isinstance(self.completion_deadline_sub_status_id, UUID): + completion_deadline_sub_status_id = str(self.completion_deadline_sub_status_id) + else: + completion_deadline_sub_status_id = self.completion_deadline_sub_status_id + + completion_skip_weekends = self.completion_skip_weekends + + conditions: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.conditions, Unset): + conditions = [] + for conditions_item_data in self.conditions: + conditions_item = conditions_item_data.to_dict() + conditions.append(conditions_item) + + notification_configurations: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.notification_configurations, Unset): + notification_configurations = [] + for notification_configurations_item_data in self.notification_configurations: + notification_configurations_item = notification_configurations_item_data.to_dict() + notification_configurations.append(notification_configurations_item) + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if position is not UNSET: + field_dict["position"] = position + if condition_match_type is not UNSET: + field_dict["condition_match_type"] = condition_match_type + if manager_role_id is not UNSET: + field_dict["manager_role_id"] = manager_role_id + if manager_user_id is not UNSET: + field_dict["manager_user_id"] = manager_user_id + if assignment_deadline_days is not UNSET: + field_dict["assignment_deadline_days"] = assignment_deadline_days + if assignment_deadline_parent_status is not UNSET: + field_dict["assignment_deadline_parent_status"] = assignment_deadline_parent_status + if assignment_deadline_sub_status_id is not UNSET: + field_dict["assignment_deadline_sub_status_id"] = assignment_deadline_sub_status_id + if assignment_skip_weekends is not UNSET: + field_dict["assignment_skip_weekends"] = assignment_skip_weekends + if completion_deadline_days is not UNSET: + field_dict["completion_deadline_days"] = completion_deadline_days + if completion_deadline_parent_status is not UNSET: + field_dict["completion_deadline_parent_status"] = completion_deadline_parent_status + if completion_deadline_sub_status_id is not UNSET: + field_dict["completion_deadline_sub_status_id"] = completion_deadline_sub_status_id + if completion_skip_weekends is not UNSET: + field_dict["completion_skip_weekends"] = completion_skip_weekends + if conditions is not UNSET: + field_dict["conditions"] = conditions + if notification_configurations is not UNSET: + field_dict["notification_configurations"] = notification_configurations + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem + from ..models.update_sla_data_attributes_notification_configurations_item import ( + UpdateSlaDataAttributesNotificationConfigurationsItem, + ) + + d = dict(src_dict) + name = d.pop("name", UNSET) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_position(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + position = _parse_position(d.pop("position", UNSET)) + + _condition_match_type = d.pop("condition_match_type", UNSET) + condition_match_type: UpdateSlaDataAttributesConditionMatchType | Unset + if isinstance(_condition_match_type, Unset): + condition_match_type = UNSET + else: + condition_match_type = check_update_sla_data_attributes_condition_match_type(_condition_match_type) + + def _parse_manager_role_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + manager_role_id_type_0 = UUID(data) + + return manager_role_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + manager_role_id = _parse_manager_role_id(d.pop("manager_role_id", UNSET)) + + def _parse_manager_user_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + manager_user_id = _parse_manager_user_id(d.pop("manager_user_id", UNSET)) + + _assignment_deadline_days = d.pop("assignment_deadline_days", UNSET) + assignment_deadline_days: UpdateSlaDataAttributesAssignmentDeadlineDays | Unset + if isinstance(_assignment_deadline_days, Unset): + assignment_deadline_days = UNSET + else: + assignment_deadline_days = check_update_sla_data_attributes_assignment_deadline_days( + _assignment_deadline_days + ) + + _assignment_deadline_parent_status = d.pop("assignment_deadline_parent_status", UNSET) + assignment_deadline_parent_status: UpdateSlaDataAttributesAssignmentDeadlineParentStatus | Unset + if isinstance(_assignment_deadline_parent_status, Unset): + assignment_deadline_parent_status = UNSET + else: + assignment_deadline_parent_status = check_update_sla_data_attributes_assignment_deadline_parent_status( + _assignment_deadline_parent_status + ) + + def _parse_assignment_deadline_sub_status_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + assignment_deadline_sub_status_id_type_0 = UUID(data) + + return assignment_deadline_sub_status_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + assignment_deadline_sub_status_id = _parse_assignment_deadline_sub_status_id( + d.pop("assignment_deadline_sub_status_id", UNSET) + ) + + assignment_skip_weekends = d.pop("assignment_skip_weekends", UNSET) + + _completion_deadline_days = d.pop("completion_deadline_days", UNSET) + completion_deadline_days: UpdateSlaDataAttributesCompletionDeadlineDays | Unset + if isinstance(_completion_deadline_days, Unset): + completion_deadline_days = UNSET + else: + completion_deadline_days = check_update_sla_data_attributes_completion_deadline_days( + _completion_deadline_days + ) + + _completion_deadline_parent_status = d.pop("completion_deadline_parent_status", UNSET) + completion_deadline_parent_status: UpdateSlaDataAttributesCompletionDeadlineParentStatus | Unset + if isinstance(_completion_deadline_parent_status, Unset): + completion_deadline_parent_status = UNSET + else: + completion_deadline_parent_status = check_update_sla_data_attributes_completion_deadline_parent_status( + _completion_deadline_parent_status + ) + + def _parse_completion_deadline_sub_status_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completion_deadline_sub_status_id_type_0 = UUID(data) + + return completion_deadline_sub_status_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + completion_deadline_sub_status_id = _parse_completion_deadline_sub_status_id( + d.pop("completion_deadline_sub_status_id", UNSET) + ) + + completion_skip_weekends = d.pop("completion_skip_weekends", UNSET) + + _conditions = d.pop("conditions", UNSET) + conditions: list[UpdateSlaDataAttributesConditionsItem] | Unset = UNSET + if _conditions is not UNSET: + conditions = [] + for conditions_item_data in _conditions: + conditions_item = UpdateSlaDataAttributesConditionsItem.from_dict(conditions_item_data) + + conditions.append(conditions_item) + + _notification_configurations = d.pop("notification_configurations", UNSET) + notification_configurations: list[UpdateSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET + if _notification_configurations is not UNSET: + notification_configurations = [] + for notification_configurations_item_data in _notification_configurations: + notification_configurations_item = UpdateSlaDataAttributesNotificationConfigurationsItem.from_dict( + notification_configurations_item_data + ) + + notification_configurations.append(notification_configurations_item) + + update_sla_data_attributes = cls( + name=name, + description=description, + position=position, + condition_match_type=condition_match_type, + manager_role_id=manager_role_id, + manager_user_id=manager_user_id, + assignment_deadline_days=assignment_deadline_days, + assignment_deadline_parent_status=assignment_deadline_parent_status, + assignment_deadline_sub_status_id=assignment_deadline_sub_status_id, + assignment_skip_weekends=assignment_skip_weekends, + completion_deadline_days=completion_deadline_days, + completion_deadline_parent_status=completion_deadline_parent_status, + completion_deadline_sub_status_id=completion_deadline_sub_status_id, + completion_skip_weekends=completion_skip_weekends, + conditions=conditions, + notification_configurations=notification_configurations, + ) + + return update_sla_data_attributes diff --git a/rootly_sdk/models/update_sla_data_attributes_assignment_deadline_days.py b/rootly_sdk/models/update_sla_data_attributes_assignment_deadline_days.py new file mode 100644 index 00000000..b8860340 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_assignment_deadline_days.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesAssignmentDeadlineDays = Literal[1, 2, 3, 4, 5, 6, 7, 14, 21, 30] + +UPDATE_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_DAYS_VALUES: set[UpdateSlaDataAttributesAssignmentDeadlineDays] = { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 14, + 21, + 30, +} + + +def check_update_sla_data_attributes_assignment_deadline_days( + value: int, +) -> UpdateSlaDataAttributesAssignmentDeadlineDays: + if value in UPDATE_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_DAYS_VALUES: + return cast(UpdateSlaDataAttributesAssignmentDeadlineDays, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_DAYS_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_assignment_deadline_parent_status.py b/rootly_sdk/models/update_sla_data_attributes_assignment_deadline_parent_status.py new file mode 100644 index 00000000..3ef51437 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_assignment_deadline_parent_status.py @@ -0,0 +1,28 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesAssignmentDeadlineParentStatus = Literal[ + "cancelled", "closed", "in_triage", "mitigated", "resolved", "started" +] + +UPDATE_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_PARENT_STATUS_VALUES: set[ + UpdateSlaDataAttributesAssignmentDeadlineParentStatus +] = { + "cancelled", + "closed", + "in_triage", + "mitigated", + "resolved", + "started", +} + + +def check_update_sla_data_attributes_assignment_deadline_parent_status( + value: str | None, +) -> UpdateSlaDataAttributesAssignmentDeadlineParentStatus | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_PARENT_STATUS_VALUES: + return cast(UpdateSlaDataAttributesAssignmentDeadlineParentStatus, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_ASSIGNMENT_DEADLINE_PARENT_STATUS_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_completion_deadline_days.py b/rootly_sdk/models/update_sla_data_attributes_completion_deadline_days.py new file mode 100644 index 00000000..53f9f041 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_completion_deadline_days.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesCompletionDeadlineDays = Literal[1, 2, 3, 4, 5, 6, 7, 14, 21, 30] + +UPDATE_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_DAYS_VALUES: set[UpdateSlaDataAttributesCompletionDeadlineDays] = { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 14, + 21, + 30, +} + + +def check_update_sla_data_attributes_completion_deadline_days( + value: int, +) -> UpdateSlaDataAttributesCompletionDeadlineDays: + if value in UPDATE_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_DAYS_VALUES: + return cast(UpdateSlaDataAttributesCompletionDeadlineDays, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_DAYS_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_completion_deadline_parent_status.py b/rootly_sdk/models/update_sla_data_attributes_completion_deadline_parent_status.py new file mode 100644 index 00000000..02fe0c7c --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_completion_deadline_parent_status.py @@ -0,0 +1,28 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesCompletionDeadlineParentStatus = Literal[ + "cancelled", "closed", "in_triage", "mitigated", "resolved", "started" +] + +UPDATE_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_PARENT_STATUS_VALUES: set[ + UpdateSlaDataAttributesCompletionDeadlineParentStatus +] = { + "cancelled", + "closed", + "in_triage", + "mitigated", + "resolved", + "started", +} + + +def check_update_sla_data_attributes_completion_deadline_parent_status( + value: str | None, +) -> UpdateSlaDataAttributesCompletionDeadlineParentStatus | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_PARENT_STATUS_VALUES: + return cast(UpdateSlaDataAttributesCompletionDeadlineParentStatus, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_COMPLETION_DEADLINE_PARENT_STATUS_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_condition_match_type.py b/rootly_sdk/models/update_sla_data_attributes_condition_match_type.py new file mode 100644 index 00000000..38d85ad7 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_condition_match_type.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesConditionMatchType = Literal["ALL", "ANY"] + +UPDATE_SLA_DATA_ATTRIBUTES_CONDITION_MATCH_TYPE_VALUES: set[UpdateSlaDataAttributesConditionMatchType] = { + "ALL", + "ANY", +} + + +def check_update_sla_data_attributes_condition_match_type( + value: str | None, +) -> UpdateSlaDataAttributesConditionMatchType | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_ATTRIBUTES_CONDITION_MATCH_TYPE_VALUES: + return cast(UpdateSlaDataAttributesConditionMatchType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_CONDITION_MATCH_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py new file mode 100644 index 00000000..be124497 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py @@ -0,0 +1,169 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_sla_data_attributes_conditions_item_conditionable_type import ( + UpdateSlaDataAttributesConditionsItemConditionableType, + check_update_sla_data_attributes_conditions_item_conditionable_type, +) +from ..models.update_sla_data_attributes_conditions_item_property import ( + UpdateSlaDataAttributesConditionsItemProperty, + check_update_sla_data_attributes_conditions_item_property, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSlaDataAttributesConditionsItem") + + +@_attrs_define +class UpdateSlaDataAttributesConditionsItem: + """ + Attributes: + conditionable_type (UpdateSlaDataAttributesConditionsItemConditionableType): The type of condition + operator (str): The comparison operator + property_ (UpdateSlaDataAttributesConditionsItemProperty | Unset): The property to evaluate (for built-in field + conditions) + values (list[str] | None | Unset): The values to compare against + form_field_id (None | Unset | UUID): The ID of the form field (for custom field conditions) + position (int | Unset): The position of the condition for ordering + """ + + conditionable_type: UpdateSlaDataAttributesConditionsItemConditionableType + operator: str + property_: UpdateSlaDataAttributesConditionsItemProperty | Unset = UNSET + values: list[str] | None | Unset = UNSET + form_field_id: None | Unset | UUID = UNSET + position: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + conditionable_type: str = self.conditionable_type + + operator = self.operator + + property_: str | Unset = UNSET + if not isinstance(self.property_, Unset): + property_ = self.property_ + + values: list[str] | None | Unset + if isinstance(self.values, Unset): + values = UNSET + elif isinstance(self.values, list): + values = self.values + + else: + values = self.values + + form_field_id: None | str | Unset + if isinstance(self.form_field_id, Unset): + form_field_id = UNSET + elif isinstance(self.form_field_id, UUID): + form_field_id = str(self.form_field_id) + else: + form_field_id = self.form_field_id + + position = self.position + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "conditionable_type": conditionable_type, + "operator": operator, + } + ) + if property_ is not UNSET: + field_dict["property"] = property_ + if values is not UNSET: + field_dict["values"] = values + if form_field_id is not UNSET: + field_dict["form_field_id"] = form_field_id + if position is not UNSET: + field_dict["position"] = position + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + conditionable_type = check_update_sla_data_attributes_conditions_item_conditionable_type( + d.pop("conditionable_type") + ) + + operator = d.pop("operator") + + _property_ = d.pop("property", UNSET) + property_: UpdateSlaDataAttributesConditionsItemProperty | Unset + if isinstance(_property_, Unset): + property_ = UNSET + else: + property_ = check_update_sla_data_attributes_conditions_item_property(_property_) + + def _parse_values(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + values_type_0 = cast(list[str], data) + + return values_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + values = _parse_values(d.pop("values", UNSET)) + + def _parse_form_field_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + form_field_id_type_0 = UUID(data) + + return form_field_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + form_field_id = _parse_form_field_id(d.pop("form_field_id", UNSET)) + + position = d.pop("position", UNSET) + + update_sla_data_attributes_conditions_item = cls( + conditionable_type=conditionable_type, + operator=operator, + property_=property_, + values=values, + form_field_id=form_field_id, + position=position, + ) + + update_sla_data_attributes_conditions_item.additional_properties = d + return update_sla_data_attributes_conditions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_sla_data_attributes_conditions_item_conditionable_type.py b/rootly_sdk/models/update_sla_data_attributes_conditions_item_conditionable_type.py new file mode 100644 index 00000000..e3652003 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_conditions_item_conditionable_type.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesConditionsItemConditionableType = Literal[ + "SLAs::BuiltInFieldCondition", "SLAs::CustomFieldCondition" +] + +UPDATE_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES: set[ + UpdateSlaDataAttributesConditionsItemConditionableType +] = { + "SLAs::BuiltInFieldCondition", + "SLAs::CustomFieldCondition", +} + + +def check_update_sla_data_attributes_conditions_item_conditionable_type( + value: str | None, +) -> UpdateSlaDataAttributesConditionsItemConditionableType | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES: + return cast(UpdateSlaDataAttributesConditionsItemConditionableType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_CONDITIONABLE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_conditions_item_property.py b/rootly_sdk/models/update_sla_data_attributes_conditions_item_property.py new file mode 100644 index 00000000..6cbbbbbb --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_conditions_item_property.py @@ -0,0 +1,55 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesConditionsItemProperty = Literal[ + "acknowledged_at", + "cause", + "detected_at", + "environment", + "functionality", + "group", + "incident_role", + "incident_type", + "kind", + "mitigated_at", + "resolved_at", + "service", + "severity", + "started_at", + "status", + "sub_status", + "summary", + "visibility", +] + +UPDATE_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_PROPERTY_VALUES: set[UpdateSlaDataAttributesConditionsItemProperty] = { + "acknowledged_at", + "cause", + "detected_at", + "environment", + "functionality", + "group", + "incident_role", + "incident_type", + "kind", + "mitigated_at", + "resolved_at", + "service", + "severity", + "started_at", + "status", + "sub_status", + "summary", + "visibility", +} + + +def check_update_sla_data_attributes_conditions_item_property( + value: str | None, +) -> UpdateSlaDataAttributesConditionsItemProperty | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_PROPERTY_VALUES: + return cast(UpdateSlaDataAttributesConditionsItemProperty, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_CONDITIONS_ITEM_PROPERTY_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py b/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py new file mode 100644 index 00000000..d4296bf0 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_sla_data_attributes_notification_configurations_item_offset_type import ( + UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType, + check_update_sla_data_attributes_notification_configurations_item_offset_type, +) + +T = TypeVar("T", bound="UpdateSlaDataAttributesNotificationConfigurationsItem") + + +@_attrs_define +class UpdateSlaDataAttributesNotificationConfigurationsItem: + """ + Attributes: + offset_type (UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType): When to send the notification + relative to the deadline + offset_days (int): Number of days before or after the deadline. Must be 0 for when_due. + """ + + offset_type: UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType + offset_days: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + offset_type: str = self.offset_type + + offset_days = self.offset_days + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "offset_type": offset_type, + "offset_days": offset_days, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + offset_type = check_update_sla_data_attributes_notification_configurations_item_offset_type( + d.pop("offset_type") + ) + + offset_days = d.pop("offset_days") + + update_sla_data_attributes_notification_configurations_item = cls( + offset_type=offset_type, + offset_days=offset_days, + ) + + update_sla_data_attributes_notification_configurations_item.additional_properties = d + return update_sla_data_attributes_notification_configurations_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item_offset_type.py b/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item_offset_type.py new file mode 100644 index 00000000..df9e54b1 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item_offset_type.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType = Literal["after_due", "before_due", "when_due"] + +UPDATE_SLA_DATA_ATTRIBUTES_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES: set[ + UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType +] = { + "after_due", + "before_due", + "when_due", +} + + +def check_update_sla_data_attributes_notification_configurations_item_offset_type( + value: str | None, +) -> UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_ATTRIBUTES_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES: + return cast(UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_ATTRIBUTES_NOTIFICATION_CONFIGURATIONS_ITEM_OFFSET_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_sla_data_type.py b/rootly_sdk/models/update_sla_data_type.py new file mode 100644 index 00000000..31432935 --- /dev/null +++ b/rootly_sdk/models/update_sla_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +UpdateSlaDataType = Literal["slas"] + +UPDATE_SLA_DATA_TYPE_VALUES: set[UpdateSlaDataType] = { + "slas", +} + + +def check_update_sla_data_type(value: str | None) -> UpdateSlaDataType | None: + if value is None: + return None + if value in UPDATE_SLA_DATA_TYPE_VALUES: + return cast(UpdateSlaDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_SLA_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/update_slack_channel_topic_task_params.py b/rootly_sdk/models/update_slack_channel_topic_task_params.py index 50023adc..612712b5 100644 --- a/rootly_sdk/models/update_slack_channel_topic_task_params.py +++ b/rootly_sdk/models/update_slack_channel_topic_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -23,12 +25,12 @@ class UpdateSlackChannelTopicTaskParams: Attributes: channel (UpdateSlackChannelTopicTaskParamsChannel): topic (str): - task_type (Union[Unset, UpdateSlackChannelTopicTaskParamsTaskType]): + task_type (UpdateSlackChannelTopicTaskParamsTaskType | Unset): """ - channel: "UpdateSlackChannelTopicTaskParamsChannel" + channel: UpdateSlackChannelTopicTaskParamsChannel topic: str - task_type: Unset | UpdateSlackChannelTopicTaskParamsTaskType = UNSET + task_type: UpdateSlackChannelTopicTaskParamsTaskType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: topic = self.topic - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -63,7 +65,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: topic = d.pop("topic") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateSlackChannelTopicTaskParamsTaskType + task_type: UpdateSlackChannelTopicTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_slack_channel_topic_task_params_channel.py b/rootly_sdk/models/update_slack_channel_topic_task_params_channel.py index fc44769d..134f02c9 100644 --- a/rootly_sdk/models/update_slack_channel_topic_task_params_channel.py +++ b/rootly_sdk/models/update_slack_channel_topic_task_params_channel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateSlackChannelTopicTaskParamsChannel: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_status_page.py b/rootly_sdk/models/update_status_page.py index 3cbbccdd..ef000551 100644 --- a/rootly_sdk/models/update_status_page.py +++ b/rootly_sdk/models/update_status_page.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateStatusPage: data (UpdateStatusPageData): """ - data: "UpdateStatusPageData" + data: UpdateStatusPageData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_status_page_data.py b/rootly_sdk/models/update_status_page_data.py index a0601657..d20a5a83 100644 --- a/rootly_sdk/models/update_status_page_data.py +++ b/rootly_sdk/models/update_status_page_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateStatusPageData: """ type_: UpdateStatusPageDataType - attributes: "UpdateStatusPageDataAttributes" + attributes: UpdateStatusPageDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_status_page_data_attributes.py b/rootly_sdk/models/update_status_page_data_attributes.py index e3b749d5..ee451103 100644 --- a/rootly_sdk/models/update_status_page_data_attributes.py +++ b/rootly_sdk/models/update_status_page_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -11,6 +13,10 @@ UpdateStatusPageDataAttributesSamlNameIdentifierFormat, check_update_status_page_data_attributes_saml_name_identifier_format, ) +from ..models.update_status_page_data_attributes_section_order_type_0_item import ( + UpdateStatusPageDataAttributesSectionOrderType0Item, + check_update_status_page_data_attributes_section_order_type_0_item, +) from ..models.update_status_page_data_attributes_show_uptime_last_days import ( UpdateStatusPageDataAttributesShowUptimeLastDays, check_update_status_page_data_attributes_show_uptime_last_days, @@ -24,211 +30,237 @@ class UpdateStatusPageDataAttributes: """ Attributes: - title (Union[Unset, str]): The title of the status page - public_title (Union[None, Unset, str]): The public title of the status page - description (Union[None, Unset, str]): The description of the status page - public_description (Union[None, Unset, str]): The public description of the status page - header_color (Union[None, Unset, str]): The color of the header. Eg. "#0061F2" - footer_color (Union[None, Unset, str]): The color of the footer. Eg. "#1F2F41" - allow_search_engine_index (Union[None, Unset, bool]): Allow search engines to include your public status page in + title (str | Unset): The title of the status page + public_title (None | str | Unset): The public title of the status page + description (None | str | Unset): The description of the status page + public_description (None | str | Unset): The public description of the status page + header_color (None | str | Unset): The color of the header. Eg. "#0061F2" + footer_color (None | str | Unset): The color of the footer. Eg. "#1F2F41" + allow_search_engine_index (bool | None | Unset): Allow search engines to include your public status page in search results - show_uptime (Union[None, Unset, bool]): Show uptime - show_uptime_last_days (Union[Unset, UpdateStatusPageDataAttributesShowUptimeLastDays]): Show uptime over x days - success_message (Union[None, Unset, str]): Message showing when all components are operational - failure_message (Union[None, Unset, str]): Message showing when at least one component is not operational - authentication_method (Union[Unset, UpdateStatusPageDataAttributesAuthenticationMethod]): Authentication method + show_uptime (bool | None | Unset): Show uptime + show_uptime_last_days (UpdateStatusPageDataAttributesShowUptimeLastDays | Unset): Show uptime over x days + success_message (None | str | Unset): Message showing when all components are operational + failure_message (None | str | Unset): Message showing when at least one component is not operational + authentication_method (UpdateStatusPageDataAttributesAuthenticationMethod | Unset): Authentication method Default: 'none'. - authentication_enabled (Union[None, Unset, bool]): Enable authentication (deprecated - use authentication_method + authentication_enabled (bool | None | Unset): Enable authentication (deprecated - use authentication_method instead) Default: False. - authentication_password (Union[None, Unset, str]): Authentication password - saml_idp_sso_service_url (Union[None, Unset, str]): SAML IdP SSO service URL - saml_idp_slo_service_url (Union[None, Unset, str]): SAML IdP SLO service URL - saml_idp_cert (Union[None, Unset, str]): SAML IdP certificate - saml_name_identifier_format (Union[Unset, UpdateStatusPageDataAttributesSamlNameIdentifierFormat]): SAML name + authentication_password (None | str | Unset): Authentication password + saml_idp_sso_service_url (None | str | Unset): SAML IdP SSO service URL + saml_idp_slo_service_url (None | str | Unset): SAML IdP SLO service URL + saml_idp_cert (None | str | Unset): SAML IdP certificate + saml_name_identifier_format (UpdateStatusPageDataAttributesSamlNameIdentifierFormat | Unset): SAML name identifier format - website_url (Union[None, Unset, str]): Website URL - website_privacy_url (Union[None, Unset, str]): Website Privacy URL - website_support_url (Union[None, Unset, str]): Website Support URL - ga_tracking_id (Union[None, Unset, str]): Google Analytics tracking ID - time_zone (Union[None, Unset, str]): A valid IANA time zone name. Default: 'Etc/UTC'. - public (Union[None, Unset, bool]): Make the status page accessible to the public - service_ids (Union[Unset, list[str]]): Services attached to the status page - functionality_ids (Union[Unset, list[str]]): Functionalities attached to the status page - enabled (Union[None, Unset, bool]): Enabled / Disable the status page + section_order (list[UpdateStatusPageDataAttributesSectionOrderType0Item] | None | Unset): Order of sections on + the status page + external_domain_names (list[str] | None | Unset): External domain names attached to the status page + website_url (None | str | Unset): Website URL + website_privacy_url (None | str | Unset): Website Privacy URL + website_support_url (None | str | Unset): Website Support URL + ga_tracking_id (None | str | Unset): Google Analytics tracking ID + time_zone (None | str | Unset): A valid IANA time zone name. Default: 'Etc/UTC'. + public (bool | None | Unset): Make the status page accessible to the public + service_ids (list[str] | Unset): Services attached to the status page + functionality_ids (list[str] | Unset): Functionalities attached to the status page + enabled (bool | None | Unset): Enabled / Disable the status page """ - title: Unset | str = UNSET - public_title: None | Unset | str = UNSET - description: None | Unset | str = UNSET - public_description: None | Unset | str = UNSET - header_color: None | Unset | str = UNSET - footer_color: None | Unset | str = UNSET - allow_search_engine_index: None | Unset | bool = UNSET - show_uptime: None | Unset | bool = UNSET - show_uptime_last_days: Unset | UpdateStatusPageDataAttributesShowUptimeLastDays = UNSET - success_message: None | Unset | str = UNSET - failure_message: None | Unset | str = UNSET - authentication_method: Unset | UpdateStatusPageDataAttributesAuthenticationMethod = "none" - authentication_enabled: None | Unset | bool = False - authentication_password: None | Unset | str = UNSET - saml_idp_sso_service_url: None | Unset | str = UNSET - saml_idp_slo_service_url: None | Unset | str = UNSET - saml_idp_cert: None | Unset | str = UNSET - saml_name_identifier_format: Unset | UpdateStatusPageDataAttributesSamlNameIdentifierFormat = UNSET - website_url: None | Unset | str = UNSET - website_privacy_url: None | Unset | str = UNSET - website_support_url: None | Unset | str = UNSET - ga_tracking_id: None | Unset | str = UNSET - time_zone: None | Unset | str = "Etc/UTC" - public: None | Unset | bool = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - enabled: None | Unset | bool = UNSET + title: str | Unset = UNSET + public_title: None | str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + header_color: None | str | Unset = UNSET + footer_color: None | str | Unset = UNSET + allow_search_engine_index: bool | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: UpdateStatusPageDataAttributesShowUptimeLastDays | Unset = UNSET + success_message: None | str | Unset = UNSET + failure_message: None | str | Unset = UNSET + authentication_method: UpdateStatusPageDataAttributesAuthenticationMethod | Unset = "none" + authentication_enabled: bool | None | Unset = False + authentication_password: None | str | Unset = UNSET + saml_idp_sso_service_url: None | str | Unset = UNSET + saml_idp_slo_service_url: None | str | Unset = UNSET + saml_idp_cert: None | str | Unset = UNSET + saml_name_identifier_format: UpdateStatusPageDataAttributesSamlNameIdentifierFormat | Unset = UNSET + section_order: list[UpdateStatusPageDataAttributesSectionOrderType0Item] | None | Unset = UNSET + external_domain_names: list[str] | None | Unset = UNSET + website_url: None | str | Unset = UNSET + website_privacy_url: None | str | Unset = UNSET + website_support_url: None | str | Unset = UNSET + ga_tracking_id: None | str | Unset = UNSET + time_zone: None | str | Unset = "Etc/UTC" + public: bool | None | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + enabled: bool | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title - public_title: None | Unset | str + public_title: None | str | Unset if isinstance(self.public_title, Unset): public_title = UNSET else: public_title = self.public_title - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - public_description: None | Unset | str + public_description: None | str | Unset if isinstance(self.public_description, Unset): public_description = UNSET else: public_description = self.public_description - header_color: None | Unset | str + header_color: None | str | Unset if isinstance(self.header_color, Unset): header_color = UNSET else: header_color = self.header_color - footer_color: None | Unset | str + footer_color: None | str | Unset if isinstance(self.footer_color, Unset): footer_color = UNSET else: footer_color = self.footer_color - allow_search_engine_index: None | Unset | bool + allow_search_engine_index: bool | None | Unset if isinstance(self.allow_search_engine_index, Unset): allow_search_engine_index = UNSET else: allow_search_engine_index = self.allow_search_engine_index - show_uptime: None | Unset | bool + show_uptime: bool | None | Unset if isinstance(self.show_uptime, Unset): show_uptime = UNSET else: show_uptime = self.show_uptime - show_uptime_last_days: Unset | int = UNSET + show_uptime_last_days: int | Unset = UNSET if not isinstance(self.show_uptime_last_days, Unset): show_uptime_last_days = self.show_uptime_last_days - success_message: None | Unset | str + success_message: None | str | Unset if isinstance(self.success_message, Unset): success_message = UNSET else: success_message = self.success_message - failure_message: None | Unset | str + failure_message: None | str | Unset if isinstance(self.failure_message, Unset): failure_message = UNSET else: failure_message = self.failure_message - authentication_method: Unset | str = UNSET + authentication_method: str | Unset = UNSET if not isinstance(self.authentication_method, Unset): authentication_method = self.authentication_method - authentication_enabled: None | Unset | bool + authentication_enabled: bool | None | Unset if isinstance(self.authentication_enabled, Unset): authentication_enabled = UNSET else: authentication_enabled = self.authentication_enabled - authentication_password: None | Unset | str + authentication_password: None | str | Unset if isinstance(self.authentication_password, Unset): authentication_password = UNSET else: authentication_password = self.authentication_password - saml_idp_sso_service_url: None | Unset | str + saml_idp_sso_service_url: None | str | Unset if isinstance(self.saml_idp_sso_service_url, Unset): saml_idp_sso_service_url = UNSET else: saml_idp_sso_service_url = self.saml_idp_sso_service_url - saml_idp_slo_service_url: None | Unset | str + saml_idp_slo_service_url: None | str | Unset if isinstance(self.saml_idp_slo_service_url, Unset): saml_idp_slo_service_url = UNSET else: saml_idp_slo_service_url = self.saml_idp_slo_service_url - saml_idp_cert: None | Unset | str + saml_idp_cert: None | str | Unset if isinstance(self.saml_idp_cert, Unset): saml_idp_cert = UNSET else: saml_idp_cert = self.saml_idp_cert - saml_name_identifier_format: Unset | str = UNSET + saml_name_identifier_format: str | Unset = UNSET if not isinstance(self.saml_name_identifier_format, Unset): saml_name_identifier_format = self.saml_name_identifier_format - website_url: None | Unset | str + section_order: list[str] | None | Unset + if isinstance(self.section_order, Unset): + section_order = UNSET + elif isinstance(self.section_order, list): + section_order = [] + for section_order_type_0_item_data in self.section_order: + section_order_type_0_item: str = section_order_type_0_item_data + section_order.append(section_order_type_0_item) + + else: + section_order = self.section_order + + external_domain_names: list[str] | None | Unset + if isinstance(self.external_domain_names, Unset): + external_domain_names = UNSET + elif isinstance(self.external_domain_names, list): + external_domain_names = self.external_domain_names + + else: + external_domain_names = self.external_domain_names + + website_url: None | str | Unset if isinstance(self.website_url, Unset): website_url = UNSET else: website_url = self.website_url - website_privacy_url: None | Unset | str + website_privacy_url: None | str | Unset if isinstance(self.website_privacy_url, Unset): website_privacy_url = UNSET else: website_privacy_url = self.website_privacy_url - website_support_url: None | Unset | str + website_support_url: None | str | Unset if isinstance(self.website_support_url, Unset): website_support_url = UNSET else: website_support_url = self.website_support_url - ga_tracking_id: None | Unset | str + ga_tracking_id: None | str | Unset if isinstance(self.ga_tracking_id, Unset): ga_tracking_id = UNSET else: ga_tracking_id = self.ga_tracking_id - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: time_zone = self.time_zone - public: None | Unset | bool + public: bool | None | Unset if isinstance(self.public, Unset): public = UNSET else: public = self.public - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - enabled: None | Unset | bool + enabled: bool | None | Unset if isinstance(self.enabled, Unset): enabled = UNSET else: @@ -273,6 +305,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["saml_idp_cert"] = saml_idp_cert if saml_name_identifier_format is not UNSET: field_dict["saml_name_identifier_format"] = saml_name_identifier_format + if section_order is not UNSET: + field_dict["section_order"] = section_order + if external_domain_names is not UNSET: + field_dict["external_domain_names"] = external_domain_names if website_url is not UNSET: field_dict["website_url"] = website_url if website_privacy_url is not UNSET: @@ -299,71 +335,71 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) title = d.pop("title", UNSET) - def _parse_public_title(data: object) -> None | Unset | str: + def _parse_public_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_title = _parse_public_title(d.pop("public_title", UNSET)) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_public_description(data: object) -> None | Unset | str: + def _parse_public_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) public_description = _parse_public_description(d.pop("public_description", UNSET)) - def _parse_header_color(data: object) -> None | Unset | str: + def _parse_header_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) header_color = _parse_header_color(d.pop("header_color", UNSET)) - def _parse_footer_color(data: object) -> None | Unset | str: + def _parse_footer_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) footer_color = _parse_footer_color(d.pop("footer_color", UNSET)) - def _parse_allow_search_engine_index(data: object) -> None | Unset | bool: + def _parse_allow_search_engine_index(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) allow_search_engine_index = _parse_allow_search_engine_index(d.pop("allow_search_engine_index", UNSET)) - def _parse_show_uptime(data: object) -> None | Unset | bool: + def _parse_show_uptime(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) _show_uptime_last_days = d.pop("show_uptime_last_days", UNSET) - show_uptime_last_days: Unset | UpdateStatusPageDataAttributesShowUptimeLastDays + show_uptime_last_days: UpdateStatusPageDataAttributesShowUptimeLastDays | Unset if isinstance(_show_uptime_last_days, Unset): show_uptime_last_days = UNSET else: @@ -371,26 +407,26 @@ def _parse_show_uptime(data: object) -> None | Unset | bool: _show_uptime_last_days ) - def _parse_success_message(data: object) -> None | Unset | str: + def _parse_success_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) success_message = _parse_success_message(d.pop("success_message", UNSET)) - def _parse_failure_message(data: object) -> None | Unset | str: + def _parse_failure_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) failure_message = _parse_failure_message(d.pop("failure_message", UNSET)) _authentication_method = d.pop("authentication_method", UNSET) - authentication_method: Unset | UpdateStatusPageDataAttributesAuthenticationMethod + authentication_method: UpdateStatusPageDataAttributesAuthenticationMethod | Unset if isinstance(_authentication_method, Unset): authentication_method = UNSET else: @@ -398,53 +434,53 @@ def _parse_failure_message(data: object) -> None | Unset | str: _authentication_method ) - def _parse_authentication_enabled(data: object) -> None | Unset | bool: + def _parse_authentication_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) authentication_enabled = _parse_authentication_enabled(d.pop("authentication_enabled", UNSET)) - def _parse_authentication_password(data: object) -> None | Unset | str: + def _parse_authentication_password(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) authentication_password = _parse_authentication_password(d.pop("authentication_password", UNSET)) - def _parse_saml_idp_sso_service_url(data: object) -> None | Unset | str: + def _parse_saml_idp_sso_service_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_sso_service_url = _parse_saml_idp_sso_service_url(d.pop("saml_idp_sso_service_url", UNSET)) - def _parse_saml_idp_slo_service_url(data: object) -> None | Unset | str: + def _parse_saml_idp_slo_service_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_slo_service_url = _parse_saml_idp_slo_service_url(d.pop("saml_idp_slo_service_url", UNSET)) - def _parse_saml_idp_cert(data: object) -> None | Unset | str: + def _parse_saml_idp_cert(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) saml_idp_cert = _parse_saml_idp_cert(d.pop("saml_idp_cert", UNSET)) _saml_name_identifier_format = d.pop("saml_name_identifier_format", UNSET) - saml_name_identifier_format: Unset | UpdateStatusPageDataAttributesSamlNameIdentifierFormat + saml_name_identifier_format: UpdateStatusPageDataAttributesSamlNameIdentifierFormat | Unset if isinstance(_saml_name_identifier_format, Unset): saml_name_identifier_format = UNSET else: @@ -452,57 +488,100 @@ def _parse_saml_idp_cert(data: object) -> None | Unset | str: _saml_name_identifier_format ) - def _parse_website_url(data: object) -> None | Unset | str: + def _parse_section_order( + data: object, + ) -> list[UpdateStatusPageDataAttributesSectionOrderType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + section_order_type_0 = [] + _section_order_type_0 = data + for section_order_type_0_item_data in _section_order_type_0: + section_order_type_0_item = check_update_status_page_data_attributes_section_order_type_0_item( + section_order_type_0_item_data + ) + + section_order_type_0.append(section_order_type_0_item) + + return section_order_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UpdateStatusPageDataAttributesSectionOrderType0Item] | None | Unset, data) + + section_order = _parse_section_order(d.pop("section_order", UNSET)) + + def _parse_external_domain_names(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + external_domain_names_type_0 = cast(list[str], data) + + return external_domain_names_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + external_domain_names = _parse_external_domain_names(d.pop("external_domain_names", UNSET)) + + def _parse_website_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_url = _parse_website_url(d.pop("website_url", UNSET)) - def _parse_website_privacy_url(data: object) -> None | Unset | str: + def _parse_website_privacy_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_privacy_url = _parse_website_privacy_url(d.pop("website_privacy_url", UNSET)) - def _parse_website_support_url(data: object) -> None | Unset | str: + def _parse_website_support_url(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) website_support_url = _parse_website_support_url(d.pop("website_support_url", UNSET)) - def _parse_ga_tracking_id(data: object) -> None | Unset | str: + def _parse_ga_tracking_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) ga_tracking_id = _parse_ga_tracking_id(d.pop("ga_tracking_id", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) - def _parse_public(data: object) -> None | Unset | bool: + def _parse_public(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) public = _parse_public(d.pop("public", UNSET)) @@ -510,12 +589,12 @@ def _parse_public(data: object) -> None | Unset | bool: functionality_ids = cast(list[str], d.pop("functionality_ids", UNSET)) - def _parse_enabled(data: object) -> None | Unset | bool: + def _parse_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) enabled = _parse_enabled(d.pop("enabled", UNSET)) @@ -538,6 +617,8 @@ def _parse_enabled(data: object) -> None | Unset | bool: saml_idp_slo_service_url=saml_idp_slo_service_url, saml_idp_cert=saml_idp_cert, saml_name_identifier_format=saml_name_identifier_format, + section_order=section_order, + external_domain_names=external_domain_names, website_url=website_url, website_privacy_url=website_privacy_url, website_support_url=website_support_url, diff --git a/rootly_sdk/models/update_status_page_data_attributes_section_order_type_0_item.py b/rootly_sdk/models/update_status_page_data_attributes_section_order_type_0_item.py new file mode 100644 index 00000000..7fe9b768 --- /dev/null +++ b/rootly_sdk/models/update_status_page_data_attributes_section_order_type_0_item.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +UpdateStatusPageDataAttributesSectionOrderType0Item = Literal["incidents", "maintenance", "system_status"] + +UPDATE_STATUS_PAGE_DATA_ATTRIBUTES_SECTION_ORDER_TYPE_0_ITEM_VALUES: set[ + UpdateStatusPageDataAttributesSectionOrderType0Item +] = { + "incidents", + "maintenance", + "system_status", +} + + +def check_update_status_page_data_attributes_section_order_type_0_item( + value: str | None, +) -> UpdateStatusPageDataAttributesSectionOrderType0Item | None: + if value is None: + return None + if value in UPDATE_STATUS_PAGE_DATA_ATTRIBUTES_SECTION_ORDER_TYPE_0_ITEM_VALUES: + return cast(UpdateStatusPageDataAttributesSectionOrderType0Item, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_STATUS_PAGE_DATA_ATTRIBUTES_SECTION_ORDER_TYPE_0_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_status_page_template.py b/rootly_sdk/models/update_status_page_template.py index 2d1d2500..6c781dbf 100644 --- a/rootly_sdk/models/update_status_page_template.py +++ b/rootly_sdk/models/update_status_page_template.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateStatusPageTemplate: data (UpdateStatusPageTemplateData): """ - data: "UpdateStatusPageTemplateData" + data: UpdateStatusPageTemplateData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_status_page_template_data.py b/rootly_sdk/models/update_status_page_template_data.py index 008f3102..e75b138f 100644 --- a/rootly_sdk/models/update_status_page_template_data.py +++ b/rootly_sdk/models/update_status_page_template_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateStatusPageTemplateData: """ type_: UpdateStatusPageTemplateDataType - attributes: "UpdateStatusPageTemplateDataAttributes" + attributes: UpdateStatusPageTemplateDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_status_page_template_data_attributes.py b/rootly_sdk/models/update_status_page_template_data_attributes.py index a05b3365..9efc9b6b 100644 --- a/rootly_sdk/models/update_status_page_template_data_attributes.py +++ b/rootly_sdk/models/update_status_page_template_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -22,44 +24,44 @@ class UpdateStatusPageTemplateDataAttributes: Attributes: title (str): Title of the template body (str): Description of the event the template will populate - update_title (Union[None, Unset, str]): Title that will be used for the status page update - update_status (Union[Unset, UpdateStatusPageTemplateDataAttributesUpdateStatus]): Status of the event the - template will populate - kind (Union[Unset, UpdateStatusPageTemplateDataAttributesKind]): The kind of the status page template - should_notify_subscribers (Union[None, Unset, bool]): Controls if incident subscribers should be notified - position (Union[Unset, int]): Position of the workflow task - enabled (Union[None, Unset, bool]): Enable / Disable the status page template + update_title (None | str | Unset): Title that will be used for the status page update + update_status (UpdateStatusPageTemplateDataAttributesUpdateStatus | Unset): Status of the event the template + will populate + kind (UpdateStatusPageTemplateDataAttributesKind | Unset): The kind of the status page template + should_notify_subscribers (bool | None | Unset): Controls if incident subscribers should be notified + position (int | Unset): Position of the workflow task + enabled (bool | None | Unset): Enable / Disable the status page template """ title: str body: str - update_title: None | Unset | str = UNSET - update_status: Unset | UpdateStatusPageTemplateDataAttributesUpdateStatus = UNSET - kind: Unset | UpdateStatusPageTemplateDataAttributesKind = UNSET - should_notify_subscribers: None | Unset | bool = UNSET - position: Unset | int = UNSET - enabled: None | Unset | bool = UNSET + update_title: None | str | Unset = UNSET + update_status: UpdateStatusPageTemplateDataAttributesUpdateStatus | Unset = UNSET + kind: UpdateStatusPageTemplateDataAttributesKind | Unset = UNSET + should_notify_subscribers: bool | None | Unset = UNSET + position: int | Unset = UNSET + enabled: bool | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: title = self.title body = self.body - update_title: None | Unset | str + update_title: None | str | Unset if isinstance(self.update_title, Unset): update_title = UNSET else: update_title = self.update_title - update_status: Unset | str = UNSET + update_status: str | Unset = UNSET if not isinstance(self.update_status, Unset): update_status = self.update_status - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind - should_notify_subscribers: None | Unset | bool + should_notify_subscribers: bool | None | Unset if isinstance(self.should_notify_subscribers, Unset): should_notify_subscribers = UNSET else: @@ -67,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: position = self.position - enabled: None | Unset | bool + enabled: bool | None | Unset if isinstance(self.enabled, Unset): enabled = UNSET else: @@ -103,46 +105,46 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: body = d.pop("body") - def _parse_update_title(data: object) -> None | Unset | str: + def _parse_update_title(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) update_title = _parse_update_title(d.pop("update_title", UNSET)) _update_status = d.pop("update_status", UNSET) - update_status: Unset | UpdateStatusPageTemplateDataAttributesUpdateStatus + update_status: UpdateStatusPageTemplateDataAttributesUpdateStatus | Unset if isinstance(_update_status, Unset): update_status = UNSET else: update_status = check_update_status_page_template_data_attributes_update_status(_update_status) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateStatusPageTemplateDataAttributesKind + kind: UpdateStatusPageTemplateDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: kind = check_update_status_page_template_data_attributes_kind(_kind) - def _parse_should_notify_subscribers(data: object) -> None | Unset | bool: + def _parse_should_notify_subscribers(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) should_notify_subscribers = _parse_should_notify_subscribers(d.pop("should_notify_subscribers", UNSET)) position = d.pop("position", UNSET) - def _parse_enabled(data: object) -> None | Unset | bool: + def _parse_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) enabled = _parse_enabled(d.pop("enabled", UNSET)) diff --git a/rootly_sdk/models/update_status_task_params.py b/rootly_sdk/models/update_status_task_params.py index 24deaf51..d623cf43 100644 --- a/rootly_sdk/models/update_status_task_params.py +++ b/rootly_sdk/models/update_status_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -22,19 +24,19 @@ class UpdateStatusTaskParams: """ Attributes: status (UpdateStatusTaskParamsStatus): - task_type (Union[Unset, UpdateStatusTaskParamsTaskType]): - inactivity_timeout (Union[Unset, str]): In format '1 hour', '1 day', etc Example: 1 hour. + task_type (UpdateStatusTaskParamsTaskType | Unset): + inactivity_timeout (str | Unset): In format '1 hour', '1 day', etc Example: 1 hour. """ status: UpdateStatusTaskParamsStatus - task_type: Unset | UpdateStatusTaskParamsTaskType = UNSET - inactivity_timeout: Unset | str = UNSET + task_type: UpdateStatusTaskParamsTaskType | Unset = UNSET + inactivity_timeout: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: status: str = self.status - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -60,7 +62,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = check_update_status_task_params_status(d.pop("status")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateStatusTaskParamsTaskType + task_type: UpdateStatusTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_sub_status.py b/rootly_sdk/models/update_sub_status.py index 6fda819a..5cd3a6ad 100644 --- a/rootly_sdk/models/update_sub_status.py +++ b/rootly_sdk/models/update_sub_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateSubStatus: data (UpdateSubStatusData): """ - data: "UpdateSubStatusData" + data: UpdateSubStatusData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_sub_status_data.py b/rootly_sdk/models/update_sub_status_data.py index 9ff74dae..bb16ef47 100644 --- a/rootly_sdk/models/update_sub_status_data.py +++ b/rootly_sdk/models/update_sub_status_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateSubStatusData: """ type_: UpdateSubStatusDataType - attributes: "UpdateSubStatusDataAttributes" + attributes: UpdateSubStatusDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_sub_status_data_attributes.py b/rootly_sdk/models/update_sub_status_data_attributes.py index d9296c3d..06db078d 100644 --- a/rootly_sdk/models/update_sub_status_data_attributes.py +++ b/rootly_sdk/models/update_sub_status_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,25 +14,25 @@ class UpdateSubStatusDataAttributes: """ Attributes: - name (Union[Unset, str]): - description (Union[None, Unset, str]): - position (Union[None, Unset, int]): + name (str | Unset): + description (None | str | Unset): + position (int | None | Unset): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - position: None | Unset | int = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + position: int | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: @@ -53,21 +55,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) diff --git a/rootly_sdk/models/update_team.py b/rootly_sdk/models/update_team.py index 54e99506..3168adfb 100644 --- a/rootly_sdk/models/update_team.py +++ b/rootly_sdk/models/update_team.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateTeam: data (UpdateTeamData): """ - data: "UpdateTeamData" + data: UpdateTeamData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_team_data.py b/rootly_sdk/models/update_team_data.py index faa345fa..e632bc31 100644 --- a/rootly_sdk/models/update_team_data.py +++ b/rootly_sdk/models/update_team_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateTeamData: """ type_: UpdateTeamDataType - attributes: "UpdateTeamDataAttributes" + attributes: UpdateTeamDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_team_data_attributes.py b/rootly_sdk/models/update_team_data_attributes.py index cc405d2d..f8393a51 100644 --- a/rootly_sdk/models/update_team_data_attributes.py +++ b/rootly_sdk/models/update_team_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -9,10 +11,10 @@ from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) - from ..models.update_team_data_attributes_fields_item import UpdateTeamDataAttributesFieldsItem from ..models.update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) + from ..models.update_team_data_attributes_properties_item import UpdateTeamDataAttributesPropertiesItem from ..models.update_team_data_attributes_slack_aliases_type_0_item import ( UpdateTeamDataAttributesSlackAliasesType0Item, ) @@ -28,67 +30,66 @@ class UpdateTeamDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the team - description (Union[None, Unset, str]): The description of the team - notify_emails (Union[None, Unset, list[str]]): Emails to attach to the team - color (Union[None, Unset, str]): The hex color of the team - position (Union[None, Unset, int]): Position of the team - backstage_id (Union[None, Unset, str]): The Backstage entity id associated to this team. eg: + name (str | Unset): The name of the team + description (None | str | Unset): The description of the team + notify_emails (list[str] | None | Unset): Emails to attach to the team + color (None | str | Unset): The hex color of the team + position (int | None | Unset): Position of the team + backstage_id (None | str | Unset): The Backstage entity id associated to this team. eg: :namespace/:kind/:entity_name - external_id (Union[None, Unset, str]): The external id associated to this team - pagerduty_id (Union[None, Unset, str]): The PagerDuty group id associated to this team - pagerduty_service_id (Union[None, Unset, str]): The PagerDuty service id associated to this team - opsgenie_id (Union[None, Unset, str]): The Opsgenie group id associated to this team - victor_ops_id (Union[None, Unset, str]): The VictorOps group id associated to this team - pagertree_id (Union[None, Unset, str]): The PagerTree group id associated to this team - cortex_id (Union[None, Unset, str]): The Cortex group id associated to this team - service_now_ci_sys_id (Union[None, Unset, str]): The Service Now CI sys id associated to this team - user_ids (Union[None, Unset, list[int]]): The user ids of the members of this team. - admin_ids (Union[None, Unset, list[int]]): The user ids of the admins of this team. These users must also be - present in user_ids attribute. - alerts_email_enabled (Union[None, Unset, bool]): Enable alerts through email - alert_urgency_id (Union[None, Unset, str]): The alert urgency id of the team - slack_channels (Union[None, Unset, list['UpdateTeamDataAttributesSlackChannelsType0Item']]): Slack Channels - associated with this team - slack_aliases (Union[None, Unset, list['UpdateTeamDataAttributesSlackAliasesType0Item']]): Slack Aliases - associated with this team - alert_broadcast_enabled (Union[None, Unset, bool]): Enable alerts to be broadcasted to a specific channel - alert_broadcast_channel (Union['UpdateTeamDataAttributesAlertBroadcastChannelType0', None, Unset]): Slack - channel to broadcast alerts to - incident_broadcast_enabled (Union[None, Unset, bool]): Enable incidents to be broadcasted to a specific channel - incident_broadcast_channel (Union['UpdateTeamDataAttributesIncidentBroadcastChannelType0', None, Unset]): Slack - channel to broadcast incidents to - auto_add_members_when_attached (Union[None, Unset, bool]): Auto add members to incident channel when team is - attached - fields (Union[Unset, list['UpdateTeamDataAttributesFieldsItem']]): Array of field values for this team. + external_id (None | str | Unset): The external id associated to this team + pagerduty_id (None | str | Unset): The PagerDuty group id associated to this team + pagerduty_service_id (None | str | Unset): The PagerDuty service id associated to this team + opsgenie_id (None | str | Unset): The Opsgenie group id associated to this team + victor_ops_id (None | str | Unset): The VictorOps group id associated to this team + pagertree_id (None | str | Unset): The PagerTree group id associated to this team + cortex_id (None | str | Unset): The Cortex group id associated to this team + service_now_ci_sys_id (None | str | Unset): The Service Now CI sys id associated to this team + user_ids (list[int] | None | Unset): The user ids of the members of this team. + admin_ids (list[int] | None | Unset): The user ids of the admins of this team. These users must also be present + in user_ids attribute. + alerts_email_enabled (bool | None | Unset): Enable alerts through email + alert_urgency_id (None | str | Unset): The alert urgency id of the team + slack_channels (list[UpdateTeamDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated + with this team + slack_aliases (list[UpdateTeamDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases associated + with this team + alert_broadcast_enabled (bool | None | Unset): Enable alerts to be broadcasted to a specific channel + alert_broadcast_channel (None | Unset | UpdateTeamDataAttributesAlertBroadcastChannelType0): Slack channel to + broadcast alerts to + incident_broadcast_enabled (bool | None | Unset): Enable incidents to be broadcasted to a specific channel + incident_broadcast_channel (None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0): Slack channel + to broadcast incidents to + auto_add_members_when_attached (bool | None | Unset): Auto add members to incident channel when team is attached + properties (list[UpdateTeamDataAttributesPropertiesItem] | Unset): Array of property values for this team. """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - notify_emails: None | Unset | list[str] = UNSET - color: None | Unset | str = UNSET - position: None | Unset | int = UNSET - backstage_id: None | Unset | str = UNSET - external_id: None | Unset | str = UNSET - pagerduty_id: None | Unset | str = UNSET - pagerduty_service_id: None | Unset | str = UNSET - opsgenie_id: None | Unset | str = UNSET - victor_ops_id: None | Unset | str = UNSET - pagertree_id: None | Unset | str = UNSET - cortex_id: None | Unset | str = UNSET - service_now_ci_sys_id: None | Unset | str = UNSET - user_ids: None | Unset | list[int] = UNSET - admin_ids: None | Unset | list[int] = UNSET - alerts_email_enabled: None | Unset | bool = UNSET - alert_urgency_id: None | Unset | str = UNSET - slack_channels: None | Unset | list["UpdateTeamDataAttributesSlackChannelsType0Item"] = UNSET - slack_aliases: None | Unset | list["UpdateTeamDataAttributesSlackAliasesType0Item"] = UNSET - alert_broadcast_enabled: None | Unset | bool = UNSET - alert_broadcast_channel: Union["UpdateTeamDataAttributesAlertBroadcastChannelType0", None, Unset] = UNSET - incident_broadcast_enabled: None | Unset | bool = UNSET - incident_broadcast_channel: Union["UpdateTeamDataAttributesIncidentBroadcastChannelType0", None, Unset] = UNSET - auto_add_members_when_attached: None | Unset | bool = UNSET - fields: Unset | list["UpdateTeamDataAttributesFieldsItem"] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + pagerduty_service_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + victor_ops_id: None | str | Unset = UNSET + pagertree_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + user_ids: list[int] | None | Unset = UNSET + admin_ids: list[int] | None | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + alert_urgency_id: None | str | Unset = UNSET + slack_channels: list[UpdateTeamDataAttributesSlackChannelsType0Item] | None | Unset = UNSET + slack_aliases: list[UpdateTeamDataAttributesSlackAliasesType0Item] | None | Unset = UNSET + alert_broadcast_enabled: bool | None | Unset = UNSET + alert_broadcast_channel: None | Unset | UpdateTeamDataAttributesAlertBroadcastChannelType0 = UNSET + incident_broadcast_enabled: bool | None | Unset = UNSET + incident_broadcast_channel: None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0 = UNSET + auto_add_members_when_attached: bool | None | Unset = UNSET + properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( @@ -100,13 +101,13 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - notify_emails: None | Unset | list[str] + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET elif isinstance(self.notify_emails, list): @@ -115,73 +116,73 @@ def to_dict(self) -> dict[str, Any]: else: notify_emails = self.notify_emails - color: None | Unset | str + color: None | str | Unset if isinstance(self.color, Unset): color = UNSET else: color = self.color - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - backstage_id: None | Unset | str + backstage_id: None | str | Unset if isinstance(self.backstage_id, Unset): backstage_id = UNSET else: backstage_id = self.backstage_id - external_id: None | Unset | str + external_id: None | str | Unset if isinstance(self.external_id, Unset): external_id = UNSET else: external_id = self.external_id - pagerduty_id: None | Unset | str + pagerduty_id: None | str | Unset if isinstance(self.pagerduty_id, Unset): pagerduty_id = UNSET else: pagerduty_id = self.pagerduty_id - pagerduty_service_id: None | Unset | str + pagerduty_service_id: None | str | Unset if isinstance(self.pagerduty_service_id, Unset): pagerduty_service_id = UNSET else: pagerduty_service_id = self.pagerduty_service_id - opsgenie_id: None | Unset | str + opsgenie_id: None | str | Unset if isinstance(self.opsgenie_id, Unset): opsgenie_id = UNSET else: opsgenie_id = self.opsgenie_id - victor_ops_id: None | Unset | str + victor_ops_id: None | str | Unset if isinstance(self.victor_ops_id, Unset): victor_ops_id = UNSET else: victor_ops_id = self.victor_ops_id - pagertree_id: None | Unset | str + pagertree_id: None | str | Unset if isinstance(self.pagertree_id, Unset): pagertree_id = UNSET else: pagertree_id = self.pagertree_id - cortex_id: None | Unset | str + cortex_id: None | str | Unset if isinstance(self.cortex_id, Unset): cortex_id = UNSET else: cortex_id = self.cortex_id - service_now_ci_sys_id: None | Unset | str + service_now_ci_sys_id: None | str | Unset if isinstance(self.service_now_ci_sys_id, Unset): service_now_ci_sys_id = UNSET else: service_now_ci_sys_id = self.service_now_ci_sys_id - user_ids: None | Unset | list[int] + user_ids: list[int] | None | Unset if isinstance(self.user_ids, Unset): user_ids = UNSET elif isinstance(self.user_ids, list): @@ -190,7 +191,7 @@ def to_dict(self) -> dict[str, Any]: else: user_ids = self.user_ids - admin_ids: None | Unset | list[int] + admin_ids: list[int] | None | Unset if isinstance(self.admin_ids, Unset): admin_ids = UNSET elif isinstance(self.admin_ids, list): @@ -199,19 +200,19 @@ def to_dict(self) -> dict[str, Any]: else: admin_ids = self.admin_ids - alerts_email_enabled: None | Unset | bool + alerts_email_enabled: bool | None | Unset if isinstance(self.alerts_email_enabled, Unset): alerts_email_enabled = UNSET else: alerts_email_enabled = self.alerts_email_enabled - alert_urgency_id: None | Unset | str + alert_urgency_id: None | str | Unset if isinstance(self.alert_urgency_id, Unset): alert_urgency_id = UNSET else: alert_urgency_id = self.alert_urgency_id - slack_channels: None | Unset | list[dict[str, Any]] + slack_channels: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET elif isinstance(self.slack_channels, list): @@ -223,7 +224,7 @@ def to_dict(self) -> dict[str, Any]: else: slack_channels = self.slack_channels - slack_aliases: None | Unset | list[dict[str, Any]] + slack_aliases: list[dict[str, Any]] | None | Unset if isinstance(self.slack_aliases, Unset): slack_aliases = UNSET elif isinstance(self.slack_aliases, list): @@ -235,13 +236,13 @@ def to_dict(self) -> dict[str, Any]: else: slack_aliases = self.slack_aliases - alert_broadcast_enabled: None | Unset | bool + alert_broadcast_enabled: bool | None | Unset if isinstance(self.alert_broadcast_enabled, Unset): alert_broadcast_enabled = UNSET else: alert_broadcast_enabled = self.alert_broadcast_enabled - alert_broadcast_channel: None | Unset | dict[str, Any] + alert_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.alert_broadcast_channel, Unset): alert_broadcast_channel = UNSET elif isinstance(self.alert_broadcast_channel, UpdateTeamDataAttributesAlertBroadcastChannelType0): @@ -249,13 +250,13 @@ def to_dict(self) -> dict[str, Any]: else: alert_broadcast_channel = self.alert_broadcast_channel - incident_broadcast_enabled: None | Unset | bool + incident_broadcast_enabled: bool | None | Unset if isinstance(self.incident_broadcast_enabled, Unset): incident_broadcast_enabled = UNSET else: incident_broadcast_enabled = self.incident_broadcast_enabled - incident_broadcast_channel: None | Unset | dict[str, Any] + incident_broadcast_channel: dict[str, Any] | None | Unset if isinstance(self.incident_broadcast_channel, Unset): incident_broadcast_channel = UNSET elif isinstance(self.incident_broadcast_channel, UpdateTeamDataAttributesIncidentBroadcastChannelType0): @@ -263,18 +264,18 @@ def to_dict(self) -> dict[str, Any]: else: incident_broadcast_channel = self.incident_broadcast_channel - auto_add_members_when_attached: None | Unset | bool + auto_add_members_when_attached: bool | None | Unset if isinstance(self.auto_add_members_when_attached, Unset): auto_add_members_when_attached = UNSET else: auto_add_members_when_attached = self.auto_add_members_when_attached - fields: Unset | list[dict[str, Any]] = UNSET - if not isinstance(self.fields, Unset): - fields = [] - for fields_item_data in self.fields: - fields_item = fields_item_data.to_dict() - fields.append(fields_item) + properties: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.properties, Unset): + properties = [] + for properties_item_data in self.properties: + properties_item = properties_item_data.to_dict() + properties.append(properties_item) field_dict: dict[str, Any] = {} @@ -329,8 +330,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_broadcast_channel"] = incident_broadcast_channel if auto_add_members_when_attached is not UNSET: field_dict["auto_add_members_when_attached"] = auto_add_members_when_attached - if fields is not UNSET: - field_dict["fields"] = fields + if properties is not UNSET: + field_dict["properties"] = properties return field_dict @@ -339,10 +340,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) - from ..models.update_team_data_attributes_fields_item import UpdateTeamDataAttributesFieldsItem from ..models.update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) + from ..models.update_team_data_attributes_properties_item import UpdateTeamDataAttributesPropertiesItem from ..models.update_team_data_attributes_slack_aliases_type_0_item import ( UpdateTeamDataAttributesSlackAliasesType0Item, ) @@ -353,16 +354,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_notify_emails(data: object) -> None | Unset | list[str]: + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -373,112 +374,112 @@ def _parse_notify_emails(data: object) -> None | Unset | list[str]: notify_emails_type_0 = cast(list[str], data) return notify_emails_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[str], data) + return cast(list[str] | None | Unset, data) notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) - def _parse_color(data: object) -> None | Unset | str: + def _parse_color(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) color = _parse_color(d.pop("color", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_backstage_id(data: object) -> None | Unset | str: + def _parse_backstage_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) - def _parse_external_id(data: object) -> None | Unset | str: + def _parse_external_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) external_id = _parse_external_id(d.pop("external_id", UNSET)) - def _parse_pagerduty_id(data: object) -> None | Unset | str: + def _parse_pagerduty_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) - def _parse_pagerduty_service_id(data: object) -> None | Unset | str: + def _parse_pagerduty_service_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagerduty_service_id = _parse_pagerduty_service_id(d.pop("pagerduty_service_id", UNSET)) - def _parse_opsgenie_id(data: object) -> None | Unset | str: + def _parse_opsgenie_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) opsgenie_id = _parse_opsgenie_id(d.pop("opsgenie_id", UNSET)) - def _parse_victor_ops_id(data: object) -> None | Unset | str: + def _parse_victor_ops_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) victor_ops_id = _parse_victor_ops_id(d.pop("victor_ops_id", UNSET)) - def _parse_pagertree_id(data: object) -> None | Unset | str: + def _parse_pagertree_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pagertree_id = _parse_pagertree_id(d.pop("pagertree_id", UNSET)) - def _parse_cortex_id(data: object) -> None | Unset | str: + def _parse_cortex_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) - def _parse_service_now_ci_sys_id(data: object) -> None | Unset | str: + def _parse_service_now_ci_sys_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) - def _parse_user_ids(data: object) -> None | Unset | list[int]: + def _parse_user_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -489,13 +490,13 @@ def _parse_user_ids(data: object) -> None | Unset | list[int]: user_ids_type_0 = cast(list[int], data) return user_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) user_ids = _parse_user_ids(d.pop("user_ids", UNSET)) - def _parse_admin_ids(data: object) -> None | Unset | list[int]: + def _parse_admin_ids(data: object) -> list[int] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -506,33 +507,31 @@ def _parse_admin_ids(data: object) -> None | Unset | list[int]: admin_ids_type_0 = cast(list[int], data) return admin_ids_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[int], data) + return cast(list[int] | None | Unset, data) admin_ids = _parse_admin_ids(d.pop("admin_ids", UNSET)) - def _parse_alerts_email_enabled(data: object) -> None | Unset | bool: + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) - def _parse_alert_urgency_id(data: object) -> None | Unset | str: + def _parse_alert_urgency_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) - def _parse_slack_channels( - data: object, - ) -> None | Unset | list["UpdateTeamDataAttributesSlackChannelsType0Item"]: + def _parse_slack_channels(data: object) -> list[UpdateTeamDataAttributesSlackChannelsType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -550,15 +549,13 @@ def _parse_slack_channels( slack_channels_type_0.append(slack_channels_type_0_item) return slack_channels_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateTeamDataAttributesSlackChannelsType0Item"], data) + return cast(list[UpdateTeamDataAttributesSlackChannelsType0Item] | None | Unset, data) slack_channels = _parse_slack_channels(d.pop("slack_channels", UNSET)) - def _parse_slack_aliases( - data: object, - ) -> None | Unset | list["UpdateTeamDataAttributesSlackAliasesType0Item"]: + def _parse_slack_aliases(data: object) -> list[UpdateTeamDataAttributesSlackAliasesType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -576,24 +573,24 @@ def _parse_slack_aliases( slack_aliases_type_0.append(slack_aliases_type_0_item) return slack_aliases_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list["UpdateTeamDataAttributesSlackAliasesType0Item"], data) + return cast(list[UpdateTeamDataAttributesSlackAliasesType0Item] | None | Unset, data) slack_aliases = _parse_slack_aliases(d.pop("slack_aliases", UNSET)) - def _parse_alert_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_alert_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) alert_broadcast_enabled = _parse_alert_broadcast_enabled(d.pop("alert_broadcast_enabled", UNSET)) def _parse_alert_broadcast_channel( data: object, - ) -> Union["UpdateTeamDataAttributesAlertBroadcastChannelType0", None, Unset]: + ) -> None | Unset | UpdateTeamDataAttributesAlertBroadcastChannelType0: if data is None: return data if isinstance(data, Unset): @@ -604,24 +601,24 @@ def _parse_alert_broadcast_channel( alert_broadcast_channel_type_0 = UpdateTeamDataAttributesAlertBroadcastChannelType0.from_dict(data) return alert_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateTeamDataAttributesAlertBroadcastChannelType0", None, Unset], data) + return cast(None | Unset | UpdateTeamDataAttributesAlertBroadcastChannelType0, data) alert_broadcast_channel = _parse_alert_broadcast_channel(d.pop("alert_broadcast_channel", UNSET)) - def _parse_incident_broadcast_enabled(data: object) -> None | Unset | bool: + def _parse_incident_broadcast_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) incident_broadcast_enabled = _parse_incident_broadcast_enabled(d.pop("incident_broadcast_enabled", UNSET)) def _parse_incident_broadcast_channel( data: object, - ) -> Union["UpdateTeamDataAttributesIncidentBroadcastChannelType0", None, Unset]: + ) -> None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0: if data is None: return data if isinstance(data, Unset): @@ -634,29 +631,31 @@ def _parse_incident_broadcast_channel( ) return incident_broadcast_channel_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(Union["UpdateTeamDataAttributesIncidentBroadcastChannelType0", None, Unset], data) + return cast(None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0, data) incident_broadcast_channel = _parse_incident_broadcast_channel(d.pop("incident_broadcast_channel", UNSET)) - def _parse_auto_add_members_when_attached(data: object) -> None | Unset | bool: + def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) auto_add_members_when_attached = _parse_auto_add_members_when_attached( d.pop("auto_add_members_when_attached", UNSET) ) - fields = [] - _fields = d.pop("fields", UNSET) - for fields_item_data in _fields or []: - fields_item = UpdateTeamDataAttributesFieldsItem.from_dict(fields_item_data) + _properties = d.pop("properties", UNSET) + properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET + if _properties is not UNSET: + properties = [] + for properties_item_data in _properties: + properties_item = UpdateTeamDataAttributesPropertiesItem.from_dict(properties_item_data) - fields.append(fields_item) + properties.append(properties_item) update_team_data_attributes = cls( name=name, @@ -684,7 +683,7 @@ def _parse_auto_add_members_when_attached(data: object) -> None | Unset | bool: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, - fields=fields, + properties=properties, ) return update_team_data_attributes diff --git a/rootly_sdk/models/update_team_data_attributes_alert_broadcast_channel_type_0.py b/rootly_sdk/models/update_team_data_attributes_alert_broadcast_channel_type_0.py index bb588d8e..d609ce1e 100644 --- a/rootly_sdk/models/update_team_data_attributes_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/update_team_data_attributes_alert_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class UpdateTeamDataAttributesAlertBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_team_data_attributes_fields_item.py b/rootly_sdk/models/update_team_data_attributes_fields_item.py deleted file mode 100644 index ceb6cd46..00000000 --- a/rootly_sdk/models/update_team_data_attributes_fields_item.py +++ /dev/null @@ -1,68 +0,0 @@ -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="UpdateTeamDataAttributesFieldsItem") - - -@_attrs_define -class UpdateTeamDataAttributesFieldsItem: - """Set a value for a catalog field - - Attributes: - catalog_field_id (str): Catalog field ID - value (str): The field value - """ - - catalog_field_id: str - value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - catalog_field_id = self.catalog_field_id - - value = self.value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "catalog_field_id": catalog_field_id, - "value": value, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - catalog_field_id = d.pop("catalog_field_id") - - value = d.pop("value") - - update_team_data_attributes_fields_item = cls( - catalog_field_id=catalog_field_id, - value=value, - ) - - update_team_data_attributes_fields_item.additional_properties = d - return update_team_data_attributes_fields_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/update_team_data_attributes_incident_broadcast_channel_type_0.py b/rootly_sdk/models/update_team_data_attributes_incident_broadcast_channel_type_0.py index 88354504..66230036 100644 --- a/rootly_sdk/models/update_team_data_attributes_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/update_team_data_attributes_incident_broadcast_channel_type_0.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -15,11 +17,11 @@ class UpdateTeamDataAttributesIncidentBroadcastChannelType0: Attributes: id (str): Slack channel ID - name (Union[Unset, str]): Slack channel name + name (str | Unset): Slack channel name """ id: str - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_team_data_attributes_properties_item.py b/rootly_sdk/models/update_team_data_attributes_properties_item.py new file mode 100644 index 00000000..4a14f3eb --- /dev/null +++ b/rootly_sdk/models/update_team_data_attributes_properties_item.py @@ -0,0 +1,70 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UpdateTeamDataAttributesPropertiesItem") + + +@_attrs_define +class UpdateTeamDataAttributesPropertiesItem: + """Set a value for a catalog property + + Attributes: + catalog_property_id (str): Catalog property ID + value (str): The property value + """ + + catalog_property_id: str + value: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + catalog_property_id = self.catalog_property_id + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "catalog_property_id": catalog_property_id, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + catalog_property_id = d.pop("catalog_property_id") + + value = d.pop("value") + + update_team_data_attributes_properties_item = cls( + catalog_property_id=catalog_property_id, + value=value, + ) + + update_team_data_attributes_properties_item.additional_properties = d + return update_team_data_attributes_properties_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_team_data_attributes_slack_aliases_type_0_item.py b/rootly_sdk/models/update_team_data_attributes_slack_aliases_type_0_item.py index ed8d4c01..9ed2220b 100644 --- a/rootly_sdk/models/update_team_data_attributes_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/update_team_data_attributes_slack_aliases_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_team_data_attributes_slack_channels_type_0_item.py b/rootly_sdk/models/update_team_data_attributes_slack_channels_type_0_item.py index 3c22919f..0d642c32 100644 --- a/rootly_sdk/models/update_team_data_attributes_slack_channels_type_0_item.py +++ b/rootly_sdk/models/update_team_data_attributes_slack_channels_type_0_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/update_trello_card_task_params.py b/rootly_sdk/models/update_trello_card_task_params.py index 36e4ee8b..b71d98a0 100644 --- a/rootly_sdk/models/update_trello_card_task_params.py +++ b/rootly_sdk/models/update_trello_card_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,24 +28,24 @@ class UpdateTrelloCardTaskParams: Attributes: card_id (str): The card id archivation (UpdateTrelloCardTaskParamsArchivation): The archivation id and display name - task_type (Union[Unset, UpdateTrelloCardTaskParamsTaskType]): - title (Union[Unset, str]): The card title - description (Union[Unset, str]): The card description - due_date (Union[Unset, str]): The due date - board (Union[Unset, UpdateTrelloCardTaskParamsBoard]): The board id and display name - list_ (Union[Unset, UpdateTrelloCardTaskParamsList]): The list id and display name - labels (Union[Unset, list['UpdateTrelloCardTaskParamsLabelsItem']]): + task_type (UpdateTrelloCardTaskParamsTaskType | Unset): + title (str | Unset): The card title + description (str | Unset): The card description + due_date (str | Unset): The due date + board (UpdateTrelloCardTaskParamsBoard | Unset): The board id and display name + list_ (UpdateTrelloCardTaskParamsList | Unset): The list id and display name + labels (list[UpdateTrelloCardTaskParamsLabelsItem] | Unset): """ card_id: str - archivation: "UpdateTrelloCardTaskParamsArchivation" - task_type: Unset | UpdateTrelloCardTaskParamsTaskType = UNSET - title: Unset | str = UNSET - description: Unset | str = UNSET - due_date: Unset | str = UNSET - board: Union[Unset, "UpdateTrelloCardTaskParamsBoard"] = UNSET - list_: Union[Unset, "UpdateTrelloCardTaskParamsList"] = UNSET - labels: Unset | list["UpdateTrelloCardTaskParamsLabelsItem"] = UNSET + archivation: UpdateTrelloCardTaskParamsArchivation + task_type: UpdateTrelloCardTaskParamsTaskType | Unset = UNSET + title: str | Unset = UNSET + description: str | Unset = UNSET + due_date: str | Unset = UNSET + board: UpdateTrelloCardTaskParamsBoard | Unset = UNSET + list_: UpdateTrelloCardTaskParamsList | Unset = UNSET + labels: list[UpdateTrelloCardTaskParamsLabelsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: archivation = self.archivation.to_dict() - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -61,15 +63,15 @@ def to_dict(self) -> dict[str, Any]: due_date = self.due_date - board: Unset | dict[str, Any] = UNSET + board: dict[str, Any] | Unset = UNSET if not isinstance(self.board, Unset): board = self.board.to_dict() - list_: Unset | dict[str, Any] = UNSET + list_: dict[str, Any] | Unset = UNSET if not isinstance(self.list_, Unset): list_ = self.list_.to_dict() - labels: Unset | list[dict[str, Any]] = UNSET + labels: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] for labels_item_data in self.labels: @@ -114,7 +116,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: archivation = UpdateTrelloCardTaskParamsArchivation.from_dict(d.pop("archivation")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateTrelloCardTaskParamsTaskType + task_type: UpdateTrelloCardTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -127,25 +129,27 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: due_date = d.pop("due_date", UNSET) _board = d.pop("board", UNSET) - board: Unset | UpdateTrelloCardTaskParamsBoard + board: UpdateTrelloCardTaskParamsBoard | Unset if isinstance(_board, Unset): board = UNSET else: board = UpdateTrelloCardTaskParamsBoard.from_dict(_board) _list_ = d.pop("list", UNSET) - list_: Unset | UpdateTrelloCardTaskParamsList + list_: UpdateTrelloCardTaskParamsList | Unset if isinstance(_list_, Unset): list_ = UNSET else: list_ = UpdateTrelloCardTaskParamsList.from_dict(_list_) - labels = [] _labels = d.pop("labels", UNSET) - for labels_item_data in _labels or []: - labels_item = UpdateTrelloCardTaskParamsLabelsItem.from_dict(labels_item_data) + labels: list[UpdateTrelloCardTaskParamsLabelsItem] | Unset = UNSET + if _labels is not UNSET: + labels = [] + for labels_item_data in _labels: + labels_item = UpdateTrelloCardTaskParamsLabelsItem.from_dict(labels_item_data) - labels.append(labels_item) + labels.append(labels_item) update_trello_card_task_params = cls( card_id=card_id, diff --git a/rootly_sdk/models/update_trello_card_task_params_archivation.py b/rootly_sdk/models/update_trello_card_task_params_archivation.py index 6196d586..14b2a7be 100644 --- a/rootly_sdk/models/update_trello_card_task_params_archivation.py +++ b/rootly_sdk/models/update_trello_card_task_params_archivation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateTrelloCardTaskParamsArchivation: """The archivation id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_trello_card_task_params_board.py b/rootly_sdk/models/update_trello_card_task_params_board.py index 71073b9f..586b06c8 100644 --- a/rootly_sdk/models/update_trello_card_task_params_board.py +++ b/rootly_sdk/models/update_trello_card_task_params_board.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateTrelloCardTaskParamsBoard: """The board id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_trello_card_task_params_labels_item.py b/rootly_sdk/models/update_trello_card_task_params_labels_item.py index ab0604a8..061422b6 100644 --- a/rootly_sdk/models/update_trello_card_task_params_labels_item.py +++ b/rootly_sdk/models/update_trello_card_task_params_labels_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,12 +15,12 @@ class UpdateTrelloCardTaskParamsLabelsItem: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_trello_card_task_params_list.py b/rootly_sdk/models/update_trello_card_task_params_list.py index 1fd02aee..bd084e60 100644 --- a/rootly_sdk/models/update_trello_card_task_params_list.py +++ b/rootly_sdk/models/update_trello_card_task_params_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateTrelloCardTaskParamsList: """The list id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user.py b/rootly_sdk/models/update_user.py index afb8ad14..d935db30 100644 --- a/rootly_sdk/models/update_user.py +++ b/rootly_sdk/models/update_user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateUser: data (UpdateUserData): """ - data: "UpdateUserData" + data: UpdateUserData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_data.py b/rootly_sdk/models/update_user_data.py index 019d9d74..95e780bb 100644 --- a/rootly_sdk/models/update_user_data.py +++ b/rootly_sdk/models/update_user_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateUserData: """ type_: UpdateUserDataType - attributes: "UpdateUserDataAttributes" + attributes: UpdateUserDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_data_attributes.py b/rootly_sdk/models/update_user_data_attributes.py index acf3a634..1ef584d0 100644 --- a/rootly_sdk/models/update_user_data_attributes.py +++ b/rootly_sdk/models/update_user_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -12,37 +14,37 @@ class UpdateUserDataAttributes: """ Attributes: - first_name (Union[None, Unset, str]): First name of the user - last_name (Union[None, Unset, str]): Last name of the user - role_id (Union[None, Unset, str]): ID of the role to assign - on_call_role_id (Union[None, Unset, str]): ID of the on-call role to assign + first_name (None | str | Unset): First name of the user + last_name (None | str | Unset): Last name of the user + role_id (None | str | Unset): ID of the role to assign + on_call_role_id (None | str | Unset): ID of the on-call role to assign """ - first_name: None | Unset | str = UNSET - last_name: None | Unset | str = UNSET - role_id: None | Unset | str = UNSET - on_call_role_id: None | Unset | str = UNSET + first_name: None | str | Unset = UNSET + last_name: None | str | Unset = UNSET + role_id: None | str | Unset = UNSET + on_call_role_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - first_name: None | Unset | str + first_name: None | str | Unset if isinstance(self.first_name, Unset): first_name = UNSET else: first_name = self.first_name - last_name: None | Unset | str + last_name: None | str | Unset if isinstance(self.last_name, Unset): last_name = UNSET else: last_name = self.last_name - role_id: None | Unset | str + role_id: None | str | Unset if isinstance(self.role_id, Unset): role_id = UNSET else: role_id = self.role_id - on_call_role_id: None | Unset | str + on_call_role_id: None | str | Unset if isinstance(self.on_call_role_id, Unset): on_call_role_id = UNSET else: @@ -66,39 +68,39 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_first_name(data: object) -> None | Unset | str: + def _parse_first_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) first_name = _parse_first_name(d.pop("first_name", UNSET)) - def _parse_last_name(data: object) -> None | Unset | str: + def _parse_last_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) last_name = _parse_last_name(d.pop("last_name", UNSET)) - def _parse_role_id(data: object) -> None | Unset | str: + def _parse_role_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) role_id = _parse_role_id(d.pop("role_id", UNSET)) - def _parse_on_call_role_id(data: object) -> None | Unset | str: + def _parse_on_call_role_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) on_call_role_id = _parse_on_call_role_id(d.pop("on_call_role_id", UNSET)) diff --git a/rootly_sdk/models/update_user_email_address.py b/rootly_sdk/models/update_user_email_address.py index 31757578..b744ccab 100644 --- a/rootly_sdk/models/update_user_email_address.py +++ b/rootly_sdk/models/update_user_email_address.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateUserEmailAddress: data (UpdateUserEmailAddressData): """ - data: "UpdateUserEmailAddressData" + data: UpdateUserEmailAddressData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_email_address_data.py b/rootly_sdk/models/update_user_email_address_data.py index 2b87d935..999aebf1 100644 --- a/rootly_sdk/models/update_user_email_address_data.py +++ b/rootly_sdk/models/update_user_email_address_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateUserEmailAddressData: """ type_: UpdateUserEmailAddressDataType - attributes: "UpdateUserEmailAddressDataAttributes" + attributes: UpdateUserEmailAddressDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_email_address_data_attributes.py b/rootly_sdk/models/update_user_email_address_data_attributes.py index 021d4325..977a87b2 100644 --- a/rootly_sdk/models/update_user_email_address_data_attributes.py +++ b/rootly_sdk/models/update_user_email_address_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,10 +14,10 @@ class UpdateUserEmailAddressDataAttributes: """ Attributes: - email (Union[Unset, str]): Email address + email (str | Unset): Email address """ - email: Unset | str = UNSET + email: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: email = self.email diff --git a/rootly_sdk/models/update_user_notification_rule.py b/rootly_sdk/models/update_user_notification_rule.py index 5e02a9df..0c612570 100644 --- a/rootly_sdk/models/update_user_notification_rule.py +++ b/rootly_sdk/models/update_user_notification_rule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateUserNotificationRule: data (UpdateUserNotificationRuleData): """ - data: "UpdateUserNotificationRuleData" + data: UpdateUserNotificationRuleData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_notification_rule_data.py b/rootly_sdk/models/update_user_notification_rule_data.py index dd48e99d..f9651ad1 100644 --- a/rootly_sdk/models/update_user_notification_rule_data.py +++ b/rootly_sdk/models/update_user_notification_rule_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateUserNotificationRuleData: """ type_: UpdateUserNotificationRuleDataType - attributes: "UpdateUserNotificationRuleDataAttributes" + attributes: UpdateUserNotificationRuleDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_notification_rule_data_attributes.py b/rootly_sdk/models/update_user_notification_rule_data_attributes.py index 145fe36f..8c2a5196 100644 --- a/rootly_sdk/models/update_user_notification_rule_data_attributes.py +++ b/rootly_sdk/models/update_user_notification_rule_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,62 +18,62 @@ class UpdateUserNotificationRuleDataAttributes: """ Attributes: - delay (Union[None, Unset, int]): Delay after which rule gets triggered - position (Union[None, Unset, int]): Position of the rule - user_email_address_id (Union[None, Unset, str]): User email address to which notification to be sent - user_call_number_id (Union[None, Unset, str]): User phone number to which notification to be sent - user_sms_number_id (Union[None, Unset, str]): User sms number to which notification to be sent - user_device_id (Union[None, Unset, str]): User device to which notification to be sent - enabled_contact_types (Union[Unset, list[UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem]]): - Contact types for which notification needs to be enabled + delay (int | None | Unset): Delay after which rule gets triggered + position (int | None | Unset): Position of the rule + user_email_address_id (None | str | Unset): User email address to which notification to be sent + user_call_number_id (None | str | Unset): User phone number to which notification to be sent + user_sms_number_id (None | str | Unset): User sms number to which notification to be sent + user_device_id (None | str | Unset): User device to which notification to be sent + enabled_contact_types (list[UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem] | Unset): Contact + types for which notification needs to be enabled """ - delay: None | Unset | int = UNSET - position: None | Unset | int = UNSET - user_email_address_id: None | Unset | str = UNSET - user_call_number_id: None | Unset | str = UNSET - user_sms_number_id: None | Unset | str = UNSET - user_device_id: None | Unset | str = UNSET - enabled_contact_types: Unset | list[UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem] = UNSET + delay: int | None | Unset = UNSET + position: int | None | Unset = UNSET + user_email_address_id: None | str | Unset = UNSET + user_call_number_id: None | str | Unset = UNSET + user_sms_number_id: None | str | Unset = UNSET + user_device_id: None | str | Unset = UNSET + enabled_contact_types: list[UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - delay: None | Unset | int + delay: int | None | Unset if isinstance(self.delay, Unset): delay = UNSET else: delay = self.delay - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - user_email_address_id: None | Unset | str + user_email_address_id: None | str | Unset if isinstance(self.user_email_address_id, Unset): user_email_address_id = UNSET else: user_email_address_id = self.user_email_address_id - user_call_number_id: None | Unset | str + user_call_number_id: None | str | Unset if isinstance(self.user_call_number_id, Unset): user_call_number_id = UNSET else: user_call_number_id = self.user_call_number_id - user_sms_number_id: None | Unset | str + user_sms_number_id: None | str | Unset if isinstance(self.user_sms_number_id, Unset): user_sms_number_id = UNSET else: user_sms_number_id = self.user_sms_number_id - user_device_id: None | Unset | str + user_device_id: None | str | Unset if isinstance(self.user_device_id, Unset): user_device_id = UNSET else: user_device_id = self.user_device_id - enabled_contact_types: Unset | list[str] = UNSET + enabled_contact_types: list[str] | Unset = UNSET if not isinstance(self.enabled_contact_types, Unset): enabled_contact_types = [] for enabled_contact_types_item_data in self.enabled_contact_types: @@ -102,68 +104,72 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - def _parse_delay(data: object) -> None | Unset | int: + def _parse_delay(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) delay = _parse_delay(d.pop("delay", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_user_email_address_id(data: object) -> None | Unset | str: + def _parse_user_email_address_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_email_address_id = _parse_user_email_address_id(d.pop("user_email_address_id", UNSET)) - def _parse_user_call_number_id(data: object) -> None | Unset | str: + def _parse_user_call_number_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_call_number_id = _parse_user_call_number_id(d.pop("user_call_number_id", UNSET)) - def _parse_user_sms_number_id(data: object) -> None | Unset | str: + def _parse_user_sms_number_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_sms_number_id = _parse_user_sms_number_id(d.pop("user_sms_number_id", UNSET)) - def _parse_user_device_id(data: object) -> None | Unset | str: + def _parse_user_device_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_device_id = _parse_user_device_id(d.pop("user_device_id", UNSET)) - enabled_contact_types = [] _enabled_contact_types = d.pop("enabled_contact_types", UNSET) - for enabled_contact_types_item_data in _enabled_contact_types or []: - enabled_contact_types_item = check_update_user_notification_rule_data_attributes_enabled_contact_types_item( - enabled_contact_types_item_data - ) + enabled_contact_types: list[UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem] | Unset = UNSET + if _enabled_contact_types is not UNSET: + enabled_contact_types = [] + for enabled_contact_types_item_data in _enabled_contact_types: + enabled_contact_types_item = ( + check_update_user_notification_rule_data_attributes_enabled_contact_types_item( + enabled_contact_types_item_data + ) + ) - enabled_contact_types.append(enabled_contact_types_item) + enabled_contact_types.append(enabled_contact_types_item) update_user_notification_rule_data_attributes = cls( delay=delay, diff --git a/rootly_sdk/models/update_user_phone_number.py b/rootly_sdk/models/update_user_phone_number.py index 14c053e0..32de0ee5 100644 --- a/rootly_sdk/models/update_user_phone_number.py +++ b/rootly_sdk/models/update_user_phone_number.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateUserPhoneNumber: data (UpdateUserPhoneNumberData): """ - data: "UpdateUserPhoneNumberData" + data: UpdateUserPhoneNumberData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_phone_number_data.py b/rootly_sdk/models/update_user_phone_number_data.py index 196d946f..3e0d69d9 100644 --- a/rootly_sdk/models/update_user_phone_number_data.py +++ b/rootly_sdk/models/update_user_phone_number_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateUserPhoneNumberData: """ type_: UpdateUserPhoneNumberDataType - attributes: "UpdateUserPhoneNumberDataAttributes" + attributes: UpdateUserPhoneNumberDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_user_phone_number_data_attributes.py b/rootly_sdk/models/update_user_phone_number_data_attributes.py index bb449a53..28772c0b 100644 --- a/rootly_sdk/models/update_user_phone_number_data_attributes.py +++ b/rootly_sdk/models/update_user_phone_number_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -12,10 +14,10 @@ class UpdateUserPhoneNumberDataAttributes: """ Attributes: - phone (Union[Unset, str]): Phone number in international format + phone (str | Unset): Phone number in international format """ - phone: Unset | str = UNSET + phone: str | Unset = UNSET def to_dict(self) -> dict[str, Any]: phone = self.phone diff --git a/rootly_sdk/models/update_victor_ops_incident_task_params.py b/rootly_sdk/models/update_victor_ops_incident_task_params.py index 990a3a5b..861fb6d5 100644 --- a/rootly_sdk/models/update_victor_ops_incident_task_params.py +++ b/rootly_sdk/models/update_victor_ops_incident_task_params.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -24,14 +26,14 @@ class UpdateVictorOpsIncidentTaskParams: victor_ops_incident_id (str): The victor_ops incident ID, this can also be a Rootly incident variable ex. {{ incident.victor_ops_incident_id }} status (UpdateVictorOpsIncidentTaskParamsStatus): - task_type (Union[Unset, UpdateVictorOpsIncidentTaskParamsTaskType]): - resolution_message (Union[Unset, str]): Resolution message + task_type (UpdateVictorOpsIncidentTaskParamsTaskType | Unset): + resolution_message (str | Unset): Resolution message """ victor_ops_incident_id: str status: UpdateVictorOpsIncidentTaskParamsStatus - task_type: Unset | UpdateVictorOpsIncidentTaskParamsTaskType = UNSET - resolution_message: Unset | str = UNSET + task_type: UpdateVictorOpsIncidentTaskParamsTaskType | Unset = UNSET + resolution_message: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,7 +41,7 @@ def to_dict(self) -> dict[str, Any]: status: str = self.status - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = check_update_victor_ops_incident_task_params_status(d.pop("status")) _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateVictorOpsIncidentTaskParamsTaskType + task_type: UpdateVictorOpsIncidentTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: diff --git a/rootly_sdk/models/update_webhooks_endpoint.py b/rootly_sdk/models/update_webhooks_endpoint.py index 8825d130..8fae8e34 100644 --- a/rootly_sdk/models/update_webhooks_endpoint.py +++ b/rootly_sdk/models/update_webhooks_endpoint.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateWebhooksEndpoint: data (UpdateWebhooksEndpointData): """ - data: "UpdateWebhooksEndpointData" + data: UpdateWebhooksEndpointData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_webhooks_endpoint_data.py b/rootly_sdk/models/update_webhooks_endpoint_data.py index 3d7f75a2..1988848c 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -25,7 +27,7 @@ class UpdateWebhooksEndpointData: """ type_: UpdateWebhooksEndpointDataType - attributes: "UpdateWebhooksEndpointDataAttributes" + attributes: UpdateWebhooksEndpointDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py index 0c1f5d87..a0dd08ea 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -16,19 +18,19 @@ class UpdateWebhooksEndpointDataAttributes: """ Attributes: - name (Union[Unset, str]): The name of the endpoint - event_types (Union[Unset, list[UpdateWebhooksEndpointDataAttributesEventTypesItem]]): - enabled (Union[Unset, bool]): + name (str | Unset): The name of the endpoint + event_types (list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset): + enabled (bool | Unset): """ - name: Unset | str = UNSET - event_types: Unset | list[UpdateWebhooksEndpointDataAttributesEventTypesItem] = UNSET - enabled: Unset | bool = UNSET + name: str | Unset = UNSET + event_types: list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET + enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - event_types: Unset | list[str] = UNSET + event_types: list[str] | Unset = UNSET if not isinstance(self.event_types, Unset): event_types = [] for event_types_item_data in self.event_types: @@ -54,12 +56,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - event_types = [] _event_types = d.pop("event_types", UNSET) - for event_types_item_data in _event_types or []: - event_types_item = check_update_webhooks_endpoint_data_attributes_event_types_item(event_types_item_data) + event_types: list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET + if _event_types is not UNSET: + event_types = [] + for event_types_item_data in _event_types: + event_types_item = check_update_webhooks_endpoint_data_attributes_event_types_item( + event_types_item_data + ) - event_types.append(event_types_item) + event_types.append(event_types_item) enabled = d.pop("enabled", UNSET) diff --git a/rootly_sdk/models/update_workflow.py b/rootly_sdk/models/update_workflow.py index 66d9c7cd..56054fff 100644 --- a/rootly_sdk/models/update_workflow.py +++ b/rootly_sdk/models/update_workflow.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateWorkflow: data (UpdateWorkflowData): """ - data: "UpdateWorkflowData" + data: UpdateWorkflowData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_custom_field_selection.py b/rootly_sdk/models/update_workflow_custom_field_selection.py index 931ab1c2..965431c3 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateWorkflowCustomFieldSelection: data (UpdateWorkflowCustomFieldSelectionData): """ - data: "UpdateWorkflowCustomFieldSelectionData" + data: UpdateWorkflowCustomFieldSelectionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_custom_field_selection_data.py b/rootly_sdk/models/update_workflow_custom_field_selection_data.py index dc4ebd9c..d11e0ae3 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateWorkflowCustomFieldSelectionData: """ type_: UpdateWorkflowCustomFieldSelectionDataType - attributes: "UpdateWorkflowCustomFieldSelectionDataAttributes" + attributes: UpdateWorkflowCustomFieldSelectionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_custom_field_selection_data_attributes.py b/rootly_sdk/models/update_workflow_custom_field_selection_data_attributes.py index f895b861..6aa9476a 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection_data_attributes.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,26 +18,26 @@ class UpdateWorkflowCustomFieldSelectionDataAttributes: """ Attributes: - incident_condition (Union[Unset, UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition]): The - trigger condition Default: 'ANY'. - values (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[int]]): + incident_condition (UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition | Unset): The trigger + condition Default: 'ANY'. + values (list[str] | Unset): + selected_option_ids (list[int] | Unset): """ - incident_condition: Unset | UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition = "ANY" - values: Unset | list[str] = UNSET - selected_option_ids: Unset | list[int] = UNSET + incident_condition: UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition | Unset = "ANY" + values: list[str] | Unset = UNSET + selected_option_ids: list[int] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - incident_condition: Unset | str = UNSET + incident_condition: str | Unset = UNSET if not isinstance(self.incident_condition, Unset): incident_condition = self.incident_condition - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values - selected_option_ids: Unset | list[int] = UNSET + selected_option_ids: list[int] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids @@ -55,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _incident_condition = d.pop("incident_condition", UNSET) - incident_condition: Unset | UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition + incident_condition: UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition | Unset if isinstance(_incident_condition, Unset): incident_condition = UNSET else: diff --git a/rootly_sdk/models/update_workflow_data.py b/rootly_sdk/models/update_workflow_data.py index 403c9d51..91f4f38e 100644 --- a/rootly_sdk/models/update_workflow_data.py +++ b/rootly_sdk/models/update_workflow_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateWorkflowData: """ type_: UpdateWorkflowDataType - attributes: "UpdateWorkflowDataAttributes" + attributes: UpdateWorkflowDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_data_attributes.py b/rootly_sdk/models/update_workflow_data_attributes.py index 4cad8ed9..be178cbf 100644 --- a/rootly_sdk/models/update_workflow_data_attributes.py +++ b/rootly_sdk/models/update_workflow_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -20,66 +22,66 @@ class UpdateWorkflowDataAttributes: """ Attributes: - name (Union[Unset, str]): The title of the workflow - description (Union[None, Unset, str]): The description of the workflow - command (Union[None, Unset, str]): Workflow command - command_feedback_enabled (Union[None, Unset, bool]): This will notify you back when the workflow is starting - wait (Union[None, Unset, str]): Wait this duration before executing - repeat_every_duration (Union[None, Unset, str]): Repeat workflow every duration - repeat_condition_duration_since_first_run (Union[None, Unset, str]): The workflow will stop repeating if its - runtime since it's first workflow run exceeds the duration set in this field - repeat_condition_number_of_repeats (Union[Unset, int]): The workflow will stop repeating if the number of - repeats exceeds the value set in this field - continuously_repeat (Union[Unset, bool]): When continuously repeat is true, repeat workflows aren't - automatically stopped when conditions aren't met. This setting won't override your conditions set by + name (str | Unset): The title of the workflow + description (None | str | Unset): The description of the workflow + command (None | str | Unset): Workflow command + command_feedback_enabled (bool | None | Unset): This will notify you back when the workflow is starting + wait (None | str | Unset): Wait this duration before executing + repeat_every_duration (None | str | Unset): Repeat workflow every duration + repeat_condition_duration_since_first_run (None | str | Unset): The workflow will stop repeating if its runtime + since it's first workflow run exceeds the duration set in this field + repeat_condition_number_of_repeats (int | Unset): The workflow will stop repeating if the number of repeats + exceeds the value set in this field + continuously_repeat (bool | Unset): When continuously repeat is true, repeat workflows aren't automatically + stopped when conditions aren't met. This setting won't override your conditions set by repeat_condition_duration_since_first_run and repeat_condition_number_of_repeats parameters. - enabled (Union[Unset, bool]): - locked (Union[Unset, bool]): Restricts workflow edits to admins when turned on. Only admins can set this field. - position (Union[Unset, int]): The order which the workflow should run with other workflows. - workflow_group_id (Union[None, Unset, str]): The group this workflow belongs to. - trigger_params (Union['ActionItemTriggerParams', 'AlertTriggerParams', 'IncidentTriggerParams', - 'PulseTriggerParams', 'SimpleTriggerParams', Unset]): - environment_ids (Union[Unset, list[str]]): - severity_ids (Union[Unset, list[str]]): - incident_type_ids (Union[Unset, list[str]]): - incident_role_ids (Union[Unset, list[str]]): - service_ids (Union[Unset, list[str]]): - functionality_ids (Union[Unset, list[str]]): - group_ids (Union[Unset, list[str]]): - cause_ids (Union[Unset, list[str]]): - sub_status_ids (Union[Unset, list[str]]): + enabled (bool | Unset): + locked (bool | Unset): Restricts workflow edits to admins when turned on. Only admins can set this field. + position (int | Unset): The order which the workflow should run with other workflows. + workflow_group_id (None | str | Unset): The group this workflow belongs to. + trigger_params (ActionItemTriggerParams | AlertTriggerParams | IncidentTriggerParams | PulseTriggerParams | + SimpleTriggerParams | Unset): + environment_ids (list[str] | Unset): + severity_ids (list[str] | Unset): + incident_type_ids (list[str] | Unset): + incident_role_ids (list[str] | Unset): + service_ids (list[str] | Unset): + functionality_ids (list[str] | Unset): + group_ids (list[str] | Unset): + cause_ids (list[str] | Unset): + sub_status_ids (list[str] | Unset): """ - name: Unset | str = UNSET - description: None | Unset | str = UNSET - command: None | Unset | str = UNSET - command_feedback_enabled: None | Unset | bool = UNSET - wait: None | Unset | str = UNSET - repeat_every_duration: None | Unset | str = UNSET - repeat_condition_duration_since_first_run: None | Unset | str = UNSET - repeat_condition_number_of_repeats: Unset | int = UNSET - continuously_repeat: Unset | bool = UNSET - enabled: Unset | bool = UNSET - locked: Unset | bool = UNSET - position: Unset | int = UNSET - workflow_group_id: None | Unset | str = UNSET - trigger_params: Union[ - "ActionItemTriggerParams", - "AlertTriggerParams", - "IncidentTriggerParams", - "PulseTriggerParams", - "SimpleTriggerParams", - Unset, - ] = UNSET - environment_ids: Unset | list[str] = UNSET - severity_ids: Unset | list[str] = UNSET - incident_type_ids: Unset | list[str] = UNSET - incident_role_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - group_ids: Unset | list[str] = UNSET - cause_ids: Unset | list[str] = UNSET - sub_status_ids: Unset | list[str] = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + command: None | str | Unset = UNSET + command_feedback_enabled: bool | None | Unset = UNSET + wait: None | str | Unset = UNSET + repeat_every_duration: None | str | Unset = UNSET + repeat_condition_duration_since_first_run: None | str | Unset = UNSET + repeat_condition_number_of_repeats: int | Unset = UNSET + continuously_repeat: bool | Unset = UNSET + enabled: bool | Unset = UNSET + locked: bool | Unset = UNSET + position: int | Unset = UNSET + workflow_group_id: None | str | Unset = UNSET + trigger_params: ( + ActionItemTriggerParams + | AlertTriggerParams + | IncidentTriggerParams + | PulseTriggerParams + | SimpleTriggerParams + | Unset + ) = UNSET + environment_ids: list[str] | Unset = UNSET + severity_ids: list[str] | Unset = UNSET + incident_type_ids: list[str] | Unset = UNSET + incident_role_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + group_ids: list[str] | Unset = UNSET + cause_ids: list[str] | Unset = UNSET + sub_status_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.action_item_trigger_params import ActionItemTriggerParams @@ -89,37 +91,37 @@ def to_dict(self) -> dict[str, Any]: name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - command: None | Unset | str + command: None | str | Unset if isinstance(self.command, Unset): command = UNSET else: command = self.command - command_feedback_enabled: None | Unset | bool + command_feedback_enabled: bool | None | Unset if isinstance(self.command_feedback_enabled, Unset): command_feedback_enabled = UNSET else: command_feedback_enabled = self.command_feedback_enabled - wait: None | Unset | str + wait: None | str | Unset if isinstance(self.wait, Unset): wait = UNSET else: wait = self.wait - repeat_every_duration: None | Unset | str + repeat_every_duration: None | str | Unset if isinstance(self.repeat_every_duration, Unset): repeat_every_duration = UNSET else: repeat_every_duration = self.repeat_every_duration - repeat_condition_duration_since_first_run: None | Unset | str + repeat_condition_duration_since_first_run: None | str | Unset if isinstance(self.repeat_condition_duration_since_first_run, Unset): repeat_condition_duration_since_first_run = UNSET else: @@ -135,13 +137,13 @@ def to_dict(self) -> dict[str, Any]: position = self.position - workflow_group_id: None | Unset | str + workflow_group_id: None | str | Unset if isinstance(self.workflow_group_id, Unset): workflow_group_id = UNSET else: workflow_group_id = self.workflow_group_id - trigger_params: Unset | dict[str, Any] + trigger_params: dict[str, Any] | Unset if isinstance(self.trigger_params, Unset): trigger_params = UNSET elif isinstance(self.trigger_params, IncidentTriggerParams): @@ -155,39 +157,39 @@ def to_dict(self) -> dict[str, Any]: else: trigger_params = self.trigger_params.to_dict() - environment_ids: Unset | list[str] = UNSET + environment_ids: list[str] | Unset = UNSET if not isinstance(self.environment_ids, Unset): environment_ids = self.environment_ids - severity_ids: Unset | list[str] = UNSET + severity_ids: list[str] | Unset = UNSET if not isinstance(self.severity_ids, Unset): severity_ids = self.severity_ids - incident_type_ids: Unset | list[str] = UNSET + incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.incident_type_ids, Unset): incident_type_ids = self.incident_type_ids - incident_role_ids: Unset | list[str] = UNSET + incident_role_ids: list[str] | Unset = UNSET if not isinstance(self.incident_role_ids, Unset): incident_role_ids = self.incident_role_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids - cause_ids: Unset | list[str] = UNSET + cause_ids: list[str] | Unset = UNSET if not isinstance(self.cause_ids, Unset): cause_ids = self.cause_ids - sub_status_ids: Unset | list[str] = UNSET + sub_status_ids: list[str] | Unset = UNSET if not isinstance(self.sub_status_ids, Unset): sub_status_ids = self.sub_status_ids @@ -254,57 +256,57 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_command(data: object) -> None | Unset | str: + def _parse_command(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) command = _parse_command(d.pop("command", UNSET)) - def _parse_command_feedback_enabled(data: object) -> None | Unset | bool: + def _parse_command_feedback_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) command_feedback_enabled = _parse_command_feedback_enabled(d.pop("command_feedback_enabled", UNSET)) - def _parse_wait(data: object) -> None | Unset | str: + def _parse_wait(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) wait = _parse_wait(d.pop("wait", UNSET)) - def _parse_repeat_every_duration(data: object) -> None | Unset | str: + def _parse_repeat_every_duration(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) repeat_every_duration = _parse_repeat_every_duration(d.pop("repeat_every_duration", UNSET)) - def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Unset | str: + def _parse_repeat_condition_duration_since_first_run(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) repeat_condition_duration_since_first_run = _parse_repeat_condition_duration_since_first_run( d.pop("repeat_condition_duration_since_first_run", UNSET) @@ -320,25 +322,25 @@ def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Uns position = d.pop("position", UNSET) - def _parse_workflow_group_id(data: object) -> None | Unset | str: + def _parse_workflow_group_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) workflow_group_id = _parse_workflow_group_id(d.pop("workflow_group_id", UNSET)) def _parse_trigger_params( data: object, - ) -> Union[ - "ActionItemTriggerParams", - "AlertTriggerParams", - "IncidentTriggerParams", - "PulseTriggerParams", - "SimpleTriggerParams", - Unset, - ]: + ) -> ( + ActionItemTriggerParams + | AlertTriggerParams + | IncidentTriggerParams + | PulseTriggerParams + | SimpleTriggerParams + | Unset + ): if isinstance(data, Unset): return data try: @@ -347,7 +349,7 @@ def _parse_trigger_params( trigger_params_type_0 = IncidentTriggerParams.from_dict(data) return trigger_params_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -355,7 +357,7 @@ def _parse_trigger_params( trigger_params_type_1 = ActionItemTriggerParams.from_dict(data) return trigger_params_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -363,7 +365,7 @@ def _parse_trigger_params( trigger_params_type_2 = AlertTriggerParams.from_dict(data) return trigger_params_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -371,7 +373,7 @@ def _parse_trigger_params( trigger_params_type_3 = PulseTriggerParams.from_dict(data) return trigger_params_type_3 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/update_workflow_form_field_condition.py b/rootly_sdk/models/update_workflow_form_field_condition.py index 5dcc8f4a..4495825c 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition.py +++ b/rootly_sdk/models/update_workflow_form_field_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateWorkflowFormFieldCondition: data (UpdateWorkflowFormFieldConditionData): """ - data: "UpdateWorkflowFormFieldConditionData" + data: UpdateWorkflowFormFieldConditionData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_form_field_condition_data.py b/rootly_sdk/models/update_workflow_form_field_condition_data.py index de2ac575..a4139688 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/update_workflow_form_field_condition_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UpdateWorkflowFormFieldConditionData: """ type_: UpdateWorkflowFormFieldConditionDataType - attributes: "UpdateWorkflowFormFieldConditionDataAttributes" + attributes: UpdateWorkflowFormFieldConditionDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_form_field_condition_data_attributes.py b/rootly_sdk/models/update_workflow_form_field_condition_data_attributes.py index 01865d0b..212d2286 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition_data_attributes.py +++ b/rootly_sdk/models/update_workflow_form_field_condition_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,74 +18,74 @@ class UpdateWorkflowFormFieldConditionDataAttributes: """ Attributes: - incident_condition (Union[Unset, UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition]): The trigger + incident_condition (UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition | Unset): The trigger condition Default: 'ANY'. - values (Union[Unset, list[str]]): - selected_catalog_entity_ids (Union[Unset, list[str]]): - selected_functionality_ids (Union[Unset, list[str]]): - selected_group_ids (Union[Unset, list[str]]): - selected_option_ids (Union[Unset, list[str]]): - selected_service_ids (Union[Unset, list[str]]): - selected_user_ids (Union[Unset, list[int]]): - selected_cause_ids (Union[Unset, list[str]]): - selected_environment_ids (Union[Unset, list[str]]): - selected_incident_type_ids (Union[Unset, list[str]]): + values (list[str] | Unset): + selected_catalog_entity_ids (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_option_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_user_ids (list[int] | Unset): + selected_cause_ids (list[str] | Unset): + selected_environment_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): """ - incident_condition: Unset | UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition = "ANY" - values: Unset | list[str] = UNSET - selected_catalog_entity_ids: Unset | list[str] = UNSET - selected_functionality_ids: Unset | list[str] = UNSET - selected_group_ids: Unset | list[str] = UNSET - selected_option_ids: Unset | list[str] = UNSET - selected_service_ids: Unset | list[str] = UNSET - selected_user_ids: Unset | list[int] = UNSET - selected_cause_ids: Unset | list[str] = UNSET - selected_environment_ids: Unset | list[str] = UNSET - selected_incident_type_ids: Unset | list[str] = UNSET + incident_condition: UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition | Unset = "ANY" + values: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - incident_condition: Unset | str = UNSET + incident_condition: str | Unset = UNSET if not isinstance(self.incident_condition, Unset): incident_condition = self.incident_condition - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values - selected_catalog_entity_ids: Unset | list[str] = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET if not isinstance(self.selected_catalog_entity_ids, Unset): selected_catalog_entity_ids = self.selected_catalog_entity_ids - selected_functionality_ids: Unset | list[str] = UNSET + selected_functionality_ids: list[str] | Unset = UNSET if not isinstance(self.selected_functionality_ids, Unset): selected_functionality_ids = self.selected_functionality_ids - selected_group_ids: Unset | list[str] = UNSET + selected_group_ids: list[str] | Unset = UNSET if not isinstance(self.selected_group_ids, Unset): selected_group_ids = self.selected_group_ids - selected_option_ids: Unset | list[str] = UNSET + selected_option_ids: list[str] | Unset = UNSET if not isinstance(self.selected_option_ids, Unset): selected_option_ids = self.selected_option_ids - selected_service_ids: Unset | list[str] = UNSET + selected_service_ids: list[str] | Unset = UNSET if not isinstance(self.selected_service_ids, Unset): selected_service_ids = self.selected_service_ids - selected_user_ids: Unset | list[int] = UNSET + selected_user_ids: list[int] | Unset = UNSET if not isinstance(self.selected_user_ids, Unset): selected_user_ids = self.selected_user_ids - selected_cause_ids: Unset | list[str] = UNSET + selected_cause_ids: list[str] | Unset = UNSET if not isinstance(self.selected_cause_ids, Unset): selected_cause_ids = self.selected_cause_ids - selected_environment_ids: Unset | list[str] = UNSET + selected_environment_ids: list[str] | Unset = UNSET if not isinstance(self.selected_environment_ids, Unset): selected_environment_ids = self.selected_environment_ids - selected_incident_type_ids: Unset | list[str] = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.selected_incident_type_ids, Unset): selected_incident_type_ids = self.selected_incident_type_ids @@ -119,7 +121,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _incident_condition = d.pop("incident_condition", UNSET) - incident_condition: Unset | UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition + incident_condition: UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition | Unset if isinstance(_incident_condition, Unset): incident_condition = UNSET else: diff --git a/rootly_sdk/models/update_workflow_group.py b/rootly_sdk/models/update_workflow_group.py index 14a490be..0944145e 100644 --- a/rootly_sdk/models/update_workflow_group.py +++ b/rootly_sdk/models/update_workflow_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateWorkflowGroup: data (UpdateWorkflowGroupData): """ - data: "UpdateWorkflowGroupData" + data: UpdateWorkflowGroupData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_group_data.py b/rootly_sdk/models/update_workflow_group_data.py index dca07ffb..be072563 100644 --- a/rootly_sdk/models/update_workflow_group_data.py +++ b/rootly_sdk/models/update_workflow_group_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateWorkflowGroupData: """ type_: UpdateWorkflowGroupDataType - attributes: "UpdateWorkflowGroupDataAttributes" + attributes: UpdateWorkflowGroupDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_group_data_attributes.py b/rootly_sdk/models/update_workflow_group_data_attributes.py index 023311d0..b61fd078 100644 --- a/rootly_sdk/models/update_workflow_group_data_attributes.py +++ b/rootly_sdk/models/update_workflow_group_data_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -17,30 +19,30 @@ class UpdateWorkflowGroupDataAttributes: """ Attributes: - kind (Union[Unset, UpdateWorkflowGroupDataAttributesKind]): The kind of the workflow group - name (Union[Unset, str]): The name of the workflow group. - description (Union[None, Unset, str]): A description of the workflow group. - icon (Union[Unset, str]): An emoji icon displayed next to the workflow group. - expanded (Union[Unset, bool]): Whether the group is expanded or collapsed. - position (Union[Unset, int]): The position of the workflow group + kind (UpdateWorkflowGroupDataAttributesKind | Unset): The kind of the workflow group + name (str | Unset): The name of the workflow group. + description (None | str | Unset): A description of the workflow group. + icon (str | Unset): An emoji icon displayed next to the workflow group. + expanded (bool | Unset): Whether the group is expanded or collapsed. + position (int | Unset): The position of the workflow group """ - kind: Unset | UpdateWorkflowGroupDataAttributesKind = UNSET - name: Unset | str = UNSET - description: None | Unset | str = UNSET - icon: Unset | str = UNSET - expanded: Unset | bool = UNSET - position: Unset | int = UNSET + kind: UpdateWorkflowGroupDataAttributesKind | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + icon: str | Unset = UNSET + expanded: bool | Unset = UNSET + position: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind name = self.name - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _kind = d.pop("kind", UNSET) - kind: Unset | UpdateWorkflowGroupDataAttributesKind + kind: UpdateWorkflowGroupDataAttributesKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -82,12 +84,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/update_workflow_task.py b/rootly_sdk/models/update_workflow_task.py index e1af76eb..3fb3bb7b 100644 --- a/rootly_sdk/models/update_workflow_task.py +++ b/rootly_sdk/models/update_workflow_task.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UpdateWorkflowTask: data (UpdateWorkflowTaskData): """ - data: "UpdateWorkflowTaskData" + data: UpdateWorkflowTaskData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_task_data.py b/rootly_sdk/models/update_workflow_task_data.py index e84af22e..4f992383 100644 --- a/rootly_sdk/models/update_workflow_task_data.py +++ b/rootly_sdk/models/update_workflow_task_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -22,7 +24,7 @@ class UpdateWorkflowTaskData: """ type_: UpdateWorkflowTaskDataType - attributes: "UpdateWorkflowTaskDataAttributes" + attributes: UpdateWorkflowTaskDataAttributes additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_workflow_task_data_attributes.py b/rootly_sdk/models/update_workflow_task_data_attributes.py index b06d6d0e..c6dcf4ea 100644 --- a/rootly_sdk/models/update_workflow_task_data_attributes.py +++ b/rootly_sdk/models/update_workflow_task_data_attributes.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define @@ -40,6 +42,7 @@ from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -73,6 +76,7 @@ from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -137,185 +141,186 @@ class UpdateWorkflowTaskDataAttributes: """ Attributes: - name (Union[Unset, str]): Name of the workflow task - position (Union[Unset, int]): The position of the workflow task - skip_on_failure (Union[Unset, bool]): Skip workflow task if any failures - enabled (Union[Unset, bool]): Enable/disable workflow task Default: True. - task_params (Union['AddActionItemTaskParams', 'AddMicrosoftTeamsChatTabTaskParams', 'AddRoleTaskParams', - 'AddTeamTaskParams', 'AddToTimelineTaskParams', 'ArchiveMicrosoftTeamsChannelsTaskParams', - 'ArchiveSlackChannelsTaskParams', 'AttachDatadogDashboardsTaskParams', 'AutoAssignRoleOpsgenieTaskParams', - 'AutoAssignRoleRootlyTaskParams', 'AutoAssignRoleVictorOpsTaskParams', 'CallPeopleTaskParams', - 'ChangeSlackChannelPrivacyTaskParams', 'CreateAirtableTableRecordTaskParams', - 'CreateAnthropicChatCompletionTaskParams', 'CreateAsanaSubtaskTaskParams', 'CreateAsanaTaskTaskParams', - 'CreateClickupTaskTaskParams', 'CreateCodaPageTaskParams', 'CreateConfluencePageTaskParams', - 'CreateDatadogNotebookTaskParams', 'CreateDropboxPaperPageTaskParams', 'CreateGithubIssueTaskParams', - 'CreateGitlabIssueTaskParams', 'CreateGoToMeetingTaskParams', 'CreateGoogleCalendarEventTaskParams', - 'CreateGoogleDocsPageTaskParams', 'CreateGoogleDocsPermissionsTaskParams', - 'CreateGoogleGeminiChatCompletionTaskParams', 'CreateGoogleMeetingTaskParams', - 'CreateIncidentPostmortemTaskParams', 'CreateIncidentTaskParams', 'CreateJiraIssueTaskParams', - 'CreateJiraSubtaskTaskParams', 'CreateLinearIssueCommentTaskParams', 'CreateLinearIssueTaskParams', - 'CreateLinearSubtaskIssueTaskParams', 'CreateMicrosoftTeamsChannelTaskParams', - 'CreateMicrosoftTeamsChatTaskParams', 'CreateMicrosoftTeamsMeetingTaskParams', - 'CreateMistralChatCompletionTaskParams', 'CreateMotionTaskTaskParams', 'CreateNotionPageTaskParams', - 'CreateOpenaiChatCompletionTaskParams', 'CreateOpsgenieAlertTaskParams', 'CreateOutlookEventTaskParams', - 'CreatePagerdutyStatusUpdateTaskParams', 'CreatePagertreeAlertTaskParams', 'CreateQuipPageTaskParams', - 'CreateServiceNowIncidentTaskParams', 'CreateSharepointPageTaskParams', 'CreateShortcutTaskTaskParams', - 'CreateSlackChannelTaskParams', 'CreateSubIncidentTaskParams', 'CreateTrelloCardTaskParams', - 'CreateWatsonxChatCompletionTaskParams', 'CreateWebexMeetingTaskParams', 'CreateZendeskJiraLinkTaskParams', - 'CreateZendeskTicketTaskParams', 'CreateZoomMeetingTaskParams', 'GetAlertsTaskParams', 'GetPulsesTaskParams', - 'HttpClientTaskParams', 'InviteToMicrosoftTeamsChannelTaskParams', 'InviteToSlackChannelOpsgenieTaskParams', - 'InviteToSlackChannelRootlyTaskParams', 'InviteToSlackChannelVictorOpsTaskParams', - 'PageOpsgenieOnCallRespondersTaskParams', 'PagePagerdutyOnCallRespondersTaskParams', - 'PageRootlyOnCallRespondersTaskParams', 'PrintTaskParams', 'PublishIncidentTaskParams', 'RedisClientTaskParams', - 'RemoveGoogleDocsPermissionsTaskParams', 'RenameMicrosoftTeamsChannelTaskParams', - 'RenameSlackChannelTaskParams', 'RunCommandHerokuTaskParams', 'SendDashboardReportTaskParams', - 'SendEmailTaskParams', 'SendMicrosoftTeamsChatMessageTaskParams', 'SendSmsTaskParams', - 'SendWhatsappMessageTaskParams', 'SnapshotDatadogGraphTaskParams', 'SnapshotGrafanaDashboardTaskParams', - 'SnapshotLookerLookTaskParams', 'SnapshotNewRelicGraphTaskParams', 'TriggerWorkflowTaskParams', - 'TweetTwitterMessageTaskParams', 'UpdateActionItemTaskParams', 'UpdateAirtableTableRecordTaskParams', - 'UpdateAsanaTaskTaskParams', 'UpdateAttachedAlertsTaskParams', 'UpdateClickupTaskTaskParams', - 'UpdateCodaPageTaskParams', 'UpdateConfluencePageTaskParams', 'UpdateDatadogNotebookTaskParams', - 'UpdateDropboxPaperPageTaskParams', 'UpdateGithubIssueTaskParams', 'UpdateGitlabIssueTaskParams', - 'UpdateGoogleCalendarEventTaskParams', 'UpdateGoogleDocsPageTaskParams', 'UpdateIncidentPostmortemTaskParams', - 'UpdateIncidentStatusTimestampTaskParams', 'UpdateIncidentTaskParams', 'UpdateJiraIssueTaskParams', - 'UpdateLinearIssueTaskParams', 'UpdateMotionTaskTaskParams', 'UpdateNotionPageTaskParams', - 'UpdateOpsgenieAlertTaskParams', 'UpdateOpsgenieIncidentTaskParams', 'UpdatePagerdutyIncidentTaskParams', - 'UpdatePagertreeAlertTaskParams', 'UpdateQuipPageTaskParams', 'UpdateServiceNowIncidentTaskParams', - 'UpdateSharepointPageTaskParams', 'UpdateShortcutStoryTaskParams', 'UpdateShortcutTaskTaskParams', - 'UpdateSlackChannelTopicTaskParams', 'UpdateStatusTaskParams', 'UpdateTrelloCardTaskParams', - 'UpdateVictorOpsIncidentTaskParams', 'UpdateZendeskTicketTaskParams', Any, Unset]): + name (str | Unset): Name of the workflow task + position (int | Unset): The position of the workflow task + skip_on_failure (bool | Unset): Skip workflow task if any failures + enabled (bool | Unset): Enable/disable workflow task Default: True. + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddRoleTaskParams | + AddTeamTaskParams | AddToTimelineTaskParams | Any | ArchiveMicrosoftTeamsChannelsTaskParams | + ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams | AutoAssignRoleOpsgenieTaskParams | + AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams | + ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | + CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | CreateAsanaTaskTaskParams | + CreateClickupTaskTaskParams | CreateCodaPageTaskParams | CreateConfluencePageTaskParams | + CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | CreateGithubIssueTaskParams | + CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | CreateGoogleDocsPageTaskParams | + CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams | + CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | CreateIncidentPostmortemTaskParams | + CreateIncidentTaskParams | CreateJiraIssueTaskParams | CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams | CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | + CreateMicrosoftTeamsChannelTaskParams | CreateMicrosoftTeamsChatTaskParams | + CreateMicrosoftTeamsMeetingTaskParams | CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | + CreateNotionPageTaskParams | CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | + CreateOutlookEventTaskParams | CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | + CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | + CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams | + CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | CreateWebexMeetingTaskParams | + CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | + GetAlertsTaskParams | GetPulsesTaskParams | HttpClientTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | + PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | + PageRootlyOnCallRespondersTaskParams | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | + RemoveGoogleDocsPermissionsTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | + RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams | + SendMicrosoftTeamsChatMessageTaskParams | SendSmsTaskParams | SendWhatsappMessageTaskParams | + SnapshotDatadogGraphTaskParams | SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | + SnapshotNewRelicGraphTaskParams | TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | Unset | + UpdateActionItemTaskParams | UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | + UpdateAttachedAlertsTaskParams | UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | + UpdateConfluencePageTaskParams | UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | + UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | + UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | + UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | + UpdatePagerdutyIncidentTaskParams | UpdatePagertreeAlertTaskParams | UpdateQuipPageTaskParams | + UpdateServiceNowIncidentTaskParams | UpdateSharepointPageTaskParams | UpdateShortcutStoryTaskParams | + UpdateShortcutTaskTaskParams | UpdateSlackChannelTopicTaskParams | UpdateStatusTaskParams | + UpdateTrelloCardTaskParams | UpdateVictorOpsIncidentTaskParams | UpdateZendeskTicketTaskParams): """ - name: Unset | str = UNSET - position: Unset | int = UNSET - skip_on_failure: Unset | bool = UNSET - enabled: Unset | bool = True - task_params: Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - Unset, - ] = UNSET + name: str | Unset = UNSET + position: int | Unset = UNSET + skip_on_failure: bool | Unset = UNSET + enabled: bool | Unset = True + task_params: ( + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | Unset + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams + ) = UNSET def to_dict(self) -> dict[str, Any]: from ..models.add_action_item_task_params import AddActionItemTaskParams @@ -352,6 +357,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -385,6 +391,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -449,7 +456,7 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - task_params: Any | Unset | dict[str, Any] + task_params: Any | dict[str, Any] | Unset if isinstance(self.task_params, Unset): task_params = UNSET elif isinstance(self.task_params, AddActionItemTaskParams): @@ -604,6 +611,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpsgenieAlertTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateJsmopsAlertTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageJsmopsOnCallRespondersTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateOpsgenieAlertTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateOpsgenieIncidentTaskParams): @@ -751,6 +762,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -784,6 +796,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -851,132 +864,134 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_task_params( data: object, - ) -> Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - Unset, - ]: + ) -> ( + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | Unset + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams + ): if isinstance(data, Unset): return data try: @@ -985,7 +1000,7 @@ def _parse_task_params( task_params_type_0 = AddActionItemTaskParams.from_dict(data) return task_params_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -993,7 +1008,7 @@ def _parse_task_params( task_params_type_1 = UpdateActionItemTaskParams.from_dict(data) return task_params_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1001,7 +1016,7 @@ def _parse_task_params( task_params_type_2 = AddRoleTaskParams.from_dict(data) return task_params_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1009,7 +1024,7 @@ def _parse_task_params( task_params_type_4 = AddTeamTaskParams.from_dict(data) return task_params_type_4 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1017,7 +1032,7 @@ def _parse_task_params( task_params_type_5 = AddToTimelineTaskParams.from_dict(data) return task_params_type_5 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1025,7 +1040,7 @@ def _parse_task_params( task_params_type_6 = ArchiveSlackChannelsTaskParams.from_dict(data) return task_params_type_6 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1033,7 +1048,7 @@ def _parse_task_params( task_params_type_7 = AttachDatadogDashboardsTaskParams.from_dict(data) return task_params_type_7 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1041,7 +1056,7 @@ def _parse_task_params( task_params_type_8 = AutoAssignRoleOpsgenieTaskParams.from_dict(data) return task_params_type_8 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1049,7 +1064,7 @@ def _parse_task_params( task_params_type_9 = AutoAssignRoleRootlyTaskParams.from_dict(data) return task_params_type_9 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1057,7 +1072,7 @@ def _parse_task_params( task_params_type_11 = UpdatePagerdutyIncidentTaskParams.from_dict(data) return task_params_type_11 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1065,7 +1080,7 @@ def _parse_task_params( task_params_type_12 = CreatePagerdutyStatusUpdateTaskParams.from_dict(data) return task_params_type_12 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1073,7 +1088,7 @@ def _parse_task_params( task_params_type_13 = CreatePagertreeAlertTaskParams.from_dict(data) return task_params_type_13 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1081,7 +1096,7 @@ def _parse_task_params( task_params_type_14 = UpdatePagertreeAlertTaskParams.from_dict(data) return task_params_type_14 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1089,7 +1104,7 @@ def _parse_task_params( task_params_type_15 = AutoAssignRoleVictorOpsTaskParams.from_dict(data) return task_params_type_15 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1097,7 +1112,7 @@ def _parse_task_params( task_params_type_16 = CallPeopleTaskParams.from_dict(data) return task_params_type_16 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1105,7 +1120,7 @@ def _parse_task_params( task_params_type_17 = CreateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_17 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1113,7 +1128,7 @@ def _parse_task_params( task_params_type_18 = CreateAsanaSubtaskTaskParams.from_dict(data) return task_params_type_18 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1121,7 +1136,7 @@ def _parse_task_params( task_params_type_19 = CreateAsanaTaskTaskParams.from_dict(data) return task_params_type_19 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1129,7 +1144,7 @@ def _parse_task_params( task_params_type_20 = CreateConfluencePageTaskParams.from_dict(data) return task_params_type_20 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1137,7 +1152,7 @@ def _parse_task_params( task_params_type_21 = CreateDatadogNotebookTaskParams.from_dict(data) return task_params_type_21 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1145,7 +1160,7 @@ def _parse_task_params( task_params_type_22 = CreateCodaPageTaskParams.from_dict(data) return task_params_type_22 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1153,7 +1168,7 @@ def _parse_task_params( task_params_type_23 = CreateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_23 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1161,7 +1176,7 @@ def _parse_task_params( task_params_type_24 = CreateGithubIssueTaskParams.from_dict(data) return task_params_type_24 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1169,7 +1184,7 @@ def _parse_task_params( task_params_type_25 = CreateGitlabIssueTaskParams.from_dict(data) return task_params_type_25 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1177,7 +1192,7 @@ def _parse_task_params( task_params_type_26 = CreateOutlookEventTaskParams.from_dict(data) return task_params_type_26 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1185,7 +1200,7 @@ def _parse_task_params( task_params_type_27 = CreateGoogleCalendarEventTaskParams.from_dict(data) return task_params_type_27 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1193,7 +1208,7 @@ def _parse_task_params( task_params_type_28 = UpdateGoogleDocsPageTaskParams.from_dict(data) return task_params_type_28 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1201,7 +1216,7 @@ def _parse_task_params( task_params_type_29 = UpdateCodaPageTaskParams.from_dict(data) return task_params_type_29 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1209,7 +1224,7 @@ def _parse_task_params( task_params_type_30 = UpdateGoogleCalendarEventTaskParams.from_dict(data) return task_params_type_30 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1217,7 +1232,7 @@ def _parse_task_params( task_params_type_31 = CreateSharepointPageTaskParams.from_dict(data) return task_params_type_31 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1225,7 +1240,7 @@ def _parse_task_params( task_params_type_32 = CreateGoogleDocsPageTaskParams.from_dict(data) return task_params_type_32 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1233,7 +1248,7 @@ def _parse_task_params( task_params_type_33 = CreateGoogleDocsPermissionsTaskParams.from_dict(data) return task_params_type_33 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1241,7 +1256,7 @@ def _parse_task_params( task_params_type_34 = RemoveGoogleDocsPermissionsTaskParams.from_dict(data) return task_params_type_34 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1249,7 +1264,7 @@ def _parse_task_params( task_params_type_35 = CreateQuipPageTaskParams.from_dict(data) return task_params_type_35 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1257,7 +1272,7 @@ def _parse_task_params( task_params_type_36 = CreateGoogleMeetingTaskParams.from_dict(data) return task_params_type_36 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1265,7 +1280,7 @@ def _parse_task_params( task_params_type_37 = CreateGoToMeetingTaskParams.from_dict(data) return task_params_type_37 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1273,7 +1288,7 @@ def _parse_task_params( task_params_type_38 = CreateIncidentTaskParams.from_dict(data) return task_params_type_38 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1281,7 +1296,7 @@ def _parse_task_params( task_params_type_39 = CreateSubIncidentTaskParams.from_dict(data) return task_params_type_39 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1289,7 +1304,7 @@ def _parse_task_params( task_params_type_40 = CreateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_40 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1297,7 +1312,7 @@ def _parse_task_params( task_params_type_41 = CreateJiraIssueTaskParams.from_dict(data) return task_params_type_41 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1305,7 +1320,7 @@ def _parse_task_params( task_params_type_42 = CreateJiraSubtaskTaskParams.from_dict(data) return task_params_type_42 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1313,7 +1328,7 @@ def _parse_task_params( task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_43 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1321,7 +1336,7 @@ def _parse_task_params( task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_44 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1329,7 +1344,7 @@ def _parse_task_params( task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_45 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1337,7 +1352,7 @@ def _parse_task_params( task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_46 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1345,7 +1360,7 @@ def _parse_task_params( task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_47 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1353,7 +1368,7 @@ def _parse_task_params( task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) return task_params_type_48 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1361,7 +1376,7 @@ def _parse_task_params( task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_50 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1369,7 +1384,7 @@ def _parse_task_params( task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_51 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1377,7 +1392,7 @@ def _parse_task_params( task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_52 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1385,7 +1400,7 @@ def _parse_task_params( task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_53 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1393,7 +1408,7 @@ def _parse_task_params( task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_54 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1401,7 +1416,7 @@ def _parse_task_params( task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) return task_params_type_56 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1409,7 +1424,7 @@ def _parse_task_params( task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_58 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1417,7 +1432,7 @@ def _parse_task_params( task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_59 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1425,7 +1440,7 @@ def _parse_task_params( task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_60 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1433,7 +1448,7 @@ def _parse_task_params( task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_61 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1441,7 +1456,7 @@ def _parse_task_params( task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_62 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1449,7 +1464,7 @@ def _parse_task_params( task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_63 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1457,7 +1472,7 @@ def _parse_task_params( task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_64 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1465,7 +1480,7 @@ def _parse_task_params( task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) return task_params_type_66 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1473,7 +1488,7 @@ def _parse_task_params( task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_67 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1481,7 +1496,7 @@ def _parse_task_params( task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_68 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1489,7 +1504,7 @@ def _parse_task_params( task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_69 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1497,7 +1512,7 @@ def _parse_task_params( task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_70 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1505,7 +1520,7 @@ def _parse_task_params( task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_71 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1513,7 +1528,7 @@ def _parse_task_params( task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) return task_params_type_72 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1521,7 +1536,7 @@ def _parse_task_params( task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) return task_params_type_73 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1529,7 +1544,7 @@ def _parse_task_params( task_params_type_76 = GetPulsesTaskParams.from_dict(data) return task_params_type_76 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1537,7 +1552,7 @@ def _parse_task_params( task_params_type_77 = GetAlertsTaskParams.from_dict(data) return task_params_type_77 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1545,7 +1560,7 @@ def _parse_task_params( task_params_type_78 = HttpClientTaskParams.from_dict(data) return task_params_type_78 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1553,7 +1568,7 @@ def _parse_task_params( task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_79 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1561,7 +1576,7 @@ def _parse_task_params( task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_80 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1569,7 +1584,7 @@ def _parse_task_params( task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_83 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1577,7 +1592,7 @@ def _parse_task_params( task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_84 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1585,503 +1600,519 @@ def _parse_task_params( task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_85 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_86 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_87 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_88 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_89 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) - return task_params_type_91 - except: # noqa: E722 + return task_params_type_90 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_92 = PrintTaskParams.from_dict(data) + task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) - return task_params_type_92 - except: # noqa: E722 + return task_params_type_91 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = PublishIncidentTaskParams.from_dict(data) + task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) return task_params_type_93 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = RedisClientTaskParams.from_dict(data) + task_params_type_94 = PrintTaskParams.from_dict(data) return task_params_type_94 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_95 = PublishIncidentTaskParams.from_dict(data) return task_params_type_95 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_96 = RedisClientTaskParams.from_dict(data) return task_params_type_96 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_97 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = SendEmailTaskParams.from_dict(data) + task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_98 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_99 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = CreateSlackChannelTaskParams.from_dict(data) + task_params_type_100 = SendEmailTaskParams.from_dict(data) return task_params_type_100 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = SendSmsTaskParams.from_dict(data) + task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) - return task_params_type_102 - except: # noqa: E722 + return task_params_type_101 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_103 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) - return task_params_type_103 - except: # noqa: E722 + return task_params_type_102 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_104 = SendSmsTaskParams.from_dict(data) return task_params_type_104 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_105 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_106 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_107 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_108 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_109 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_110 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateGithubIssueTaskParams.from_dict(data) + task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_111 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateGitlabIssueTaskParams.from_dict(data) + task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_112 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_113 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_114 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_115 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_116 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_117 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_118 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_119 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_120 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateStatusTaskParams.from_dict(data) + task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) return task_params_type_121 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_122 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_123 = UpdateStatusTaskParams.from_dict(data) return task_params_type_123 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_124 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_125 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_126 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) return task_params_type_127 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) return task_params_type_128 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) - return task_params_type_130 - except: # noqa: E722 + return task_params_type_129 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_131 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) - return task_params_type_131 - except: # noqa: E722 + return task_params_type_130 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) return task_params_type_132 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) return task_params_type_133 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) return task_params_type_134 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_135 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_136 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - Unset, - ], + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | Unset + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams, data, ) diff --git a/rootly_sdk/models/update_zendesk_ticket_task_params.py b/rootly_sdk/models/update_zendesk_ticket_task_params.py index 17aeb783..fbc11737 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,31 +25,31 @@ class UpdateZendeskTicketTaskParams: """ Attributes: ticket_id (str): The ticket id - task_type (Union[Unset, UpdateZendeskTicketTaskParamsTaskType]): - subject (Union[Unset, str]): The ticket subject - tags (Union[Unset, str]): The ticket tags - priority (Union[Unset, UpdateZendeskTicketTaskParamsPriority]): The priority id and display name - completion (Union[Unset, UpdateZendeskTicketTaskParamsCompletion]): The completion id and display name - custom_fields_mapping (Union[None, Unset, str]): Custom field mappings. Can contain liquid markup and need to be + task_type (UpdateZendeskTicketTaskParamsTaskType | Unset): + subject (str | Unset): The ticket subject + tags (str | Unset): The ticket tags + priority (UpdateZendeskTicketTaskParamsPriority | Unset): The priority id and display name + completion (UpdateZendeskTicketTaskParamsCompletion | Unset): The completion id and display name + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be valid JSON - ticket_payload (Union[None, Unset, str]): Additional Zendesk ticket attributes. Will be merged into whatever was + ticket_payload (None | str | Unset): Additional Zendesk ticket attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON """ ticket_id: str - task_type: Unset | UpdateZendeskTicketTaskParamsTaskType = UNSET - subject: Unset | str = UNSET - tags: Unset | str = UNSET - priority: Union[Unset, "UpdateZendeskTicketTaskParamsPriority"] = UNSET - completion: Union[Unset, "UpdateZendeskTicketTaskParamsCompletion"] = UNSET - custom_fields_mapping: None | Unset | str = UNSET - ticket_payload: None | Unset | str = UNSET + task_type: UpdateZendeskTicketTaskParamsTaskType | Unset = UNSET + subject: str | Unset = UNSET + tags: str | Unset = UNSET + priority: UpdateZendeskTicketTaskParamsPriority | Unset = UNSET + completion: UpdateZendeskTicketTaskParamsCompletion | Unset = UNSET + custom_fields_mapping: None | str | Unset = UNSET + ticket_payload: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: ticket_id = self.ticket_id - task_type: Unset | str = UNSET + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type @@ -55,21 +57,21 @@ def to_dict(self) -> dict[str, Any]: tags = self.tags - priority: Unset | dict[str, Any] = UNSET + priority: dict[str, Any] | Unset = UNSET if not isinstance(self.priority, Unset): priority = self.priority.to_dict() - completion: Unset | dict[str, Any] = UNSET + completion: dict[str, Any] | Unset = UNSET if not isinstance(self.completion, Unset): completion = self.completion.to_dict() - custom_fields_mapping: None | Unset | str + custom_fields_mapping: None | str | Unset if isinstance(self.custom_fields_mapping, Unset): custom_fields_mapping = UNSET else: custom_fields_mapping = self.custom_fields_mapping - ticket_payload: None | Unset | str + ticket_payload: None | str | Unset if isinstance(self.ticket_payload, Unset): ticket_payload = UNSET else: @@ -108,7 +110,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ticket_id = d.pop("ticket_id") _task_type = d.pop("task_type", UNSET) - task_type: Unset | UpdateZendeskTicketTaskParamsTaskType + task_type: UpdateZendeskTicketTaskParamsTaskType | Unset if isinstance(_task_type, Unset): task_type = UNSET else: @@ -119,34 +121,34 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: tags = d.pop("tags", UNSET) _priority = d.pop("priority", UNSET) - priority: Unset | UpdateZendeskTicketTaskParamsPriority + priority: UpdateZendeskTicketTaskParamsPriority | Unset if isinstance(_priority, Unset): priority = UNSET else: priority = UpdateZendeskTicketTaskParamsPriority.from_dict(_priority) _completion = d.pop("completion", UNSET) - completion: Unset | UpdateZendeskTicketTaskParamsCompletion + completion: UpdateZendeskTicketTaskParamsCompletion | Unset if isinstance(_completion, Unset): completion = UNSET else: completion = UpdateZendeskTicketTaskParamsCompletion.from_dict(_completion) - def _parse_custom_fields_mapping(data: object) -> None | Unset | str: + def _parse_custom_fields_mapping(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) - def _parse_ticket_payload(data: object) -> None | Unset | str: + def _parse_ticket_payload(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) ticket_payload = _parse_ticket_payload(d.pop("ticket_payload", UNSET)) diff --git a/rootly_sdk/models/update_zendesk_ticket_task_params_completion.py b/rootly_sdk/models/update_zendesk_ticket_task_params_completion.py index 728efbab..5e531f48 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params_completion.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params_completion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateZendeskTicketTaskParamsCompletion: """The completion id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/update_zendesk_ticket_task_params_priority.py b/rootly_sdk/models/update_zendesk_ticket_task_params_priority.py index 1545b485..e87ec4f3 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params_priority.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params_priority.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,12 +16,12 @@ class UpdateZendeskTicketTaskParamsPriority: """The priority id and display name Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): + id (str | Unset): + name (str | Unset): """ - id: Unset | str = UNSET - name: Unset | str = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/uptime_chart_response.py b/rootly_sdk/models/uptime_chart_response.py index baa0672e..66c79963 100644 --- a/rootly_sdk/models/uptime_chart_response.py +++ b/rootly_sdk/models/uptime_chart_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class UptimeChartResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/user.py b/rootly_sdk/models/user.py index 0d31891e..3604e323 100644 --- a/rootly_sdk/models/user.py +++ b/rootly_sdk/models/user.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,21 +18,21 @@ class User: email (str): The email of the user created_at (str): Date of creation updated_at (str): Date of last update - first_name (Union[None, Unset, str]): First name of the user - last_name (Union[None, Unset, str]): Last name of the user - full_name (Union[None, Unset, str]): The full name of the user - full_name_with_team (Union[None, Unset, str]): The full name with team of the user - time_zone (Union[None, Unset, str]): Configured time zone + first_name (None | str | Unset): First name of the user + last_name (None | str | Unset): Last name of the user + full_name (None | str | Unset): The full name of the user + full_name_with_team (None | str | Unset): The full name with team of the user + time_zone (None | str | Unset): Configured time zone """ email: str created_at: str updated_at: str - first_name: None | Unset | str = UNSET - last_name: None | Unset | str = UNSET - full_name: None | Unset | str = UNSET - full_name_with_team: None | Unset | str = UNSET - time_zone: None | Unset | str = UNSET + first_name: None | str | Unset = UNSET + last_name: None | str | Unset = UNSET + full_name: None | str | Unset = UNSET + full_name_with_team: None | str | Unset = UNSET + time_zone: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,31 +42,31 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - first_name: None | Unset | str + first_name: None | str | Unset if isinstance(self.first_name, Unset): first_name = UNSET else: first_name = self.first_name - last_name: None | Unset | str + last_name: None | str | Unset if isinstance(self.last_name, Unset): last_name = UNSET else: last_name = self.last_name - full_name: None | Unset | str + full_name: None | str | Unset if isinstance(self.full_name, Unset): full_name = UNSET else: full_name = self.full_name - full_name_with_team: None | Unset | str + full_name_with_team: None | str | Unset if isinstance(self.full_name_with_team, Unset): full_name_with_team = UNSET else: full_name_with_team = self.full_name_with_team - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: @@ -101,48 +103,48 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_first_name(data: object) -> None | Unset | str: + def _parse_first_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) first_name = _parse_first_name(d.pop("first_name", UNSET)) - def _parse_last_name(data: object) -> None | Unset | str: + def _parse_last_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) last_name = _parse_last_name(d.pop("last_name", UNSET)) - def _parse_full_name(data: object) -> None | Unset | str: + def _parse_full_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) full_name = _parse_full_name(d.pop("full_name", UNSET)) - def _parse_full_name_with_team(data: object) -> None | Unset | str: + def _parse_full_name_with_team(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) full_name_with_team = _parse_full_name_with_team(d.pop("full_name_with_team", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) diff --git a/rootly_sdk/models/user_email_address.py b/rootly_sdk/models/user_email_address.py index ada7931e..2f901d3e 100644 --- a/rootly_sdk/models/user_email_address.py +++ b/rootly_sdk/models/user_email_address.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -13,18 +15,18 @@ class UserEmailAddress: """ Attributes: - user_id (Union[Unset, int]): - email (Union[Unset, str]): Email address - primary (Union[Unset, bool]): Whether this is the primary email address - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + user_id (int | Unset): + email (str | Unset): Email address + primary (bool | Unset): Whether this is the primary email address + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ - user_id: Unset | int = UNSET - email: Unset | str = UNSET - primary: Unset | bool = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + user_id: int | Unset = UNSET + email: str | Unset = UNSET + primary: bool | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_email_address_list.py b/rootly_sdk/models/user_email_address_list.py index f718295f..5ac02e51 100644 --- a/rootly_sdk/models/user_email_address_list.py +++ b/rootly_sdk/models/user_email_address_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class UserEmailAddressList: """ Attributes: - data (list['UserEmailAddressListDataItem']): + data (list[UserEmailAddressListDataItem]): links (Links): meta (Meta): """ - data: list["UserEmailAddressListDataItem"] - links: "Links" - meta: "Meta" + data: list[UserEmailAddressListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_email_address_list_data_item.py b/rootly_sdk/models/user_email_address_list_data_item.py index 86906a72..b5979d41 100644 --- a/rootly_sdk/models/user_email_address_list_data_item.py +++ b/rootly_sdk/models/user_email_address_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UserEmailAddressListDataItem: id: str type_: UserEmailAddressListDataItemType - attributes: "UserEmailAddress" + attributes: UserEmailAddress additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_email_address_response.py b/rootly_sdk/models/user_email_address_response.py index 1e0869e7..271c4b0b 100644 --- a/rootly_sdk/models/user_email_address_response.py +++ b/rootly_sdk/models/user_email_address_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UserEmailAddressResponse: data (UserEmailAddressResponseData): """ - data: "UserEmailAddressResponseData" + data: UserEmailAddressResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_email_address_response_data.py b/rootly_sdk/models/user_email_address_response_data.py index 05b0715b..e6e23d8c 100644 --- a/rootly_sdk/models/user_email_address_response_data.py +++ b/rootly_sdk/models/user_email_address_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UserEmailAddressResponseData: id: str type_: UserEmailAddressResponseDataType - attributes: "UserEmailAddress" + attributes: UserEmailAddress additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_flat_response.py b/rootly_sdk/models/user_flat_response.py index 5708b04e..72654e6b 100644 --- a/rootly_sdk/models/user_flat_response.py +++ b/rootly_sdk/models/user_flat_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -18,22 +20,22 @@ class UserFlatResponse: email (str): User email created_at (str): User creation timestamp updated_at (str): User last update timestamp - first_name (Union[None, Unset, str]): User first name - last_name (Union[None, Unset, str]): User last name - full_name (Union[None, Unset, str]): User full name - full_name_with_team (Union[None, Unset, str]): User full name with team - time_zone (Union[None, Unset, str]): User time zone + first_name (None | str | Unset): User first name + last_name (None | str | Unset): User last name + full_name (None | str | Unset): User full name + full_name_with_team (None | str | Unset): User full name with team + time_zone (None | str | Unset): User time zone """ id: int email: str created_at: str updated_at: str - first_name: None | Unset | str = UNSET - last_name: None | Unset | str = UNSET - full_name: None | Unset | str = UNSET - full_name_with_team: None | Unset | str = UNSET - time_zone: None | Unset | str = UNSET + first_name: None | str | Unset = UNSET + last_name: None | str | Unset = UNSET + full_name: None | str | Unset = UNSET + full_name_with_team: None | str | Unset = UNSET + time_zone: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -45,31 +47,31 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - first_name: None | Unset | str + first_name: None | str | Unset if isinstance(self.first_name, Unset): first_name = UNSET else: first_name = self.first_name - last_name: None | Unset | str + last_name: None | str | Unset if isinstance(self.last_name, Unset): last_name = UNSET else: last_name = self.last_name - full_name: None | Unset | str + full_name: None | str | Unset if isinstance(self.full_name, Unset): full_name = UNSET else: full_name = self.full_name - full_name_with_team: None | Unset | str + full_name_with_team: None | str | Unset if isinstance(self.full_name_with_team, Unset): full_name_with_team = UNSET else: full_name_with_team = self.full_name_with_team - time_zone: None | Unset | str + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET else: @@ -109,48 +111,48 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") - def _parse_first_name(data: object) -> None | Unset | str: + def _parse_first_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) first_name = _parse_first_name(d.pop("first_name", UNSET)) - def _parse_last_name(data: object) -> None | Unset | str: + def _parse_last_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) last_name = _parse_last_name(d.pop("last_name", UNSET)) - def _parse_full_name(data: object) -> None | Unset | str: + def _parse_full_name(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) full_name = _parse_full_name(d.pop("full_name", UNSET)) - def _parse_full_name_with_team(data: object) -> None | Unset | str: + def _parse_full_name_with_team(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) full_name_with_team = _parse_full_name_with_team(d.pop("full_name_with_team", UNSET)) - def _parse_time_zone(data: object) -> None | Unset | str: + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) diff --git a/rootly_sdk/models/user_list.py b/rootly_sdk/models/user_list.py index bcf0bcf3..b03a1139 100644 --- a/rootly_sdk/models/user_list.py +++ b/rootly_sdk/models/user_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class UserList: """ Attributes: - data (list['UserListDataItem']): + data (list[UserListDataItem]): links (Links): meta (Meta): """ - data: list["UserListDataItem"] - links: "Links" - meta: "Meta" + data: list[UserListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_list_data_item.py b/rootly_sdk/models/user_list_data_item.py index 4abc12ea..c9692dbd 100644 --- a/rootly_sdk/models/user_list_data_item.py +++ b/rootly_sdk/models/user_list_data_item.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,13 +24,13 @@ class UserListDataItem: id (str): Unique ID of the user type_ (UserListDataItemType): attributes (User): - relationships (Union[Unset, UserRelationships]): + relationships (UserRelationships | Unset): """ id: str type_: UserListDataItemType - attributes: "User" - relationships: Union[Unset, "UserRelationships"] = UNSET + attributes: User + relationships: UserRelationships | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - relationships: Unset | dict[str, Any] = UNSET + relationships: dict[str, Any] | Unset = UNSET if not isinstance(self.relationships, Unset): relationships = self.relationships.to_dict() @@ -69,7 +71,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = User.from_dict(d.pop("attributes")) _relationships = d.pop("relationships", UNSET) - relationships: Unset | UserRelationships + relationships: UserRelationships | Unset if isinstance(_relationships, Unset): relationships = UNSET else: diff --git a/rootly_sdk/models/user_notification_rule.py b/rootly_sdk/models/user_notification_rule.py index d271fc44..a1ece08a 100644 --- a/rootly_sdk/models/user_notification_rule.py +++ b/rootly_sdk/models/user_notification_rule.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,81 +23,81 @@ class UserNotificationRule: """ Attributes: - user_id (Union[Unset, int]): - delay (Union[None, Unset, int]): Delay after which rule gets triggered - position (Union[None, Unset, int]): Position of the rule - user_email_address_id (Union[None, Unset, str]): User email address to which notification to be sent - user_call_number_id (Union[None, Unset, str]): User phone number to which notification to be sent - user_sms_number_id (Union[None, Unset, str]): User sms number to which notification to be sent - user_device_id (Union[None, Unset, str]): User device to which notification to be sent - enabled_contact_types (Union[Unset, list[UserNotificationRuleEnabledContactTypesItem]]): Contact types for which + user_id (int | Unset): + delay (int | None | Unset): Delay after which rule gets triggered + position (int | None | Unset): Position of the rule + user_email_address_id (None | str | Unset): User email address to which notification to be sent + user_call_number_id (None | str | Unset): User phone number to which notification to be sent + user_sms_number_id (None | str | Unset): User sms number to which notification to be sent + user_device_id (None | str | Unset): User device to which notification to be sent + enabled_contact_types (list[UserNotificationRuleEnabledContactTypesItem] | Unset): Contact types for which notification needs to be enabled - notification_type (Union[Unset, UserNotificationRuleNotificationType]): Type of notification rule (audible or - quiet). Audible notifications use sound/vibration to alert users, while quiet notifications are silent. - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + notification_type (UserNotificationRuleNotificationType | Unset): Type of notification rule (audible or quiet). + Audible notifications use sound/vibration to alert users, while quiet notifications are silent. + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ - user_id: Unset | int = UNSET - delay: None | Unset | int = UNSET - position: None | Unset | int = UNSET - user_email_address_id: None | Unset | str = UNSET - user_call_number_id: None | Unset | str = UNSET - user_sms_number_id: None | Unset | str = UNSET - user_device_id: None | Unset | str = UNSET - enabled_contact_types: Unset | list[UserNotificationRuleEnabledContactTypesItem] = UNSET - notification_type: Unset | UserNotificationRuleNotificationType = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + user_id: int | Unset = UNSET + delay: int | None | Unset = UNSET + position: int | None | Unset = UNSET + user_email_address_id: None | str | Unset = UNSET + user_call_number_id: None | str | Unset = UNSET + user_sms_number_id: None | str | Unset = UNSET + user_device_id: None | str | Unset = UNSET + enabled_contact_types: list[UserNotificationRuleEnabledContactTypesItem] | Unset = UNSET + notification_type: UserNotificationRuleNotificationType | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: user_id = self.user_id - delay: None | Unset | int + delay: int | None | Unset if isinstance(self.delay, Unset): delay = UNSET else: delay = self.delay - position: None | Unset | int + position: int | None | Unset if isinstance(self.position, Unset): position = UNSET else: position = self.position - user_email_address_id: None | Unset | str + user_email_address_id: None | str | Unset if isinstance(self.user_email_address_id, Unset): user_email_address_id = UNSET else: user_email_address_id = self.user_email_address_id - user_call_number_id: None | Unset | str + user_call_number_id: None | str | Unset if isinstance(self.user_call_number_id, Unset): user_call_number_id = UNSET else: user_call_number_id = self.user_call_number_id - user_sms_number_id: None | Unset | str + user_sms_number_id: None | str | Unset if isinstance(self.user_sms_number_id, Unset): user_sms_number_id = UNSET else: user_sms_number_id = self.user_sms_number_id - user_device_id: None | Unset | str + user_device_id: None | str | Unset if isinstance(self.user_device_id, Unset): user_device_id = UNSET else: user_device_id = self.user_device_id - enabled_contact_types: Unset | list[str] = UNSET + enabled_contact_types: list[str] | Unset = UNSET if not isinstance(self.enabled_contact_types, Unset): enabled_contact_types = [] for enabled_contact_types_item_data in self.enabled_contact_types: enabled_contact_types_item: str = enabled_contact_types_item_data enabled_contact_types.append(enabled_contact_types_item) - notification_type: Unset | str = UNSET + notification_type: str | Unset = UNSET if not isinstance(self.notification_type, Unset): notification_type = self.notification_type @@ -136,71 +138,73 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) user_id = d.pop("user_id", UNSET) - def _parse_delay(data: object) -> None | Unset | int: + def _parse_delay(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) delay = _parse_delay(d.pop("delay", UNSET)) - def _parse_position(data: object) -> None | Unset | int: + def _parse_position(data: object) -> int | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(int | None | Unset, data) position = _parse_position(d.pop("position", UNSET)) - def _parse_user_email_address_id(data: object) -> None | Unset | str: + def _parse_user_email_address_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_email_address_id = _parse_user_email_address_id(d.pop("user_email_address_id", UNSET)) - def _parse_user_call_number_id(data: object) -> None | Unset | str: + def _parse_user_call_number_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_call_number_id = _parse_user_call_number_id(d.pop("user_call_number_id", UNSET)) - def _parse_user_sms_number_id(data: object) -> None | Unset | str: + def _parse_user_sms_number_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_sms_number_id = _parse_user_sms_number_id(d.pop("user_sms_number_id", UNSET)) - def _parse_user_device_id(data: object) -> None | Unset | str: + def _parse_user_device_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) user_device_id = _parse_user_device_id(d.pop("user_device_id", UNSET)) - enabled_contact_types = [] _enabled_contact_types = d.pop("enabled_contact_types", UNSET) - for enabled_contact_types_item_data in _enabled_contact_types or []: - enabled_contact_types_item = check_user_notification_rule_enabled_contact_types_item( - enabled_contact_types_item_data - ) + enabled_contact_types: list[UserNotificationRuleEnabledContactTypesItem] | Unset = UNSET + if _enabled_contact_types is not UNSET: + enabled_contact_types = [] + for enabled_contact_types_item_data in _enabled_contact_types: + enabled_contact_types_item = check_user_notification_rule_enabled_contact_types_item( + enabled_contact_types_item_data + ) - enabled_contact_types.append(enabled_contact_types_item) + enabled_contact_types.append(enabled_contact_types_item) _notification_type = d.pop("notification_type", UNSET) - notification_type: Unset | UserNotificationRuleNotificationType + notification_type: UserNotificationRuleNotificationType | Unset if isinstance(_notification_type, Unset): notification_type = UNSET else: diff --git a/rootly_sdk/models/user_notification_rule_list.py b/rootly_sdk/models/user_notification_rule_list.py index 4f6192c9..348f64aa 100644 --- a/rootly_sdk/models/user_notification_rule_list.py +++ b/rootly_sdk/models/user_notification_rule_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class UserNotificationRuleList: """ Attributes: - data (list['UserNotificationRuleListDataItem']): + data (list[UserNotificationRuleListDataItem]): links (Links): meta (Meta): """ - data: list["UserNotificationRuleListDataItem"] - links: "Links" - meta: "Meta" + data: list[UserNotificationRuleListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_notification_rule_list_data_item.py b/rootly_sdk/models/user_notification_rule_list_data_item.py index cf65d0b1..52215b0c 100644 --- a/rootly_sdk/models/user_notification_rule_list_data_item.py +++ b/rootly_sdk/models/user_notification_rule_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UserNotificationRuleListDataItem: id: str type_: UserNotificationRuleListDataItemType - attributes: "UserNotificationRule" + attributes: UserNotificationRule additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_notification_rule_response.py b/rootly_sdk/models/user_notification_rule_response.py index 65a15985..94079f59 100644 --- a/rootly_sdk/models/user_notification_rule_response.py +++ b/rootly_sdk/models/user_notification_rule_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UserNotificationRuleResponse: data (UserNotificationRuleResponseData): """ - data: "UserNotificationRuleResponseData" + data: UserNotificationRuleResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_notification_rule_response_data.py b/rootly_sdk/models/user_notification_rule_response_data.py index 962221fd..ed717983 100644 --- a/rootly_sdk/models/user_notification_rule_response_data.py +++ b/rootly_sdk/models/user_notification_rule_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UserNotificationRuleResponseData: id: str type_: UserNotificationRuleResponseDataType - attributes: "UserNotificationRule" + attributes: UserNotificationRule additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_phone_number.py b/rootly_sdk/models/user_phone_number.py index a458ba06..56225020 100644 --- a/rootly_sdk/models/user_phone_number.py +++ b/rootly_sdk/models/user_phone_number.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -15,22 +17,22 @@ class UserPhoneNumber: """ Attributes: - user_id (Union[Unset, int]): - phone (Union[Unset, str]): Phone number in international format - primary (Union[Unset, bool]): Whether this is the primary phone number - verified_at (Union[None, Unset, datetime.datetime]): Date when phone number was verified - verification_attempts_today (Union[Unset, int]): Number of verification attempts made today - created_at (Union[Unset, str]): Date of creation - updated_at (Union[Unset, str]): Date of last update + user_id (int | Unset): + phone (str | Unset): Phone number in international format + primary (bool | Unset): Whether this is the primary phone number + verified_at (datetime.datetime | None | Unset): Date when phone number was verified + verification_attempts_today (int | Unset): Number of verification attempts made today + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update """ - user_id: Unset | int = UNSET - phone: Unset | str = UNSET - primary: Unset | bool = UNSET - verified_at: None | Unset | datetime.datetime = UNSET - verification_attempts_today: Unset | int = UNSET - created_at: Unset | str = UNSET - updated_at: Unset | str = UNSET + user_id: int | Unset = UNSET + phone: str | Unset = UNSET + primary: bool | Unset = UNSET + verified_at: datetime.datetime | None | Unset = UNSET + verification_attempts_today: int | Unset = UNSET + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: primary = self.primary - verified_at: None | Unset | str + verified_at: None | str | Unset if isinstance(self.verified_at, Unset): verified_at = UNSET elif isinstance(self.verified_at, datetime.datetime): @@ -83,7 +85,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: primary = d.pop("primary", UNSET) - def _parse_verified_at(data: object) -> None | Unset | datetime.datetime: + def _parse_verified_at(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -94,9 +96,9 @@ def _parse_verified_at(data: object) -> None | Unset | datetime.datetime: verified_at_type_0 = isoparse(data) return verified_at_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | datetime.datetime, data) + return cast(datetime.datetime | None | Unset, data) verified_at = _parse_verified_at(d.pop("verified_at", UNSET)) diff --git a/rootly_sdk/models/user_phone_number_list.py b/rootly_sdk/models/user_phone_number_list.py index ad739972..e9a7b3a8 100644 --- a/rootly_sdk/models/user_phone_number_list.py +++ b/rootly_sdk/models/user_phone_number_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class UserPhoneNumberList: """ Attributes: - data (list['UserPhoneNumberListDataItem']): + data (list[UserPhoneNumberListDataItem]): links (Links): meta (Meta): """ - data: list["UserPhoneNumberListDataItem"] - links: "Links" - meta: "Meta" + data: list[UserPhoneNumberListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_phone_number_list_data_item.py b/rootly_sdk/models/user_phone_number_list_data_item.py index d8e9ce4c..afe5c8cb 100644 --- a/rootly_sdk/models/user_phone_number_list_data_item.py +++ b/rootly_sdk/models/user_phone_number_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UserPhoneNumberListDataItem: id: str type_: UserPhoneNumberListDataItemType - attributes: "UserPhoneNumber" + attributes: UserPhoneNumber additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_phone_number_response.py b/rootly_sdk/models/user_phone_number_response.py index 9d2c8fe0..f800a3e8 100644 --- a/rootly_sdk/models/user_phone_number_response.py +++ b/rootly_sdk/models/user_phone_number_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UserPhoneNumberResponse: data (UserPhoneNumberResponseData): """ - data: "UserPhoneNumberResponseData" + data: UserPhoneNumberResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_phone_number_response_data.py b/rootly_sdk/models/user_phone_number_response_data.py index 4fcbf23a..faa7c9ef 100644 --- a/rootly_sdk/models/user_phone_number_response_data.py +++ b/rootly_sdk/models/user_phone_number_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class UserPhoneNumberResponseData: id: str type_: UserPhoneNumberResponseDataType - attributes: "UserPhoneNumber" + attributes: UserPhoneNumber additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_relationships.py b/rootly_sdk/models/user_relationships.py index 01891445..ccf31d0d 100644 --- a/rootly_sdk/models/user_relationships.py +++ b/rootly_sdk/models/user_relationships.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class UserRelationships: """ Attributes: - role (Union[Unset, RoleRelationship]): - on_call_role (Union[Unset, OnCallRoleRelationship]): + role (RoleRelationship | Unset): + on_call_role (OnCallRoleRelationship | Unset): """ - role: Union[Unset, "RoleRelationship"] = UNSET - on_call_role: Union[Unset, "OnCallRoleRelationship"] = UNSET + role: RoleRelationship | Unset = UNSET + on_call_role: OnCallRoleRelationship | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - role: Unset | dict[str, Any] = UNSET + role: dict[str, Any] | Unset = UNSET if not isinstance(self.role, Unset): role = self.role.to_dict() - on_call_role: Unset | dict[str, Any] = UNSET + on_call_role: dict[str, Any] | Unset = UNSET if not isinstance(self.on_call_role, Unset): on_call_role = self.on_call_role.to_dict() @@ -52,14 +54,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _role = d.pop("role", UNSET) - role: Unset | RoleRelationship + role: RoleRelationship | Unset if isinstance(_role, Unset): role = UNSET else: role = RoleRelationship.from_dict(_role) _on_call_role = d.pop("on_call_role", UNSET) - on_call_role: Unset | OnCallRoleRelationship + on_call_role: OnCallRoleRelationship | Unset if isinstance(_on_call_role, Unset): on_call_role = UNSET else: diff --git a/rootly_sdk/models/user_response.py b/rootly_sdk/models/user_response.py index 8963fd50..4f3139ab 100644 --- a/rootly_sdk/models/user_response.py +++ b/rootly_sdk/models/user_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class UserResponse: data (UserResponseData): """ - data: "UserResponseData" + data: UserResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/user_response_data.py b/rootly_sdk/models/user_response_data.py index 48e292f5..adf3b1f1 100644 --- a/rootly_sdk/models/user_response_data.py +++ b/rootly_sdk/models/user_response_data.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,13 +24,13 @@ class UserResponseData: id (str): Unique ID of the user type_ (UserResponseDataType): attributes (User): - relationships (Union[Unset, UserRelationships]): + relationships (UserRelationships | Unset): """ id: str type_: UserResponseDataType - attributes: "User" - relationships: Union[Unset, "UserRelationships"] = UNSET + attributes: User + relationships: UserRelationships | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: attributes = self.attributes.to_dict() - relationships: Unset | dict[str, Any] = UNSET + relationships: dict[str, Any] | Unset = UNSET if not isinstance(self.relationships, Unset): relationships = self.relationships.to_dict() @@ -69,7 +71,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: attributes = User.from_dict(d.pop("attributes")) _relationships = d.pop("relationships", UNSET) - relationships: Unset | UserRelationships + relationships: UserRelationships | Unset if isinstance(_relationships, Unset): relationships = UNSET else: diff --git a/rootly_sdk/models/verify_phone_number_request.py b/rootly_sdk/models/verify_phone_number_request.py index af4fd0ef..0a2aa912 100644 --- a/rootly_sdk/models/verify_phone_number_request.py +++ b/rootly_sdk/models/verify_phone_number_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/rootly_sdk/models/webhooks_delivery.py b/rootly_sdk/models/webhooks_delivery.py index dbc6d265..82c25bb5 100644 --- a/rootly_sdk/models/webhooks_delivery.py +++ b/rootly_sdk/models/webhooks_delivery.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -13,7 +15,7 @@ class WebhooksDelivery: Attributes: endpoint_id (str): payload (str): - delivered_at (Union[None, str]): + delivered_at (None | str): created_at (str): Date of creation updated_at (str): Date of last update """ diff --git a/rootly_sdk/models/webhooks_delivery_list.py b/rootly_sdk/models/webhooks_delivery_list.py index c08dad80..d717e142 100644 --- a/rootly_sdk/models/webhooks_delivery_list.py +++ b/rootly_sdk/models/webhooks_delivery_list.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class WebhooksDeliveryList: """ Attributes: - data (list['WebhooksDeliveryListDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[WebhooksDeliveryListDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["WebhooksDeliveryListDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[WebhooksDeliveryListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/webhooks_delivery_list_data_item.py b/rootly_sdk/models/webhooks_delivery_list_data_item.py index 28e9bcf7..5fa5e915 100644 --- a/rootly_sdk/models/webhooks_delivery_list_data_item.py +++ b/rootly_sdk/models/webhooks_delivery_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WebhooksDeliveryListDataItem: id: str type_: WebhooksDeliveryListDataItemType - attributes: "WebhooksDelivery" + attributes: WebhooksDelivery additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/webhooks_delivery_response.py b/rootly_sdk/models/webhooks_delivery_response.py index 4829663f..65f5c806 100644 --- a/rootly_sdk/models/webhooks_delivery_response.py +++ b/rootly_sdk/models/webhooks_delivery_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WebhooksDeliveryResponse: data (WebhooksDeliveryResponseData): """ - data: "WebhooksDeliveryResponseData" + data: WebhooksDeliveryResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/webhooks_delivery_response_data.py b/rootly_sdk/models/webhooks_delivery_response_data.py index e08e14af..034eb5c6 100644 --- a/rootly_sdk/models/webhooks_delivery_response_data.py +++ b/rootly_sdk/models/webhooks_delivery_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WebhooksDeliveryResponseData: id: str type_: WebhooksDeliveryResponseDataType - attributes: "WebhooksDelivery" + attributes: WebhooksDelivery additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/webhooks_endpoint.py b/rootly_sdk/models/webhooks_endpoint.py index ac7e46ae..a8e405b2 100644 --- a/rootly_sdk/models/webhooks_endpoint.py +++ b/rootly_sdk/models/webhooks_endpoint.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -24,7 +26,7 @@ class WebhooksEndpoint: enabled (bool): created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the endpoint + slug (str | Unset): The slug of the endpoint """ name: str @@ -34,7 +36,7 @@ class WebhooksEndpoint: enabled: bool created_at: str updated_at: str - slug: Unset | str = UNSET + slug: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/webhooks_endpoint_list.py b/rootly_sdk/models/webhooks_endpoint_list.py index e8e15007..8555d0b7 100644 --- a/rootly_sdk/models/webhooks_endpoint_list.py +++ b/rootly_sdk/models/webhooks_endpoint_list.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +21,14 @@ class WebhooksEndpointList: """ Attributes: - data (list['WebhooksEndpointListDataItem']): - links (Union[Unset, Links]): - meta (Union[Unset, Meta]): + data (list[WebhooksEndpointListDataItem]): + links (Links | Unset): + meta (Meta | Unset): """ - data: list["WebhooksEndpointListDataItem"] - links: Union[Unset, "Links"] = UNSET - meta: Union[Unset, "Meta"] = UNSET + data: list[WebhooksEndpointListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -35,11 +37,11 @@ def to_dict(self) -> dict[str, Any]: data_item = data_item_data.to_dict() data.append(data_item) - links: Unset | dict[str, Any] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - meta: Unset | dict[str, Any] = UNSET + meta: dict[str, Any] | Unset = UNSET if not isinstance(self.meta, Unset): meta = self.meta.to_dict() @@ -72,14 +74,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) _links = d.pop("links", UNSET) - links: Unset | Links + links: Links | Unset if isinstance(_links, Unset): links = UNSET else: links = Links.from_dict(_links) _meta = d.pop("meta", UNSET) - meta: Unset | Meta + meta: Meta | Unset if isinstance(_meta, Unset): meta = UNSET else: diff --git a/rootly_sdk/models/webhooks_endpoint_list_data_item.py b/rootly_sdk/models/webhooks_endpoint_list_data_item.py index cc5bce1c..a19f4014 100644 --- a/rootly_sdk/models/webhooks_endpoint_list_data_item.py +++ b/rootly_sdk/models/webhooks_endpoint_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WebhooksEndpointListDataItem: id: str type_: WebhooksEndpointListDataItemType - attributes: "WebhooksEndpoint" + attributes: WebhooksEndpoint additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/webhooks_endpoint_response.py b/rootly_sdk/models/webhooks_endpoint_response.py index c5c76fd9..62aa441b 100644 --- a/rootly_sdk/models/webhooks_endpoint_response.py +++ b/rootly_sdk/models/webhooks_endpoint_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WebhooksEndpointResponse: data (WebhooksEndpointResponseData): """ - data: "WebhooksEndpointResponseData" + data: WebhooksEndpointResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/webhooks_endpoint_response_data.py b/rootly_sdk/models/webhooks_endpoint_response_data.py index d86d8e51..b4a2d8ed 100644 --- a/rootly_sdk/models/webhooks_endpoint_response_data.py +++ b/rootly_sdk/models/webhooks_endpoint_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WebhooksEndpointResponseData: id: str type_: WebhooksEndpointResponseDataType - attributes: "WebhooksEndpoint" + attributes: WebhooksEndpoint additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow.py b/rootly_sdk/models/workflow.py index 255a05be..ee3acbe6 100644 --- a/rootly_sdk/models/workflow.py +++ b/rootly_sdk/models/workflow.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,71 +27,71 @@ class Workflow: name (str): The title of the workflow created_at (str): Date of creation updated_at (str): Date of last update - slug (Union[Unset, str]): The slug of the workflow - description (Union[None, Unset, str]): The description of the workflow - command (Union[None, Unset, str]): Workflow command - command_feedback_enabled (Union[None, Unset, bool]): This will notify you back when the workflow is starting - wait (Union[None, Unset, str]): Wait this duration before executing - repeat_every_duration (Union[None, Unset, str]): Repeat workflow every duration - repeat_condition_duration_since_first_run (Union[None, Unset, str]): The workflow will stop repeating if its - runtime since it's first workflow run exceeds the duration set in this field - repeat_condition_number_of_repeats (Union[Unset, int]): The workflow will stop repeating if the number of - repeats exceeds the value set in this field - continuously_repeat (Union[Unset, bool]): When continuously repeat is true, repeat workflows aren't - automatically stopped when conditions aren't met. This setting won't override your conditions set by + slug (str | Unset): The slug of the workflow + description (None | str | Unset): The description of the workflow + command (None | str | Unset): Workflow command + command_feedback_enabled (bool | None | Unset): This will notify you back when the workflow is starting + wait (None | str | Unset): Wait this duration before executing + repeat_every_duration (None | str | Unset): Repeat workflow every duration + repeat_condition_duration_since_first_run (None | str | Unset): The workflow will stop repeating if its runtime + since it's first workflow run exceeds the duration set in this field + repeat_condition_number_of_repeats (int | Unset): The workflow will stop repeating if the number of repeats + exceeds the value set in this field + continuously_repeat (bool | Unset): When continuously repeat is true, repeat workflows aren't automatically + stopped when conditions aren't met. This setting won't override your conditions set by repeat_condition_duration_since_first_run and repeat_condition_number_of_repeats parameters. - repeat_on (Union[None, Unset, list[WorkflowRepeatOnType0Item]]): - enabled (Union[Unset, bool]): - locked (Union[Unset, bool]): Restricts workflow edits to admins when turned on. Only admins can set this field. - position (Union[Unset, int]): The order which the workflow should run with other workflows. - workflow_group_id (Union[None, Unset, str]): The group this workflow belongs to. - trigger_params (Union['ActionItemTriggerParams', 'AlertTriggerParams', 'IncidentTriggerParams', - 'PulseTriggerParams', 'SimpleTriggerParams', Unset]): - environment_ids (Union[Unset, list[str]]): - severity_ids (Union[Unset, list[str]]): - incident_type_ids (Union[Unset, list[str]]): - incident_role_ids (Union[Unset, list[str]]): - service_ids (Union[Unset, list[str]]): - functionality_ids (Union[Unset, list[str]]): - group_ids (Union[Unset, list[str]]): - cause_ids (Union[Unset, list[str]]): - sub_status_ids (Union[Unset, list[str]]): + repeat_on (list[WorkflowRepeatOnType0Item] | None | Unset): + enabled (bool | Unset): + locked (bool | Unset): Restricts workflow edits to admins when turned on. Only admins can set this field. + position (int | Unset): The order which the workflow should run with other workflows. + workflow_group_id (None | str | Unset): The group this workflow belongs to. + trigger_params (ActionItemTriggerParams | AlertTriggerParams | IncidentTriggerParams | PulseTriggerParams | + SimpleTriggerParams | Unset): + environment_ids (list[str] | Unset): + severity_ids (list[str] | Unset): + incident_type_ids (list[str] | Unset): + incident_role_ids (list[str] | Unset): + service_ids (list[str] | Unset): + functionality_ids (list[str] | Unset): + group_ids (list[str] | Unset): + cause_ids (list[str] | Unset): + sub_status_ids (list[str] | Unset): """ name: str created_at: str updated_at: str - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - command: None | Unset | str = UNSET - command_feedback_enabled: None | Unset | bool = UNSET - wait: None | Unset | str = UNSET - repeat_every_duration: None | Unset | str = UNSET - repeat_condition_duration_since_first_run: None | Unset | str = UNSET - repeat_condition_number_of_repeats: Unset | int = UNSET - continuously_repeat: Unset | bool = UNSET - repeat_on: None | Unset | list[WorkflowRepeatOnType0Item] = UNSET - enabled: Unset | bool = UNSET - locked: Unset | bool = UNSET - position: Unset | int = UNSET - workflow_group_id: None | Unset | str = UNSET - trigger_params: Union[ - "ActionItemTriggerParams", - "AlertTriggerParams", - "IncidentTriggerParams", - "PulseTriggerParams", - "SimpleTriggerParams", - Unset, - ] = UNSET - environment_ids: Unset | list[str] = UNSET - severity_ids: Unset | list[str] = UNSET - incident_type_ids: Unset | list[str] = UNSET - incident_role_ids: Unset | list[str] = UNSET - service_ids: Unset | list[str] = UNSET - functionality_ids: Unset | list[str] = UNSET - group_ids: Unset | list[str] = UNSET - cause_ids: Unset | list[str] = UNSET - sub_status_ids: Unset | list[str] = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + command: None | str | Unset = UNSET + command_feedback_enabled: bool | None | Unset = UNSET + wait: None | str | Unset = UNSET + repeat_every_duration: None | str | Unset = UNSET + repeat_condition_duration_since_first_run: None | str | Unset = UNSET + repeat_condition_number_of_repeats: int | Unset = UNSET + continuously_repeat: bool | Unset = UNSET + repeat_on: list[WorkflowRepeatOnType0Item] | None | Unset = UNSET + enabled: bool | Unset = UNSET + locked: bool | Unset = UNSET + position: int | Unset = UNSET + workflow_group_id: None | str | Unset = UNSET + trigger_params: ( + ActionItemTriggerParams + | AlertTriggerParams + | IncidentTriggerParams + | PulseTriggerParams + | SimpleTriggerParams + | Unset + ) = UNSET + environment_ids: list[str] | Unset = UNSET + severity_ids: list[str] | Unset = UNSET + incident_type_ids: list[str] | Unset = UNSET + incident_role_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + group_ids: list[str] | Unset = UNSET + cause_ids: list[str] | Unset = UNSET + sub_status_ids: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -106,37 +108,37 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: description = self.description - command: None | Unset | str + command: None | str | Unset if isinstance(self.command, Unset): command = UNSET else: command = self.command - command_feedback_enabled: None | Unset | bool + command_feedback_enabled: bool | None | Unset if isinstance(self.command_feedback_enabled, Unset): command_feedback_enabled = UNSET else: command_feedback_enabled = self.command_feedback_enabled - wait: None | Unset | str + wait: None | str | Unset if isinstance(self.wait, Unset): wait = UNSET else: wait = self.wait - repeat_every_duration: None | Unset | str + repeat_every_duration: None | str | Unset if isinstance(self.repeat_every_duration, Unset): repeat_every_duration = UNSET else: repeat_every_duration = self.repeat_every_duration - repeat_condition_duration_since_first_run: None | Unset | str + repeat_condition_duration_since_first_run: None | str | Unset if isinstance(self.repeat_condition_duration_since_first_run, Unset): repeat_condition_duration_since_first_run = UNSET else: @@ -146,7 +148,7 @@ def to_dict(self) -> dict[str, Any]: continuously_repeat = self.continuously_repeat - repeat_on: None | Unset | list[str] + repeat_on: list[str] | None | Unset if isinstance(self.repeat_on, Unset): repeat_on = UNSET elif isinstance(self.repeat_on, list): @@ -164,13 +166,13 @@ def to_dict(self) -> dict[str, Any]: position = self.position - workflow_group_id: None | Unset | str + workflow_group_id: None | str | Unset if isinstance(self.workflow_group_id, Unset): workflow_group_id = UNSET else: workflow_group_id = self.workflow_group_id - trigger_params: Unset | dict[str, Any] + trigger_params: dict[str, Any] | Unset if isinstance(self.trigger_params, Unset): trigger_params = UNSET elif isinstance(self.trigger_params, IncidentTriggerParams): @@ -184,39 +186,39 @@ def to_dict(self) -> dict[str, Any]: else: trigger_params = self.trigger_params.to_dict() - environment_ids: Unset | list[str] = UNSET + environment_ids: list[str] | Unset = UNSET if not isinstance(self.environment_ids, Unset): environment_ids = self.environment_ids - severity_ids: Unset | list[str] = UNSET + severity_ids: list[str] | Unset = UNSET if not isinstance(self.severity_ids, Unset): severity_ids = self.severity_ids - incident_type_ids: Unset | list[str] = UNSET + incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.incident_type_ids, Unset): incident_type_ids = self.incident_type_ids - incident_role_ids: Unset | list[str] = UNSET + incident_role_ids: list[str] | Unset = UNSET if not isinstance(self.incident_role_ids, Unset): incident_role_ids = self.incident_role_ids - service_ids: Unset | list[str] = UNSET + service_ids: list[str] | Unset = UNSET if not isinstance(self.service_ids, Unset): service_ids = self.service_ids - functionality_ids: Unset | list[str] = UNSET + functionality_ids: list[str] | Unset = UNSET if not isinstance(self.functionality_ids, Unset): functionality_ids = self.functionality_ids - group_ids: Unset | list[str] = UNSET + group_ids: list[str] | Unset = UNSET if not isinstance(self.group_ids, Unset): group_ids = self.group_ids - cause_ids: Unset | list[str] = UNSET + cause_ids: list[str] | Unset = UNSET if not isinstance(self.cause_ids, Unset): cause_ids = self.cause_ids - sub_status_ids: Unset | list[str] = UNSET + sub_status_ids: list[str] | Unset = UNSET if not isinstance(self.sub_status_ids, Unset): sub_status_ids = self.sub_status_ids @@ -297,57 +299,57 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_command(data: object) -> None | Unset | str: + def _parse_command(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) command = _parse_command(d.pop("command", UNSET)) - def _parse_command_feedback_enabled(data: object) -> None | Unset | bool: + def _parse_command_feedback_enabled(data: object) -> bool | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(bool | None | Unset, data) command_feedback_enabled = _parse_command_feedback_enabled(d.pop("command_feedback_enabled", UNSET)) - def _parse_wait(data: object) -> None | Unset | str: + def _parse_wait(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) wait = _parse_wait(d.pop("wait", UNSET)) - def _parse_repeat_every_duration(data: object) -> None | Unset | str: + def _parse_repeat_every_duration(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) repeat_every_duration = _parse_repeat_every_duration(d.pop("repeat_every_duration", UNSET)) - def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Unset | str: + def _parse_repeat_condition_duration_since_first_run(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) repeat_condition_duration_since_first_run = _parse_repeat_condition_duration_since_first_run( d.pop("repeat_condition_duration_since_first_run", UNSET) @@ -357,7 +359,7 @@ def _parse_repeat_condition_duration_since_first_run(data: object) -> None | Uns continuously_repeat = d.pop("continuously_repeat", UNSET) - def _parse_repeat_on(data: object) -> None | Unset | list[WorkflowRepeatOnType0Item]: + def _parse_repeat_on(data: object) -> list[WorkflowRepeatOnType0Item] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -373,9 +375,9 @@ def _parse_repeat_on(data: object) -> None | Unset | list[WorkflowRepeatOnType0I repeat_on_type_0.append(repeat_on_type_0_item) return repeat_on_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(None | Unset | list[WorkflowRepeatOnType0Item], data) + return cast(list[WorkflowRepeatOnType0Item] | None | Unset, data) repeat_on = _parse_repeat_on(d.pop("repeat_on", UNSET)) @@ -385,25 +387,25 @@ def _parse_repeat_on(data: object) -> None | Unset | list[WorkflowRepeatOnType0I position = d.pop("position", UNSET) - def _parse_workflow_group_id(data: object) -> None | Unset | str: + def _parse_workflow_group_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) workflow_group_id = _parse_workflow_group_id(d.pop("workflow_group_id", UNSET)) def _parse_trigger_params( data: object, - ) -> Union[ - "ActionItemTriggerParams", - "AlertTriggerParams", - "IncidentTriggerParams", - "PulseTriggerParams", - "SimpleTriggerParams", - Unset, - ]: + ) -> ( + ActionItemTriggerParams + | AlertTriggerParams + | IncidentTriggerParams + | PulseTriggerParams + | SimpleTriggerParams + | Unset + ): if isinstance(data, Unset): return data try: @@ -412,7 +414,7 @@ def _parse_trigger_params( trigger_params_type_0 = IncidentTriggerParams.from_dict(data) return trigger_params_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -420,7 +422,7 @@ def _parse_trigger_params( trigger_params_type_1 = ActionItemTriggerParams.from_dict(data) return trigger_params_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -428,7 +430,7 @@ def _parse_trigger_params( trigger_params_type_2 = AlertTriggerParams.from_dict(data) return trigger_params_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -436,7 +438,7 @@ def _parse_trigger_params( trigger_params_type_3 = PulseTriggerParams.from_dict(data) return trigger_params_type_3 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass if not isinstance(data, dict): raise TypeError() diff --git a/rootly_sdk/models/workflow_custom_field_selection.py b/rootly_sdk/models/workflow_custom_field_selection.py index b236ae05..aa0bec5c 100644 --- a/rootly_sdk/models/workflow_custom_field_selection.py +++ b/rootly_sdk/models/workflow_custom_field_selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -21,14 +23,14 @@ class WorkflowCustomFieldSelection: custom_field_id (int): The custom field for this selection incident_condition (WorkflowCustomFieldSelectionIncidentCondition): The trigger condition Default: 'ANY'. selected_option_ids (list[int]): - values (Union[Unset, list[str]]): + values (list[str] | Unset): """ workflow_id: str custom_field_id: int selected_option_ids: list[int] incident_condition: WorkflowCustomFieldSelectionIncidentCondition = "ANY" - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: selected_option_ids = self.selected_option_ids - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values diff --git a/rootly_sdk/models/workflow_custom_field_selection_list.py b/rootly_sdk/models/workflow_custom_field_selection_list.py index ea640594..22d392a7 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_list.py +++ b/rootly_sdk/models/workflow_custom_field_selection_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class WorkflowCustomFieldSelectionList: """ Attributes: - data (list['WorkflowCustomFieldSelectionListDataItem']): + data (list[WorkflowCustomFieldSelectionListDataItem]): links (Links): meta (Meta): """ - data: list["WorkflowCustomFieldSelectionListDataItem"] - links: "Links" - meta: "Meta" + data: list[WorkflowCustomFieldSelectionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py b/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py index 5dee7a75..efbc03c1 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py +++ b/rootly_sdk/models/workflow_custom_field_selection_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowCustomFieldSelectionListDataItem: id: str type_: WorkflowCustomFieldSelectionListDataItemType - attributes: "WorkflowCustomFieldSelection" + attributes: WorkflowCustomFieldSelection additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_custom_field_selection_response.py b/rootly_sdk/models/workflow_custom_field_selection_response.py index 61fa471e..04fffc61 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WorkflowCustomFieldSelectionResponse: data (WorkflowCustomFieldSelectionResponseData): """ - data: "WorkflowCustomFieldSelectionResponseData" + data: WorkflowCustomFieldSelectionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_custom_field_selection_response_data.py b/rootly_sdk/models/workflow_custom_field_selection_response_data.py index 0ae87605..48636735 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response_data.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowCustomFieldSelectionResponseData: id: str type_: WorkflowCustomFieldSelectionResponseDataType - attributes: "WorkflowCustomFieldSelection" + attributes: WorkflowCustomFieldSelection additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_form_field_condition.py b/rootly_sdk/models/workflow_form_field_condition.py index b937c662..f3d3ed95 100644 --- a/rootly_sdk/models/workflow_form_field_condition.py +++ b/rootly_sdk/models/workflow_form_field_condition.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -23,13 +25,13 @@ class WorkflowFormFieldCondition: selected_catalog_entity_ids (list[str]): selected_option_ids (list[str]): selected_user_ids (list[int]): - values (Union[Unset, list[str]]): - selected_functionality_ids (Union[Unset, list[str]]): - selected_group_ids (Union[Unset, list[str]]): - selected_service_ids (Union[Unset, list[str]]): - selected_cause_ids (Union[Unset, list[str]]): - selected_environment_ids (Union[Unset, list[str]]): - selected_incident_type_ids (Union[Unset, list[str]]): + values (list[str] | Unset): + selected_functionality_ids (list[str] | Unset): + selected_group_ids (list[str] | Unset): + selected_service_ids (list[str] | Unset): + selected_cause_ids (list[str] | Unset): + selected_environment_ids (list[str] | Unset): + selected_incident_type_ids (list[str] | Unset): """ workflow_id: str @@ -38,13 +40,13 @@ class WorkflowFormFieldCondition: selected_option_ids: list[str] selected_user_ids: list[int] incident_condition: WorkflowFormFieldConditionIncidentCondition = "ANY" - values: Unset | list[str] = UNSET - selected_functionality_ids: Unset | list[str] = UNSET - selected_group_ids: Unset | list[str] = UNSET - selected_service_ids: Unset | list[str] = UNSET - selected_cause_ids: Unset | list[str] = UNSET - selected_environment_ids: Unset | list[str] = UNSET - selected_incident_type_ids: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -60,31 +62,31 @@ def to_dict(self) -> dict[str, Any]: selected_user_ids = self.selected_user_ids - values: Unset | list[str] = UNSET + values: list[str] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values - selected_functionality_ids: Unset | list[str] = UNSET + selected_functionality_ids: list[str] | Unset = UNSET if not isinstance(self.selected_functionality_ids, Unset): selected_functionality_ids = self.selected_functionality_ids - selected_group_ids: Unset | list[str] = UNSET + selected_group_ids: list[str] | Unset = UNSET if not isinstance(self.selected_group_ids, Unset): selected_group_ids = self.selected_group_ids - selected_service_ids: Unset | list[str] = UNSET + selected_service_ids: list[str] | Unset = UNSET if not isinstance(self.selected_service_ids, Unset): selected_service_ids = self.selected_service_ids - selected_cause_ids: Unset | list[str] = UNSET + selected_cause_ids: list[str] | Unset = UNSET if not isinstance(self.selected_cause_ids, Unset): selected_cause_ids = self.selected_cause_ids - selected_environment_ids: Unset | list[str] = UNSET + selected_environment_ids: list[str] | Unset = UNSET if not isinstance(self.selected_environment_ids, Unset): selected_environment_ids = self.selected_environment_ids - selected_incident_type_ids: Unset | list[str] = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET if not isinstance(self.selected_incident_type_ids, Unset): selected_incident_type_ids = self.selected_incident_type_ids diff --git a/rootly_sdk/models/workflow_form_field_condition_list.py b/rootly_sdk/models/workflow_form_field_condition_list.py index 934beed3..8292e787 100644 --- a/rootly_sdk/models/workflow_form_field_condition_list.py +++ b/rootly_sdk/models/workflow_form_field_condition_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class WorkflowFormFieldConditionList: """ Attributes: - data (list['WorkflowFormFieldConditionListDataItem']): + data (list[WorkflowFormFieldConditionListDataItem]): links (Links): meta (Meta): """ - data: list["WorkflowFormFieldConditionListDataItem"] - links: "Links" - meta: "Meta" + data: list[WorkflowFormFieldConditionListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_form_field_condition_list_data_item.py b/rootly_sdk/models/workflow_form_field_condition_list_data_item.py index 3597e8e1..9c98bfa0 100644 --- a/rootly_sdk/models/workflow_form_field_condition_list_data_item.py +++ b/rootly_sdk/models/workflow_form_field_condition_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowFormFieldConditionListDataItem: id: str type_: WorkflowFormFieldConditionListDataItemType - attributes: "WorkflowFormFieldCondition" + attributes: WorkflowFormFieldCondition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_form_field_condition_response.py b/rootly_sdk/models/workflow_form_field_condition_response.py index fb185256..51a5c101 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response.py +++ b/rootly_sdk/models/workflow_form_field_condition_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WorkflowFormFieldConditionResponse: data (WorkflowFormFieldConditionResponseData): """ - data: "WorkflowFormFieldConditionResponseData" + data: WorkflowFormFieldConditionResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_form_field_condition_response_data.py b/rootly_sdk/models/workflow_form_field_condition_response_data.py index c7a81d78..a4b46959 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response_data.py +++ b/rootly_sdk/models/workflow_form_field_condition_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowFormFieldConditionResponseData: id: str type_: WorkflowFormFieldConditionResponseDataType - attributes: "WorkflowFormFieldCondition" + attributes: WorkflowFormFieldCondition additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_group.py b/rootly_sdk/models/workflow_group.py index bc80f73e..1563246a 100644 --- a/rootly_sdk/models/workflow_group.py +++ b/rootly_sdk/models/workflow_group.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar, cast @@ -16,20 +18,20 @@ class WorkflowGroup: Attributes: name (str): The name of the workflow group. position (int): The position of the workflow group - kind (Union[Unset, WorkflowGroupKind]): The kind of the workflow group - slug (Union[Unset, str]): The slug of the workflow group. - description (Union[None, Unset, str]): A description of the workflow group. - icon (Union[Unset, str]): An emoji icon displayed next to the workflow group. - expanded (Union[Unset, bool]): Whether the group is expanded or collapsed. + kind (WorkflowGroupKind | Unset): The kind of the workflow group + slug (str | Unset): The slug of the workflow group. + description (None | str | Unset): A description of the workflow group. + icon (str | Unset): An emoji icon displayed next to the workflow group. + expanded (bool | Unset): Whether the group is expanded or collapsed. """ name: str position: int - kind: Unset | WorkflowGroupKind = UNSET - slug: Unset | str = UNSET - description: None | Unset | str = UNSET - icon: Unset | str = UNSET - expanded: Unset | bool = UNSET + kind: WorkflowGroupKind | Unset = UNSET + slug: str | Unset = UNSET + description: None | str | Unset = UNSET + icon: str | Unset = UNSET + expanded: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -37,13 +39,13 @@ def to_dict(self) -> dict[str, Any]: position = self.position - kind: Unset | str = UNSET + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind slug = self.slug - description: None | Unset | str + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET else: @@ -82,7 +84,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: position = d.pop("position") _kind = d.pop("kind", UNSET) - kind: Unset | WorkflowGroupKind + kind: WorkflowGroupKind | Unset if isinstance(_kind, Unset): kind = UNSET else: @@ -90,12 +92,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) description = _parse_description(d.pop("description", UNSET)) diff --git a/rootly_sdk/models/workflow_group_list.py b/rootly_sdk/models/workflow_group_list.py index 26625939..88fd2044 100644 --- a/rootly_sdk/models/workflow_group_list.py +++ b/rootly_sdk/models/workflow_group_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class WorkflowGroupList: """ Attributes: - data (list['WorkflowGroupListDataItem']): + data (list[WorkflowGroupListDataItem]): links (Links): meta (Meta): """ - data: list["WorkflowGroupListDataItem"] - links: "Links" - meta: "Meta" + data: list[WorkflowGroupListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_group_list_data_item.py b/rootly_sdk/models/workflow_group_list_data_item.py index adf2c51c..f6ba32cb 100644 --- a/rootly_sdk/models/workflow_group_list_data_item.py +++ b/rootly_sdk/models/workflow_group_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowGroupListDataItem: id: str type_: WorkflowGroupListDataItemType - attributes: "WorkflowGroup" + attributes: WorkflowGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_group_response.py b/rootly_sdk/models/workflow_group_response.py index 23d80a7a..686ea693 100644 --- a/rootly_sdk/models/workflow_group_response.py +++ b/rootly_sdk/models/workflow_group_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WorkflowGroupResponse: data (WorkflowGroupResponseData): """ - data: "WorkflowGroupResponseData" + data: WorkflowGroupResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_group_response_data.py b/rootly_sdk/models/workflow_group_response_data.py index 6fcd902e..dfe198b8 100644 --- a/rootly_sdk/models/workflow_group_response_data.py +++ b/rootly_sdk/models/workflow_group_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowGroupResponseData: id: str type_: WorkflowGroupResponseDataType - attributes: "WorkflowGroup" + attributes: WorkflowGroup additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_list.py b/rootly_sdk/models/workflow_list.py index 6ff279a2..abf5662d 100644 --- a/rootly_sdk/models/workflow_list.py +++ b/rootly_sdk/models/workflow_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class WorkflowList: """ Attributes: - data (list['WorkflowListDataItem']): + data (list[WorkflowListDataItem]): links (Links): meta (Meta): """ - data: list["WorkflowListDataItem"] - links: "Links" - meta: "Meta" + data: list[WorkflowListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_list_data_item.py b/rootly_sdk/models/workflow_list_data_item.py index b751de36..1dc431c1 100644 --- a/rootly_sdk/models/workflow_list_data_item.py +++ b/rootly_sdk/models/workflow_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class WorkflowListDataItem: id: str type_: WorkflowListDataItemType - attributes: "Workflow" + attributes: Workflow additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_response.py b/rootly_sdk/models/workflow_response.py index 0185711a..0dafd7f8 100644 --- a/rootly_sdk/models/workflow_response.py +++ b/rootly_sdk/models/workflow_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WorkflowResponse: data (WorkflowResponseData): """ - data: "WorkflowResponseData" + data: WorkflowResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_response_data.py b/rootly_sdk/models/workflow_response_data.py index eeced5e7..0a58c477 100644 --- a/rootly_sdk/models/workflow_response_data.py +++ b/rootly_sdk/models/workflow_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class WorkflowResponseData: id: str type_: WorkflowResponseDataType - attributes: "Workflow" + attributes: Workflow additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_run.py b/rootly_sdk/models/workflow_run.py index 53b52940..c94f5585 100644 --- a/rootly_sdk/models/workflow_run.py +++ b/rootly_sdk/models/workflow_run.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,33 +24,33 @@ class WorkflowRun: workflow_id (str): status (WorkflowRunStatus): triggered_by (WorkflowRunTriggeredBy): - status_message (Union[None, Unset, str]): - started_at (Union[None, Unset, str]): - completed_at (Union[None, Unset, str]): - failed_at (Union[None, Unset, str]): - canceled_at (Union[None, Unset, str]): - incident_id (Union[None, Unset, str]): - post_mortem_id (Union[None, Unset, str]): - action_item_id (Union[None, Unset, str]): - alert_id (Union[None, Unset, str]): - pulse_id (Union[None, Unset, str]): - context (Union[Unset, WorkflowRunContext]): + status_message (None | str | Unset): + started_at (None | str | Unset): + completed_at (None | str | Unset): + failed_at (None | str | Unset): + canceled_at (None | str | Unset): + incident_id (None | str | Unset): + post_mortem_id (None | str | Unset): + action_item_id (None | str | Unset): + alert_id (None | str | Unset): + pulse_id (None | str | Unset): + context (WorkflowRunContext | Unset): """ workflow_id: str status: WorkflowRunStatus triggered_by: WorkflowRunTriggeredBy - status_message: None | Unset | str = UNSET - started_at: None | Unset | str = UNSET - completed_at: None | Unset | str = UNSET - failed_at: None | Unset | str = UNSET - canceled_at: None | Unset | str = UNSET - incident_id: None | Unset | str = UNSET - post_mortem_id: None | Unset | str = UNSET - action_item_id: None | Unset | str = UNSET - alert_id: None | Unset | str = UNSET - pulse_id: None | Unset | str = UNSET - context: Union[Unset, "WorkflowRunContext"] = UNSET + status_message: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + completed_at: None | str | Unset = UNSET + failed_at: None | str | Unset = UNSET + canceled_at: None | str | Unset = UNSET + incident_id: None | str | Unset = UNSET + post_mortem_id: None | str | Unset = UNSET + action_item_id: None | str | Unset = UNSET + alert_id: None | str | Unset = UNSET + pulse_id: None | str | Unset = UNSET + context: WorkflowRunContext | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -58,67 +60,67 @@ def to_dict(self) -> dict[str, Any]: triggered_by: str = self.triggered_by - status_message: None | Unset | str + status_message: None | str | Unset if isinstance(self.status_message, Unset): status_message = UNSET else: status_message = self.status_message - started_at: None | Unset | str + started_at: None | str | Unset if isinstance(self.started_at, Unset): started_at = UNSET else: started_at = self.started_at - completed_at: None | Unset | str + completed_at: None | str | Unset if isinstance(self.completed_at, Unset): completed_at = UNSET else: completed_at = self.completed_at - failed_at: None | Unset | str + failed_at: None | str | Unset if isinstance(self.failed_at, Unset): failed_at = UNSET else: failed_at = self.failed_at - canceled_at: None | Unset | str + canceled_at: None | str | Unset if isinstance(self.canceled_at, Unset): canceled_at = UNSET else: canceled_at = self.canceled_at - incident_id: None | Unset | str + incident_id: None | str | Unset if isinstance(self.incident_id, Unset): incident_id = UNSET else: incident_id = self.incident_id - post_mortem_id: None | Unset | str + post_mortem_id: None | str | Unset if isinstance(self.post_mortem_id, Unset): post_mortem_id = UNSET else: post_mortem_id = self.post_mortem_id - action_item_id: None | Unset | str + action_item_id: None | str | Unset if isinstance(self.action_item_id, Unset): action_item_id = UNSET else: action_item_id = self.action_item_id - alert_id: None | Unset | str + alert_id: None | str | Unset if isinstance(self.alert_id, Unset): alert_id = UNSET else: alert_id = self.alert_id - pulse_id: None | Unset | str + pulse_id: None | str | Unset if isinstance(self.pulse_id, Unset): pulse_id = UNSET else: pulse_id = self.pulse_id - context: Unset | dict[str, Any] = UNSET + context: dict[str, Any] | Unset = UNSET if not isinstance(self.context, Unset): context = self.context.to_dict() @@ -167,98 +169,98 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: triggered_by = check_workflow_run_triggered_by(d.pop("triggered_by")) - def _parse_status_message(data: object) -> None | Unset | str: + def _parse_status_message(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) status_message = _parse_status_message(d.pop("status_message", UNSET)) - def _parse_started_at(data: object) -> None | Unset | str: + def _parse_started_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) started_at = _parse_started_at(d.pop("started_at", UNSET)) - def _parse_completed_at(data: object) -> None | Unset | str: + def _parse_completed_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) completed_at = _parse_completed_at(d.pop("completed_at", UNSET)) - def _parse_failed_at(data: object) -> None | Unset | str: + def _parse_failed_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) failed_at = _parse_failed_at(d.pop("failed_at", UNSET)) - def _parse_canceled_at(data: object) -> None | Unset | str: + def _parse_canceled_at(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) canceled_at = _parse_canceled_at(d.pop("canceled_at", UNSET)) - def _parse_incident_id(data: object) -> None | Unset | str: + def _parse_incident_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) incident_id = _parse_incident_id(d.pop("incident_id", UNSET)) - def _parse_post_mortem_id(data: object) -> None | Unset | str: + def _parse_post_mortem_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) post_mortem_id = _parse_post_mortem_id(d.pop("post_mortem_id", UNSET)) - def _parse_action_item_id(data: object) -> None | Unset | str: + def _parse_action_item_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) action_item_id = _parse_action_item_id(d.pop("action_item_id", UNSET)) - def _parse_alert_id(data: object) -> None | Unset | str: + def _parse_alert_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) alert_id = _parse_alert_id(d.pop("alert_id", UNSET)) - def _parse_pulse_id(data: object) -> None | Unset | str: + def _parse_pulse_id(data: object) -> None | str | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(None | str | Unset, data) pulse_id = _parse_pulse_id(d.pop("pulse_id", UNSET)) _context = d.pop("context", UNSET) - context: Unset | WorkflowRunContext + context: WorkflowRunContext | Unset if isinstance(_context, Unset): context = UNSET else: diff --git a/rootly_sdk/models/workflow_run_context.py b/rootly_sdk/models/workflow_run_context.py index 28bff04f..ecd3107f 100644 --- a/rootly_sdk/models/workflow_run_context.py +++ b/rootly_sdk/models/workflow_run_context.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar @@ -14,6 +16,7 @@ class WorkflowRunContext: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) diff --git a/rootly_sdk/models/workflow_run_response.py b/rootly_sdk/models/workflow_run_response.py index dbf1cb73..ab93fbee 100644 --- a/rootly_sdk/models/workflow_run_response.py +++ b/rootly_sdk/models/workflow_run_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WorkflowRunResponse: data (WorkflowRunResponseData): """ - data: "WorkflowRunResponseData" + data: WorkflowRunResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_run_response_data.py b/rootly_sdk/models/workflow_run_response_data.py index 73ec5e96..a2b091e9 100644 --- a/rootly_sdk/models/workflow_run_response_data.py +++ b/rootly_sdk/models/workflow_run_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -24,7 +26,7 @@ class WorkflowRunResponseData: id: str type_: WorkflowRunResponseDataType - attributes: "WorkflowRun" + attributes: WorkflowRun additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_runs_list.py b/rootly_sdk/models/workflow_runs_list.py index 6ccbf6e1..f0b180d0 100644 --- a/rootly_sdk/models/workflow_runs_list.py +++ b/rootly_sdk/models/workflow_runs_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class WorkflowRunsList: """ Attributes: - data (list['WorkflowRunsListDataItem']): + data (list[WorkflowRunsListDataItem]): links (Links): meta (Meta): """ - data: list["WorkflowRunsListDataItem"] - links: "Links" - meta: "Meta" + data: list[WorkflowRunsListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_runs_list_data_item.py b/rootly_sdk/models/workflow_runs_list_data_item.py index 970d0bec..a501592c 100644 --- a/rootly_sdk/models/workflow_runs_list_data_item.py +++ b/rootly_sdk/models/workflow_runs_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowRunsListDataItem: id: str type_: WorkflowRunsListDataItemType - attributes: "WorkflowRun" + attributes: WorkflowRun additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_task.py b/rootly_sdk/models/workflow_task.py index 52044c9b..3c71e8a1 100644 --- a/rootly_sdk/models/workflow_task.py +++ b/rootly_sdk/models/workflow_task.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,6 +43,7 @@ from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -74,6 +77,7 @@ from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -139,189 +143,190 @@ class WorkflowTask: """ Attributes: workflow_id (str): The ID of the parent workflow - task_params (Union['AddActionItemTaskParams', 'AddMicrosoftTeamsChatTabTaskParams', 'AddRoleTaskParams', - 'AddTeamTaskParams', 'AddToTimelineTaskParams', 'ArchiveMicrosoftTeamsChannelsTaskParams', - 'ArchiveSlackChannelsTaskParams', 'AttachDatadogDashboardsTaskParams', 'AutoAssignRoleOpsgenieTaskParams', - 'AutoAssignRoleRootlyTaskParams', 'AutoAssignRoleVictorOpsTaskParams', 'CallPeopleTaskParams', - 'ChangeSlackChannelPrivacyTaskParams', 'CreateAirtableTableRecordTaskParams', - 'CreateAnthropicChatCompletionTaskParams', 'CreateAsanaSubtaskTaskParams', 'CreateAsanaTaskTaskParams', - 'CreateClickupTaskTaskParams', 'CreateCodaPageTaskParams', 'CreateConfluencePageTaskParams', - 'CreateDatadogNotebookTaskParams', 'CreateDropboxPaperPageTaskParams', 'CreateGithubIssueTaskParams', - 'CreateGitlabIssueTaskParams', 'CreateGoToMeetingTaskParams', 'CreateGoogleCalendarEventTaskParams', - 'CreateGoogleDocsPageTaskParams', 'CreateGoogleDocsPermissionsTaskParams', - 'CreateGoogleGeminiChatCompletionTaskParams', 'CreateGoogleMeetingTaskParams', - 'CreateIncidentPostmortemTaskParams', 'CreateIncidentTaskParams', 'CreateJiraIssueTaskParams', - 'CreateJiraSubtaskTaskParams', 'CreateLinearIssueCommentTaskParams', 'CreateLinearIssueTaskParams', - 'CreateLinearSubtaskIssueTaskParams', 'CreateMicrosoftTeamsChannelTaskParams', - 'CreateMicrosoftTeamsChatTaskParams', 'CreateMicrosoftTeamsMeetingTaskParams', - 'CreateMistralChatCompletionTaskParams', 'CreateMotionTaskTaskParams', 'CreateNotionPageTaskParams', - 'CreateOpenaiChatCompletionTaskParams', 'CreateOpsgenieAlertTaskParams', 'CreateOutlookEventTaskParams', - 'CreatePagerdutyStatusUpdateTaskParams', 'CreatePagertreeAlertTaskParams', 'CreateQuipPageTaskParams', - 'CreateServiceNowIncidentTaskParams', 'CreateSharepointPageTaskParams', 'CreateShortcutTaskTaskParams', - 'CreateSlackChannelTaskParams', 'CreateSubIncidentTaskParams', 'CreateTrelloCardTaskParams', - 'CreateWatsonxChatCompletionTaskParams', 'CreateWebexMeetingTaskParams', 'CreateZendeskJiraLinkTaskParams', - 'CreateZendeskTicketTaskParams', 'CreateZoomMeetingTaskParams', 'GetAlertsTaskParams', 'GetPulsesTaskParams', - 'HttpClientTaskParams', 'InviteToMicrosoftTeamsChannelTaskParams', 'InviteToSlackChannelOpsgenieTaskParams', - 'InviteToSlackChannelRootlyTaskParams', 'InviteToSlackChannelVictorOpsTaskParams', - 'PageOpsgenieOnCallRespondersTaskParams', 'PagePagerdutyOnCallRespondersTaskParams', - 'PageRootlyOnCallRespondersTaskParams', 'PrintTaskParams', 'PublishIncidentTaskParams', 'RedisClientTaskParams', - 'RemoveGoogleDocsPermissionsTaskParams', 'RenameMicrosoftTeamsChannelTaskParams', - 'RenameSlackChannelTaskParams', 'RunCommandHerokuTaskParams', 'SendDashboardReportTaskParams', - 'SendEmailTaskParams', 'SendMicrosoftTeamsChatMessageTaskParams', 'SendSmsTaskParams', - 'SendWhatsappMessageTaskParams', 'SnapshotDatadogGraphTaskParams', 'SnapshotGrafanaDashboardTaskParams', - 'SnapshotLookerLookTaskParams', 'SnapshotNewRelicGraphTaskParams', 'TriggerWorkflowTaskParams', - 'TweetTwitterMessageTaskParams', 'UpdateActionItemTaskParams', 'UpdateAirtableTableRecordTaskParams', - 'UpdateAsanaTaskTaskParams', 'UpdateAttachedAlertsTaskParams', 'UpdateClickupTaskTaskParams', - 'UpdateCodaPageTaskParams', 'UpdateConfluencePageTaskParams', 'UpdateDatadogNotebookTaskParams', - 'UpdateDropboxPaperPageTaskParams', 'UpdateGithubIssueTaskParams', 'UpdateGitlabIssueTaskParams', - 'UpdateGoogleCalendarEventTaskParams', 'UpdateGoogleDocsPageTaskParams', 'UpdateIncidentPostmortemTaskParams', - 'UpdateIncidentStatusTimestampTaskParams', 'UpdateIncidentTaskParams', 'UpdateJiraIssueTaskParams', - 'UpdateLinearIssueTaskParams', 'UpdateMotionTaskTaskParams', 'UpdateNotionPageTaskParams', - 'UpdateOpsgenieAlertTaskParams', 'UpdateOpsgenieIncidentTaskParams', 'UpdatePagerdutyIncidentTaskParams', - 'UpdatePagertreeAlertTaskParams', 'UpdateQuipPageTaskParams', 'UpdateServiceNowIncidentTaskParams', - 'UpdateSharepointPageTaskParams', 'UpdateShortcutStoryTaskParams', 'UpdateShortcutTaskTaskParams', - 'UpdateSlackChannelTopicTaskParams', 'UpdateStatusTaskParams', 'UpdateTrelloCardTaskParams', - 'UpdateVictorOpsIncidentTaskParams', 'UpdateZendeskTicketTaskParams', Any]): + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddRoleTaskParams | + AddTeamTaskParams | AddToTimelineTaskParams | Any | ArchiveMicrosoftTeamsChannelsTaskParams | + ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams | AutoAssignRoleOpsgenieTaskParams | + AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams | + ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | + CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | CreateAsanaTaskTaskParams | + CreateClickupTaskTaskParams | CreateCodaPageTaskParams | CreateConfluencePageTaskParams | + CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | CreateGithubIssueTaskParams | + CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | CreateGoogleDocsPageTaskParams | + CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams | + CreateGoogleMeetingTaskParams | CreateGoToMeetingTaskParams | CreateIncidentPostmortemTaskParams | + CreateIncidentTaskParams | CreateJiraIssueTaskParams | CreateJiraSubtaskTaskParams | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams | CreateLinearIssueTaskParams | CreateLinearSubtaskIssueTaskParams | + CreateMicrosoftTeamsChannelTaskParams | CreateMicrosoftTeamsChatTaskParams | + CreateMicrosoftTeamsMeetingTaskParams | CreateMistralChatCompletionTaskParams | CreateMotionTaskTaskParams | + CreateNotionPageTaskParams | CreateOpenaiChatCompletionTaskParams | CreateOpsgenieAlertTaskParams | + CreateOutlookEventTaskParams | CreatePagerdutyStatusUpdateTaskParams | CreatePagertreeAlertTaskParams | + CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams | + CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams | + CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | CreateWebexMeetingTaskParams | + CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | + GetAlertsTaskParams | GetPulsesTaskParams | HttpClientTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | + PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | + PageRootlyOnCallRespondersTaskParams | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | + RemoveGoogleDocsPermissionsTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | + RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams | + SendMicrosoftTeamsChatMessageTaskParams | SendSmsTaskParams | SendWhatsappMessageTaskParams | + SnapshotDatadogGraphTaskParams | SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | + SnapshotNewRelicGraphTaskParams | TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | + UpdateActionItemTaskParams | UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | + UpdateAttachedAlertsTaskParams | UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | + UpdateConfluencePageTaskParams | UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | + UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | + UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | + UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | + UpdatePagerdutyIncidentTaskParams | UpdatePagertreeAlertTaskParams | UpdateQuipPageTaskParams | + UpdateServiceNowIncidentTaskParams | UpdateSharepointPageTaskParams | UpdateShortcutStoryTaskParams | + UpdateShortcutTaskTaskParams | UpdateSlackChannelTopicTaskParams | UpdateStatusTaskParams | + UpdateTrelloCardTaskParams | UpdateVictorOpsIncidentTaskParams | UpdateZendeskTicketTaskParams): position (int): The position of the workflow task skip_on_failure (bool): Skip workflow task if any failures enabled (bool): Enable/disable workflow task Default: True. created_at (str): Date of creation updated_at (str): Date of last update - name (Union[Unset, str]): Name of the workflow task + name (str | Unset): Name of the workflow task """ workflow_id: str - task_params: Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - ] + task_params: ( + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams + ) position: int skip_on_failure: bool created_at: str updated_at: str enabled: bool = True - name: Unset | str = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -359,6 +364,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -392,6 +398,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -603,6 +610,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpsgenieAlertTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateJsmopsAlertTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageJsmopsOnCallRespondersTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateOpsgenieAlertTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateOpsgenieIncidentTaskParams): @@ -764,6 +775,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams @@ -797,6 +809,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams @@ -858,138 +871,140 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def _parse_task_params( data: object, - ) -> Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - ]: + ) -> ( + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams + ): try: if not isinstance(data, dict): raise TypeError() task_params_type_0 = AddActionItemTaskParams.from_dict(data) return task_params_type_0 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -997,7 +1012,7 @@ def _parse_task_params( task_params_type_1 = UpdateActionItemTaskParams.from_dict(data) return task_params_type_1 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1005,7 +1020,7 @@ def _parse_task_params( task_params_type_2 = AddRoleTaskParams.from_dict(data) return task_params_type_2 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1013,7 +1028,7 @@ def _parse_task_params( task_params_type_4 = AddTeamTaskParams.from_dict(data) return task_params_type_4 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1021,7 +1036,7 @@ def _parse_task_params( task_params_type_5 = AddToTimelineTaskParams.from_dict(data) return task_params_type_5 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1029,7 +1044,7 @@ def _parse_task_params( task_params_type_6 = ArchiveSlackChannelsTaskParams.from_dict(data) return task_params_type_6 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1037,7 +1052,7 @@ def _parse_task_params( task_params_type_7 = AttachDatadogDashboardsTaskParams.from_dict(data) return task_params_type_7 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1045,7 +1060,7 @@ def _parse_task_params( task_params_type_8 = AutoAssignRoleOpsgenieTaskParams.from_dict(data) return task_params_type_8 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1053,7 +1068,7 @@ def _parse_task_params( task_params_type_9 = AutoAssignRoleRootlyTaskParams.from_dict(data) return task_params_type_9 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1061,7 +1076,7 @@ def _parse_task_params( task_params_type_11 = UpdatePagerdutyIncidentTaskParams.from_dict(data) return task_params_type_11 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1069,7 +1084,7 @@ def _parse_task_params( task_params_type_12 = CreatePagerdutyStatusUpdateTaskParams.from_dict(data) return task_params_type_12 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1077,7 +1092,7 @@ def _parse_task_params( task_params_type_13 = CreatePagertreeAlertTaskParams.from_dict(data) return task_params_type_13 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1085,7 +1100,7 @@ def _parse_task_params( task_params_type_14 = UpdatePagertreeAlertTaskParams.from_dict(data) return task_params_type_14 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1093,7 +1108,7 @@ def _parse_task_params( task_params_type_15 = AutoAssignRoleVictorOpsTaskParams.from_dict(data) return task_params_type_15 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1101,7 +1116,7 @@ def _parse_task_params( task_params_type_16 = CallPeopleTaskParams.from_dict(data) return task_params_type_16 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1109,7 +1124,7 @@ def _parse_task_params( task_params_type_17 = CreateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_17 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1117,7 +1132,7 @@ def _parse_task_params( task_params_type_18 = CreateAsanaSubtaskTaskParams.from_dict(data) return task_params_type_18 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1125,7 +1140,7 @@ def _parse_task_params( task_params_type_19 = CreateAsanaTaskTaskParams.from_dict(data) return task_params_type_19 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1133,7 +1148,7 @@ def _parse_task_params( task_params_type_20 = CreateConfluencePageTaskParams.from_dict(data) return task_params_type_20 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1141,7 +1156,7 @@ def _parse_task_params( task_params_type_21 = CreateDatadogNotebookTaskParams.from_dict(data) return task_params_type_21 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1149,7 +1164,7 @@ def _parse_task_params( task_params_type_22 = CreateCodaPageTaskParams.from_dict(data) return task_params_type_22 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1157,7 +1172,7 @@ def _parse_task_params( task_params_type_23 = CreateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_23 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1165,7 +1180,7 @@ def _parse_task_params( task_params_type_24 = CreateGithubIssueTaskParams.from_dict(data) return task_params_type_24 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1173,7 +1188,7 @@ def _parse_task_params( task_params_type_25 = CreateGitlabIssueTaskParams.from_dict(data) return task_params_type_25 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1181,7 +1196,7 @@ def _parse_task_params( task_params_type_26 = CreateOutlookEventTaskParams.from_dict(data) return task_params_type_26 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1189,7 +1204,7 @@ def _parse_task_params( task_params_type_27 = CreateGoogleCalendarEventTaskParams.from_dict(data) return task_params_type_27 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1197,7 +1212,7 @@ def _parse_task_params( task_params_type_28 = UpdateGoogleDocsPageTaskParams.from_dict(data) return task_params_type_28 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1205,7 +1220,7 @@ def _parse_task_params( task_params_type_29 = UpdateCodaPageTaskParams.from_dict(data) return task_params_type_29 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1213,7 +1228,7 @@ def _parse_task_params( task_params_type_30 = UpdateGoogleCalendarEventTaskParams.from_dict(data) return task_params_type_30 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1221,7 +1236,7 @@ def _parse_task_params( task_params_type_31 = CreateSharepointPageTaskParams.from_dict(data) return task_params_type_31 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1229,7 +1244,7 @@ def _parse_task_params( task_params_type_32 = CreateGoogleDocsPageTaskParams.from_dict(data) return task_params_type_32 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1237,7 +1252,7 @@ def _parse_task_params( task_params_type_33 = CreateGoogleDocsPermissionsTaskParams.from_dict(data) return task_params_type_33 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1245,7 +1260,7 @@ def _parse_task_params( task_params_type_34 = RemoveGoogleDocsPermissionsTaskParams.from_dict(data) return task_params_type_34 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1253,7 +1268,7 @@ def _parse_task_params( task_params_type_35 = CreateQuipPageTaskParams.from_dict(data) return task_params_type_35 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1261,7 +1276,7 @@ def _parse_task_params( task_params_type_36 = CreateGoogleMeetingTaskParams.from_dict(data) return task_params_type_36 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1269,7 +1284,7 @@ def _parse_task_params( task_params_type_37 = CreateGoToMeetingTaskParams.from_dict(data) return task_params_type_37 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1277,7 +1292,7 @@ def _parse_task_params( task_params_type_38 = CreateIncidentTaskParams.from_dict(data) return task_params_type_38 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1285,7 +1300,7 @@ def _parse_task_params( task_params_type_39 = CreateSubIncidentTaskParams.from_dict(data) return task_params_type_39 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1293,7 +1308,7 @@ def _parse_task_params( task_params_type_40 = CreateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_40 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1301,7 +1316,7 @@ def _parse_task_params( task_params_type_41 = CreateJiraIssueTaskParams.from_dict(data) return task_params_type_41 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1309,7 +1324,7 @@ def _parse_task_params( task_params_type_42 = CreateJiraSubtaskTaskParams.from_dict(data) return task_params_type_42 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1317,7 +1332,7 @@ def _parse_task_params( task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_43 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1325,7 +1340,7 @@ def _parse_task_params( task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_44 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1333,7 +1348,7 @@ def _parse_task_params( task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_45 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1341,7 +1356,7 @@ def _parse_task_params( task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_46 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1349,7 +1364,7 @@ def _parse_task_params( task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_47 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1357,7 +1372,7 @@ def _parse_task_params( task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) return task_params_type_48 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1365,7 +1380,7 @@ def _parse_task_params( task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_50 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1373,7 +1388,7 @@ def _parse_task_params( task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_51 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1381,7 +1396,7 @@ def _parse_task_params( task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_52 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1389,7 +1404,7 @@ def _parse_task_params( task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_53 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1397,7 +1412,7 @@ def _parse_task_params( task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_54 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1405,7 +1420,7 @@ def _parse_task_params( task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) return task_params_type_56 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1413,7 +1428,7 @@ def _parse_task_params( task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_58 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1421,7 +1436,7 @@ def _parse_task_params( task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_59 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1429,7 +1444,7 @@ def _parse_task_params( task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_60 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1437,7 +1452,7 @@ def _parse_task_params( task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_61 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1445,7 +1460,7 @@ def _parse_task_params( task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_62 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1453,7 +1468,7 @@ def _parse_task_params( task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_63 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1461,7 +1476,7 @@ def _parse_task_params( task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_64 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1469,7 +1484,7 @@ def _parse_task_params( task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) return task_params_type_66 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1477,7 +1492,7 @@ def _parse_task_params( task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_67 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1485,7 +1500,7 @@ def _parse_task_params( task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_68 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1493,7 +1508,7 @@ def _parse_task_params( task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_69 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1501,7 +1516,7 @@ def _parse_task_params( task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_70 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1509,7 +1524,7 @@ def _parse_task_params( task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_71 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1517,7 +1532,7 @@ def _parse_task_params( task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) return task_params_type_72 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1525,7 +1540,7 @@ def _parse_task_params( task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) return task_params_type_73 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1533,7 +1548,7 @@ def _parse_task_params( task_params_type_76 = GetPulsesTaskParams.from_dict(data) return task_params_type_76 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1541,7 +1556,7 @@ def _parse_task_params( task_params_type_77 = GetAlertsTaskParams.from_dict(data) return task_params_type_77 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1549,7 +1564,7 @@ def _parse_task_params( task_params_type_78 = HttpClientTaskParams.from_dict(data) return task_params_type_78 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1557,7 +1572,7 @@ def _parse_task_params( task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_79 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1565,7 +1580,7 @@ def _parse_task_params( task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_80 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1573,7 +1588,7 @@ def _parse_task_params( task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_83 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1581,7 +1596,7 @@ def _parse_task_params( task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_84 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): @@ -1589,502 +1604,518 @@ def _parse_task_params( task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_85 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_86 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_87 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_88 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_89 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) - return task_params_type_91 - except: # noqa: E722 + return task_params_type_90 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_92 = PrintTaskParams.from_dict(data) + task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) - return task_params_type_92 - except: # noqa: E722 + return task_params_type_91 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = PublishIncidentTaskParams.from_dict(data) + task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) return task_params_type_93 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = RedisClientTaskParams.from_dict(data) + task_params_type_94 = PrintTaskParams.from_dict(data) return task_params_type_94 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_95 = PublishIncidentTaskParams.from_dict(data) return task_params_type_95 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_96 = RedisClientTaskParams.from_dict(data) return task_params_type_96 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_97 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = SendEmailTaskParams.from_dict(data) + task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_98 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_99 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = CreateSlackChannelTaskParams.from_dict(data) + task_params_type_100 = SendEmailTaskParams.from_dict(data) return task_params_type_100 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = SendSmsTaskParams.from_dict(data) + task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) - return task_params_type_102 - except: # noqa: E722 + return task_params_type_101 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_103 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) - return task_params_type_103 - except: # noqa: E722 + return task_params_type_102 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_104 = SendSmsTaskParams.from_dict(data) return task_params_type_104 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_105 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_106 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_107 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_108 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_109 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_110 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateGithubIssueTaskParams.from_dict(data) + task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_111 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateGitlabIssueTaskParams.from_dict(data) + task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_112 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_113 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_114 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_115 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_116 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_117 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_118 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_119 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_120 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateStatusTaskParams.from_dict(data) + task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) return task_params_type_121 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_122 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_123 = UpdateStatusTaskParams.from_dict(data) return task_params_type_123 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_124 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_125 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_126 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) return task_params_type_127 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) return task_params_type_128 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) - return task_params_type_130 - except: # noqa: E722 + return task_params_type_129 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_131 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) - return task_params_type_131 - except: # noqa: E722 + return task_params_type_130 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) return task_params_type_132 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) return task_params_type_133 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) return task_params_type_134 - except: # noqa: E722 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_135 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_136 + except (TypeError, ValueError, AttributeError, KeyError): pass return cast( - Union[ - "AddActionItemTaskParams", - "AddMicrosoftTeamsChatTabTaskParams", - "AddRoleTaskParams", - "AddTeamTaskParams", - "AddToTimelineTaskParams", - "ArchiveMicrosoftTeamsChannelsTaskParams", - "ArchiveSlackChannelsTaskParams", - "AttachDatadogDashboardsTaskParams", - "AutoAssignRoleOpsgenieTaskParams", - "AutoAssignRoleRootlyTaskParams", - "AutoAssignRoleVictorOpsTaskParams", - "CallPeopleTaskParams", - "ChangeSlackChannelPrivacyTaskParams", - "CreateAirtableTableRecordTaskParams", - "CreateAnthropicChatCompletionTaskParams", - "CreateAsanaSubtaskTaskParams", - "CreateAsanaTaskTaskParams", - "CreateClickupTaskTaskParams", - "CreateCodaPageTaskParams", - "CreateConfluencePageTaskParams", - "CreateDatadogNotebookTaskParams", - "CreateDropboxPaperPageTaskParams", - "CreateGithubIssueTaskParams", - "CreateGitlabIssueTaskParams", - "CreateGoToMeetingTaskParams", - "CreateGoogleCalendarEventTaskParams", - "CreateGoogleDocsPageTaskParams", - "CreateGoogleDocsPermissionsTaskParams", - "CreateGoogleGeminiChatCompletionTaskParams", - "CreateGoogleMeetingTaskParams", - "CreateIncidentPostmortemTaskParams", - "CreateIncidentTaskParams", - "CreateJiraIssueTaskParams", - "CreateJiraSubtaskTaskParams", - "CreateLinearIssueCommentTaskParams", - "CreateLinearIssueTaskParams", - "CreateLinearSubtaskIssueTaskParams", - "CreateMicrosoftTeamsChannelTaskParams", - "CreateMicrosoftTeamsChatTaskParams", - "CreateMicrosoftTeamsMeetingTaskParams", - "CreateMistralChatCompletionTaskParams", - "CreateMotionTaskTaskParams", - "CreateNotionPageTaskParams", - "CreateOpenaiChatCompletionTaskParams", - "CreateOpsgenieAlertTaskParams", - "CreateOutlookEventTaskParams", - "CreatePagerdutyStatusUpdateTaskParams", - "CreatePagertreeAlertTaskParams", - "CreateQuipPageTaskParams", - "CreateServiceNowIncidentTaskParams", - "CreateSharepointPageTaskParams", - "CreateShortcutTaskTaskParams", - "CreateSlackChannelTaskParams", - "CreateSubIncidentTaskParams", - "CreateTrelloCardTaskParams", - "CreateWatsonxChatCompletionTaskParams", - "CreateWebexMeetingTaskParams", - "CreateZendeskJiraLinkTaskParams", - "CreateZendeskTicketTaskParams", - "CreateZoomMeetingTaskParams", - "GetAlertsTaskParams", - "GetPulsesTaskParams", - "HttpClientTaskParams", - "InviteToMicrosoftTeamsChannelTaskParams", - "InviteToSlackChannelOpsgenieTaskParams", - "InviteToSlackChannelRootlyTaskParams", - "InviteToSlackChannelVictorOpsTaskParams", - "PageOpsgenieOnCallRespondersTaskParams", - "PagePagerdutyOnCallRespondersTaskParams", - "PageRootlyOnCallRespondersTaskParams", - "PrintTaskParams", - "PublishIncidentTaskParams", - "RedisClientTaskParams", - "RemoveGoogleDocsPermissionsTaskParams", - "RenameMicrosoftTeamsChannelTaskParams", - "RenameSlackChannelTaskParams", - "RunCommandHerokuTaskParams", - "SendDashboardReportTaskParams", - "SendEmailTaskParams", - "SendMicrosoftTeamsChatMessageTaskParams", - "SendSmsTaskParams", - "SendWhatsappMessageTaskParams", - "SnapshotDatadogGraphTaskParams", - "SnapshotGrafanaDashboardTaskParams", - "SnapshotLookerLookTaskParams", - "SnapshotNewRelicGraphTaskParams", - "TriggerWorkflowTaskParams", - "TweetTwitterMessageTaskParams", - "UpdateActionItemTaskParams", - "UpdateAirtableTableRecordTaskParams", - "UpdateAsanaTaskTaskParams", - "UpdateAttachedAlertsTaskParams", - "UpdateClickupTaskTaskParams", - "UpdateCodaPageTaskParams", - "UpdateConfluencePageTaskParams", - "UpdateDatadogNotebookTaskParams", - "UpdateDropboxPaperPageTaskParams", - "UpdateGithubIssueTaskParams", - "UpdateGitlabIssueTaskParams", - "UpdateGoogleCalendarEventTaskParams", - "UpdateGoogleDocsPageTaskParams", - "UpdateIncidentPostmortemTaskParams", - "UpdateIncidentStatusTimestampTaskParams", - "UpdateIncidentTaskParams", - "UpdateJiraIssueTaskParams", - "UpdateLinearIssueTaskParams", - "UpdateMotionTaskTaskParams", - "UpdateNotionPageTaskParams", - "UpdateOpsgenieAlertTaskParams", - "UpdateOpsgenieIncidentTaskParams", - "UpdatePagerdutyIncidentTaskParams", - "UpdatePagertreeAlertTaskParams", - "UpdateQuipPageTaskParams", - "UpdateServiceNowIncidentTaskParams", - "UpdateSharepointPageTaskParams", - "UpdateShortcutStoryTaskParams", - "UpdateShortcutTaskTaskParams", - "UpdateSlackChannelTopicTaskParams", - "UpdateStatusTaskParams", - "UpdateTrelloCardTaskParams", - "UpdateVictorOpsIncidentTaskParams", - "UpdateZendeskTicketTaskParams", - Any, - ], + AddActionItemTaskParams + | AddMicrosoftTeamsChatTabTaskParams + | AddRoleTaskParams + | AddTeamTaskParams + | AddToTimelineTaskParams + | Any + | ArchiveMicrosoftTeamsChannelsTaskParams + | ArchiveSlackChannelsTaskParams + | AttachDatadogDashboardsTaskParams + | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRoleRootlyTaskParams + | AutoAssignRoleVictorOpsTaskParams + | CallPeopleTaskParams + | ChangeSlackChannelPrivacyTaskParams + | CreateAirtableTableRecordTaskParams + | CreateAnthropicChatCompletionTaskParams + | CreateAsanaSubtaskTaskParams + | CreateAsanaTaskTaskParams + | CreateClickupTaskTaskParams + | CreateCodaPageTaskParams + | CreateConfluencePageTaskParams + | CreateDatadogNotebookTaskParams + | CreateDropboxPaperPageTaskParams + | CreateGithubIssueTaskParams + | CreateGitlabIssueTaskParams + | CreateGoogleCalendarEventTaskParams + | CreateGoogleDocsPageTaskParams + | CreateGoogleDocsPermissionsTaskParams + | CreateGoogleGeminiChatCompletionTaskParams + | CreateGoogleMeetingTaskParams + | CreateGoToMeetingTaskParams + | CreateIncidentPostmortemTaskParams + | CreateIncidentTaskParams + | CreateJiraIssueTaskParams + | CreateJiraSubtaskTaskParams + | CreateJsmopsAlertTaskParams + | CreateLinearIssueCommentTaskParams + | CreateLinearIssueTaskParams + | CreateLinearSubtaskIssueTaskParams + | CreateMicrosoftTeamsChannelTaskParams + | CreateMicrosoftTeamsChatTaskParams + | CreateMicrosoftTeamsMeetingTaskParams + | CreateMistralChatCompletionTaskParams + | CreateMotionTaskTaskParams + | CreateNotionPageTaskParams + | CreateOpenaiChatCompletionTaskParams + | CreateOpsgenieAlertTaskParams + | CreateOutlookEventTaskParams + | CreatePagerdutyStatusUpdateTaskParams + | CreatePagertreeAlertTaskParams + | CreateQuipPageTaskParams + | CreateServiceNowIncidentTaskParams + | CreateSharepointPageTaskParams + | CreateShortcutTaskTaskParams + | CreateSlackChannelTaskParams + | CreateSubIncidentTaskParams + | CreateTrelloCardTaskParams + | CreateWatsonxChatCompletionTaskParams + | CreateWebexMeetingTaskParams + | CreateZendeskJiraLinkTaskParams + | CreateZendeskTicketTaskParams + | CreateZoomMeetingTaskParams + | GetAlertsTaskParams + | GetPulsesTaskParams + | HttpClientTaskParams + | InviteToMicrosoftTeamsChannelTaskParams + | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelVictorOpsTaskParams + | PageJsmopsOnCallRespondersTaskParams + | PageOpsgenieOnCallRespondersTaskParams + | PagePagerdutyOnCallRespondersTaskParams + | PageRootlyOnCallRespondersTaskParams + | PrintTaskParams + | PublishIncidentTaskParams + | RedisClientTaskParams + | RemoveGoogleDocsPermissionsTaskParams + | RenameMicrosoftTeamsChannelTaskParams + | RenameSlackChannelTaskParams + | RunCommandHerokuTaskParams + | SendDashboardReportTaskParams + | SendEmailTaskParams + | SendMicrosoftTeamsChatMessageTaskParams + | SendSmsTaskParams + | SendWhatsappMessageTaskParams + | SnapshotDatadogGraphTaskParams + | SnapshotGrafanaDashboardTaskParams + | SnapshotLookerLookTaskParams + | SnapshotNewRelicGraphTaskParams + | TriggerWorkflowTaskParams + | TweetTwitterMessageTaskParams + | UpdateActionItemTaskParams + | UpdateAirtableTableRecordTaskParams + | UpdateAsanaTaskTaskParams + | UpdateAttachedAlertsTaskParams + | UpdateClickupTaskTaskParams + | UpdateCodaPageTaskParams + | UpdateConfluencePageTaskParams + | UpdateDatadogNotebookTaskParams + | UpdateDropboxPaperPageTaskParams + | UpdateGithubIssueTaskParams + | UpdateGitlabIssueTaskParams + | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleDocsPageTaskParams + | UpdateIncidentPostmortemTaskParams + | UpdateIncidentStatusTimestampTaskParams + | UpdateIncidentTaskParams + | UpdateJiraIssueTaskParams + | UpdateLinearIssueTaskParams + | UpdateMotionTaskTaskParams + | UpdateNotionPageTaskParams + | UpdateOpsgenieAlertTaskParams + | UpdateOpsgenieIncidentTaskParams + | UpdatePagerdutyIncidentTaskParams + | UpdatePagertreeAlertTaskParams + | UpdateQuipPageTaskParams + | UpdateServiceNowIncidentTaskParams + | UpdateSharepointPageTaskParams + | UpdateShortcutStoryTaskParams + | UpdateShortcutTaskTaskParams + | UpdateSlackChannelTopicTaskParams + | UpdateStatusTaskParams + | UpdateTrelloCardTaskParams + | UpdateVictorOpsIncidentTaskParams + | UpdateZendeskTicketTaskParams, data, ) diff --git a/rootly_sdk/models/workflow_task_list.py b/rootly_sdk/models/workflow_task_list.py index 4aeb2ab0..a42b27fd 100644 --- a/rootly_sdk/models/workflow_task_list.py +++ b/rootly_sdk/models/workflow_task_list.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,14 +19,14 @@ class WorkflowTaskList: """ Attributes: - data (list['WorkflowTaskListDataItem']): + data (list[WorkflowTaskListDataItem]): links (Links): meta (Meta): """ - data: list["WorkflowTaskListDataItem"] - links: "Links" - meta: "Meta" + data: list[WorkflowTaskListDataItem] + links: Links + meta: Meta additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_task_list_data_item.py b/rootly_sdk/models/workflow_task_list_data_item.py index 43d4b2c7..eb0f4179 100644 --- a/rootly_sdk/models/workflow_task_list_data_item.py +++ b/rootly_sdk/models/workflow_task_list_data_item.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowTaskListDataItem: id: str type_: WorkflowTaskListDataItemType - attributes: "WorkflowTask" + attributes: WorkflowTask additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_task_response.py b/rootly_sdk/models/workflow_task_response.py index 571f15fd..d23213d3 100644 --- a/rootly_sdk/models/workflow_task_response.py +++ b/rootly_sdk/models/workflow_task_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class WorkflowTaskResponse: data (WorkflowTaskResponseData): """ - data: "WorkflowTaskResponseData" + data: WorkflowTaskResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/models/workflow_task_response_data.py b/rootly_sdk/models/workflow_task_response_data.py index 73762081..a042e828 100644 --- a/rootly_sdk/models/workflow_task_response_data.py +++ b/rootly_sdk/models/workflow_task_response_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -27,7 +29,7 @@ class WorkflowTaskResponseData: id: str type_: WorkflowTaskResponseDataType - attributes: "WorkflowTask" + attributes: WorkflowTask additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/rootly_sdk/types.py b/rootly_sdk/types.py index e4114a42..b64af095 100644 --- a/rootly_sdk/types.py +++ b/rootly_sdk/types.py @@ -1,7 +1,5 @@ """Contains some shared types for properties""" -from __future__ import annotations - from collections.abc import Mapping, MutableMapping from http import HTTPStatus from typing import IO, BinaryIO, Generic, Literal, TypeVar From 83bbb01876c3f1324963992e3386609244d1d021 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Wed, 22 Apr 2026 08:13:25 -0700 Subject: [PATCH 2/7] Fix escalation path generation with OpenAPI spec patching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The real issue was not anyOf vs oneOf — openapi-python-client cannot handle inline oneOf variants (objects with properties/required but no $ref). Additionally, the upstream spec has urgency_ids arrays missing items definitions. Added tools/fix_openapi_escalation_paths.py that: - Extracts inline rule variants into named component schemas - Fixes arrays missing items definitions - Replaces inline definitions with $ref pointers Escalation path endpoints now fully generate with typed rule models: alert_urgency, working_hour, json_path, field, service, deferral_window. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CHANGELOG.md | 7 +- .../create_escalation_path.py | 195 ++++++++ .../update_escalation_path.py | 190 ++++++++ rootly_sdk/models/__init__.py | 204 ++++---- ... => escalation_path_rule_alert_urgency.py} | 22 +- ...ation_path_rule_alert_urgency_rule_type.py | 19 + ...> escalation_path_rule_deferral_window.py} | 48 +- ...ion_path_rule_deferral_window_rule_type.py | 19 + ..._rule_deferral_window_time_blocks_item.py} | 10 +- ...on_path_rule_deferral_window_time_zone.py} | 14 +- ...ype_3.py => escalation_path_rule_field.py} | 34 +- ...=> escalation_path_rule_field_operator.py} | 16 +- .../escalation_path_rule_field_rule_type.py | 15 + ...2.py => escalation_path_rule_json_path.py} | 34 +- ...escalation_path_rule_json_path_operator.py | 22 + ...scalation_path_rule_json_path_rule_type.py | 15 + ...e_4.py => escalation_path_rule_service.py} | 22 +- .../escalation_path_rule_service_rule_type.py | 15 + ...y => escalation_path_rule_working_hour.py} | 22 +- ...lation_path_rule_working_hour_rule_type.py | 19 + rootly_sdk/models/escalation_policy_path.py | 316 +++---------- ...policy_path_rules_item_type_0_rule_type.py | 19 - ...policy_path_rules_item_type_1_rule_type.py | 19 - ..._policy_path_rules_item_type_2_operator.py | 26 -- ...policy_path_rules_item_type_2_rule_type.py | 19 - ...policy_path_rules_item_type_3_rule_type.py | 19 - ...policy_path_rules_item_type_4_rule_type.py | 19 - ...policy_path_rules_item_type_5_rule_type.py | 19 - ...on_policy_path_rules_item_type_6_type_0.py | 74 --- ...path_rules_item_type_6_type_0_rule_type.py | 21 - ...on_policy_path_rules_item_type_6_type_1.py | 74 --- ...path_rules_item_type_6_type_1_rule_type.py | 21 - ...on_policy_path_rules_item_type_6_type_2.py | 118 ----- ..._path_rules_item_type_6_type_2_operator.py | 28 -- ...path_rules_item_type_6_type_2_rule_type.py | 21 - ...on_policy_path_rules_item_type_6_type_3.py | 106 ----- ..._path_rules_item_type_6_type_3_operator.py | 49 -- ...path_rules_item_type_6_type_3_rule_type.py | 21 - ...on_policy_path_rules_item_type_6_type_4.py | 74 --- ...path_rules_item_type_6_type_4_rule_type.py | 21 - ...on_policy_path_rules_item_type_6_type_5.py | 105 ----- ...path_rules_item_type_6_type_5_rule_type.py | 21 - ...les_item_type_6_type_5_time_blocks_item.py | 251 ---------- ...on_policy_path_rules_item_type_7_type_0.py | 74 --- ...path_rules_item_type_7_type_0_rule_type.py | 21 - ...on_policy_path_rules_item_type_7_type_1.py | 74 --- ...path_rules_item_type_7_type_1_rule_type.py | 21 - ...on_policy_path_rules_item_type_7_type_2.py | 118 ----- ..._path_rules_item_type_7_type_2_operator.py | 28 -- ...path_rules_item_type_7_type_2_rule_type.py | 21 - ...on_policy_path_rules_item_type_7_type_3.py | 106 ----- ..._path_rules_item_type_7_type_3_operator.py | 49 -- ...path_rules_item_type_7_type_3_rule_type.py | 21 - ...on_policy_path_rules_item_type_7_type_4.py | 74 --- ...path_rules_item_type_7_type_4_rule_type.py | 21 - ...on_policy_path_rules_item_type_7_type_5.py | 105 ----- ...path_rules_item_type_7_type_5_rule_type.py | 21 - ...les_item_type_7_type_5_time_blocks_item.py | 251 ---------- .../models/new_escalation_policy_path.py | 67 +++ .../models/new_escalation_policy_path_data.py | 80 ++++ ..._escalation_policy_path_data_attributes.py | 419 +++++++++++++++++ ...data_attributes_after_deferral_behavior.py | 22 + ..._policy_path_data_attributes_match_mode.py | 20 + ..._path_data_attributes_notification_type.py | 22 + ...n_policy_path_data_attributes_path_type.py | 20 + ..._attributes_time_restriction_time_zone.py} | 16 +- ..._data_attributes_time_restrictions_item.py | 96 ++++ ...tributes_time_restrictions_item_end_day.py | 29 ++ ...ibutes_time_restrictions_item_start_day.py | 29 ++ .../new_escalation_policy_path_data_type.py | 15 + rootly_sdk/models/new_sla_data_attributes.py | 6 +- rootly_sdk/models/sla.py | 12 +- .../models/update_escalation_policy_path.py | 67 +++ .../update_escalation_policy_path_data.py | 80 ++++ ..._escalation_policy_path_data_attributes.py | 439 ++++++++++++++++++ ...data_attributes_after_deferral_behavior.py | 22 + ..._policy_path_data_attributes_match_mode.py | 22 + ..._path_data_attributes_notification_type.py | 22 + ...n_policy_path_data_attributes_path_type.py | 22 + ..._attributes_time_restriction_time_zone.py} | 16 +- ..._data_attributes_time_restrictions_item.py | 110 +++++ ...tributes_time_restrictions_item_end_day.py | 29 ++ ...ibutes_time_restrictions_item_start_day.py | 29 ++ ...update_escalation_policy_path_data_type.py | 15 + .../models/update_sla_data_attributes.py | 12 +- tools/fix_openapi_escalation_paths.py | 98 ++++ 86 files changed, 2604 insertions(+), 2640 deletions(-) create mode 100644 rootly_sdk/api/escalation_paths/create_escalation_path.py create mode 100644 rootly_sdk/api/escalation_paths/update_escalation_path.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_0.py => escalation_path_rule_alert_urgency.py} (68%) create mode 100644 rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5.py => escalation_path_rule_deferral_window.py} (52%) create mode 100644 rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5_time_blocks_item.py => escalation_path_rule_deferral_window_time_blocks_item.py} (95%) rename rootly_sdk/models/{escalation_policy_path_rules_item_type_5_time_zone.py => escalation_path_rule_deferral_window_time_zone.py} (95%) rename rootly_sdk/models/{escalation_policy_path_rules_item_type_3.py => escalation_path_rule_field.py} (66%) rename rootly_sdk/models/{escalation_policy_path_rules_item_type_3_operator.py => escalation_path_rule_field_operator.py} (51%) create mode 100644 rootly_sdk/models/escalation_path_rule_field_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_2.py => escalation_path_rule_json_path.py} (70%) create mode 100644 rootly_sdk/models/escalation_path_rule_json_path_operator.py create mode 100644 rootly_sdk/models/escalation_path_rule_json_path_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_4.py => escalation_path_rule_service.py} (68%) create mode 100644 rootly_sdk/models/escalation_path_rule_service_rule_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_1.py => escalation_path_rule_working_hour.py} (69%) create mode 100644 rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py delete mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/new_escalation_policy_path.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_after_deferral_behavior.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_match_mode.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_notification_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_path_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_7_type_5_time_zone.py => new_escalation_policy_path_data_attributes_time_restriction_time_zone.py} (94%) create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_after_deferral_behavior.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_match_mode.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_notification_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_path_type.py rename rootly_sdk/models/{escalation_policy_path_rules_item_type_6_type_5_time_zone.py => update_escalation_policy_path_data_attributes_time_restriction_time_zone.py} (94%) create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_type.py create mode 100644 tools/fix_openapi_escalation_paths.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f49c0b9..fa969c08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.3.0] - 2026-04-21 ### Added +- New Escalation Paths endpoints (create, read, update, delete, list) with typed rule models (alert urgency, working hour, JSON path, field, service, deferral window) - New API Keys endpoints (create, read, update, delete, list, rotate) - New SLA endpoints (create, read, update, delete, list) - New On-Call endpoints (list on-call users) @@ -39,10 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Some escalation policy path rule type models (consolidated in upstream spec) ### Fixed -- Applied nullable enum fix to 1,350 model files via `tools/fix_nullable_enums.py` - -### Known Issues -- Escalation path endpoints not generated due to OpenAPI schema issues with union types in `rules_item` +- Applied nullable enum fix to 1,348 model files via `tools/fix_nullable_enums.py` +- Escalation path endpoints now fully generated — added `tools/fix_openapi_escalation_paths.py` to patch inline `oneOf` variants into named `$ref` schemas and fix missing array `items` definitions ## [1.2.1] - 2025-03-02 diff --git a/rootly_sdk/api/escalation_paths/create_escalation_path.py b/rootly_sdk/api/escalation_paths/create_escalation_path.py new file mode 100644 index 00000000..169f479f --- /dev/null +++ b/rootly_sdk/api/escalation_paths/create_escalation_path.py @@ -0,0 +1,195 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.escalation_policy_path_response import EscalationPolicyPathResponse +from ...models.new_escalation_policy_path import NewEscalationPolicyPath +from ...types import Response + + +def _get_kwargs( + escalation_policy_id: str, + *, + body: NewEscalationPolicyPath, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_paths".format( + escalation_policy_id=quote(str(escalation_policy_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyPathResponse | None: + if response.status_code == 201: + response_201 = EscalationPolicyPathResponse.from_dict(response.json()) + + return response_201 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + return response_401 + + if response.status_code == 422: + response_422 = ErrorsList.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyPathResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + escalation_policy_id: str, + *, + client: AuthenticatedClient, + body: NewEscalationPolicyPath, +) -> Response[ErrorsList | EscalationPolicyPathResponse]: + """Creates an escalation path + + Creates a new escalation path from provided data + + Args: + escalation_policy_id (str): + body (NewEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | EscalationPolicyPathResponse] + """ + + kwargs = _get_kwargs( + escalation_policy_id=escalation_policy_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + escalation_policy_id: str, + *, + client: AuthenticatedClient, + body: NewEscalationPolicyPath, +) -> ErrorsList | EscalationPolicyPathResponse | None: + """Creates an escalation path + + Creates a new escalation path from provided data + + Args: + escalation_policy_id (str): + body (NewEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | EscalationPolicyPathResponse + """ + + return sync_detailed( + escalation_policy_id=escalation_policy_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + escalation_policy_id: str, + *, + client: AuthenticatedClient, + body: NewEscalationPolicyPath, +) -> Response[ErrorsList | EscalationPolicyPathResponse]: + """Creates an escalation path + + Creates a new escalation path from provided data + + Args: + escalation_policy_id (str): + body (NewEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | EscalationPolicyPathResponse] + """ + + kwargs = _get_kwargs( + escalation_policy_id=escalation_policy_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + escalation_policy_id: str, + *, + client: AuthenticatedClient, + body: NewEscalationPolicyPath, +) -> ErrorsList | EscalationPolicyPathResponse | None: + """Creates an escalation path + + Creates a new escalation path from provided data + + Args: + escalation_policy_id (str): + body (NewEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | EscalationPolicyPathResponse + """ + + return ( + await asyncio_detailed( + escalation_policy_id=escalation_policy_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_paths/update_escalation_path.py b/rootly_sdk/api/escalation_paths/update_escalation_path.py new file mode 100644 index 00000000..ccbf345f --- /dev/null +++ b/rootly_sdk/api/escalation_paths/update_escalation_path.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.errors_list import ErrorsList +from ...models.escalation_policy_path_response import EscalationPolicyPathResponse +from ...models.update_escalation_policy_path import UpdateEscalationPolicyPath +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UpdateEscalationPolicyPath, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/escalation_paths/{id}".format( + id=quote(str(id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/vnd.api+json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyPathResponse | None: + if response.status_code == 200: + response_200 = EscalationPolicyPathResponse.from_dict(response.json()) + + return response_200 + + if response.status_code == 404: + response_404 = ErrorsList.from_dict(response.json()) + + return response_404 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyPathResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateEscalationPolicyPath, +) -> Response[ErrorsList | EscalationPolicyPathResponse]: + """Update an escalation path + + Update a specific escalation path by id + + Args: + id (str): + body (UpdateEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | EscalationPolicyPathResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: UpdateEscalationPolicyPath, +) -> ErrorsList | EscalationPolicyPathResponse | None: + """Update an escalation path + + Update a specific escalation path by id + + Args: + id (str): + body (UpdateEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | EscalationPolicyPathResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateEscalationPolicyPath, +) -> Response[ErrorsList | EscalationPolicyPathResponse]: + """Update an escalation path + + Update a specific escalation path by id + + Args: + id (str): + body (UpdateEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorsList | EscalationPolicyPathResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: UpdateEscalationPolicyPath, +) -> ErrorsList | EscalationPolicyPathResponse | None: + """Update an escalation path + + Update a specific escalation path by id + + Args: + id (str): + body (UpdateEscalationPolicyPath): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorsList | EscalationPolicyPathResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/models/__init__.py b/rootly_sdk/models/__init__.py index a2c17ae2..4bd273e9 100644 --- a/rootly_sdk/models/__init__.py +++ b/rootly_sdk/models/__init__.py @@ -852,6 +852,22 @@ from .environment_slack_channels_type_0_item import EnvironmentSlackChannelsType0Item from .errors_list import ErrorsList from .errors_list_errors_item import ErrorsListErrorsItem +from .escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency +from .escalation_path_rule_alert_urgency_rule_type import EscalationPathRuleAlertUrgencyRuleType +from .escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow +from .escalation_path_rule_deferral_window_rule_type import EscalationPathRuleDeferralWindowRuleType +from .escalation_path_rule_deferral_window_time_blocks_item import EscalationPathRuleDeferralWindowTimeBlocksItem +from .escalation_path_rule_deferral_window_time_zone import EscalationPathRuleDeferralWindowTimeZone +from .escalation_path_rule_field import EscalationPathRuleField +from .escalation_path_rule_field_operator import EscalationPathRuleFieldOperator +from .escalation_path_rule_field_rule_type import EscalationPathRuleFieldRuleType +from .escalation_path_rule_json_path import EscalationPathRuleJsonPath +from .escalation_path_rule_json_path_operator import EscalationPathRuleJsonPathOperator +from .escalation_path_rule_json_path_rule_type import EscalationPathRuleJsonPathRuleType +from .escalation_path_rule_service import EscalationPathRuleService +from .escalation_path_rule_service_rule_type import EscalationPathRuleServiceRuleType +from .escalation_path_rule_working_hour import EscalationPathRuleWorkingHour +from .escalation_path_rule_working_hour_rule_type import EscalationPathRuleWorkingHourRuleType from .escalation_policy import EscalationPolicy from .escalation_policy_business_hours_type_0 import EscalationPolicyBusinessHoursType0 from .escalation_policy_business_hours_type_0_days_type_0_item import EscalationPolicyBusinessHoursType0DaysType0Item @@ -889,58 +905,6 @@ from .escalation_policy_path_response import EscalationPolicyPathResponse from .escalation_policy_path_response_data import EscalationPolicyPathResponseData from .escalation_policy_path_response_data_type import EscalationPolicyPathResponseDataType -from .escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 -from .escalation_policy_path_rules_item_type_0_rule_type import EscalationPolicyPathRulesItemType0RuleType -from .escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 -from .escalation_policy_path_rules_item_type_1_rule_type import EscalationPolicyPathRulesItemType1RuleType -from .escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 -from .escalation_policy_path_rules_item_type_2_operator import EscalationPolicyPathRulesItemType2Operator -from .escalation_policy_path_rules_item_type_2_rule_type import EscalationPolicyPathRulesItemType2RuleType -from .escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 -from .escalation_policy_path_rules_item_type_3_operator import EscalationPolicyPathRulesItemType3Operator -from .escalation_policy_path_rules_item_type_3_rule_type import EscalationPolicyPathRulesItemType3RuleType -from .escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 -from .escalation_policy_path_rules_item_type_4_rule_type import EscalationPolicyPathRulesItemType4RuleType -from .escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 -from .escalation_policy_path_rules_item_type_5_rule_type import EscalationPolicyPathRulesItemType5RuleType -from .escalation_policy_path_rules_item_type_5_time_blocks_item import EscalationPolicyPathRulesItemType5TimeBlocksItem -from .escalation_policy_path_rules_item_type_5_time_zone import EscalationPolicyPathRulesItemType5TimeZone -from .escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 -from .escalation_policy_path_rules_item_type_6_type_0_rule_type import EscalationPolicyPathRulesItemType6Type0RuleType -from .escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 -from .escalation_policy_path_rules_item_type_6_type_1_rule_type import EscalationPolicyPathRulesItemType6Type1RuleType -from .escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 -from .escalation_policy_path_rules_item_type_6_type_2_operator import EscalationPolicyPathRulesItemType6Type2Operator -from .escalation_policy_path_rules_item_type_6_type_2_rule_type import EscalationPolicyPathRulesItemType6Type2RuleType -from .escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 -from .escalation_policy_path_rules_item_type_6_type_3_operator import EscalationPolicyPathRulesItemType6Type3Operator -from .escalation_policy_path_rules_item_type_6_type_3_rule_type import EscalationPolicyPathRulesItemType6Type3RuleType -from .escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 -from .escalation_policy_path_rules_item_type_6_type_4_rule_type import EscalationPolicyPathRulesItemType6Type4RuleType -from .escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 -from .escalation_policy_path_rules_item_type_6_type_5_rule_type import EscalationPolicyPathRulesItemType6Type5RuleType -from .escalation_policy_path_rules_item_type_6_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType6Type5TimeBlocksItem, -) -from .escalation_policy_path_rules_item_type_6_type_5_time_zone import EscalationPolicyPathRulesItemType6Type5TimeZone -from .escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 -from .escalation_policy_path_rules_item_type_7_type_0_rule_type import EscalationPolicyPathRulesItemType7Type0RuleType -from .escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 -from .escalation_policy_path_rules_item_type_7_type_1_rule_type import EscalationPolicyPathRulesItemType7Type1RuleType -from .escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 -from .escalation_policy_path_rules_item_type_7_type_2_operator import EscalationPolicyPathRulesItemType7Type2Operator -from .escalation_policy_path_rules_item_type_7_type_2_rule_type import EscalationPolicyPathRulesItemType7Type2RuleType -from .escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 -from .escalation_policy_path_rules_item_type_7_type_3_operator import EscalationPolicyPathRulesItemType7Type3Operator -from .escalation_policy_path_rules_item_type_7_type_3_rule_type import EscalationPolicyPathRulesItemType7Type3RuleType -from .escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 -from .escalation_policy_path_rules_item_type_7_type_4_rule_type import EscalationPolicyPathRulesItemType7Type4RuleType -from .escalation_policy_path_rules_item_type_7_type_5 import EscalationPolicyPathRulesItemType7Type5 -from .escalation_policy_path_rules_item_type_7_type_5_rule_type import EscalationPolicyPathRulesItemType7Type5RuleType -from .escalation_policy_path_rules_item_type_7_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType7Type5TimeBlocksItem, -) -from .escalation_policy_path_rules_item_type_7_type_5_time_zone import EscalationPolicyPathRulesItemType7Type5TimeZone from .escalation_policy_path_time_restriction_time_zone import EscalationPolicyPathTimeRestrictionTimeZone from .escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem from .escalation_policy_path_time_restrictions_item_end_day import EscalationPolicyPathTimeRestrictionsItemEndDay @@ -1727,6 +1691,30 @@ NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, ) from .new_escalation_policy_level_data_type import NewEscalationPolicyLevelDataType +from .new_escalation_policy_path import NewEscalationPolicyPath +from .new_escalation_policy_path_data import NewEscalationPolicyPathData +from .new_escalation_policy_path_data_attributes import NewEscalationPolicyPathDataAttributes +from .new_escalation_policy_path_data_attributes_after_deferral_behavior import ( + NewEscalationPolicyPathDataAttributesAfterDeferralBehavior, +) +from .new_escalation_policy_path_data_attributes_match_mode import NewEscalationPolicyPathDataAttributesMatchMode +from .new_escalation_policy_path_data_attributes_notification_type import ( + NewEscalationPolicyPathDataAttributesNotificationType, +) +from .new_escalation_policy_path_data_attributes_path_type import NewEscalationPolicyPathDataAttributesPathType +from .new_escalation_policy_path_data_attributes_time_restriction_time_zone import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, +) +from .new_escalation_policy_path_data_attributes_time_restrictions_item import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, +) +from .new_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, +) +from .new_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, +) +from .new_escalation_policy_path_data_type import NewEscalationPolicyPathDataType from .new_form_field import NewFormField from .new_form_field_data import NewFormFieldData from .new_form_field_data_attributes import NewFormFieldDataAttributes @@ -3235,6 +3223,30 @@ UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, ) from .update_escalation_policy_level_data_type import UpdateEscalationPolicyLevelDataType +from .update_escalation_policy_path import UpdateEscalationPolicyPath +from .update_escalation_policy_path_data import UpdateEscalationPolicyPathData +from .update_escalation_policy_path_data_attributes import UpdateEscalationPolicyPathDataAttributes +from .update_escalation_policy_path_data_attributes_after_deferral_behavior import ( + UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior, +) +from .update_escalation_policy_path_data_attributes_match_mode import UpdateEscalationPolicyPathDataAttributesMatchMode +from .update_escalation_policy_path_data_attributes_notification_type import ( + UpdateEscalationPolicyPathDataAttributesNotificationType, +) +from .update_escalation_policy_path_data_attributes_path_type import UpdateEscalationPolicyPathDataAttributesPathType +from .update_escalation_policy_path_data_attributes_time_restriction_time_zone import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, +) +from .update_escalation_policy_path_data_attributes_time_restrictions_item import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, +) +from .update_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, +) +from .update_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, +) +from .update_escalation_policy_path_data_type import UpdateEscalationPolicyPathDataType from .update_form_field import UpdateFormField from .update_form_field_data import UpdateFormFieldData from .update_form_field_data_attributes import UpdateFormFieldDataAttributes @@ -4700,6 +4712,22 @@ "EnvironmentSlackChannelsType0Item", "ErrorsList", "ErrorsListErrorsItem", + "EscalationPathRuleAlertUrgency", + "EscalationPathRuleAlertUrgencyRuleType", + "EscalationPathRuleDeferralWindow", + "EscalationPathRuleDeferralWindowRuleType", + "EscalationPathRuleDeferralWindowTimeBlocksItem", + "EscalationPathRuleDeferralWindowTimeZone", + "EscalationPathRuleField", + "EscalationPathRuleFieldOperator", + "EscalationPathRuleFieldRuleType", + "EscalationPathRuleJsonPath", + "EscalationPathRuleJsonPathOperator", + "EscalationPathRuleJsonPathRuleType", + "EscalationPathRuleService", + "EscalationPathRuleServiceRuleType", + "EscalationPathRuleWorkingHour", + "EscalationPathRuleWorkingHourRuleType", "EscalationPolicy", "EscalationPolicyBusinessHoursType0", "EscalationPolicyBusinessHoursType0DaysType0Item", @@ -4727,54 +4755,6 @@ "EscalationPolicyPathResponse", "EscalationPolicyPathResponseData", "EscalationPolicyPathResponseDataType", - "EscalationPolicyPathRulesItemType0", - "EscalationPolicyPathRulesItemType0RuleType", - "EscalationPolicyPathRulesItemType1", - "EscalationPolicyPathRulesItemType1RuleType", - "EscalationPolicyPathRulesItemType2", - "EscalationPolicyPathRulesItemType2Operator", - "EscalationPolicyPathRulesItemType2RuleType", - "EscalationPolicyPathRulesItemType3", - "EscalationPolicyPathRulesItemType3Operator", - "EscalationPolicyPathRulesItemType3RuleType", - "EscalationPolicyPathRulesItemType4", - "EscalationPolicyPathRulesItemType4RuleType", - "EscalationPolicyPathRulesItemType5", - "EscalationPolicyPathRulesItemType5RuleType", - "EscalationPolicyPathRulesItemType5TimeBlocksItem", - "EscalationPolicyPathRulesItemType5TimeZone", - "EscalationPolicyPathRulesItemType6Type0", - "EscalationPolicyPathRulesItemType6Type0RuleType", - "EscalationPolicyPathRulesItemType6Type1", - "EscalationPolicyPathRulesItemType6Type1RuleType", - "EscalationPolicyPathRulesItemType6Type2", - "EscalationPolicyPathRulesItemType6Type2Operator", - "EscalationPolicyPathRulesItemType6Type2RuleType", - "EscalationPolicyPathRulesItemType6Type3", - "EscalationPolicyPathRulesItemType6Type3Operator", - "EscalationPolicyPathRulesItemType6Type3RuleType", - "EscalationPolicyPathRulesItemType6Type4", - "EscalationPolicyPathRulesItemType6Type4RuleType", - "EscalationPolicyPathRulesItemType6Type5", - "EscalationPolicyPathRulesItemType6Type5RuleType", - "EscalationPolicyPathRulesItemType6Type5TimeBlocksItem", - "EscalationPolicyPathRulesItemType6Type5TimeZone", - "EscalationPolicyPathRulesItemType7Type0", - "EscalationPolicyPathRulesItemType7Type0RuleType", - "EscalationPolicyPathRulesItemType7Type1", - "EscalationPolicyPathRulesItemType7Type1RuleType", - "EscalationPolicyPathRulesItemType7Type2", - "EscalationPolicyPathRulesItemType7Type2Operator", - "EscalationPolicyPathRulesItemType7Type2RuleType", - "EscalationPolicyPathRulesItemType7Type3", - "EscalationPolicyPathRulesItemType7Type3Operator", - "EscalationPolicyPathRulesItemType7Type3RuleType", - "EscalationPolicyPathRulesItemType7Type4", - "EscalationPolicyPathRulesItemType7Type4RuleType", - "EscalationPolicyPathRulesItemType7Type5", - "EscalationPolicyPathRulesItemType7Type5RuleType", - "EscalationPolicyPathRulesItemType7Type5TimeBlocksItem", - "EscalationPolicyPathRulesItemType7Type5TimeZone", "EscalationPolicyPathTimeRestrictionsItem", "EscalationPolicyPathTimeRestrictionsItemEndDay", "EscalationPolicyPathTimeRestrictionsItemStartDay", @@ -5403,6 +5383,18 @@ "NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy", "NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy", "NewEscalationPolicyLevelDataType", + "NewEscalationPolicyPath", + "NewEscalationPolicyPathData", + "NewEscalationPolicyPathDataAttributes", + "NewEscalationPolicyPathDataAttributesAfterDeferralBehavior", + "NewEscalationPolicyPathDataAttributesMatchMode", + "NewEscalationPolicyPathDataAttributesNotificationType", + "NewEscalationPolicyPathDataAttributesPathType", + "NewEscalationPolicyPathDataAttributesTimeRestrictionsItem", + "NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay", + "NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay", + "NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone", + "NewEscalationPolicyPathDataType", "NewFormField", "NewFormFieldData", "NewFormFieldDataAttributes", @@ -6563,6 +6555,18 @@ "UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy", "UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy", "UpdateEscalationPolicyLevelDataType", + "UpdateEscalationPolicyPath", + "UpdateEscalationPolicyPathData", + "UpdateEscalationPolicyPathDataAttributes", + "UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior", + "UpdateEscalationPolicyPathDataAttributesMatchMode", + "UpdateEscalationPolicyPathDataAttributesNotificationType", + "UpdateEscalationPolicyPathDataAttributesPathType", + "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem", + "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay", + "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay", + "UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone", + "UpdateEscalationPolicyPathDataType", "UpdateFormField", "UpdateFormFieldData", "UpdateFormFieldDataAttributes", diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py b/rootly_sdk/models/escalation_path_rule_alert_urgency.py similarity index 68% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_0.py rename to rootly_sdk/models/escalation_path_rule_alert_urgency.py index f01cb69c..86c59b5b 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py +++ b/rootly_sdk/models/escalation_path_rule_alert_urgency.py @@ -6,23 +6,23 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_0_rule_type import ( - EscalationPolicyPathRulesItemType0RuleType, - check_escalation_policy_path_rules_item_type_0_rule_type, +from ..models.escalation_path_rule_alert_urgency_rule_type import ( + EscalationPathRuleAlertUrgencyRuleType, + check_escalation_path_rule_alert_urgency_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType0") +T = TypeVar("T", bound="EscalationPathRuleAlertUrgency") @_attrs_define -class EscalationPolicyPathRulesItemType0: +class EscalationPathRuleAlertUrgency: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType0RuleType): The type of the escalation path rule + rule_type (EscalationPathRuleAlertUrgencyRuleType): The type of the escalation path rule urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used """ - rule_type: EscalationPolicyPathRulesItemType0RuleType + rule_type: EscalationPathRuleAlertUrgencyRuleType urgency_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_0_rule_type(d.pop("rule_type")) + rule_type = check_escalation_path_rule_alert_urgency_rule_type(d.pop("rule_type")) urgency_ids = cast(list[str], d.pop("urgency_ids")) - escalation_policy_path_rules_item_type_0 = cls( + escalation_path_rule_alert_urgency = cls( rule_type=rule_type, urgency_ids=urgency_ids, ) - escalation_policy_path_rules_item_type_0.additional_properties = d - return escalation_policy_path_rules_item_type_0 + escalation_path_rule_alert_urgency.additional_properties = d + return escalation_path_rule_alert_urgency @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py b/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py new file mode 100644 index 00000000..165b2c66 --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPathRuleAlertUrgencyRuleType = Literal["alert_urgency"] + +ESCALATION_PATH_RULE_ALERT_URGENCY_RULE_TYPE_VALUES: set[EscalationPathRuleAlertUrgencyRuleType] = { + "alert_urgency", +} + + +def check_escalation_path_rule_alert_urgency_rule_type( + value: str | None, +) -> EscalationPathRuleAlertUrgencyRuleType | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_ALERT_URGENCY_RULE_TYPE_VALUES: + return cast(EscalationPathRuleAlertUrgencyRuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_ALERT_URGENCY_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py b/rootly_sdk/models/escalation_path_rule_deferral_window.py similarity index 52% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5.py rename to rootly_sdk/models/escalation_path_rule_deferral_window.py index 73525b03..d495663f 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py +++ b/rootly_sdk/models/escalation_path_rule_deferral_window.py @@ -6,37 +6,37 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_5_rule_type import ( - EscalationPolicyPathRulesItemType5RuleType, - check_escalation_policy_path_rules_item_type_5_rule_type, +from ..models.escalation_path_rule_deferral_window_rule_type import ( + EscalationPathRuleDeferralWindowRuleType, + check_escalation_path_rule_deferral_window_rule_type, ) -from ..models.escalation_policy_path_rules_item_type_5_time_zone import ( - EscalationPolicyPathRulesItemType5TimeZone, - check_escalation_policy_path_rules_item_type_5_time_zone, +from ..models.escalation_path_rule_deferral_window_time_zone import ( + EscalationPathRuleDeferralWindowTimeZone, + check_escalation_path_rule_deferral_window_time_zone, ) if TYPE_CHECKING: - from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType5TimeBlocksItem, + from ..models.escalation_path_rule_deferral_window_time_blocks_item import ( + EscalationPathRuleDeferralWindowTimeBlocksItem, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5") +T = TypeVar("T", bound="EscalationPathRuleDeferralWindow") @_attrs_define -class EscalationPolicyPathRulesItemType5: +class EscalationPathRuleDeferralWindow: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType5RuleType): The type of the escalation path rule - time_zone (EscalationPolicyPathRulesItemType5TimeZone): Time zone for the deferral window - time_blocks (list[EscalationPolicyPathRulesItemType5TimeBlocksItem]): Time windows during which alerts are + rule_type (EscalationPathRuleDeferralWindowRuleType): The type of the escalation path rule + time_zone (EscalationPathRuleDeferralWindowTimeZone): Time zone for the deferral window + time_blocks (list[EscalationPathRuleDeferralWindowTimeBlocksItem]): Time windows during which alerts are deferred """ - rule_type: EscalationPolicyPathRulesItemType5RuleType - time_zone: EscalationPolicyPathRulesItemType5TimeZone - time_blocks: list[EscalationPolicyPathRulesItemType5TimeBlocksItem] + rule_type: EscalationPathRuleDeferralWindowRuleType + time_zone: EscalationPathRuleDeferralWindowTimeZone + time_blocks: list[EscalationPathRuleDeferralWindowTimeBlocksItem] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -63,30 +63,30 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType5TimeBlocksItem, + from ..models.escalation_path_rule_deferral_window_time_blocks_item import ( + EscalationPathRuleDeferralWindowTimeBlocksItem, ) d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_5_rule_type(d.pop("rule_type")) + rule_type = check_escalation_path_rule_deferral_window_rule_type(d.pop("rule_type")) - time_zone = check_escalation_policy_path_rules_item_type_5_time_zone(d.pop("time_zone")) + time_zone = check_escalation_path_rule_deferral_window_time_zone(d.pop("time_zone")) time_blocks = [] _time_blocks = d.pop("time_blocks") for time_blocks_item_data in _time_blocks: - time_blocks_item = EscalationPolicyPathRulesItemType5TimeBlocksItem.from_dict(time_blocks_item_data) + time_blocks_item = EscalationPathRuleDeferralWindowTimeBlocksItem.from_dict(time_blocks_item_data) time_blocks.append(time_blocks_item) - escalation_policy_path_rules_item_type_5 = cls( + escalation_path_rule_deferral_window = cls( rule_type=rule_type, time_zone=time_zone, time_blocks=time_blocks, ) - escalation_policy_path_rules_item_type_5.additional_properties = d - return escalation_policy_path_rules_item_type_5 + escalation_path_rule_deferral_window.additional_properties = d + return escalation_path_rule_deferral_window @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py b/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py new file mode 100644 index 00000000..215b8e8d --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPathRuleDeferralWindowRuleType = Literal["deferral_window"] + +ESCALATION_PATH_RULE_DEFERRAL_WINDOW_RULE_TYPE_VALUES: set[EscalationPathRuleDeferralWindowRuleType] = { + "deferral_window", +} + + +def check_escalation_path_rule_deferral_window_rule_type( + value: str | None, +) -> EscalationPathRuleDeferralWindowRuleType | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_DEFERRAL_WINDOW_RULE_TYPE_VALUES: + return cast(EscalationPathRuleDeferralWindowRuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_DEFERRAL_WINDOW_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py similarity index 95% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py rename to rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py index be2042fa..b4c63629 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py +++ b/rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py @@ -8,11 +8,11 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5TimeBlocksItem") +T = TypeVar("T", bound="EscalationPathRuleDeferralWindowTimeBlocksItem") @_attrs_define -class EscalationPolicyPathRulesItemType5TimeBlocksItem: +class EscalationPathRuleDeferralWindowTimeBlocksItem: """ Attributes: monday (bool | None | Unset): @@ -217,7 +217,7 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) - escalation_policy_path_rules_item_type_5_time_blocks_item = cls( + escalation_path_rule_deferral_window_time_blocks_item = cls( monday=monday, tuesday=tuesday, wednesday=wednesday, @@ -231,8 +231,8 @@ def _parse_position(data: object) -> int | None | Unset: position=position, ) - escalation_policy_path_rules_item_type_5_time_blocks_item.additional_properties = d - return escalation_policy_path_rules_item_type_5_time_blocks_item + escalation_path_rule_deferral_window_time_blocks_item.additional_properties = d + return escalation_path_rule_deferral_window_time_blocks_item @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py b/rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py similarity index 95% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py rename to rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py index 6cffd7b2..dbd31352 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py +++ b/rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType5TimeZone = Literal[ +EscalationPathRuleDeferralWindowTimeZone = Literal[ "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -292,7 +292,7 @@ "Zurich", ] -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[EscalationPolicyPathRulesItemType5TimeZone] = { +ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES: set[EscalationPathRuleDeferralWindowTimeZone] = { "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -585,13 +585,13 @@ } -def check_escalation_policy_path_rules_item_type_5_time_zone( +def check_escalation_path_rule_deferral_window_time_zone( value: str | None, -) -> EscalationPolicyPathRulesItemType5TimeZone | None: +) -> EscalationPathRuleDeferralWindowTimeZone | None: if value is None: return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: - return cast(EscalationPolicyPathRulesItemType5TimeZone, value) + if value in ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES: + return cast(EscalationPathRuleDeferralWindowTimeZone, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES!r}" ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py b/rootly_sdk/models/escalation_path_rule_field.py similarity index 66% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_3.py rename to rootly_sdk/models/escalation_path_rule_field.py index 7696e1e7..3df46e2c 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py +++ b/rootly_sdk/models/escalation_path_rule_field.py @@ -6,34 +6,34 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_3_operator import ( - EscalationPolicyPathRulesItemType3Operator, - check_escalation_policy_path_rules_item_type_3_operator, +from ..models.escalation_path_rule_field_operator import ( + EscalationPathRuleFieldOperator, + check_escalation_path_rule_field_operator, ) -from ..models.escalation_policy_path_rules_item_type_3_rule_type import ( - EscalationPolicyPathRulesItemType3RuleType, - check_escalation_policy_path_rules_item_type_3_rule_type, +from ..models.escalation_path_rule_field_rule_type import ( + EscalationPathRuleFieldRuleType, + check_escalation_path_rule_field_rule_type, ) from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType3") +T = TypeVar("T", bound="EscalationPathRuleField") @_attrs_define -class EscalationPolicyPathRulesItemType3: +class EscalationPathRuleField: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType3RuleType): The type of the escalation path rule + rule_type (EscalationPathRuleFieldRuleType): The type of the escalation path rule fieldable_type (str): The type of the fieldable (e.g., AlertField) fieldable_id (str): The ID of the alert field - operator (EscalationPolicyPathRulesItemType3Operator): How the alert field value should be matched + operator (EscalationPathRuleFieldOperator): How the alert field value should be matched values (list[str] | Unset): Values to match against """ - rule_type: EscalationPolicyPathRulesItemType3RuleType + rule_type: EscalationPathRuleFieldRuleType fieldable_type: str fieldable_id: str - operator: EscalationPolicyPathRulesItemType3Operator + operator: EscalationPathRuleFieldOperator values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -68,17 +68,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_3_rule_type(d.pop("rule_type")) + rule_type = check_escalation_path_rule_field_rule_type(d.pop("rule_type")) fieldable_type = d.pop("fieldable_type") fieldable_id = d.pop("fieldable_id") - operator = check_escalation_policy_path_rules_item_type_3_operator(d.pop("operator")) + operator = check_escalation_path_rule_field_operator(d.pop("operator")) values = cast(list[str], d.pop("values", UNSET)) - escalation_policy_path_rules_item_type_3 = cls( + escalation_path_rule_field = cls( rule_type=rule_type, fieldable_type=fieldable_type, fieldable_id=fieldable_id, @@ -86,8 +86,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: values=values, ) - escalation_policy_path_rules_item_type_3.additional_properties = d - return escalation_policy_path_rules_item_type_3 + escalation_path_rule_field.additional_properties = d + return escalation_path_rule_field @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py b/rootly_sdk/models/escalation_path_rule_field_operator.py similarity index 51% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py rename to rootly_sdk/models/escalation_path_rule_field_operator.py index d036caca..6258b694 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py +++ b/rootly_sdk/models/escalation_path_rule_field_operator.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType3Operator = Literal[ +EscalationPathRuleFieldOperator = Literal[ "contains", "contains_key", "does_not_contain", @@ -17,7 +17,7 @@ "starts_with", ] -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType3Operator] = { +ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES: set[EscalationPathRuleFieldOperator] = { "contains", "contains_key", "does_not_contain", @@ -35,13 +35,9 @@ } -def check_escalation_policy_path_rules_item_type_3_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType3Operator | None: +def check_escalation_path_rule_field_operator(value: str | None) -> EscalationPathRuleFieldOperator | None: if value is None: return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType3Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES!r}" - ) + if value in ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES: + return cast(EscalationPathRuleFieldOperator, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_field_rule_type.py b/rootly_sdk/models/escalation_path_rule_field_rule_type.py new file mode 100644 index 00000000..414160bc --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_field_rule_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +EscalationPathRuleFieldRuleType = Literal["field"] + +ESCALATION_PATH_RULE_FIELD_RULE_TYPE_VALUES: set[EscalationPathRuleFieldRuleType] = { + "field", +} + + +def check_escalation_path_rule_field_rule_type(value: str | None) -> EscalationPathRuleFieldRuleType | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_FIELD_RULE_TYPE_VALUES: + return cast(EscalationPathRuleFieldRuleType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_FIELD_RULE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py b/rootly_sdk/models/escalation_path_rule_json_path.py similarity index 70% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_2.py rename to rootly_sdk/models/escalation_path_rule_json_path.py index 6c37de59..31951043 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py +++ b/rootly_sdk/models/escalation_path_rule_json_path.py @@ -6,33 +6,33 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_2_operator import ( - EscalationPolicyPathRulesItemType2Operator, - check_escalation_policy_path_rules_item_type_2_operator, +from ..models.escalation_path_rule_json_path_operator import ( + EscalationPathRuleJsonPathOperator, + check_escalation_path_rule_json_path_operator, ) -from ..models.escalation_policy_path_rules_item_type_2_rule_type import ( - EscalationPolicyPathRulesItemType2RuleType, - check_escalation_policy_path_rules_item_type_2_rule_type, +from ..models.escalation_path_rule_json_path_rule_type import ( + EscalationPathRuleJsonPathRuleType, + check_escalation_path_rule_json_path_rule_type, ) from ..types import UNSET, Unset -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType2") +T = TypeVar("T", bound="EscalationPathRuleJsonPath") @_attrs_define -class EscalationPolicyPathRulesItemType2: +class EscalationPathRuleJsonPath: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType2RuleType): The type of the escalation path rule + rule_type (EscalationPathRuleJsonPathRuleType): The type of the escalation path rule json_path (str): JSON path to extract value from payload - operator (EscalationPolicyPathRulesItemType2Operator): How JSON path value should be matched + operator (EscalationPathRuleJsonPathOperator): How JSON path value should be matched value (None | str | Unset): Value with which JSON path value should be matched values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) """ - rule_type: EscalationPolicyPathRulesItemType2RuleType + rule_type: EscalationPathRuleJsonPathRuleType json_path: str - operator: EscalationPolicyPathRulesItemType2Operator + operator: EscalationPathRuleJsonPathOperator value: None | str | Unset = UNSET values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -73,11 +73,11 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_2_rule_type(d.pop("rule_type")) + rule_type = check_escalation_path_rule_json_path_rule_type(d.pop("rule_type")) json_path = d.pop("json_path") - operator = check_escalation_policy_path_rules_item_type_2_operator(d.pop("operator")) + operator = check_escalation_path_rule_json_path_operator(d.pop("operator")) def _parse_value(data: object) -> None | str | Unset: if data is None: @@ -90,7 +90,7 @@ def _parse_value(data: object) -> None | str | Unset: values = cast(list[str], d.pop("values", UNSET)) - escalation_policy_path_rules_item_type_2 = cls( + escalation_path_rule_json_path = cls( rule_type=rule_type, json_path=json_path, operator=operator, @@ -98,8 +98,8 @@ def _parse_value(data: object) -> None | str | Unset: values=values, ) - escalation_policy_path_rules_item_type_2.additional_properties = d - return escalation_policy_path_rules_item_type_2 + escalation_path_rule_json_path.additional_properties = d + return escalation_path_rule_json_path @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_json_path_operator.py b/rootly_sdk/models/escalation_path_rule_json_path_operator.py new file mode 100644 index 00000000..ca7e74dc --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_json_path_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPathRuleJsonPathOperator = Literal[ + "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" +] + +ESCALATION_PATH_RULE_JSON_PATH_OPERATOR_VALUES: set[EscalationPathRuleJsonPathOperator] = { + "contains", + "does_not_contain", + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_path_rule_json_path_operator(value: str | None) -> EscalationPathRuleJsonPathOperator | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_JSON_PATH_OPERATOR_VALUES: + return cast(EscalationPathRuleJsonPathOperator, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_JSON_PATH_OPERATOR_VALUES!r}") diff --git a/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py b/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py new file mode 100644 index 00000000..1e4bff52 --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +EscalationPathRuleJsonPathRuleType = Literal["json_path"] + +ESCALATION_PATH_RULE_JSON_PATH_RULE_TYPE_VALUES: set[EscalationPathRuleJsonPathRuleType] = { + "json_path", +} + + +def check_escalation_path_rule_json_path_rule_type(value: str | None) -> EscalationPathRuleJsonPathRuleType | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_JSON_PATH_RULE_TYPE_VALUES: + return cast(EscalationPathRuleJsonPathRuleType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_JSON_PATH_RULE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py b/rootly_sdk/models/escalation_path_rule_service.py similarity index 68% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_4.py rename to rootly_sdk/models/escalation_path_rule_service.py index 0b343c49..9b278181 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py +++ b/rootly_sdk/models/escalation_path_rule_service.py @@ -6,23 +6,23 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_4_rule_type import ( - EscalationPolicyPathRulesItemType4RuleType, - check_escalation_policy_path_rules_item_type_4_rule_type, +from ..models.escalation_path_rule_service_rule_type import ( + EscalationPathRuleServiceRuleType, + check_escalation_path_rule_service_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4") +T = TypeVar("T", bound="EscalationPathRuleService") @_attrs_define -class EscalationPolicyPathRulesItemType4: +class EscalationPathRuleService: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType4RuleType): The type of the escalation path rule + rule_type (EscalationPathRuleServiceRuleType): The type of the escalation path rule service_ids (list[str]): Service ids for which this escalation path should be used """ - rule_type: EscalationPolicyPathRulesItemType4RuleType + rule_type: EscalationPathRuleServiceRuleType service_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_4_rule_type(d.pop("rule_type")) + rule_type = check_escalation_path_rule_service_rule_type(d.pop("rule_type")) service_ids = cast(list[str], d.pop("service_ids")) - escalation_policy_path_rules_item_type_4 = cls( + escalation_path_rule_service = cls( rule_type=rule_type, service_ids=service_ids, ) - escalation_policy_path_rules_item_type_4.additional_properties = d - return escalation_policy_path_rules_item_type_4 + escalation_path_rule_service.additional_properties = d + return escalation_path_rule_service @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_service_rule_type.py b/rootly_sdk/models/escalation_path_rule_service_rule_type.py new file mode 100644 index 00000000..fd8a88c8 --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_service_rule_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +EscalationPathRuleServiceRuleType = Literal["service"] + +ESCALATION_PATH_RULE_SERVICE_RULE_TYPE_VALUES: set[EscalationPathRuleServiceRuleType] = { + "service", +} + + +def check_escalation_path_rule_service_rule_type(value: str | None) -> EscalationPathRuleServiceRuleType | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_SERVICE_RULE_TYPE_VALUES: + return cast(EscalationPathRuleServiceRuleType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_SERVICE_RULE_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py b/rootly_sdk/models/escalation_path_rule_working_hour.py similarity index 69% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_1.py rename to rootly_sdk/models/escalation_path_rule_working_hour.py index cebe2ca3..c48901b4 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py +++ b/rootly_sdk/models/escalation_path_rule_working_hour.py @@ -6,23 +6,23 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_rules_item_type_1_rule_type import ( - EscalationPolicyPathRulesItemType1RuleType, - check_escalation_policy_path_rules_item_type_1_rule_type, +from ..models.escalation_path_rule_working_hour_rule_type import ( + EscalationPathRuleWorkingHourRuleType, + check_escalation_path_rule_working_hour_rule_type, ) -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType1") +T = TypeVar("T", bound="EscalationPathRuleWorkingHour") @_attrs_define -class EscalationPolicyPathRulesItemType1: +class EscalationPathRuleWorkingHour: """ Attributes: - rule_type (EscalationPolicyPathRulesItemType1RuleType): The type of the escalation path rule + rule_type (EscalationPathRuleWorkingHourRuleType): The type of the escalation path rule within_working_hour (bool): Whether the escalation path should be used within working hours """ - rule_type: EscalationPolicyPathRulesItemType1RuleType + rule_type: EscalationPathRuleWorkingHourRuleType within_working_hour: bool additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +45,17 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_1_rule_type(d.pop("rule_type")) + rule_type = check_escalation_path_rule_working_hour_rule_type(d.pop("rule_type")) within_working_hour = d.pop("within_working_hour") - escalation_policy_path_rules_item_type_1 = cls( + escalation_path_rule_working_hour = cls( rule_type=rule_type, within_working_hour=within_working_hour, ) - escalation_policy_path_rules_item_type_1.additional_properties = d - return escalation_policy_path_rules_item_type_1 + escalation_path_rule_working_hour.additional_properties = d + return escalation_path_rule_working_hour @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py b/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py new file mode 100644 index 00000000..a7d93d20 --- /dev/null +++ b/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPathRuleWorkingHourRuleType = Literal["working_hour"] + +ESCALATION_PATH_RULE_WORKING_HOUR_RULE_TYPE_VALUES: set[EscalationPathRuleWorkingHourRuleType] = { + "working_hour", +} + + +def check_escalation_path_rule_working_hour_rule_type( + value: str | None, +) -> EscalationPathRuleWorkingHourRuleType | None: + if value is None: + return None + if value in ESCALATION_PATH_RULE_WORKING_HOUR_RULE_TYPE_VALUES: + return cast(EscalationPathRuleWorkingHourRuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_PATH_RULE_WORKING_HOUR_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path.py b/rootly_sdk/models/escalation_policy_path.py index 3f5524ea..9da832f9 100644 --- a/rootly_sdk/models/escalation_policy_path.py +++ b/rootly_sdk/models/escalation_policy_path.py @@ -25,24 +25,12 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 - from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 - from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 - from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 - from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 - from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 - from ..models.escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 - from ..models.escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 - from ..models.escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 - from ..models.escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 - from ..models.escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 - from ..models.escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 - from ..models.escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 - from ..models.escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 - from ..models.escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 - from ..models.escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 - from ..models.escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 - from ..models.escalation_policy_path_rules_item_type_7_type_5 import EscalationPolicyPathRulesItemType7Type5 + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem @@ -69,15 +57,9 @@ class EscalationPolicyPath: initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). created_at (str | Unset): Date of creation updated_at (str | Unset): Date of last update - rules (list[EscalationPolicyPathRulesItemType0 | EscalationPolicyPathRulesItemType1 | - EscalationPolicyPathRulesItemType2 | EscalationPolicyPathRulesItemType3 | EscalationPolicyPathRulesItemType4 | - EscalationPolicyPathRulesItemType5 | EscalationPolicyPathRulesItemType6Type0 | - EscalationPolicyPathRulesItemType6Type1 | EscalationPolicyPathRulesItemType6Type2 | - EscalationPolicyPathRulesItemType6Type3 | EscalationPolicyPathRulesItemType6Type4 | - EscalationPolicyPathRulesItemType6Type5 | EscalationPolicyPathRulesItemType7Type0 | - EscalationPolicyPathRulesItemType7Type1 | EscalationPolicyPathRulesItemType7Type2 | - EscalationPolicyPathRulesItemType7Type3 | EscalationPolicyPathRulesItemType7Type4 | - EscalationPolicyPathRulesItemType7Type5] | Unset): Escalation path rules + rules (list[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | + EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour | None] | Unset): + Escalation path rules time_restriction_time_zone (EscalationPolicyPathTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. time_restrictions (list[EscalationPolicyPathTimeRestrictionsItem] | Unset): If time restrictions are set, alerts @@ -100,24 +82,13 @@ class EscalationPolicyPath: updated_at: str | Unset = UNSET rules: ( list[ - EscalationPolicyPathRulesItemType0 - | EscalationPolicyPathRulesItemType1 - | EscalationPolicyPathRulesItemType2 - | EscalationPolicyPathRulesItemType3 - | EscalationPolicyPathRulesItemType4 - | EscalationPolicyPathRulesItemType5 - | EscalationPolicyPathRulesItemType6Type0 - | EscalationPolicyPathRulesItemType6Type1 - | EscalationPolicyPathRulesItemType6Type2 - | EscalationPolicyPathRulesItemType6Type3 - | EscalationPolicyPathRulesItemType6Type4 - | EscalationPolicyPathRulesItemType6Type5 - | EscalationPolicyPathRulesItemType7Type0 - | EscalationPolicyPathRulesItemType7Type1 - | EscalationPolicyPathRulesItemType7Type2 - | EscalationPolicyPathRulesItemType7Type3 - | EscalationPolicyPathRulesItemType7Type4 - | EscalationPolicyPathRulesItemType7Type5 + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None ] | Unset ) = UNSET @@ -126,23 +97,12 @@ class EscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 - from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 - from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 - from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 - from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 - from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 - from ..models.escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 - from ..models.escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 - from ..models.escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 - from ..models.escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 - from ..models.escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 - from ..models.escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 - from ..models.escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 - from ..models.escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 - from ..models.escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 - from ..models.escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 - from ..models.escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour name = self.name @@ -184,48 +144,25 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - rules: list[dict[str, Any]] | Unset = UNSET + rules: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.rules, Unset): rules = [] for rules_item_data in self.rules: - rules_item: dict[str, Any] - if isinstance(rules_item_data, EscalationPolicyPathRulesItemType0): + rules_item: dict[str, Any] | None + if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType1): + elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType2): + elif isinstance(rules_item_data, EscalationPathRuleJsonPath): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType3): + elif isinstance(rules_item_data, EscalationPathRuleField): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType4): + elif isinstance(rules_item_data, EscalationPathRuleService): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType5): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type0): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type1): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type2): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type3): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type4): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType6Type5): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type0): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type1): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type2): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type3): - rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7Type4): + elif isinstance(rules_item_data, EscalationPathRuleDeferralWindow): rules_item = rules_item_data.to_dict() else: - rules_item = rules_item_data.to_dict() - + rules_item = rules_item_data rules.append(rules_item) time_restriction_time_zone: str | Unset = UNSET @@ -278,24 +215,12 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 - from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 - from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 - from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 - from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 - from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 - from ..models.escalation_policy_path_rules_item_type_6_type_0 import EscalationPolicyPathRulesItemType6Type0 - from ..models.escalation_policy_path_rules_item_type_6_type_1 import EscalationPolicyPathRulesItemType6Type1 - from ..models.escalation_policy_path_rules_item_type_6_type_2 import EscalationPolicyPathRulesItemType6Type2 - from ..models.escalation_policy_path_rules_item_type_6_type_3 import EscalationPolicyPathRulesItemType6Type3 - from ..models.escalation_policy_path_rules_item_type_6_type_4 import EscalationPolicyPathRulesItemType6Type4 - from ..models.escalation_policy_path_rules_item_type_6_type_5 import EscalationPolicyPathRulesItemType6Type5 - from ..models.escalation_policy_path_rules_item_type_7_type_0 import EscalationPolicyPathRulesItemType7Type0 - from ..models.escalation_policy_path_rules_item_type_7_type_1 import EscalationPolicyPathRulesItemType7Type1 - from ..models.escalation_policy_path_rules_item_type_7_type_2 import EscalationPolicyPathRulesItemType7Type2 - from ..models.escalation_policy_path_rules_item_type_7_type_3 import EscalationPolicyPathRulesItemType7Type3 - from ..models.escalation_policy_path_rules_item_type_7_type_4 import EscalationPolicyPathRulesItemType7Type4 - from ..models.escalation_policy_path_rules_item_type_7_type_5 import EscalationPolicyPathRulesItemType7Type5 + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem d = dict(src_dict) @@ -362,24 +287,13 @@ def _parse_after_deferral_path_id(data: object) -> None | str | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPolicyPathRulesItemType0 - | EscalationPolicyPathRulesItemType1 - | EscalationPolicyPathRulesItemType2 - | EscalationPolicyPathRulesItemType3 - | EscalationPolicyPathRulesItemType4 - | EscalationPolicyPathRulesItemType5 - | EscalationPolicyPathRulesItemType6Type0 - | EscalationPolicyPathRulesItemType6Type1 - | EscalationPolicyPathRulesItemType6Type2 - | EscalationPolicyPathRulesItemType6Type3 - | EscalationPolicyPathRulesItemType6Type4 - | EscalationPolicyPathRulesItemType6Type5 - | EscalationPolicyPathRulesItemType7Type0 - | EscalationPolicyPathRulesItemType7Type1 - | EscalationPolicyPathRulesItemType7Type2 - | EscalationPolicyPathRulesItemType7Type3 - | EscalationPolicyPathRulesItemType7Type4 - | EscalationPolicyPathRulesItemType7Type5 + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None ] | Unset ) = UNSET @@ -390,29 +304,20 @@ def _parse_after_deferral_path_id(data: object) -> None | str | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPolicyPathRulesItemType0 - | EscalationPolicyPathRulesItemType1 - | EscalationPolicyPathRulesItemType2 - | EscalationPolicyPathRulesItemType3 - | EscalationPolicyPathRulesItemType4 - | EscalationPolicyPathRulesItemType5 - | EscalationPolicyPathRulesItemType6Type0 - | EscalationPolicyPathRulesItemType6Type1 - | EscalationPolicyPathRulesItemType6Type2 - | EscalationPolicyPathRulesItemType6Type3 - | EscalationPolicyPathRulesItemType6Type4 - | EscalationPolicyPathRulesItemType6Type5 - | EscalationPolicyPathRulesItemType7Type0 - | EscalationPolicyPathRulesItemType7Type1 - | EscalationPolicyPathRulesItemType7Type2 - | EscalationPolicyPathRulesItemType7Type3 - | EscalationPolicyPathRulesItemType7Type4 - | EscalationPolicyPathRulesItemType7Type5 + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None ): + if data is None: + return data try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPolicyPathRulesItemType0.from_dict(data) + rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -420,7 +325,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPolicyPathRulesItemType1.from_dict(data) + rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -428,7 +333,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPolicyPathRulesItemType2.from_dict(data) + rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -436,7 +341,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPolicyPathRulesItemType3.from_dict(data) + rules_item_type_3 = EscalationPathRuleField.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -444,7 +349,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPolicyPathRulesItemType4.from_dict(data) + rules_item_type_4 = EscalationPathRuleService.from_dict(data) return rules_item_type_4 except (TypeError, ValueError, AttributeError, KeyError): @@ -452,104 +357,21 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPolicyPathRulesItemType5.from_dict(data) + rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) return rules_item_type_5 except (TypeError, ValueError, AttributeError, KeyError): pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_6_type_0 = EscalationPolicyPathRulesItemType6Type0.from_dict(data) - - return rules_item_type_6_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_6_type_1 = EscalationPolicyPathRulesItemType6Type1.from_dict(data) - - return rules_item_type_6_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_6_type_2 = EscalationPolicyPathRulesItemType6Type2.from_dict(data) - - return rules_item_type_6_type_2 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_6_type_3 = EscalationPolicyPathRulesItemType6Type3.from_dict(data) - - return rules_item_type_6_type_3 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_6_type_4 = EscalationPolicyPathRulesItemType6Type4.from_dict(data) - - return rules_item_type_6_type_4 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_6_type_5 = EscalationPolicyPathRulesItemType6Type5.from_dict(data) - - return rules_item_type_6_type_5 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_7_type_0 = EscalationPolicyPathRulesItemType7Type0.from_dict(data) - - return rules_item_type_7_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_7_type_1 = EscalationPolicyPathRulesItemType7Type1.from_dict(data) - - return rules_item_type_7_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_7_type_2 = EscalationPolicyPathRulesItemType7Type2.from_dict(data) - - return rules_item_type_7_type_2 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_7_type_3 = EscalationPolicyPathRulesItemType7Type3.from_dict(data) - - return rules_item_type_7_type_3 - except (TypeError, ValueError, AttributeError, KeyError): - pass - try: - if not isinstance(data, dict): - raise TypeError() - rules_item_type_7_type_4 = EscalationPolicyPathRulesItemType7Type4.from_dict(data) - - return rules_item_type_7_type_4 - except (TypeError, ValueError, AttributeError, KeyError): - pass - if not isinstance(data, dict): - raise TypeError() - rules_item_type_7_type_5 = EscalationPolicyPathRulesItemType7Type5.from_dict(data) - - return rules_item_type_7_type_5 + return cast( + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None, + data, + ) rules_item = _parse_rules_item(rules_item_data) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py deleted file mode 100644 index ade096f4..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType0RuleType = Literal["alert_urgency"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType0RuleType] = { - "alert_urgency", -} - - -def check_escalation_policy_path_rules_item_type_0_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType0RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType0RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py deleted file mode 100644 index 3ff4b383..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType1RuleType = Literal["working_hour"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType1RuleType] = { - "working_hour", -} - - -def check_escalation_policy_path_rules_item_type_1_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType1RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType1RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py deleted file mode 100644 index 83d19b7a..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py +++ /dev/null @@ -1,26 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType2Operator = Literal[ - "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" -] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType2Operator] = { - "contains", - "does_not_contain", - "is", - "is_not", - "is_not_one_of", - "is_one_of", -} - - -def check_escalation_policy_path_rules_item_type_2_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType2Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType2Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py deleted file mode 100644 index ed2c358b..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType2RuleType = Literal["json_path"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType2RuleType] = { - "json_path", -} - - -def check_escalation_policy_path_rules_item_type_2_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType2RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType2RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py deleted file mode 100644 index 7e78400c..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType3RuleType = Literal["field"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType3RuleType] = { - "field", -} - - -def check_escalation_policy_path_rules_item_type_3_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType3RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType3RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py deleted file mode 100644 index fe252ee5..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType4RuleType = Literal["service"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType4RuleType] = { - "service", -} - - -def check_escalation_policy_path_rules_item_type_4_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType4RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType4RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py deleted file mode 100644 index 94cfaa55..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType5RuleType = Literal["deferral_window"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType5RuleType] = { - "deferral_window", -} - - -def check_escalation_policy_path_rules_item_type_5_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType5RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType5RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py deleted file mode 100644 index bed9649e..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_6_type_0_rule_type import ( - EscalationPolicyPathRulesItemType6Type0RuleType, - check_escalation_policy_path_rules_item_type_6_type_0_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type0") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type0: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType6Type0RuleType): The type of the escalation path rule - urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used - """ - - rule_type: EscalationPolicyPathRulesItemType6Type0RuleType - urgency_ids: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - urgency_ids = self.urgency_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "urgency_ids": urgency_ids, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_6_type_0_rule_type(d.pop("rule_type")) - - urgency_ids = cast(list[str], d.pop("urgency_ids")) - - escalation_policy_path_rules_item_type_6_type_0 = cls( - rule_type=rule_type, - urgency_ids=urgency_ids, - ) - - escalation_policy_path_rules_item_type_6_type_0.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py deleted file mode 100644 index 7bc7bd31..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_0_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type0RuleType = Literal["alert_urgency"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_0_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type0RuleType -] = { - "alert_urgency", -} - - -def check_escalation_policy_path_rules_item_type_6_type_0_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type0RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_0_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type0RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_0_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py deleted file mode 100644 index aa77808e..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_6_type_1_rule_type import ( - EscalationPolicyPathRulesItemType6Type1RuleType, - check_escalation_policy_path_rules_item_type_6_type_1_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type1") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type1: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType6Type1RuleType): The type of the escalation path rule - within_working_hour (bool): Whether the escalation path should be used within working hours - """ - - rule_type: EscalationPolicyPathRulesItemType6Type1RuleType - within_working_hour: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - within_working_hour = self.within_working_hour - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "within_working_hour": within_working_hour, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_6_type_1_rule_type(d.pop("rule_type")) - - within_working_hour = d.pop("within_working_hour") - - escalation_policy_path_rules_item_type_6_type_1 = cls( - rule_type=rule_type, - within_working_hour=within_working_hour, - ) - - escalation_policy_path_rules_item_type_6_type_1.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_1 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py deleted file mode 100644 index b81440c2..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_1_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type1RuleType = Literal["working_hour"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_1_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type1RuleType -] = { - "working_hour", -} - - -def check_escalation_policy_path_rules_item_type_6_type_1_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type1RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_1_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type1RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_1_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py deleted file mode 100644 index 3220e923..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2.py +++ /dev/null @@ -1,118 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_6_type_2_operator import ( - EscalationPolicyPathRulesItemType6Type2Operator, - check_escalation_policy_path_rules_item_type_6_type_2_operator, -) -from ..models.escalation_policy_path_rules_item_type_6_type_2_rule_type import ( - EscalationPolicyPathRulesItemType6Type2RuleType, - check_escalation_policy_path_rules_item_type_6_type_2_rule_type, -) -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type2") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type2: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType6Type2RuleType): The type of the escalation path rule - json_path (str): JSON path to extract value from payload - operator (EscalationPolicyPathRulesItemType6Type2Operator): How JSON path value should be matched - value (None | str | Unset): Value with which JSON path value should be matched - values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) - """ - - rule_type: EscalationPolicyPathRulesItemType6Type2RuleType - json_path: str - operator: EscalationPolicyPathRulesItemType6Type2Operator - value: None | str | Unset = UNSET - values: list[str] | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - json_path = self.json_path - - operator: str = self.operator - - value: None | str | Unset - if isinstance(self.value, Unset): - value = UNSET - else: - value = self.value - - values: list[str] | Unset = UNSET - if not isinstance(self.values, Unset): - values = self.values - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "json_path": json_path, - "operator": operator, - } - ) - if value is not UNSET: - field_dict["value"] = value - if values is not UNSET: - field_dict["values"] = values - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_6_type_2_rule_type(d.pop("rule_type")) - - json_path = d.pop("json_path") - - operator = check_escalation_policy_path_rules_item_type_6_type_2_operator(d.pop("operator")) - - def _parse_value(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - value = _parse_value(d.pop("value", UNSET)) - - values = cast(list[str], d.pop("values", UNSET)) - - escalation_policy_path_rules_item_type_6_type_2 = cls( - rule_type=rule_type, - json_path=json_path, - operator=operator, - value=value, - values=values, - ) - - escalation_policy_path_rules_item_type_6_type_2.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_2 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py deleted file mode 100644 index b7f5aa2b..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_operator.py +++ /dev/null @@ -1,28 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type2Operator = Literal[ - "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" -] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType6Type2Operator -] = { - "contains", - "does_not_contain", - "is", - "is_not", - "is_not_one_of", - "is_one_of", -} - - -def check_escalation_policy_path_rules_item_type_6_type_2_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type2Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type2Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py deleted file mode 100644 index 7c2cbae6..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_2_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type2RuleType = Literal["json_path"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type2RuleType -] = { - "json_path", -} - - -def check_escalation_policy_path_rules_item_type_6_type_2_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type2RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type2RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_2_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py deleted file mode 100644 index 2f4a2895..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3.py +++ /dev/null @@ -1,106 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_6_type_3_operator import ( - EscalationPolicyPathRulesItemType6Type3Operator, - check_escalation_policy_path_rules_item_type_6_type_3_operator, -) -from ..models.escalation_policy_path_rules_item_type_6_type_3_rule_type import ( - EscalationPolicyPathRulesItemType6Type3RuleType, - check_escalation_policy_path_rules_item_type_6_type_3_rule_type, -) -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type3") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type3: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType6Type3RuleType): The type of the escalation path rule - fieldable_type (str): The type of the fieldable (e.g., AlertField) - fieldable_id (str): The ID of the alert field - operator (EscalationPolicyPathRulesItemType6Type3Operator): How the alert field value should be matched - values (list[str] | Unset): Values to match against - """ - - rule_type: EscalationPolicyPathRulesItemType6Type3RuleType - fieldable_type: str - fieldable_id: str - operator: EscalationPolicyPathRulesItemType6Type3Operator - values: list[str] | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - fieldable_type = self.fieldable_type - - fieldable_id = self.fieldable_id - - operator: str = self.operator - - values: list[str] | Unset = UNSET - if not isinstance(self.values, Unset): - values = self.values - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "fieldable_type": fieldable_type, - "fieldable_id": fieldable_id, - "operator": operator, - } - ) - if values is not UNSET: - field_dict["values"] = values - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_6_type_3_rule_type(d.pop("rule_type")) - - fieldable_type = d.pop("fieldable_type") - - fieldable_id = d.pop("fieldable_id") - - operator = check_escalation_policy_path_rules_item_type_6_type_3_operator(d.pop("operator")) - - values = cast(list[str], d.pop("values", UNSET)) - - escalation_policy_path_rules_item_type_6_type_3 = cls( - rule_type=rule_type, - fieldable_type=fieldable_type, - fieldable_id=fieldable_id, - operator=operator, - values=values, - ) - - escalation_policy_path_rules_item_type_6_type_3.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_3 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py deleted file mode 100644 index a286b4dd..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_operator.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type3Operator = Literal[ - "contains", - "contains_key", - "does_not_contain", - "does_not_contain_key", - "does_not_match", - "does_not_start_with", - "is", - "is_empty", - "is_not", - "is_not_empty", - "is_not_one_of", - "is_one_of", - "matches", - "starts_with", -] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType6Type3Operator -] = { - "contains", - "contains_key", - "does_not_contain", - "does_not_contain_key", - "does_not_match", - "does_not_start_with", - "is", - "is_empty", - "is_not", - "is_not_empty", - "is_not_one_of", - "is_one_of", - "matches", - "starts_with", -} - - -def check_escalation_policy_path_rules_item_type_6_type_3_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type3Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type3Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py deleted file mode 100644 index 6ee2aa36..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_3_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type3RuleType = Literal["field"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type3RuleType -] = { - "field", -} - - -def check_escalation_policy_path_rules_item_type_6_type_3_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type3RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type3RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_3_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py deleted file mode 100644 index edf2dad6..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_6_type_4_rule_type import ( - EscalationPolicyPathRulesItemType6Type4RuleType, - check_escalation_policy_path_rules_item_type_6_type_4_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type4") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type4: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType6Type4RuleType): The type of the escalation path rule - service_ids (list[str]): Service ids for which this escalation path should be used - """ - - rule_type: EscalationPolicyPathRulesItemType6Type4RuleType - service_ids: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - service_ids = self.service_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "service_ids": service_ids, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_6_type_4_rule_type(d.pop("rule_type")) - - service_ids = cast(list[str], d.pop("service_ids")) - - escalation_policy_path_rules_item_type_6_type_4 = cls( - rule_type=rule_type, - service_ids=service_ids, - ) - - escalation_policy_path_rules_item_type_6_type_4.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_4 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py deleted file mode 100644 index 1230959d..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_4_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type4RuleType = Literal["service"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_4_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type4RuleType -] = { - "service", -} - - -def check_escalation_policy_path_rules_item_type_6_type_4_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type4RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_4_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type4RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_4_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py deleted file mode 100644 index dd212567..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5.py +++ /dev/null @@ -1,105 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_6_type_5_rule_type import ( - EscalationPolicyPathRulesItemType6Type5RuleType, - check_escalation_policy_path_rules_item_type_6_type_5_rule_type, -) -from ..models.escalation_policy_path_rules_item_type_6_type_5_time_zone import ( - EscalationPolicyPathRulesItemType6Type5TimeZone, - check_escalation_policy_path_rules_item_type_6_type_5_time_zone, -) - -if TYPE_CHECKING: - from ..models.escalation_policy_path_rules_item_type_6_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType6Type5TimeBlocksItem, - ) - - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type5") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type5: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType6Type5RuleType): The type of the escalation path rule - time_zone (EscalationPolicyPathRulesItemType6Type5TimeZone): Time zone for the deferral window - time_blocks (list[EscalationPolicyPathRulesItemType6Type5TimeBlocksItem]): Time windows during which alerts are - deferred - """ - - rule_type: EscalationPolicyPathRulesItemType6Type5RuleType - time_zone: EscalationPolicyPathRulesItemType6Type5TimeZone - time_blocks: list[EscalationPolicyPathRulesItemType6Type5TimeBlocksItem] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - time_zone: str = self.time_zone - - time_blocks = [] - for time_blocks_item_data in self.time_blocks: - time_blocks_item = time_blocks_item_data.to_dict() - time_blocks.append(time_blocks_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "time_zone": time_zone, - "time_blocks": time_blocks, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_policy_path_rules_item_type_6_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType6Type5TimeBlocksItem, - ) - - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_6_type_5_rule_type(d.pop("rule_type")) - - time_zone = check_escalation_policy_path_rules_item_type_6_type_5_time_zone(d.pop("time_zone")) - - time_blocks = [] - _time_blocks = d.pop("time_blocks") - for time_blocks_item_data in _time_blocks: - time_blocks_item = EscalationPolicyPathRulesItemType6Type5TimeBlocksItem.from_dict(time_blocks_item_data) - - time_blocks.append(time_blocks_item) - - escalation_policy_path_rules_item_type_6_type_5 = cls( - rule_type=rule_type, - time_zone=time_zone, - time_blocks=time_blocks, - ) - - escalation_policy_path_rules_item_type_6_type_5.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_5 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py deleted file mode 100644 index e5a1f2dc..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType6Type5RuleType = Literal["deferral_window"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type5RuleType -] = { - "deferral_window", -} - - -def check_escalation_policy_path_rules_item_type_6_type_5_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType6Type5RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type5RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py deleted file mode 100644 index d1d3c485..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.py +++ /dev/null @@ -1,251 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6Type5TimeBlocksItem") - - -@_attrs_define -class EscalationPolicyPathRulesItemType6Type5TimeBlocksItem: - """ - Attributes: - monday (bool | None | Unset): - tuesday (bool | None | Unset): - wednesday (bool | None | Unset): - thursday (bool | None | Unset): - friday (bool | None | Unset): - saturday (bool | None | Unset): - sunday (bool | None | Unset): - start_time (str | Unset): Formatted as HH:MM - end_time (str | Unset): Formatted as HH:MM - all_day (bool | None | Unset): - position (int | None | Unset): - """ - - monday: bool | None | Unset = UNSET - tuesday: bool | None | Unset = UNSET - wednesday: bool | None | Unset = UNSET - thursday: bool | None | Unset = UNSET - friday: bool | None | Unset = UNSET - saturday: bool | None | Unset = UNSET - sunday: bool | None | Unset = UNSET - start_time: str | Unset = UNSET - end_time: str | Unset = UNSET - all_day: bool | None | Unset = UNSET - position: int | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - monday: bool | None | Unset - if isinstance(self.monday, Unset): - monday = UNSET - else: - monday = self.monday - - tuesday: bool | None | Unset - if isinstance(self.tuesday, Unset): - tuesday = UNSET - else: - tuesday = self.tuesday - - wednesday: bool | None | Unset - if isinstance(self.wednesday, Unset): - wednesday = UNSET - else: - wednesday = self.wednesday - - thursday: bool | None | Unset - if isinstance(self.thursday, Unset): - thursday = UNSET - else: - thursday = self.thursday - - friday: bool | None | Unset - if isinstance(self.friday, Unset): - friday = UNSET - else: - friday = self.friday - - saturday: bool | None | Unset - if isinstance(self.saturday, Unset): - saturday = UNSET - else: - saturday = self.saturday - - sunday: bool | None | Unset - if isinstance(self.sunday, Unset): - sunday = UNSET - else: - sunday = self.sunday - - start_time = self.start_time - - end_time = self.end_time - - all_day: bool | None | Unset - if isinstance(self.all_day, Unset): - all_day = UNSET - else: - all_day = self.all_day - - position: int | None | Unset - if isinstance(self.position, Unset): - position = UNSET - else: - position = self.position - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if monday is not UNSET: - field_dict["monday"] = monday - if tuesday is not UNSET: - field_dict["tuesday"] = tuesday - if wednesday is not UNSET: - field_dict["wednesday"] = wednesday - if thursday is not UNSET: - field_dict["thursday"] = thursday - if friday is not UNSET: - field_dict["friday"] = friday - if saturday is not UNSET: - field_dict["saturday"] = saturday - if sunday is not UNSET: - field_dict["sunday"] = sunday - if start_time is not UNSET: - field_dict["start_time"] = start_time - if end_time is not UNSET: - field_dict["end_time"] = end_time - if all_day is not UNSET: - field_dict["all_day"] = all_day - if position is not UNSET: - field_dict["position"] = position - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - - def _parse_monday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - monday = _parse_monday(d.pop("monday", UNSET)) - - def _parse_tuesday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - tuesday = _parse_tuesday(d.pop("tuesday", UNSET)) - - def _parse_wednesday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - wednesday = _parse_wednesday(d.pop("wednesday", UNSET)) - - def _parse_thursday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - thursday = _parse_thursday(d.pop("thursday", UNSET)) - - def _parse_friday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - friday = _parse_friday(d.pop("friday", UNSET)) - - def _parse_saturday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - saturday = _parse_saturday(d.pop("saturday", UNSET)) - - def _parse_sunday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - sunday = _parse_sunday(d.pop("sunday", UNSET)) - - start_time = d.pop("start_time", UNSET) - - end_time = d.pop("end_time", UNSET) - - def _parse_all_day(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - all_day = _parse_all_day(d.pop("all_day", UNSET)) - - def _parse_position(data: object) -> int | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(int | None | Unset, data) - - position = _parse_position(d.pop("position", UNSET)) - - escalation_policy_path_rules_item_type_6_type_5_time_blocks_item = cls( - monday=monday, - tuesday=tuesday, - wednesday=wednesday, - thursday=thursday, - friday=friday, - saturday=saturday, - sunday=sunday, - start_time=start_time, - end_time=end_time, - all_day=all_day, - position=position, - ) - - escalation_policy_path_rules_item_type_6_type_5_time_blocks_item.additional_properties = d - return escalation_policy_path_rules_item_type_6_type_5_time_blocks_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py deleted file mode 100644 index a7e56df5..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_7_type_0_rule_type import ( - EscalationPolicyPathRulesItemType7Type0RuleType, - check_escalation_policy_path_rules_item_type_7_type_0_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type0") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type0: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType7Type0RuleType): The type of the escalation path rule - urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used - """ - - rule_type: EscalationPolicyPathRulesItemType7Type0RuleType - urgency_ids: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - urgency_ids = self.urgency_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "urgency_ids": urgency_ids, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_7_type_0_rule_type(d.pop("rule_type")) - - urgency_ids = cast(list[str], d.pop("urgency_ids")) - - escalation_policy_path_rules_item_type_7_type_0 = cls( - rule_type=rule_type, - urgency_ids=urgency_ids, - ) - - escalation_policy_path_rules_item_type_7_type_0.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py deleted file mode 100644 index 7aa80837..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_0_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type0RuleType = Literal["alert_urgency"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_0_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type0RuleType -] = { - "alert_urgency", -} - - -def check_escalation_policy_path_rules_item_type_7_type_0_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type0RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_0_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type0RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_0_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py deleted file mode 100644 index 5205ca98..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_7_type_1_rule_type import ( - EscalationPolicyPathRulesItemType7Type1RuleType, - check_escalation_policy_path_rules_item_type_7_type_1_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type1") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type1: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType7Type1RuleType): The type of the escalation path rule - within_working_hour (bool): Whether the escalation path should be used within working hours - """ - - rule_type: EscalationPolicyPathRulesItemType7Type1RuleType - within_working_hour: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - within_working_hour = self.within_working_hour - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "within_working_hour": within_working_hour, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_7_type_1_rule_type(d.pop("rule_type")) - - within_working_hour = d.pop("within_working_hour") - - escalation_policy_path_rules_item_type_7_type_1 = cls( - rule_type=rule_type, - within_working_hour=within_working_hour, - ) - - escalation_policy_path_rules_item_type_7_type_1.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_1 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py deleted file mode 100644 index 2b30fed9..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_1_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type1RuleType = Literal["working_hour"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_1_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type1RuleType -] = { - "working_hour", -} - - -def check_escalation_policy_path_rules_item_type_7_type_1_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type1RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_1_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type1RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_1_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py deleted file mode 100644 index 338aa074..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2.py +++ /dev/null @@ -1,118 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_7_type_2_operator import ( - EscalationPolicyPathRulesItemType7Type2Operator, - check_escalation_policy_path_rules_item_type_7_type_2_operator, -) -from ..models.escalation_policy_path_rules_item_type_7_type_2_rule_type import ( - EscalationPolicyPathRulesItemType7Type2RuleType, - check_escalation_policy_path_rules_item_type_7_type_2_rule_type, -) -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type2") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type2: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType7Type2RuleType): The type of the escalation path rule - json_path (str): JSON path to extract value from payload - operator (EscalationPolicyPathRulesItemType7Type2Operator): How JSON path value should be matched - value (None | str | Unset): Value with which JSON path value should be matched - values (list[str] | Unset): Values to match against (for is_one_of / is_not_one_of operators) - """ - - rule_type: EscalationPolicyPathRulesItemType7Type2RuleType - json_path: str - operator: EscalationPolicyPathRulesItemType7Type2Operator - value: None | str | Unset = UNSET - values: list[str] | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - json_path = self.json_path - - operator: str = self.operator - - value: None | str | Unset - if isinstance(self.value, Unset): - value = UNSET - else: - value = self.value - - values: list[str] | Unset = UNSET - if not isinstance(self.values, Unset): - values = self.values - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "json_path": json_path, - "operator": operator, - } - ) - if value is not UNSET: - field_dict["value"] = value - if values is not UNSET: - field_dict["values"] = values - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_7_type_2_rule_type(d.pop("rule_type")) - - json_path = d.pop("json_path") - - operator = check_escalation_policy_path_rules_item_type_7_type_2_operator(d.pop("operator")) - - def _parse_value(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - value = _parse_value(d.pop("value", UNSET)) - - values = cast(list[str], d.pop("values", UNSET)) - - escalation_policy_path_rules_item_type_7_type_2 = cls( - rule_type=rule_type, - json_path=json_path, - operator=operator, - value=value, - values=values, - ) - - escalation_policy_path_rules_item_type_7_type_2.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_2 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py deleted file mode 100644 index ed7d85c6..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_operator.py +++ /dev/null @@ -1,28 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type2Operator = Literal[ - "contains", "does_not_contain", "is", "is_not", "is_not_one_of", "is_one_of" -] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType7Type2Operator -] = { - "contains", - "does_not_contain", - "is", - "is_not", - "is_not_one_of", - "is_one_of", -} - - -def check_escalation_policy_path_rules_item_type_7_type_2_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type2Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type2Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py deleted file mode 100644 index edc8bc7d..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_2_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type2RuleType = Literal["json_path"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type2RuleType -] = { - "json_path", -} - - -def check_escalation_policy_path_rules_item_type_7_type_2_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type2RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type2RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_2_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py deleted file mode 100644 index 95131539..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3.py +++ /dev/null @@ -1,106 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_7_type_3_operator import ( - EscalationPolicyPathRulesItemType7Type3Operator, - check_escalation_policy_path_rules_item_type_7_type_3_operator, -) -from ..models.escalation_policy_path_rules_item_type_7_type_3_rule_type import ( - EscalationPolicyPathRulesItemType7Type3RuleType, - check_escalation_policy_path_rules_item_type_7_type_3_rule_type, -) -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type3") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type3: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType7Type3RuleType): The type of the escalation path rule - fieldable_type (str): The type of the fieldable (e.g., AlertField) - fieldable_id (str): The ID of the alert field - operator (EscalationPolicyPathRulesItemType7Type3Operator): How the alert field value should be matched - values (list[str] | Unset): Values to match against - """ - - rule_type: EscalationPolicyPathRulesItemType7Type3RuleType - fieldable_type: str - fieldable_id: str - operator: EscalationPolicyPathRulesItemType7Type3Operator - values: list[str] | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - fieldable_type = self.fieldable_type - - fieldable_id = self.fieldable_id - - operator: str = self.operator - - values: list[str] | Unset = UNSET - if not isinstance(self.values, Unset): - values = self.values - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "fieldable_type": fieldable_type, - "fieldable_id": fieldable_id, - "operator": operator, - } - ) - if values is not UNSET: - field_dict["values"] = values - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_7_type_3_rule_type(d.pop("rule_type")) - - fieldable_type = d.pop("fieldable_type") - - fieldable_id = d.pop("fieldable_id") - - operator = check_escalation_policy_path_rules_item_type_7_type_3_operator(d.pop("operator")) - - values = cast(list[str], d.pop("values", UNSET)) - - escalation_policy_path_rules_item_type_7_type_3 = cls( - rule_type=rule_type, - fieldable_type=fieldable_type, - fieldable_id=fieldable_id, - operator=operator, - values=values, - ) - - escalation_policy_path_rules_item_type_7_type_3.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_3 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py deleted file mode 100644 index 3d82e24b..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_operator.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type3Operator = Literal[ - "contains", - "contains_key", - "does_not_contain", - "does_not_contain_key", - "does_not_match", - "does_not_start_with", - "is", - "is_empty", - "is_not", - "is_not_empty", - "is_not_one_of", - "is_one_of", - "matches", - "starts_with", -] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_OPERATOR_VALUES: set[ - EscalationPolicyPathRulesItemType7Type3Operator -] = { - "contains", - "contains_key", - "does_not_contain", - "does_not_contain_key", - "does_not_match", - "does_not_start_with", - "is", - "is_empty", - "is_not", - "is_not_empty", - "is_not_one_of", - "is_one_of", - "matches", - "starts_with", -} - - -def check_escalation_policy_path_rules_item_type_7_type_3_operator( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type3Operator | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_OPERATOR_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type3Operator, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_OPERATOR_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py deleted file mode 100644 index 83918749..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_3_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type3RuleType = Literal["field"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type3RuleType -] = { - "field", -} - - -def check_escalation_policy_path_rules_item_type_7_type_3_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type3RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type3RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_3_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py deleted file mode 100644 index 992a6697..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_7_type_4_rule_type import ( - EscalationPolicyPathRulesItemType7Type4RuleType, - check_escalation_policy_path_rules_item_type_7_type_4_rule_type, -) - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type4") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type4: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType7Type4RuleType): The type of the escalation path rule - service_ids (list[str]): Service ids for which this escalation path should be used - """ - - rule_type: EscalationPolicyPathRulesItemType7Type4RuleType - service_ids: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - service_ids = self.service_ids - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "service_ids": service_ids, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_7_type_4_rule_type(d.pop("rule_type")) - - service_ids = cast(list[str], d.pop("service_ids")) - - escalation_policy_path_rules_item_type_7_type_4 = cls( - rule_type=rule_type, - service_ids=service_ids, - ) - - escalation_policy_path_rules_item_type_7_type_4.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_4 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py deleted file mode 100644 index 8fb068d1..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_4_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type4RuleType = Literal["service"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_4_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type4RuleType -] = { - "service", -} - - -def check_escalation_policy_path_rules_item_type_7_type_4_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type4RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_4_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type4RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_4_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py deleted file mode 100644 index 833cb7f1..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5.py +++ /dev/null @@ -1,105 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.escalation_policy_path_rules_item_type_7_type_5_rule_type import ( - EscalationPolicyPathRulesItemType7Type5RuleType, - check_escalation_policy_path_rules_item_type_7_type_5_rule_type, -) -from ..models.escalation_policy_path_rules_item_type_7_type_5_time_zone import ( - EscalationPolicyPathRulesItemType7Type5TimeZone, - check_escalation_policy_path_rules_item_type_7_type_5_time_zone, -) - -if TYPE_CHECKING: - from ..models.escalation_policy_path_rules_item_type_7_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType7Type5TimeBlocksItem, - ) - - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type5") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type5: - """ - Attributes: - rule_type (EscalationPolicyPathRulesItemType7Type5RuleType): The type of the escalation path rule - time_zone (EscalationPolicyPathRulesItemType7Type5TimeZone): Time zone for the deferral window - time_blocks (list[EscalationPolicyPathRulesItemType7Type5TimeBlocksItem]): Time windows during which alerts are - deferred - """ - - rule_type: EscalationPolicyPathRulesItemType7Type5RuleType - time_zone: EscalationPolicyPathRulesItemType7Type5TimeZone - time_blocks: list[EscalationPolicyPathRulesItemType7Type5TimeBlocksItem] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rule_type: str = self.rule_type - - time_zone: str = self.time_zone - - time_blocks = [] - for time_blocks_item_data in self.time_blocks: - time_blocks_item = time_blocks_item_data.to_dict() - time_blocks.append(time_blocks_item) - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "rule_type": rule_type, - "time_zone": time_zone, - "time_blocks": time_blocks, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.escalation_policy_path_rules_item_type_7_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType7Type5TimeBlocksItem, - ) - - d = dict(src_dict) - rule_type = check_escalation_policy_path_rules_item_type_7_type_5_rule_type(d.pop("rule_type")) - - time_zone = check_escalation_policy_path_rules_item_type_7_type_5_time_zone(d.pop("time_zone")) - - time_blocks = [] - _time_blocks = d.pop("time_blocks") - for time_blocks_item_data in _time_blocks: - time_blocks_item = EscalationPolicyPathRulesItemType7Type5TimeBlocksItem.from_dict(time_blocks_item_data) - - time_blocks.append(time_blocks_item) - - escalation_policy_path_rules_item_type_7_type_5 = cls( - rule_type=rule_type, - time_zone=time_zone, - time_blocks=time_blocks, - ) - - escalation_policy_path_rules_item_type_7_type_5.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_5 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py deleted file mode 100644 index 290e4ee8..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_rule_type.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -EscalationPolicyPathRulesItemType7Type5RuleType = Literal["deferral_window"] - -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_RULE_TYPE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type5RuleType -] = { - "deferral_window", -} - - -def check_escalation_policy_path_rules_item_type_7_type_5_rule_type( - value: str | None, -) -> EscalationPolicyPathRulesItemType7Type5RuleType | None: - if value is None: - return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_RULE_TYPE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type5RuleType, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_RULE_TYPE_VALUES!r}" - ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py deleted file mode 100644 index 96d6f418..00000000 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.py +++ /dev/null @@ -1,251 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7Type5TimeBlocksItem") - - -@_attrs_define -class EscalationPolicyPathRulesItemType7Type5TimeBlocksItem: - """ - Attributes: - monday (bool | None | Unset): - tuesday (bool | None | Unset): - wednesday (bool | None | Unset): - thursday (bool | None | Unset): - friday (bool | None | Unset): - saturday (bool | None | Unset): - sunday (bool | None | Unset): - start_time (str | Unset): Formatted as HH:MM - end_time (str | Unset): Formatted as HH:MM - all_day (bool | None | Unset): - position (int | None | Unset): - """ - - monday: bool | None | Unset = UNSET - tuesday: bool | None | Unset = UNSET - wednesday: bool | None | Unset = UNSET - thursday: bool | None | Unset = UNSET - friday: bool | None | Unset = UNSET - saturday: bool | None | Unset = UNSET - sunday: bool | None | Unset = UNSET - start_time: str | Unset = UNSET - end_time: str | Unset = UNSET - all_day: bool | None | Unset = UNSET - position: int | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - monday: bool | None | Unset - if isinstance(self.monday, Unset): - monday = UNSET - else: - monday = self.monday - - tuesday: bool | None | Unset - if isinstance(self.tuesday, Unset): - tuesday = UNSET - else: - tuesday = self.tuesday - - wednesday: bool | None | Unset - if isinstance(self.wednesday, Unset): - wednesday = UNSET - else: - wednesday = self.wednesday - - thursday: bool | None | Unset - if isinstance(self.thursday, Unset): - thursday = UNSET - else: - thursday = self.thursday - - friday: bool | None | Unset - if isinstance(self.friday, Unset): - friday = UNSET - else: - friday = self.friday - - saturday: bool | None | Unset - if isinstance(self.saturday, Unset): - saturday = UNSET - else: - saturday = self.saturday - - sunday: bool | None | Unset - if isinstance(self.sunday, Unset): - sunday = UNSET - else: - sunday = self.sunday - - start_time = self.start_time - - end_time = self.end_time - - all_day: bool | None | Unset - if isinstance(self.all_day, Unset): - all_day = UNSET - else: - all_day = self.all_day - - position: int | None | Unset - if isinstance(self.position, Unset): - position = UNSET - else: - position = self.position - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if monday is not UNSET: - field_dict["monday"] = monday - if tuesday is not UNSET: - field_dict["tuesday"] = tuesday - if wednesday is not UNSET: - field_dict["wednesday"] = wednesday - if thursday is not UNSET: - field_dict["thursday"] = thursday - if friday is not UNSET: - field_dict["friday"] = friday - if saturday is not UNSET: - field_dict["saturday"] = saturday - if sunday is not UNSET: - field_dict["sunday"] = sunday - if start_time is not UNSET: - field_dict["start_time"] = start_time - if end_time is not UNSET: - field_dict["end_time"] = end_time - if all_day is not UNSET: - field_dict["all_day"] = all_day - if position is not UNSET: - field_dict["position"] = position - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - - def _parse_monday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - monday = _parse_monday(d.pop("monday", UNSET)) - - def _parse_tuesday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - tuesday = _parse_tuesday(d.pop("tuesday", UNSET)) - - def _parse_wednesday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - wednesday = _parse_wednesday(d.pop("wednesday", UNSET)) - - def _parse_thursday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - thursday = _parse_thursday(d.pop("thursday", UNSET)) - - def _parse_friday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - friday = _parse_friday(d.pop("friday", UNSET)) - - def _parse_saturday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - saturday = _parse_saturday(d.pop("saturday", UNSET)) - - def _parse_sunday(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - sunday = _parse_sunday(d.pop("sunday", UNSET)) - - start_time = d.pop("start_time", UNSET) - - end_time = d.pop("end_time", UNSET) - - def _parse_all_day(data: object) -> bool | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(bool | None | Unset, data) - - all_day = _parse_all_day(d.pop("all_day", UNSET)) - - def _parse_position(data: object) -> int | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(int | None | Unset, data) - - position = _parse_position(d.pop("position", UNSET)) - - escalation_policy_path_rules_item_type_7_type_5_time_blocks_item = cls( - monday=monday, - tuesday=tuesday, - wednesday=wednesday, - thursday=thursday, - friday=friday, - saturday=saturday, - sunday=sunday, - start_time=start_time, - end_time=end_time, - all_day=all_day, - position=position, - ) - - escalation_policy_path_rules_item_type_7_type_5_time_blocks_item.additional_properties = d - return escalation_policy_path_rules_item_type_7_type_5_time_blocks_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path.py b/rootly_sdk/models/new_escalation_policy_path.py new file mode 100644 index 00000000..ad311e9d --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.new_escalation_policy_path_data import NewEscalationPolicyPathData + + +T = TypeVar("T", bound="NewEscalationPolicyPath") + + +@_attrs_define +class NewEscalationPolicyPath: + """ + Attributes: + data (NewEscalationPolicyPathData): + """ + + data: NewEscalationPolicyPathData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_escalation_policy_path_data import NewEscalationPolicyPathData + + d = dict(src_dict) + data = NewEscalationPolicyPathData.from_dict(d.pop("data")) + + new_escalation_policy_path = cls( + data=data, + ) + + new_escalation_policy_path.additional_properties = d + return new_escalation_policy_path + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data.py b/rootly_sdk/models/new_escalation_policy_path_data.py new file mode 100644 index 00000000..355e1ec9 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_type import ( + NewEscalationPolicyPathDataType, + check_new_escalation_policy_path_data_type, +) + +if TYPE_CHECKING: + from ..models.new_escalation_policy_path_data_attributes import NewEscalationPolicyPathDataAttributes + + +T = TypeVar("T", bound="NewEscalationPolicyPathData") + + +@_attrs_define +class NewEscalationPolicyPathData: + """ + Attributes: + type_ (NewEscalationPolicyPathDataType): + attributes (NewEscalationPolicyPathDataAttributes): + """ + + type_: NewEscalationPolicyPathDataType + attributes: NewEscalationPolicyPathDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_escalation_policy_path_data_attributes import NewEscalationPolicyPathDataAttributes + + d = dict(src_dict) + type_ = check_new_escalation_policy_path_data_type(d.pop("type")) + + attributes = NewEscalationPolicyPathDataAttributes.from_dict(d.pop("attributes")) + + new_escalation_policy_path_data = cls( + type_=type_, + attributes=attributes, + ) + + new_escalation_policy_path_data.additional_properties = d + return new_escalation_policy_path_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py new file mode 100644 index 00000000..b3313c07 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py @@ -0,0 +1,419 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.new_escalation_policy_path_data_attributes_after_deferral_behavior import ( + NewEscalationPolicyPathDataAttributesAfterDeferralBehavior, + check_new_escalation_policy_path_data_attributes_after_deferral_behavior, +) +from ..models.new_escalation_policy_path_data_attributes_match_mode import ( + NewEscalationPolicyPathDataAttributesMatchMode, + check_new_escalation_policy_path_data_attributes_match_mode, +) +from ..models.new_escalation_policy_path_data_attributes_notification_type import ( + NewEscalationPolicyPathDataAttributesNotificationType, + check_new_escalation_policy_path_data_attributes_notification_type, +) +from ..models.new_escalation_policy_path_data_attributes_path_type import ( + NewEscalationPolicyPathDataAttributesPathType, + check_new_escalation_policy_path_data_attributes_path_type, +) +from ..models.new_escalation_policy_path_data_attributes_time_restriction_time_zone import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, + check_new_escalation_policy_path_data_attributes_time_restriction_time_zone, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, + ) + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributes") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributes: + """ + Attributes: + name (str): The name of the escalation path + notification_type (NewEscalationPolicyPathDataAttributesNotificationType | Unset): Notification rule type to be + used Default: 'audible'. + path_type (NewEscalationPolicyPathDataAttributesPathType | Unset): The type of escalation path to create + Default: 'escalation'. + after_deferral_behavior (NewEscalationPolicyPathDataAttributesAfterDeferralBehavior | Unset): What happens after + a deferral path finishes. Required for deferral paths. + after_deferral_path_id (None | str | Unset): The escalation path to execute after this deferral path when + after_deferral_behavior is execute_path. + default (bool | None | Unset): Whether this escalation path is the default path + match_mode (NewEscalationPolicyPathDataAttributesMatchMode | Unset): How path rules are matched. Default: + 'match-all-rules'. + position (int | Unset): The position of this path in the paths for this EP. + repeat (bool | None | Unset): Whether this path should be repeated until someone acknowledges the alert + repeat_count (int | None | Unset): The number of times this path will be executed until someone acknowledges the + alert + initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). + rules (list[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | + EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour] | Unset): Escalation + path conditions + time_restriction_time_zone (NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset): Time zone + used for time restrictions. + time_restrictions (list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset): If time + restrictions are set, alerts will follow this path when they arrive within the specified time ranges and meet + the rules. + """ + + name: str + notification_type: NewEscalationPolicyPathDataAttributesNotificationType | Unset = "audible" + path_type: NewEscalationPolicyPathDataAttributesPathType | Unset = "escalation" + after_deferral_behavior: NewEscalationPolicyPathDataAttributesAfterDeferralBehavior | Unset = UNSET + after_deferral_path_id: None | str | Unset = UNSET + default: bool | None | Unset = UNSET + match_mode: NewEscalationPolicyPathDataAttributesMatchMode | Unset = "match-all-rules" + position: int | Unset = UNSET + repeat: bool | None | Unset = UNSET + repeat_count: int | None | Unset = UNSET + initial_delay: int | Unset = UNSET + rules: ( + list[ + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + ] + | Unset + ) = UNSET + time_restriction_time_zone: NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset = UNSET + time_restrictions: list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + + name = self.name + + notification_type: str | Unset = UNSET + if not isinstance(self.notification_type, Unset): + notification_type = self.notification_type + + path_type: str | Unset = UNSET + if not isinstance(self.path_type, Unset): + path_type = self.path_type + + after_deferral_behavior: str | Unset = UNSET + if not isinstance(self.after_deferral_behavior, Unset): + after_deferral_behavior = self.after_deferral_behavior + + after_deferral_path_id: None | str | Unset + if isinstance(self.after_deferral_path_id, Unset): + after_deferral_path_id = UNSET + else: + after_deferral_path_id = self.after_deferral_path_id + + default: bool | None | Unset + if isinstance(self.default, Unset): + default = UNSET + else: + default = self.default + + match_mode: str | Unset = UNSET + if not isinstance(self.match_mode, Unset): + match_mode = self.match_mode + + position = self.position + + repeat: bool | None | Unset + if isinstance(self.repeat, Unset): + repeat = UNSET + else: + repeat = self.repeat + + repeat_count: int | None | Unset + if isinstance(self.repeat_count, Unset): + repeat_count = UNSET + else: + repeat_count = self.repeat_count + + initial_delay = self.initial_delay + + rules: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.rules, Unset): + rules = [] + for rules_item_data in self.rules: + rules_item: dict[str, Any] + if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleField): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleService): + rules_item = rules_item_data.to_dict() + else: + rules_item = rules_item_data.to_dict() + + rules.append(rules_item) + + time_restriction_time_zone: str | Unset = UNSET + if not isinstance(self.time_restriction_time_zone, Unset): + time_restriction_time_zone = self.time_restriction_time_zone + + time_restrictions: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.time_restrictions, Unset): + time_restrictions = [] + for time_restrictions_item_data in self.time_restrictions: + time_restrictions_item = time_restrictions_item_data.to_dict() + time_restrictions.append(time_restrictions_item) + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + } + ) + if notification_type is not UNSET: + field_dict["notification_type"] = notification_type + if path_type is not UNSET: + field_dict["path_type"] = path_type + if after_deferral_behavior is not UNSET: + field_dict["after_deferral_behavior"] = after_deferral_behavior + if after_deferral_path_id is not UNSET: + field_dict["after_deferral_path_id"] = after_deferral_path_id + if default is not UNSET: + field_dict["default"] = default + if match_mode is not UNSET: + field_dict["match_mode"] = match_mode + if position is not UNSET: + field_dict["position"] = position + if repeat is not UNSET: + field_dict["repeat"] = repeat + if repeat_count is not UNSET: + field_dict["repeat_count"] = repeat_count + if initial_delay is not UNSET: + field_dict["initial_delay"] = initial_delay + if rules is not UNSET: + field_dict["rules"] = rules + if time_restriction_time_zone is not UNSET: + field_dict["time_restriction_time_zone"] = time_restriction_time_zone + if time_restrictions is not UNSET: + field_dict["time_restrictions"] = time_restrictions + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, + ) + + d = dict(src_dict) + name = d.pop("name") + + _notification_type = d.pop("notification_type", UNSET) + notification_type: NewEscalationPolicyPathDataAttributesNotificationType | Unset + if isinstance(_notification_type, Unset): + notification_type = UNSET + else: + notification_type = check_new_escalation_policy_path_data_attributes_notification_type(_notification_type) + + _path_type = d.pop("path_type", UNSET) + path_type: NewEscalationPolicyPathDataAttributesPathType | Unset + if isinstance(_path_type, Unset): + path_type = UNSET + else: + path_type = check_new_escalation_policy_path_data_attributes_path_type(_path_type) + + _after_deferral_behavior = d.pop("after_deferral_behavior", UNSET) + after_deferral_behavior: NewEscalationPolicyPathDataAttributesAfterDeferralBehavior | Unset + if isinstance(_after_deferral_behavior, Unset): + after_deferral_behavior = UNSET + else: + after_deferral_behavior = check_new_escalation_policy_path_data_attributes_after_deferral_behavior( + _after_deferral_behavior + ) + + def _parse_after_deferral_path_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + after_deferral_path_id = _parse_after_deferral_path_id(d.pop("after_deferral_path_id", UNSET)) + + def _parse_default(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + default = _parse_default(d.pop("default", UNSET)) + + _match_mode = d.pop("match_mode", UNSET) + match_mode: NewEscalationPolicyPathDataAttributesMatchMode | Unset + if isinstance(_match_mode, Unset): + match_mode = UNSET + else: + match_mode = check_new_escalation_policy_path_data_attributes_match_mode(_match_mode) + + position = d.pop("position", UNSET) + + def _parse_repeat(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + repeat = _parse_repeat(d.pop("repeat", UNSET)) + + def _parse_repeat_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + repeat_count = _parse_repeat_count(d.pop("repeat_count", UNSET)) + + initial_delay = d.pop("initial_delay", UNSET) + + _rules = d.pop("rules", UNSET) + rules: ( + list[ + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + ] + | Unset + ) = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + + def _parse_rules_item( + data: object, + ) -> ( + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + ): + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + + return rules_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + + return rules_item_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + + return rules_item_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_3 = EscalationPathRuleField.from_dict(data) + + return rules_item_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_4 = EscalationPathRuleService.from_dict(data) + + return rules_item_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + + return rules_item_type_5 + + rules_item = _parse_rules_item(rules_item_data) + + rules.append(rules_item) + + _time_restriction_time_zone = d.pop("time_restriction_time_zone", UNSET) + time_restriction_time_zone: NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset + if isinstance(_time_restriction_time_zone, Unset): + time_restriction_time_zone = UNSET + else: + time_restriction_time_zone = check_new_escalation_policy_path_data_attributes_time_restriction_time_zone( + _time_restriction_time_zone + ) + + _time_restrictions = d.pop("time_restrictions", UNSET) + time_restrictions: list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET + if _time_restrictions is not UNSET: + time_restrictions = [] + for time_restrictions_item_data in _time_restrictions: + time_restrictions_item = NewEscalationPolicyPathDataAttributesTimeRestrictionsItem.from_dict( + time_restrictions_item_data + ) + + time_restrictions.append(time_restrictions_item) + + new_escalation_policy_path_data_attributes = cls( + name=name, + notification_type=notification_type, + path_type=path_type, + after_deferral_behavior=after_deferral_behavior, + after_deferral_path_id=after_deferral_path_id, + default=default, + match_mode=match_mode, + position=position, + repeat=repeat, + repeat_count=repeat_count, + initial_delay=initial_delay, + rules=rules, + time_restriction_time_zone=time_restriction_time_zone, + time_restrictions=time_restrictions, + ) + + return new_escalation_policy_path_data_attributes diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_after_deferral_behavior.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_after_deferral_behavior.py new file mode 100644 index 00000000..ad03f930 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_after_deferral_behavior.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesAfterDeferralBehavior = Literal["execute_path", "re_evaluate"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_AFTER_DEFERRAL_BEHAVIOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesAfterDeferralBehavior +] = { + "execute_path", + "re_evaluate", +} + + +def check_new_escalation_policy_path_data_attributes_after_deferral_behavior( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesAfterDeferralBehavior | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_AFTER_DEFERRAL_BEHAVIOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesAfterDeferralBehavior, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_AFTER_DEFERRAL_BEHAVIOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_match_mode.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_match_mode.py new file mode 100644 index 00000000..d79afe08 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_match_mode.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesMatchMode = Literal["match-all-rules", "match-any-rule"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_MATCH_MODE_VALUES: set[NewEscalationPolicyPathDataAttributesMatchMode] = { + "match-all-rules", + "match-any-rule", +} + + +def check_new_escalation_policy_path_data_attributes_match_mode( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesMatchMode | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_MATCH_MODE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesMatchMode, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_MATCH_MODE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_notification_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_notification_type.py new file mode 100644 index 00000000..9adf8c6c --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_notification_type.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesNotificationType = Literal["audible", "quiet"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_NOTIFICATION_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesNotificationType +] = { + "audible", + "quiet", +} + + +def check_new_escalation_policy_path_data_attributes_notification_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesNotificationType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_NOTIFICATION_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesNotificationType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_NOTIFICATION_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_path_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_path_type.py new file mode 100644 index 00000000..1736c354 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_path_type.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesPathType = Literal["deferral", "escalation"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_PATH_TYPE_VALUES: set[NewEscalationPolicyPathDataAttributesPathType] = { + "deferral", + "escalation", +} + + +def check_new_escalation_policy_path_data_attributes_path_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesPathType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_PATH_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesPathType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_PATH_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py similarity index 94% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py rename to rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py index 3db89d45..750288dc 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_type_5_time_zone.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType7Type5TimeZone = Literal[ +NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone = Literal[ "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -292,8 +292,8 @@ "Zurich", ] -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_TIME_ZONE_VALUES: set[ - EscalationPolicyPathRulesItemType7Type5TimeZone +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTION_TIME_ZONE_VALUES: set[ + NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone ] = { "Abu Dhabi", "Adelaide", @@ -587,13 +587,13 @@ } -def check_escalation_policy_path_rules_item_type_7_type_5_time_zone( +def check_new_escalation_policy_path_data_attributes_time_restriction_time_zone( value: str | None, -) -> EscalationPolicyPathRulesItemType7Type5TimeZone | None: +) -> NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | None: if value is None: return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_TIME_ZONE_VALUES: - return cast(EscalationPolicyPathRulesItemType7Type5TimeZone, value) + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTION_TIME_ZONE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_TYPE_5_TIME_ZONE_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTION_TIME_ZONE_VALUES!r}" ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item.py new file mode 100644 index 00000000..6b6d14be --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item.py @@ -0,0 +1,96 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, + check_new_escalation_policy_path_data_attributes_time_restrictions_item_end_day, +) +from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, + check_new_escalation_policy_path_data_attributes_time_restrictions_item_start_day, +) + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesTimeRestrictionsItem") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesTimeRestrictionsItem: + """ + Attributes: + start_day (NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay): + start_time (str): Formatted as HH:MM + end_day (NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay): + end_time (str): Formatted as HH:MM + """ + + start_day: NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay + start_time: str + end_day: NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay + end_time: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + start_day: str = self.start_day + + start_time = self.start_time + + end_day: str = self.end_day + + end_time = self.end_time + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "start_day": start_day, + "start_time": start_time, + "end_day": end_day, + "end_time": end_time, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + start_day = check_new_escalation_policy_path_data_attributes_time_restrictions_item_start_day( + d.pop("start_day") + ) + + start_time = d.pop("start_time") + + end_day = check_new_escalation_policy_path_data_attributes_time_restrictions_item_end_day(d.pop("end_day")) + + end_time = d.pop("end_time") + + new_escalation_policy_path_data_attributes_time_restrictions_item = cls( + start_day=start_day, + start_time=start_time, + end_day=end_day, + end_time=end_time, + ) + + new_escalation_policy_path_data_attributes_time_restrictions_item.additional_properties = d + return new_escalation_policy_path_data_attributes_time_restrictions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py new file mode 100644 index 00000000..f6bc2fbc --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_END_DAY_VALUES: set[ + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay +] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_new_escalation_policy_path_data_attributes_time_restrictions_item_end_day( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_END_DAY_VALUES: + return cast(NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_END_DAY_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py new file mode 100644 index 00000000..9847165e --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_START_DAY_VALUES: set[ + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay +] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_new_escalation_policy_path_data_attributes_time_restrictions_item_start_day( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_START_DAY_VALUES: + return cast(NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_START_DAY_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_type.py b/rootly_sdk/models/new_escalation_policy_path_data_type.py new file mode 100644 index 00000000..f9740900 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataType = Literal["escalation_paths"] + +NEW_ESCALATION_POLICY_PATH_DATA_TYPE_VALUES: set[NewEscalationPolicyPathDataType] = { + "escalation_paths", +} + + +def check_new_escalation_policy_path_data_type(value: str | None) -> NewEscalationPolicyPathDataType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_sla_data_attributes.py b/rootly_sdk/models/new_sla_data_attributes.py index c146b692..e5113257 100644 --- a/rootly_sdk/models/new_sla_data_attributes.py +++ b/rootly_sdk/models/new_sla_data_attributes.py @@ -58,9 +58,11 @@ class NewSlaDataAttributes: manager_role_id or manager_user_id. manager_user_id (int | None | Unset): The ID of the user responsible for this SLA. Must provide either manager_role_id or manager_user_id. - assignment_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the assignment deadline + assignment_deadline_sub_status_id (None | Unset | UUID): Sub-status for the assignment deadline. Required when + custom lifecycle statuses are enabled on the team. assignment_skip_weekends (bool | Unset): Whether to skip weekends when calculating the assignment deadline - completion_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the completion deadline + completion_deadline_sub_status_id (None | Unset | UUID): Sub-status for the completion deadline. Required when + custom lifecycle statuses are enabled on the team. completion_skip_weekends (bool | Unset): Whether to skip weekends when calculating the completion deadline conditions (list[NewSlaDataAttributesConditionsItem] | Unset): Conditions that determine which incidents this SLA applies to. Maximum 20. diff --git a/rootly_sdk/models/sla.py b/rootly_sdk/models/sla.py index a35b8bef..c153570e 100644 --- a/rootly_sdk/models/sla.py +++ b/rootly_sdk/models/sla.py @@ -35,11 +35,15 @@ class Sla: description (None | str | Unset): A description of the SLA position (int | Unset): Position of the SLA for ordering entity_type (SlaEntityType | Unset): The entity type this SLA applies to - manager_role_id (None | Unset | UUID): The ID of the manager incident role - manager_user_id (int | None | Unset): The ID of the manager user - assignment_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the assignment deadline + manager_role_id (None | Unset | UUID): The ID of the manager incident role. Exactly one of `manager_role_id` or + `manager_user_id` must be provided. + manager_user_id (int | None | Unset): The ID of the manager user. Exactly one of `manager_role_id` or + `manager_user_id` must be provided. + assignment_deadline_sub_status_id (None | Unset | UUID): Sub-status for the assignment deadline. Required when + custom lifecycle statuses are enabled on the team. assignment_skip_weekends (bool | Unset): Whether to skip weekends when calculating the assignment deadline - completion_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the completion deadline + completion_deadline_sub_status_id (None | Unset | UUID): Sub-status for the completion deadline. Required when + custom lifecycle statuses are enabled on the team. completion_skip_weekends (bool | Unset): Whether to skip weekends when calculating the completion deadline conditions (list[SlaConditionsItem] | Unset): Conditions that determine which incidents this SLA applies to notification_configurations (list[SlaNotificationConfigurationsItem] | Unset): Notification timing diff --git a/rootly_sdk/models/update_escalation_policy_path.py b/rootly_sdk/models/update_escalation_policy_path.py new file mode 100644 index 00000000..c5332abc --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data import UpdateEscalationPolicyPathData + + +T = TypeVar("T", bound="UpdateEscalationPolicyPath") + + +@_attrs_define +class UpdateEscalationPolicyPath: + """ + Attributes: + data (UpdateEscalationPolicyPathData): + """ + + data: UpdateEscalationPolicyPathData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data = self.data.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_escalation_policy_path_data import UpdateEscalationPolicyPathData + + d = dict(src_dict) + data = UpdateEscalationPolicyPathData.from_dict(d.pop("data")) + + update_escalation_policy_path = cls( + data=data, + ) + + update_escalation_policy_path.additional_properties = d + return update_escalation_policy_path + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data.py b/rootly_sdk/models/update_escalation_policy_path_data.py new file mode 100644 index 00000000..438db618 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_type import ( + UpdateEscalationPolicyPathDataType, + check_update_escalation_policy_path_data_type, +) + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes import UpdateEscalationPolicyPathDataAttributes + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathData") + + +@_attrs_define +class UpdateEscalationPolicyPathData: + """ + Attributes: + type_ (UpdateEscalationPolicyPathDataType): + attributes (UpdateEscalationPolicyPathDataAttributes): + """ + + type_: UpdateEscalationPolicyPathDataType + attributes: UpdateEscalationPolicyPathDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "attributes": attributes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_escalation_policy_path_data_attributes import UpdateEscalationPolicyPathDataAttributes + + d = dict(src_dict) + type_ = check_update_escalation_policy_path_data_type(d.pop("type")) + + attributes = UpdateEscalationPolicyPathDataAttributes.from_dict(d.pop("attributes")) + + update_escalation_policy_path_data = cls( + type_=type_, + attributes=attributes, + ) + + update_escalation_policy_path_data.additional_properties = d + return update_escalation_policy_path_data + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py new file mode 100644 index 00000000..41421828 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py @@ -0,0 +1,439 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.update_escalation_policy_path_data_attributes_after_deferral_behavior import ( + UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior, + check_update_escalation_policy_path_data_attributes_after_deferral_behavior, +) +from ..models.update_escalation_policy_path_data_attributes_match_mode import ( + UpdateEscalationPolicyPathDataAttributesMatchMode, + check_update_escalation_policy_path_data_attributes_match_mode, +) +from ..models.update_escalation_policy_path_data_attributes_notification_type import ( + UpdateEscalationPolicyPathDataAttributesNotificationType, + check_update_escalation_policy_path_data_attributes_notification_type, +) +from ..models.update_escalation_policy_path_data_attributes_path_type import ( + UpdateEscalationPolicyPathDataAttributesPathType, + check_update_escalation_policy_path_data_attributes_path_type, +) +from ..models.update_escalation_policy_path_data_attributes_time_restriction_time_zone import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, + check_update_escalation_policy_path_data_attributes_time_restriction_time_zone, +) +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributes") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributes: + """ + Attributes: + name (str | Unset): The name of the escalation path + notification_type (UpdateEscalationPolicyPathDataAttributesNotificationType | Unset): Position of the escalation + policy level Default: 'audible'. + path_type (UpdateEscalationPolicyPathDataAttributesPathType | Unset): The type of escalation path. Cannot be + changed after creation. + after_deferral_behavior (UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior | Unset): What happens + after a deferral path finishes. + after_deferral_path_id (None | str | Unset): The escalation path to execute after this deferral path when + after_deferral_behavior is execute_path. + default (bool | None | Unset): Whether this escalation path is the default path + match_mode (UpdateEscalationPolicyPathDataAttributesMatchMode | Unset): How path rules are matched. Default: + 'match-all-rules'. + position (int | Unset): The position of this path in the paths for this EP. + repeat (bool | None | Unset): Whether this path should be repeated until someone acknowledges the alert + repeat_count (int | None | Unset): The number of times this path will be executed until someone acknowledges the + alert + initial_delay (int | Unset): Initial delay for escalation path in minutes. Maximum 1 week (10080). + rules (list[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | + EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour | None] | Unset): + Escalation path conditions + time_restriction_time_zone (UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset): Time zone + used for time restrictions. + time_restrictions (list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset): If time + restrictions are set, alerts will follow this path when they arrive within the specified time ranges and meet + the rules. + """ + + name: str | Unset = UNSET + notification_type: UpdateEscalationPolicyPathDataAttributesNotificationType | Unset = "audible" + path_type: UpdateEscalationPolicyPathDataAttributesPathType | Unset = UNSET + after_deferral_behavior: UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior | Unset = UNSET + after_deferral_path_id: None | str | Unset = UNSET + default: bool | None | Unset = UNSET + match_mode: UpdateEscalationPolicyPathDataAttributesMatchMode | Unset = "match-all-rules" + position: int | Unset = UNSET + repeat: bool | None | Unset = UNSET + repeat_count: int | None | Unset = UNSET + initial_delay: int | Unset = UNSET + rules: ( + list[ + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None + ] + | Unset + ) = UNSET + time_restriction_time_zone: UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset = UNSET + time_restrictions: list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + + name = self.name + + notification_type: str | Unset = UNSET + if not isinstance(self.notification_type, Unset): + notification_type = self.notification_type + + path_type: str | Unset = UNSET + if not isinstance(self.path_type, Unset): + path_type = self.path_type + + after_deferral_behavior: str | Unset = UNSET + if not isinstance(self.after_deferral_behavior, Unset): + after_deferral_behavior = self.after_deferral_behavior + + after_deferral_path_id: None | str | Unset + if isinstance(self.after_deferral_path_id, Unset): + after_deferral_path_id = UNSET + else: + after_deferral_path_id = self.after_deferral_path_id + + default: bool | None | Unset + if isinstance(self.default, Unset): + default = UNSET + else: + default = self.default + + match_mode: str | Unset = UNSET + if not isinstance(self.match_mode, Unset): + match_mode = self.match_mode + + position = self.position + + repeat: bool | None | Unset + if isinstance(self.repeat, Unset): + repeat = UNSET + else: + repeat = self.repeat + + repeat_count: int | None | Unset + if isinstance(self.repeat_count, Unset): + repeat_count = UNSET + else: + repeat_count = self.repeat_count + + initial_delay = self.initial_delay + + rules: list[dict[str, Any] | None] | Unset = UNSET + if not isinstance(self.rules, Unset): + rules = [] + for rules_item_data in self.rules: + rules_item: dict[str, Any] | None + if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleField): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleService): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPathRuleDeferralWindow): + rules_item = rules_item_data.to_dict() + else: + rules_item = rules_item_data + rules.append(rules_item) + + time_restriction_time_zone: str | Unset = UNSET + if not isinstance(self.time_restriction_time_zone, Unset): + time_restriction_time_zone = self.time_restriction_time_zone + + time_restrictions: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.time_restrictions, Unset): + time_restrictions = [] + for time_restrictions_item_data in self.time_restrictions: + time_restrictions_item = time_restrictions_item_data.to_dict() + time_restrictions.append(time_restrictions_item) + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if notification_type is not UNSET: + field_dict["notification_type"] = notification_type + if path_type is not UNSET: + field_dict["path_type"] = path_type + if after_deferral_behavior is not UNSET: + field_dict["after_deferral_behavior"] = after_deferral_behavior + if after_deferral_path_id is not UNSET: + field_dict["after_deferral_path_id"] = after_deferral_path_id + if default is not UNSET: + field_dict["default"] = default + if match_mode is not UNSET: + field_dict["match_mode"] = match_mode + if position is not UNSET: + field_dict["position"] = position + if repeat is not UNSET: + field_dict["repeat"] = repeat + if repeat_count is not UNSET: + field_dict["repeat_count"] = repeat_count + if initial_delay is not UNSET: + field_dict["initial_delay"] = initial_delay + if rules is not UNSET: + field_dict["rules"] = rules + if time_restriction_time_zone is not UNSET: + field_dict["time_restriction_time_zone"] = time_restriction_time_zone + if time_restrictions is not UNSET: + field_dict["time_restrictions"] = time_restrictions + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.escalation_path_rule_alert_urgency import EscalationPathRuleAlertUrgency + from ..models.escalation_path_rule_deferral_window import EscalationPathRuleDeferralWindow + from ..models.escalation_path_rule_field import EscalationPathRuleField + from ..models.escalation_path_rule_json_path import EscalationPathRuleJsonPath + from ..models.escalation_path_rule_service import EscalationPathRuleService + from ..models.escalation_path_rule_working_hour import EscalationPathRuleWorkingHour + from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, + ) + + d = dict(src_dict) + name = d.pop("name", UNSET) + + _notification_type = d.pop("notification_type", UNSET) + notification_type: UpdateEscalationPolicyPathDataAttributesNotificationType | Unset + if isinstance(_notification_type, Unset): + notification_type = UNSET + else: + notification_type = check_update_escalation_policy_path_data_attributes_notification_type( + _notification_type + ) + + _path_type = d.pop("path_type", UNSET) + path_type: UpdateEscalationPolicyPathDataAttributesPathType | Unset + if isinstance(_path_type, Unset): + path_type = UNSET + else: + path_type = check_update_escalation_policy_path_data_attributes_path_type(_path_type) + + _after_deferral_behavior = d.pop("after_deferral_behavior", UNSET) + after_deferral_behavior: UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior | Unset + if isinstance(_after_deferral_behavior, Unset): + after_deferral_behavior = UNSET + else: + after_deferral_behavior = check_update_escalation_policy_path_data_attributes_after_deferral_behavior( + _after_deferral_behavior + ) + + def _parse_after_deferral_path_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + after_deferral_path_id = _parse_after_deferral_path_id(d.pop("after_deferral_path_id", UNSET)) + + def _parse_default(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + default = _parse_default(d.pop("default", UNSET)) + + _match_mode = d.pop("match_mode", UNSET) + match_mode: UpdateEscalationPolicyPathDataAttributesMatchMode | Unset + if isinstance(_match_mode, Unset): + match_mode = UNSET + else: + match_mode = check_update_escalation_policy_path_data_attributes_match_mode(_match_mode) + + position = d.pop("position", UNSET) + + def _parse_repeat(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + repeat = _parse_repeat(d.pop("repeat", UNSET)) + + def _parse_repeat_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + repeat_count = _parse_repeat_count(d.pop("repeat_count", UNSET)) + + initial_delay = d.pop("initial_delay", UNSET) + + _rules = d.pop("rules", UNSET) + rules: ( + list[ + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None + ] + | Unset + ) = UNSET + if _rules is not UNSET: + rules = [] + for rules_item_data in _rules: + + def _parse_rules_item( + data: object, + ) -> ( + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None + ): + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + + return rules_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + + return rules_item_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + + return rules_item_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_3 = EscalationPathRuleField.from_dict(data) + + return rules_item_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_4 = EscalationPathRuleService.from_dict(data) + + return rules_item_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + + return rules_item_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast( + EscalationPathRuleAlertUrgency + | EscalationPathRuleDeferralWindow + | EscalationPathRuleField + | EscalationPathRuleJsonPath + | EscalationPathRuleService + | EscalationPathRuleWorkingHour + | None, + data, + ) + + rules_item = _parse_rules_item(rules_item_data) + + rules.append(rules_item) + + _time_restriction_time_zone = d.pop("time_restriction_time_zone", UNSET) + time_restriction_time_zone: UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset + if isinstance(_time_restriction_time_zone, Unset): + time_restriction_time_zone = UNSET + else: + time_restriction_time_zone = check_update_escalation_policy_path_data_attributes_time_restriction_time_zone( + _time_restriction_time_zone + ) + + _time_restrictions = d.pop("time_restrictions", UNSET) + time_restrictions: list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET + if _time_restrictions is not UNSET: + time_restrictions = [] + for time_restrictions_item_data in _time_restrictions: + time_restrictions_item = UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem.from_dict( + time_restrictions_item_data + ) + + time_restrictions.append(time_restrictions_item) + + update_escalation_policy_path_data_attributes = cls( + name=name, + notification_type=notification_type, + path_type=path_type, + after_deferral_behavior=after_deferral_behavior, + after_deferral_path_id=after_deferral_path_id, + default=default, + match_mode=match_mode, + position=position, + repeat=repeat, + repeat_count=repeat_count, + initial_delay=initial_delay, + rules=rules, + time_restriction_time_zone=time_restriction_time_zone, + time_restrictions=time_restrictions, + ) + + return update_escalation_policy_path_data_attributes diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_after_deferral_behavior.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_after_deferral_behavior.py new file mode 100644 index 00000000..a47e84e2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_after_deferral_behavior.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior = Literal["execute_path", "re_evaluate"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_AFTER_DEFERRAL_BEHAVIOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior +] = { + "execute_path", + "re_evaluate", +} + + +def check_update_escalation_policy_path_data_attributes_after_deferral_behavior( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_AFTER_DEFERRAL_BEHAVIOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_AFTER_DEFERRAL_BEHAVIOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_match_mode.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_match_mode.py new file mode 100644 index 00000000..b47e87a2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_match_mode.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesMatchMode = Literal["match-all-rules", "match-any-rule"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_MATCH_MODE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesMatchMode +] = { + "match-all-rules", + "match-any-rule", +} + + +def check_update_escalation_policy_path_data_attributes_match_mode( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesMatchMode | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_MATCH_MODE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesMatchMode, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_MATCH_MODE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_notification_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_notification_type.py new file mode 100644 index 00000000..6123f742 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_notification_type.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesNotificationType = Literal["audible", "quiet"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_NOTIFICATION_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesNotificationType +] = { + "audible", + "quiet", +} + + +def check_update_escalation_policy_path_data_attributes_notification_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesNotificationType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_NOTIFICATION_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesNotificationType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_NOTIFICATION_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_path_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_path_type.py new file mode 100644 index 00000000..c8496b6e --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_path_type.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesPathType = Literal["deferral", "escalation"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_PATH_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesPathType +] = { + "deferral", + "escalation", +} + + +def check_update_escalation_policy_path_data_attributes_path_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesPathType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_PATH_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesPathType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_PATH_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py similarity index 94% rename from rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py rename to rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py index a110b85b..4641bcfe 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_type_5_time_zone.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPolicyPathRulesItemType6Type5TimeZone = Literal[ +UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone = Literal[ "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -292,8 +292,8 @@ "Zurich", ] -ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_TIME_ZONE_VALUES: set[ - EscalationPolicyPathRulesItemType6Type5TimeZone +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTION_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone ] = { "Abu Dhabi", "Adelaide", @@ -587,13 +587,13 @@ } -def check_escalation_policy_path_rules_item_type_6_type_5_time_zone( +def check_update_escalation_policy_path_data_attributes_time_restriction_time_zone( value: str | None, -) -> EscalationPolicyPathRulesItemType6Type5TimeZone | None: +) -> UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | None: if value is None: return None - if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_TIME_ZONE_VALUES: - return cast(EscalationPolicyPathRulesItemType6Type5TimeZone, value) + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTION_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_TYPE_5_TIME_ZONE_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTION_TIME_ZONE_VALUES!r}" ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item.py new file mode 100644 index 00000000..a53f78dd --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, + check_update_escalation_policy_path_data_attributes_time_restrictions_item_end_day, +) +from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, + check_update_escalation_policy_path_data_attributes_time_restrictions_item_start_day, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem: + """ + Attributes: + start_day (UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay | Unset): + start_time (str | Unset): Formatted as HH:MM + end_day (UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay | Unset): + end_time (str | Unset): Formatted as HH:MM + """ + + start_day: UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay | Unset = UNSET + start_time: str | Unset = UNSET + end_day: UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay | Unset = UNSET + end_time: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + start_day: str | Unset = UNSET + if not isinstance(self.start_day, Unset): + start_day = self.start_day + + start_time = self.start_time + + end_day: str | Unset = UNSET + if not isinstance(self.end_day, Unset): + end_day = self.end_day + + end_time = self.end_time + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if start_day is not UNSET: + field_dict["start_day"] = start_day + if start_time is not UNSET: + field_dict["start_time"] = start_time + if end_day is not UNSET: + field_dict["end_day"] = end_day + if end_time is not UNSET: + field_dict["end_time"] = end_time + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _start_day = d.pop("start_day", UNSET) + start_day: UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay | Unset + if isinstance(_start_day, Unset): + start_day = UNSET + else: + start_day = check_update_escalation_policy_path_data_attributes_time_restrictions_item_start_day(_start_day) + + start_time = d.pop("start_time", UNSET) + + _end_day = d.pop("end_day", UNSET) + end_day: UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay | Unset + if isinstance(_end_day, Unset): + end_day = UNSET + else: + end_day = check_update_escalation_policy_path_data_attributes_time_restrictions_item_end_day(_end_day) + + end_time = d.pop("end_time", UNSET) + + update_escalation_policy_path_data_attributes_time_restrictions_item = cls( + start_day=start_day, + start_time=start_time, + end_day=end_day, + end_time=end_time, + ) + + update_escalation_policy_path_data_attributes_time_restrictions_item.additional_properties = d + return update_escalation_policy_path_data_attributes_time_restrictions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py new file mode 100644 index 00000000..a65e45d5 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_end_day.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_END_DAY_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay +] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_update_escalation_policy_path_data_attributes_time_restrictions_item_end_day( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_END_DAY_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_END_DAY_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py new file mode 100644 index 00000000..43a2c64c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restrictions_item_start_day.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_START_DAY_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay +] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_update_escalation_policy_path_data_attributes_time_restrictions_item_start_day( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_START_DAY_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_TIME_RESTRICTIONS_ITEM_START_DAY_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_type.py b/rootly_sdk/models/update_escalation_policy_path_data_type.py new file mode 100644 index 00000000..7b64d9c4 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataType = Literal["escalation_paths"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_TYPE_VALUES: set[UpdateEscalationPolicyPathDataType] = { + "escalation_paths", +} + + +def check_update_escalation_policy_path_data_type(value: str | None) -> UpdateEscalationPolicyPathDataType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/update_sla_data_attributes.py b/rootly_sdk/models/update_sla_data_attributes.py index 40d8ef7a..7ea47c55 100644 --- a/rootly_sdk/models/update_sla_data_attributes.py +++ b/rootly_sdk/models/update_sla_data_attributes.py @@ -47,19 +47,23 @@ class UpdateSlaDataAttributes: position (int | None | Unset): Position of the SLA for ordering condition_match_type (UpdateSlaDataAttributesConditionMatchType | Unset): Whether all or any conditions must match - manager_role_id (None | Unset | UUID): The ID of the incident role responsible for this SLA - manager_user_id (int | None | Unset): The ID of the user responsible for this SLA + manager_role_id (None | Unset | UUID): The ID of the incident role responsible for this SLA. Exactly one of + `manager_role_id` or `manager_user_id` must be provided. + manager_user_id (int | None | Unset): The ID of the user responsible for this SLA. Exactly one of + `manager_role_id` or `manager_user_id` must be provided. assignment_deadline_days (UpdateSlaDataAttributesAssignmentDeadlineDays | Unset): Number of days for the assignment deadline assignment_deadline_parent_status (UpdateSlaDataAttributesAssignmentDeadlineParentStatus | Unset): The incident parent status that triggers the assignment deadline - assignment_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the assignment deadline + assignment_deadline_sub_status_id (None | Unset | UUID): Sub-status for the assignment deadline. Required when + custom lifecycle statuses are enabled on the team. assignment_skip_weekends (bool | Unset): Whether to skip weekends when calculating the assignment deadline completion_deadline_days (UpdateSlaDataAttributesCompletionDeadlineDays | Unset): Number of days for the completion deadline completion_deadline_parent_status (UpdateSlaDataAttributesCompletionDeadlineParentStatus | Unset): The incident parent status that triggers the completion deadline - completion_deadline_sub_status_id (None | Unset | UUID): Optional sub-status for the completion deadline + completion_deadline_sub_status_id (None | Unset | UUID): Sub-status for the completion deadline. Required when + custom lifecycle statuses are enabled on the team. completion_skip_weekends (bool | Unset): Whether to skip weekends when calculating the completion deadline conditions (list[UpdateSlaDataAttributesConditionsItem] | Unset): Conditions that determine which incidents this SLA applies to. Replaces all existing conditions. diff --git a/tools/fix_openapi_escalation_paths.py b/tools/fix_openapi_escalation_paths.py new file mode 100644 index 00000000..ee1ecc41 --- /dev/null +++ b/tools/fix_openapi_escalation_paths.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +""" +Post-download fix for escalation path rules in the OpenAPI spec. + +openapi-python-client cannot handle inline oneOf variants with properties/required +but no $ref. This script extracts each rule variant into a named component schema +and replaces inline definitions with $ref pointers. + +Also fixes upstream bug where urgency_ids array is missing items definition. + +Run after downloading swagger.json, before generating: + python tools/fix_openapi_escalation_paths.py tools/swagger.json + +See: https://github.com/rootlyhq/rootly/pull/14888 +""" + +import json +import sys +from pathlib import Path + +RULE_NAMES = { + "alert_urgency": "escalation_path_rule_alert_urgency", + "working_hour": "escalation_path_rule_working_hour", + "json_path": "escalation_path_rule_json_path", + "field": "escalation_path_rule_field", + "service": "escalation_path_rule_service", + "deferral_window": "escalation_path_rule_deferral_window", +} + + +def fix_spec(data: dict) -> int: + schemas = data["components"]["schemas"] + + source_schema = schemas.get("new_escalation_policy_path") + if not source_schema: + print("new_escalation_policy_path not found in spec") + return 1 + + source_items = ( + source_schema["properties"]["data"]["properties"]["attributes"]["properties"]["rules"]["items"] + ) + + if "oneOf" not in source_items and "anyOf" not in source_items: + print("No oneOf/anyOf found in rules items") + return 1 + + union_key = "oneOf" if "oneOf" in source_items else "anyOf" + variants = source_items[union_key] + extracted = 0 + + for variant in variants: + rule_type = variant.get("properties", {}).get("rule_type", {}).get("enum", [None])[0] + if not rule_type or rule_type not in RULE_NAMES: + continue + + ref_name = RULE_NAMES[rule_type] + variant["type"] = "object" + + for prop in variant.get("properties", {}).values(): + if prop.get("type") == "array" and "items" not in prop: + prop["items"] = {"type": "string"} + + schemas[ref_name] = variant + extracted += 1 + + ref_list = [{"$ref": f"#/components/schemas/{name}"} for name in RULE_NAMES.values()] + + for schema_name in ["new_escalation_policy_path", "update_escalation_policy_path"]: + if schema_name not in schemas: + continue + items = schemas[schema_name]["properties"]["data"]["properties"]["attributes"]["properties"]["rules"]["items"] + items.pop("type", None) + items["oneOf"] = ref_list + + if "escalation_policy_path" in schemas: + resp_items = schemas["escalation_policy_path"]["properties"]["rules"]["items"] + resp_items.pop("type", None) + resp_items["oneOf"] = ref_list + + print(f"Extracted {extracted} rule variants as named schemas") + return 0 + + +def main(): + if len(sys.argv) < 2: + print(f"Usage: {sys.argv[0]} ") + return 1 + + path = Path(sys.argv[1]) + data = json.loads(path.read_text()) + result = fix_spec(data) + if result == 0: + path.write_text(json.dumps(data)) + return result + + +if __name__ == "__main__": + exit(main()) From 282b23c76aaefb6b1887e1dc2a95c93f18bec366 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Wed, 22 Apr 2026 08:22:50 -0700 Subject: [PATCH 3/7] Fix ruff formatting on fix_openapi_escalation_paths.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tools/fix_openapi_escalation_paths.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/fix_openapi_escalation_paths.py b/tools/fix_openapi_escalation_paths.py index ee1ecc41..dead1abe 100644 --- a/tools/fix_openapi_escalation_paths.py +++ b/tools/fix_openapi_escalation_paths.py @@ -36,9 +36,7 @@ def fix_spec(data: dict) -> int: print("new_escalation_policy_path not found in spec") return 1 - source_items = ( - source_schema["properties"]["data"]["properties"]["attributes"]["properties"]["rules"]["items"] - ) + source_items = source_schema["properties"]["data"]["properties"]["attributes"]["properties"]["rules"]["items"] if "oneOf" not in source_items and "anyOf" not in source_items: print("No oneOf/anyOf found in rules items") From c9061e31dea49aaa2ca1000f9719c14e869eabf3 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Wed, 22 Apr 2026 09:38:20 -0700 Subject: [PATCH 4/7] Regenerate client after upstream urgency_ids array items fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream spec now includes items: {type: "string"} on urgency_ids arrays. Regenerated output is identical since fix_openapi_escalation_paths.py already patched this, but swagger.json no longer needs to be committed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tools/swagger.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 tools/swagger.json diff --git a/tools/swagger.json b/tools/swagger.json deleted file mode 100644 index 206688f7..00000000 --- a/tools/swagger.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.0.1","info":{"title":"Rootly API v1","version":"v1","description":"# How to generate an API Key?\n- **Account** > **Manage API keys** > **Generate New API Key**\n\n# JSON:API Specification\nRootly is using **JSON:API** (https://jsonapi.org) specification:\n- JSON:API is a specification for how a client should request that resources be fetched or modified, and how a server should respond to those requests.\n- JSON:API is designed to minimize both the number of requests and the amount of data transmitted between clients and servers. This efficiency is achieved without compromising readability, flexibility, or discoverability.\n- JSON:API requires use of the JSON:API media type (**application/vnd.api+json**) for exchanging data.\n\n# Authentication and Requests\nWe use standard HTTP Authentication over HTTPS to authorize your requests.\n```\n curl --request GET \\\n--header 'Content-Type: application/vnd.api+json' \\\n--header 'Authorization: Bearer YOUR-TOKEN' \\\n--url https://api.rootly.com/v1/incidents\n```\n\n
\n\n# Rate limiting\n- There is a limit of approximately 1500 GET calls every 60 seconds per API key. The limit is calculated over a 60 seconds window looking back from the current time.\n- There is stricter limit of approximately 1500 PUT, POST, PATCH or DELETE calls every 60 seconds per API key. The limit is calculated over a 60 seconds window looking back from the current time.\n- The response to the API call will return 429 HTTP status code - Request Limit Exceeded and Rootly will not ingest the event.\n- Additional headers will be returned giving you information about the limit:\n - **RateLimit-Limit** - The maximum number of requests that the consumer is permitted to make.\n - **RateLimit-Remaining** - The number of requests remaining in the current rate limit window.\n - **RateLimit-Reset** - The time at which the current rate limit window resets in UTC epoch seconds.\n\n# Pagination\n- Pagination is supported for all endpoints that return a collection of items.\n- Pagination is controlled by the **page** query parameter\n\n## Example\n```\n curl --request GET \\\n--header 'Content-Type: application/vnd.api+json' \\\n--header 'Authorization: Bearer YOUR-TOKEN' \\\n--url https://api.rootly.com/v1/incidents?page[number]=1&page[size]=10\n```\n\n","x-logo":{"url":"https://rootly-heroku.s3.us-east-1.amazonaws.com/swagger/v1/logo.png","alt":"Rootly"}},"paths":{"/v1/alert_groups":{"post":{"summary":"Creates a alert group","security":[{"bearer_auth":[]}],"tags":["AlertGroups"],"description":"Creates a new alert group","operationId":"createAlertGroup","parameters":[],"responses":{"201":{"description":"alert group created","content":{"application/vnd.api+json":{"example":{"data":{"id":"1d40312f-0804-41b2-aa32-6c8d4051fe37","type":"alert_groups","attributes":{"name":"Test alert group","slug":"test-alert-group","description":null,"time_window":10,"condition_type":"any","group_by_alert_title":false,"group_by_alert_urgency":false,"deleted_at":null,"created_at":"2025-01-07T14:43:33.271-08:00","updated_at":"2025-01-07T14:43:33.271-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_group_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_alert_group"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/alert_groups \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_groups\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_groups\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_groups\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List alert groups","security":[{"bearer_auth":[]}],"tags":["AlertGroups"],"description":"List alert groups","operationId":"listAlertGroups","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/alert_group_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/alert_groups?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_groups?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_groups?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_groups?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alert_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a alert group","security":[{"bearer_auth":[]}],"tags":["AlertGroups"],"description":"Retrieves a specific alert group by id","operationId":"getAlertGroup","responses":{"200":{"description":"alert group found","content":{"application/vnd.api+json":{"example":{"data":{"id":"417d0d0e-4a33-492f-b3cb-3e5069d29646","type":"alert_groups","attributes":{"name":"123 test group","slug":"123-test-group","description":null,"time_window":10,"condition_type":"any","group_by_alert_title":false,"group_by_alert_urgency":false,"deleted_at":null,"created_at":"2025-01-07T14:43:31.807-08:00","updated_at":"2025-01-07T14:43:31.807-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/alert_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_groups/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"patch":{"summary":"Update a alert group","security":[{"bearer_auth":[]}],"tags":["AlertGroups"],"description":"Update a specific alert group by id","operationId":"updateAlertGroup","parameters":[],"responses":{"200":{"description":"alert group updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"417d0d0e-4a33-492f-b3cb-3e5069d29646","type":"alert_groups","attributes":{"name":"Group name updated","slug":"123-test-group","description":null,"time_window":10,"condition_type":"any","group_by_alert_title":false,"group_by_alert_urgency":false,"deleted_at":null,"created_at":"2025-01-07T14:43:31.807-08:00","updated_at":"2025-01-07T14:43:34.501-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_alert_group"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PATCH \\\n --url https://api.rootly.com/v1/alert_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PATCH\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_groups/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PATCH\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an alert group","security":[{"bearer_auth":[]}],"tags":["AlertGroups"],"description":"Delete a specific alert group by id","operationId":"deleteAlertGroup","responses":{"200":{"description":"alert group deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"417d0d0e-4a33-492f-b3cb-3e5069d29646","type":"alert_groups","attributes":{"name":"123 test group","slug":"123-test-group","description":null,"time_window":10,"condition_type":"any","group_by_alert_title":false,"group_by_alert_urgency":false,"deleted_at":"2025-01-07T14:43:35.011-08:00","created_at":"2025-01-07T14:43:31.807-08:00","updated_at":"2025-01-07T14:43:35.011-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/alert_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_groups/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alert_urgencies":{"post":{"summary":"Creates a alert urgency","security":[{"bearer_auth":[]}],"tags":["AlertUrgencies"],"description":"Creates a new alert urgency from provided data","operationId":"createAlertUrgency","parameters":[],"responses":{"201":{"description":"alert urgency created","content":{"application/vnd.api+json":{"example":{"data":{"id":"cbd14e91-7356-4038-a2a6-7f2b2d2769d9","type":"alert_urgencies","attributes":{"name":"High","description":"Hight alert urgency","position":1,"created_at":"2025-01-07T14:43:39.525-08:00","updated_at":"2025-01-07T14:43:39.525-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_urgency_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Description can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_alert_urgency"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/alert_urgencies \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_urgencies\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_urgencies\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_urgencies\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List alert urgencies","security":[{"bearer_auth":[]}],"tags":["AlertUrgencies"],"description":"List alert urgencies","operationId":"listAlertUrgencies","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/alert_urgency_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/alert_urgencies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_urgencies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_urgencies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_urgencies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alert_urgencies/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a alert urgency","security":[{"bearer_auth":[]}],"tags":["AlertUrgencies"],"description":"Retrieves a specific alert urgency by id","operationId":"getAlertUrgency","responses":{"200":{"description":"alert urgency found","content":{"application/vnd.api+json":{"example":{"data":{"id":"98e613df-ece6-4407-a6fa-d19c5e1f47bc","type":"alert_urgencies","attributes":{"name":"p9chy","description":"Esse voluptas velit et.","position":1,"created_at":"2025-01-07T14:43:36.215-08:00","updated_at":"2025-01-07T14:43:36.222-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_urgency_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/alert_urgencies/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_urgencies/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_urgencies/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_urgencies/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a alert urgency","security":[{"bearer_auth":[]}],"tags":["AlertUrgencies"],"description":"Update a specific alert urgency by id","operationId":"updateAlertUrgency","parameters":[],"responses":{"200":{"description":"alert urgency updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"98e613df-ece6-4407-a6fa-d19c5e1f47bc","type":"alert_urgencies","attributes":{"name":"High (Updated)","description":"Esse voluptas velit et.","position":2,"created_at":"2025-01-07T14:43:36.215-08:00","updated_at":"2025-01-07T14:43:40.674-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_urgency_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_alert_urgency"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/alert_urgencies/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_urgencies/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_urgencies/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_urgencies/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an alert urgency","security":[{"bearer_auth":[]}],"tags":["AlertUrgencies"],"description":"Delete a specific alert urgency by id","operationId":"deleteAlertUrgency","responses":{"200":{"description":"alert urgency deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"98e613df-ece6-4407-a6fa-d19c5e1f47bc","type":"alert_urgencies","attributes":{"name":"p9chy","description":"Esse voluptas velit et.","position":1,"created_at":"2025-01-07T14:43:36.215-08:00","updated_at":"2025-01-07T14:43:41.255-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_urgency_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/alert_urgencies/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_urgencies/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_urgencies/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_urgencies/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alert_sources":{"post":{"summary":"Creates a alert source","security":[{"bearer_auth":[]}],"tags":["AlertSources"],"description":"Creates a new alert source from provided data","operationId":"createAlertSource","parameters":[],"responses":{"201":{"description":"alert source created","content":{"application/vnd.api+json":{"example":{"data":{"id":"4569f5ae-181d-44c5-a457-f1538949cd7e","type":"alert_sources","attributes":{"name":"GW 1","source_type":"generic_webhook","status":"setup_incomplete","secret":"fbe8882c3e6a5f0fbde499fae9cf0af713fba62f275af56c062480872b4185ba","alert_urgency_id":"8f728ae6-7f8a-40c3-8ac0-13e18c3b0a05","created_at":"2025-01-07T14:43:44.711-08:00","updated_at":"2025-01-07T14:43:44.711-08:00","webhook_endpoint":"http://localhost:3001/webhooks/incoming/generic_webhooks/notify//","sourceable_attributes":{"id":"053b2110-fa26-4be0-9816-85e7c9f019d1","auto_resolve":true,"resolve_state":"fixed","created_at":"2025-01-07T14:43:44.696-08:00","updated_at":"2025-01-07T14:43:44.704-08:00","field_mappings":[{"id":"5195c3dd-514e-4574-adef-82201671bf63","field":"alert_title","json_path":"$.alert_title","created_at":"2025-01-07T14:43:44.699-08:00","updated_at":"2025-01-07T14:43:44.699-08:00"},{"id":"875e4a51-7ca7-4d49-a4c7-63c5842b87d9","field":"notification_target_id","json_path":"$.target_id","created_at":"2025-01-07T14:43:44.702-08:00","updated_at":"2025-01-07T14:43:44.702-08:00"},{"id":"6c2dc811-005a-4968-9048-83c831ed207f","field":"notification_target_type","json_path":"$.target_type","created_at":"2025-01-07T14:43:44.703-08:00","updated_at":"2025-01-07T14:43:44.703-08:00"},{"id":"743f67ab-9c61-4e59-8ebc-b423e31011c2","field":"state","json_path":"$.status","created_at":"2025-01-07T14:43:44.701-08:00","updated_at":"2025-01-07T14:43:44.701-08:00"}]}},"relationships":{"alert_source_urgency_rules":{"data":[{"id":"db9bcf8c-68e3-4ee8-b534-c9c2505b23a5","alerts_source_id":"4569f5ae-181d-44c5-a457-f1538949cd7e","alert_urgency_id":"23e58ff7-1ed0-4d22-95e5-d5f16bfdf04f","json_path":"$.alert.title","operator":"is","value":"Critical","deleted_at":null,"created_at":"2025-01-07T14:43:44.713-08:00","updated_at":"2025-01-07T14:43:44.713-08:00"}]}}}},"schema":{"$ref":"#/components/schemas/alerts_source_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_alerts_source"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/alert_sources \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_sources\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_sources\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_sources\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List alert sources","security":[{"bearer_auth":[]}],"tags":["AlertSources"],"description":"List alert sources","operationId":"listAlertSources","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[statuses]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[source_types]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/alerts_source_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/alert_sources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatuses%5D=SOME_STRING_VALUE&filter%5Bsource_types%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_sources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatuses%5D=SOME_STRING_VALUE&filter%5Bsource_types%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_sources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatuses%5D=SOME_STRING_VALUE&filter%5Bsource_types%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_sources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatuses%5D=SOME_STRING_VALUE&filter%5Bsource_types%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alert_sources/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an alert source","security":[{"bearer_auth":[]}],"tags":["AlertSources"],"description":"Retrieves a specific alert source by id","operationId":"getAlertSource","responses":{"200":{"description":"alert source found","content":{"application/vnd.api+json":{"example":{"data":{"id":"986ca939-9dcd-4775-88e2-1ff575b44802","type":"alert_sources","attributes":{"name":"Alert Source 1","source_type":"datadog","status":"setup_incomplete","secret":"376dbfbe9550ef3c12a77f1641b365a280b134e95f7ee4bce556b59152d97964","alert_urgency_id":null,"created_at":"2025-01-07T14:43:42.445-08:00","updated_at":"2025-01-07T14:43:42.445-08:00","webhook_endpoint":"http://localhost:3001/webhooks/incoming/generic_webhooks/notify//","sourceable_attributes":{}},"relationships":{"alert_source_urgency_rules":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/alerts_source_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/alert_sources/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_sources/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_sources/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_sources/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update an alert source","security":[{"bearer_auth":[]}],"tags":["AlertSources"],"description":"Update a specific alert source by id","operationId":"updateAlertSource","parameters":[],"responses":{"200":{"description":"alert source updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"986ca939-9dcd-4775-88e2-1ff575b44802","type":"alert_sources","attributes":{"name":"GW 2","source_type":"datadog","status":"setup_incomplete","secret":"376dbfbe9550ef3c12a77f1641b365a280b134e95f7ee4bce556b59152d97964","alert_urgency_id":null,"created_at":"2025-01-07T14:43:42.445-08:00","updated_at":"2025-01-07T14:43:45.887-08:00","webhook_endpoint":"http://localhost:3001/webhooks/incoming/generic_webhooks/notify//","sourceable_attributes":{}},"relationships":{"alert_source_urgency_rules":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/alerts_source_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_alerts_source"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/alert_sources/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_sources/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_sources/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_sources/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an alert source","security":[{"bearer_auth":[]}],"tags":["AlertSources"],"description":"Delete a specific alert source by id","operationId":"deleteAlertSource","responses":{"200":{"description":"alert source deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"986ca939-9dcd-4775-88e2-1ff575b44802","type":"alert_sources","attributes":{"name":"Alert Source 1","source_type":"datadog","status":"setup_incomplete","secret":"376dbfbe9550ef3c12a77f1641b365a280b134e95f7ee4bce556b59152d97964","alert_urgency_id":null,"created_at":"2025-01-07T14:43:42.445-08:00","updated_at":"2025-01-07T14:43:46.420-08:00","webhook_endpoint":"http://localhost:3001/webhooks/incoming/generic_webhooks/notify//","sourceable_attributes":{}},"relationships":{"alert_source_urgency_rules":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/alerts_source_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/alert_sources/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alert_sources/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alert_sources/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alert_sources/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/alerts":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Attach alerts to an incident","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"Attach alerts to an incident from provided data","operationId":"attachAlert","parameters":[],"responses":{"200":{"description":"alert created","content":{"application/vnd.api+json":{"example":{"data":[{"id":"3f42053e-e3ac-4938-b3dd-d2bed93d46f8","type":"alerts","attributes":{"short_id":"x7ucu6","source":"pagerduty","summary":"Inventore ut iusto quia.","description":"Et reprehenderit dolor. Et provident culpa. Nam ipsa reiciendis.","labels":[],"services":[],"groups":[],"environments":[],"responders":[],"incidents":[{"id":"022fc782-afe9-44a2-b74d-e81fbb85e296","user_id":17,"team_id":13,"title":"Ut commodi qui aut.","slug":"ut-commodi-qui-aut","summary":"Quod sed molestiae. Ipsum consectetur qui. Totam nostrum voluptatem.","status":"started","slack_channel_id":null,"started_at":"2025-01-07T14:43:48.656-08:00","mitigated_at":null,"resolved_at":null,"deleted_at":null,"created_at":"2025-01-07T14:43:48.656-08:00","updated_at":"2025-01-07T14:43:48.656-08:00","severity_id":"4a391427-2cdd-4020-8e35-a6c17f57053e","public_title":null,"zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"asana_task_id":null,"asana_task_url":null,"jira_issue_id":null,"jira_issue_url":null,"email_message_id":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"slack_channel_name":null,"service_now_incident_id":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_incident_responder_ids":[],"labels":{},"incidents_action_items_count":0,"incidents_tasks_count":0,"mitigation_message":null,"resolution_message":null,"pagerduty_incident_responder_ids":{},"victor_ops_incident_id":null,"victor_ops_incident_url":null,"victor_ops_incident_responder_ids":{},"pagerduty_incident_id":null,"pagerduty_incident_url":null,"status_pages_count":0,"mattermost_channel_id":null,"slack_summary_timestamp":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"slack_channel_url":null,"mattermost_summary_timestamp":null,"confluence_page_id":null,"confluence_page_url":null,"kind":"normal","scheduled_for":null,"scheduled_until":null,"scheduled_remind_prior":false,"scheduled_auto_in_progress":true,"scheduled_auto_completed":true,"detected_at":null,"acknowledged_at":null,"private":false,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_url":null,"summary_updated_at":null,"sequential_id":1,"slack_channels":[],"airtable_base_key":null,"airtable_table_name":null,"shortcut_task_id":null,"shortcut_task_url":null,"title_autogenerated":false,"view_source":null,"source":"web","microsoft_teams_meeting_url":null,"microsoft_teams_meeting_id":null,"dropbox_paper_id":null,"dropbox_paper_url":null,"subscribers_count":0,"status_page_io":{},"webex_meeting_id":null,"webex_meeting_url":null,"github_issue_id":null,"github_issue_url":null,"cancelled_at":null,"cancellation_message":null,"notion_page_id":null,"notion_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"notify_channels":{},"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"started_by_user_id":17,"mitigated_by_user_id":null,"resolved_by_user_id":null,"cancelled_by_user_id":null,"slack_aliases":[],"slack_channel_workspace_id":null,"google_calendar_event_url":null,"google_calendar_event_id":null,"short_url":null,"slack_channel_short_url":null,"go_to_meeting_id":null,"go_to_meeting_url":null,"jira_issue_key":null,"linear_issue_key":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"triggered_from_slack_channel_id":null,"service_now_incident_key":null,"quip_page_id":null,"quip_page_url":null,"pagertree_alert_id":null,"pagertree_alert_url":null,"duplicate_incident_id":null,"parent_incident_id":null,"ability_cache":null,"previous_attributes":{"incident_events":["Alerts has been attached: [Pagerduty] Inventore Ut Iusto Quia.[Pagerduty] Repellat Quo Delectus Nobis.[Pagerduty] Officiis Ut Quia Vel.","Started date has been set to January 7 2:43 PM PST","Susannah Kovacek created this incident"],"user_avatar_url":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KICAgICAg\nPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8y\nMDAwL3N2ZyIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAg\nMCAyMDAgMjAwIj4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRp\nZW50XzE3MzYyODk4MzNfMzAzMTk5IiBncmFkaWVudFRyYW5zZm9ybT0icm90\nYXRlKDQ1KSI+CiAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjZmY5YTll\nIiBvZmZzZXQ9IjAlIiAvPgogICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0i\nI2ZmOWE5ZSIgb2Zmc2V0PSIxMDAlIiAvPgogICAgICAgIDwvbGluZWFyR3Jh\nZGllbnQ+CiAgICAgICAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAw\nJSIgZmlsbD0idXJsKCNncmFkaWVudF8xNzM2Mjg5ODMzXzMwMzE5OSkiIC8+\nCiAgICAgICAgPHRleHQgZmlsbD0iIzQ0NCIgZm9udC1mYW1pbHk9Ik9wZW4g\nU2FucyxIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIx\nMDEiIGZvbnQtd2VpZ2h0PSI1MDAiIHg9IjUwJSIgeT0iNTUlIiBkb21pbmFu\ndC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4KICAg\nICAgICAgIFNLCiAgICAgICAgPC90ZXh0PgogICAgICA8L3N2Zz4KICAgIA==\n"},"genius_workflow_runs_count":0,"slack_channel_archived":false,"google_drive_parent_id":null,"in_triage_at":null,"in_triage_by_user_id":null,"external_id":null,"slack_channel_deep_link":null,"retrospective_progress_status":"not_started","users_assigned_count":0,"retrospective_completed_at":null,"retrospective_started_at":null,"pagerduty_incident_number":null,"current_tutorial_step":"not_started","clickup_task_id":null,"clickup_task_url":null,"slack_notify_ready_for_retrospective_timestamp":null,"notify_emails":[],"status_page_io_components":[],"retrospective_auto_skipped":false,"retrospective_mandatory":false,"embedding":null,"zoom_meeting_transcript":{},"google_meeting_transcript":{},"webex_meeting_transcript":{},"microsoft_teams_meeting_transcript":{},"zoom_meeting_bot_id":null,"google_meeting_bot_id":null,"webex_meeting_bot_id":null,"microsoft_teams_meeting_bot_id":null,"zoom_meeting_transcript_summary":null,"google_meeting_transcript_summary":null,"webex_meeting_transcript_summary":null,"microsoft_teams_meeting_transcript_summary":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"outlook_event_id":null,"outlook_event_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"created_from_slack_identifier":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"left_slack_channel_slack_user_ids":[],"using_redesigned_slack_announcement":true,"using_redesigned_slack_updates":true,"motion_task_id":null,"motion_task_url":null,"sub_status_id":"e31bf723-60e1-4d8d-92d0-021bc759cbaf","closed_at":null,"closed_by_user_id":null,"microsoft_teams_channel_id":null,"microsoft_teams_channel_name":null,"microsoft_teams_channel_url":null,"microsoft_teams_channel_short_url":null,"microsoft_teams_team_id":null,"triggered_from_microsoft_teams_channel_id":null,"microsoft_teams_summary_message_id":null,"slack_last_message_ts":null,"zoom_meeting_password":null,"microsoft_teams_channel_service_url":null,"raw_labels":null,"tutorial_steps":null}],"data":{},"started_at":"2025-01-07T14:43:50.714-08:00","ended_at":null,"external_id":null,"external_url":"http://strosin.test/lana","url":"https://test.rootly.com/account/alerts/3f42053e-e3ac-4938-b3dd-d2bed93d46f8","notification_target_type":null,"notification_target_id":null,"alert_urgency_id":"cde1efbc-8ca1-4905-bb03-58c305f6fee2","notified_users":[],"created_at":"2025-01-07T14:43:50.714-08:00","updated_at":"2025-01-07T14:43:50.714-08:00"}}],"links":{"self":"http://www.example.com/v1/incidents/022fc782-afe9-44a2-b74d-e81fbb85e296/alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10","first":"http://www.example.com/v1/incidents/022fc782-afe9-44a2-b74d-e81fbb85e296/alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10","prev":null,"next":null,"last":"http://www.example.com/v1/incidents/022fc782-afe9-44a2-b74d-e81fbb85e296/alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10"}},"schema":{"$ref":"#/components/schemas/alert_list"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/attach_alert"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/alerts \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/alerts\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/alerts\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/alerts\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List alerts","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"List incident alerts","operationId":"listIncidentAlerts","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[services]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[environments]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[groups]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[labels]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/alert_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/alerts?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bgroups%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/alerts?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bgroups%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/alerts?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bgroups%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/alerts?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bgroups%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alerts":{"post":{"summary":"Creates a alert","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"Creates a new alert from provided data","operationId":"createAlert","parameters":[],"responses":{"201":{"description":"alert created","content":{"application/vnd.api+json":{"example":{"data":{"id":"2825bc82-109e-4657-92ec-752fc82db95a","type":"alerts","attributes":{"short_id":null,"source":"asana","summary":"Asana ticket created","description":null,"labels":[{"key":"status","value":"succeeded"}],"services":[{"id":"1a02c9c1-e8c9-4490-a638-363f2df1e8c3","team_id":13,"name":"Ab libero cum atque.","slug":"ab-libero-cum-atque","description":"Cupiditate tempore perspiciatis deleniti.","deleted_at":null,"created_at":"2025-01-07T14:43:52.875-08:00","updated_at":"2025-01-07T14:43:52.875-08:00","opsgenie_id":null,"pagerduty_id":null,"public_description":null,"github_repository_branch":"master","github_repository_name":null,"color":"#F5D9C4","heroku_app_name":null,"gitlab_repository_name":null,"gitlab_repository_branch":"master","kubernetes_deployment_name":null,"incidents_count":0,"position":1,"slack_channels":[],"slack_aliases":[],"backstage_id":null,"show_uptime":true,"show_uptime_last_days":60,"status":"operational","external_id":null,"notify_emails":[],"cortex_id":null,"alerts_email_enabled":false,"alerts_email_address":"service-4e15e0b3824b9f8eac1851e7fbf11fff@email.rootly.com","opsgenie_team_id":null,"service_now_ci_sys_id":null,"alert_urgency_id":null,"opslevel_id":null}],"groups":[],"environments":[{"id":"2cc1d681-9c7c-4d5e-abd8-95cf5c93f550","team_id":13,"name":"Error accusamus enim iusto.","slug":"error-accusamus-enim-iusto","description":"Ut perferendis temporibus quia.","color":"#dddde3","deleted_at":null,"created_at":"2025-01-07T14:43:52.912-08:00","updated_at":"2025-01-07T14:43:52.912-08:00","incidents_count":0,"position":1,"slack_channels":[],"slack_aliases":[],"external_id":null,"notify_emails":[]}],"responders":[],"incidents":[],"data":{"url":"https://asana.com/issues/1"},"started_at":"2025-01-07T14:41:29.000-08:00","ended_at":"2025-01-07T14:43:29.000-08:00","external_id":null,"external_url":null,"url":"https://test.rootly.com/account/alerts/2825bc82-109e-4657-92ec-752fc82db95a","notification_target_type":null,"notification_target_id":null,"alert_urgency_id":"f506a0a3-41f6-45ed-aaf6-269b49cb5c32","notified_users":[],"created_at":"2025-01-07T14:43:55.279-08:00","updated_at":"2025-01-07T14:43:55.279-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_response"}}}},"401":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Summary can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_alert"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/alerts \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alerts\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alerts\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alerts\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List alerts","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"List alerts","operationId":"listAlerts","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/alert_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/alerts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alerts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alerts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alerts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alerts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a alert","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"Retrieves a specific alert by id","operationId":"getAlert","responses":{"200":{"description":"alert found","content":{"application/vnd.api+json":{"example":{"data":{"id":"3f42053e-e3ac-4938-b3dd-d2bed93d46f8","type":"alerts","attributes":{"short_id":"x7ucu6","source":"pagerduty","summary":"Inventore ut iusto quia.","description":"Et reprehenderit dolor. Et provident culpa. Nam ipsa reiciendis.","labels":[],"services":[],"groups":[],"environments":[],"responders":[],"incidents":[{"id":"022fc782-afe9-44a2-b74d-e81fbb85e296","user_id":17,"team_id":13,"title":"Ut commodi qui aut.","slug":"ut-commodi-qui-aut","summary":"Quod sed molestiae. Ipsum consectetur qui. Totam nostrum voluptatem.","status":"started","slack_channel_id":null,"started_at":"2025-01-07T14:43:48.656-08:00","mitigated_at":null,"resolved_at":null,"deleted_at":null,"created_at":"2025-01-07T14:43:48.656-08:00","updated_at":"2025-01-07T14:43:48.656-08:00","severity_id":"4a391427-2cdd-4020-8e35-a6c17f57053e","public_title":null,"zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"asana_task_id":null,"asana_task_url":null,"jira_issue_id":null,"jira_issue_url":null,"email_message_id":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"slack_channel_name":null,"service_now_incident_id":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_incident_responder_ids":[],"labels":{},"incidents_action_items_count":0,"incidents_tasks_count":0,"mitigation_message":null,"resolution_message":null,"pagerduty_incident_responder_ids":{},"victor_ops_incident_id":null,"victor_ops_incident_url":null,"victor_ops_incident_responder_ids":{},"pagerduty_incident_id":null,"pagerduty_incident_url":null,"status_pages_count":0,"mattermost_channel_id":null,"slack_summary_timestamp":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"slack_channel_url":null,"mattermost_summary_timestamp":null,"confluence_page_id":null,"confluence_page_url":null,"kind":"normal","scheduled_for":null,"scheduled_until":null,"scheduled_remind_prior":false,"scheduled_auto_in_progress":true,"scheduled_auto_completed":true,"detected_at":null,"acknowledged_at":null,"private":false,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_url":null,"summary_updated_at":null,"sequential_id":1,"slack_channels":[],"airtable_base_key":null,"airtable_table_name":null,"shortcut_task_id":null,"shortcut_task_url":null,"title_autogenerated":false,"view_source":null,"source":"web","microsoft_teams_meeting_url":null,"microsoft_teams_meeting_id":null,"dropbox_paper_id":null,"dropbox_paper_url":null,"subscribers_count":0,"status_page_io":{},"webex_meeting_id":null,"webex_meeting_url":null,"github_issue_id":null,"github_issue_url":null,"cancelled_at":null,"cancellation_message":null,"notion_page_id":null,"notion_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"notify_channels":{},"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"started_by_user_id":17,"mitigated_by_user_id":null,"resolved_by_user_id":null,"cancelled_by_user_id":null,"slack_aliases":[],"slack_channel_workspace_id":null,"google_calendar_event_url":null,"google_calendar_event_id":null,"short_url":null,"slack_channel_short_url":null,"go_to_meeting_id":null,"go_to_meeting_url":null,"jira_issue_key":null,"linear_issue_key":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"triggered_from_slack_channel_id":null,"service_now_incident_key":null,"quip_page_id":null,"quip_page_url":null,"pagertree_alert_id":null,"pagertree_alert_url":null,"duplicate_incident_id":null,"parent_incident_id":null,"ability_cache":null,"previous_attributes":{"incident_events":["Started date has been set to January 7 2:43 PM PST","Susannah Kovacek created this incident"],"user_avatar_url":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KICAgICAg\nPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8y\nMDAwL3N2ZyIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAg\nMCAyMDAgMjAwIj4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRp\nZW50XzE3MzYyODk4MzFfNTI2MzU5IiBncmFkaWVudFRyYW5zZm9ybT0icm90\nYXRlKDQ1KSI+CiAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjZmY5YTll\nIiBvZmZzZXQ9IjAlIiAvPgogICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0i\nI2ZmOWE5ZSIgb2Zmc2V0PSIxMDAlIiAvPgogICAgICAgIDwvbGluZWFyR3Jh\nZGllbnQ+CiAgICAgICAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAw\nJSIgZmlsbD0idXJsKCNncmFkaWVudF8xNzM2Mjg5ODMxXzUyNjM1OSkiIC8+\nCiAgICAgICAgPHRleHQgZmlsbD0iIzQ0NCIgZm9udC1mYW1pbHk9Ik9wZW4g\nU2FucyxIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIx\nMDEiIGZvbnQtd2VpZ2h0PSI1MDAiIHg9IjUwJSIgeT0iNTUlIiBkb21pbmFu\ndC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4KICAg\nICAgICAgIFNLCiAgICAgICAgPC90ZXh0PgogICAgICA8L3N2Zz4KICAgIA==\n"},"genius_workflow_runs_count":0,"slack_channel_archived":false,"google_drive_parent_id":null,"in_triage_at":null,"in_triage_by_user_id":null,"external_id":null,"slack_channel_deep_link":null,"retrospective_progress_status":"not_started","users_assigned_count":0,"retrospective_completed_at":null,"retrospective_started_at":null,"pagerduty_incident_number":null,"current_tutorial_step":"not_started","clickup_task_id":null,"clickup_task_url":null,"slack_notify_ready_for_retrospective_timestamp":null,"notify_emails":[],"status_page_io_components":[],"retrospective_auto_skipped":false,"retrospective_mandatory":false,"embedding":null,"zoom_meeting_transcript":{},"google_meeting_transcript":{},"webex_meeting_transcript":{},"microsoft_teams_meeting_transcript":{},"zoom_meeting_bot_id":null,"google_meeting_bot_id":null,"webex_meeting_bot_id":null,"microsoft_teams_meeting_bot_id":null,"zoom_meeting_transcript_summary":null,"google_meeting_transcript_summary":null,"webex_meeting_transcript_summary":null,"microsoft_teams_meeting_transcript_summary":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"outlook_event_id":null,"outlook_event_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"created_from_slack_identifier":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"left_slack_channel_slack_user_ids":[],"using_redesigned_slack_announcement":true,"using_redesigned_slack_updates":true,"motion_task_id":null,"motion_task_url":null,"sub_status_id":"e31bf723-60e1-4d8d-92d0-021bc759cbaf","closed_at":null,"closed_by_user_id":null,"microsoft_teams_channel_id":null,"microsoft_teams_channel_name":null,"microsoft_teams_channel_url":null,"microsoft_teams_channel_short_url":null,"microsoft_teams_team_id":null,"triggered_from_microsoft_teams_channel_id":null,"microsoft_teams_summary_message_id":null,"slack_last_message_ts":null,"zoom_meeting_password":null,"microsoft_teams_channel_service_url":null,"raw_labels":null,"tutorial_steps":null}],"data":{},"started_at":"2025-01-07T14:43:50.714-08:00","ended_at":null,"external_id":null,"external_url":"http://strosin.test/lana","url":"https://test.rootly.com/account/alerts/3f42053e-e3ac-4938-b3dd-d2bed93d46f8","notification_target_type":null,"notification_target_id":null,"alert_urgency_id":"cde1efbc-8ca1-4905-bb03-58c305f6fee2","notified_users":[],"created_at":"2025-01-07T14:43:50.714-08:00","updated_at":"2025-01-07T14:43:50.714-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/alerts/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alerts/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alerts/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alerts/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alerts/{id}/acknowledge":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Acknowledges a alert","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"Acknowledges a specific alert by id","operationId":"acknowledgeAlert","responses":{"200":{"description":"alert acknowledged","content":{"application/vnd.api+json":{"example":{"data":{"id":"3f42053e-e3ac-4938-b3dd-d2bed93d46f8","type":"alerts","attributes":{"short_id":"x7ucu6","source":"pagerduty","summary":"Inventore ut iusto quia.","description":"Et reprehenderit dolor. Et provident culpa. Nam ipsa reiciendis.","labels":[],"services":[],"groups":[],"environments":[],"responders":[{"id":15,"email":"gabriel@cartwright.example","deleted_at":null,"created_at":"2025-01-07T14:43:46.777-08:00","updated_at":"2025-01-07T14:43:57.110-08:00","current_team_id":13,"first_name":"Ruben","last_name":"Kunde","time_zone":"UTC","last_seen_at":null,"profile_photo_id":null,"ability_cache":null,"last_notification_email_sent_at":null,"accept_terms":true,"onboarding_completed":true,"service_user":false,"accept_marketing":true,"teams_count":1,"created_through_sso":false,"scim_uid":null,"session_token":null,"incidents_example_count":0,"incidents_test_count":0,"incidents_normal_count":0,"incidents_scheduled_count":0,"incidents_backfilled_count":0,"incidents_count":0,"theme":"light_v2","skip_tutorial":false,"external_id":null,"jti":"444d606c-df68-4a69-9216-232601db22f9","is_super_admin":false,"has_impersonate_write_permission":false,"view_multiple_schedules":true,"push_notification_new_alert_sound":"default","push_notification_shift_starts_sound":"soft_bloob","push_notification_shift_ends_sound":"soft_bloob","how_did_you_hear_about_us":null,"push_notification_new_alert_volume":1,"opsgenie_id":null}],"incidents":[{"id":"022fc782-afe9-44a2-b74d-e81fbb85e296","user_id":17,"team_id":13,"title":"Ut commodi qui aut.","slug":"ut-commodi-qui-aut","summary":"Quod sed molestiae. Ipsum consectetur qui. Totam nostrum voluptatem.","status":"started","slack_channel_id":null,"started_at":"2025-01-07T14:43:48.656-08:00","mitigated_at":null,"resolved_at":null,"deleted_at":null,"created_at":"2025-01-07T14:43:48.656-08:00","updated_at":"2025-01-07T14:43:48.656-08:00","severity_id":"4a391427-2cdd-4020-8e35-a6c17f57053e","public_title":null,"zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"asana_task_id":null,"asana_task_url":null,"jira_issue_id":null,"jira_issue_url":null,"email_message_id":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"slack_channel_name":null,"service_now_incident_id":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_incident_responder_ids":[],"labels":{},"incidents_action_items_count":0,"incidents_tasks_count":0,"mitigation_message":null,"resolution_message":null,"pagerduty_incident_responder_ids":{},"victor_ops_incident_id":null,"victor_ops_incident_url":null,"victor_ops_incident_responder_ids":{},"pagerduty_incident_id":null,"pagerduty_incident_url":null,"status_pages_count":0,"mattermost_channel_id":null,"slack_summary_timestamp":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"slack_channel_url":null,"mattermost_summary_timestamp":null,"confluence_page_id":null,"confluence_page_url":null,"kind":"normal","scheduled_for":null,"scheduled_until":null,"scheduled_remind_prior":false,"scheduled_auto_in_progress":true,"scheduled_auto_completed":true,"detected_at":null,"acknowledged_at":null,"private":false,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_url":null,"summary_updated_at":null,"sequential_id":1,"slack_channels":[],"airtable_base_key":null,"airtable_table_name":null,"shortcut_task_id":null,"shortcut_task_url":null,"title_autogenerated":false,"view_source":null,"source":"web","microsoft_teams_meeting_url":null,"microsoft_teams_meeting_id":null,"dropbox_paper_id":null,"dropbox_paper_url":null,"subscribers_count":0,"status_page_io":{},"webex_meeting_id":null,"webex_meeting_url":null,"github_issue_id":null,"github_issue_url":null,"cancelled_at":null,"cancellation_message":null,"notion_page_id":null,"notion_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"notify_channels":{},"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"started_by_user_id":17,"mitigated_by_user_id":null,"resolved_by_user_id":null,"cancelled_by_user_id":null,"slack_aliases":[],"slack_channel_workspace_id":null,"google_calendar_event_url":null,"google_calendar_event_id":null,"short_url":null,"slack_channel_short_url":null,"go_to_meeting_id":null,"go_to_meeting_url":null,"jira_issue_key":null,"linear_issue_key":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"triggered_from_slack_channel_id":null,"service_now_incident_key":null,"quip_page_id":null,"quip_page_url":null,"pagertree_alert_id":null,"pagertree_alert_url":null,"duplicate_incident_id":null,"parent_incident_id":null,"ability_cache":null,"previous_attributes":{"incident_events":["Started date has been set to January 7 2:43 PM PST","Susannah Kovacek created this incident"],"user_avatar_url":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KICAgICAg\nPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8y\nMDAwL3N2ZyIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAg\nMCAyMDAgMjAwIj4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRp\nZW50XzE3MzYyODk4MzFfNTI2MzU5IiBncmFkaWVudFRyYW5zZm9ybT0icm90\nYXRlKDQ1KSI+CiAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjZmY5YTll\nIiBvZmZzZXQ9IjAlIiAvPgogICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0i\nI2ZmOWE5ZSIgb2Zmc2V0PSIxMDAlIiAvPgogICAgICAgIDwvbGluZWFyR3Jh\nZGllbnQ+CiAgICAgICAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAw\nJSIgZmlsbD0idXJsKCNncmFkaWVudF8xNzM2Mjg5ODMxXzUyNjM1OSkiIC8+\nCiAgICAgICAgPHRleHQgZmlsbD0iIzQ0NCIgZm9udC1mYW1pbHk9Ik9wZW4g\nU2FucyxIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIx\nMDEiIGZvbnQtd2VpZ2h0PSI1MDAiIHg9IjUwJSIgeT0iNTUlIiBkb21pbmFu\ndC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4KICAg\nICAgICAgIFNLCiAgICAgICAgPC90ZXh0PgogICAgICA8L3N2Zz4KICAgIA==\n"},"genius_workflow_runs_count":0,"slack_channel_archived":false,"google_drive_parent_id":null,"in_triage_at":null,"in_triage_by_user_id":null,"external_id":null,"slack_channel_deep_link":null,"retrospective_progress_status":"not_started","users_assigned_count":0,"retrospective_completed_at":null,"retrospective_started_at":null,"pagerduty_incident_number":null,"current_tutorial_step":"not_started","clickup_task_id":null,"clickup_task_url":null,"slack_notify_ready_for_retrospective_timestamp":null,"notify_emails":[],"status_page_io_components":[],"retrospective_auto_skipped":false,"retrospective_mandatory":false,"embedding":null,"zoom_meeting_transcript":{},"google_meeting_transcript":{},"webex_meeting_transcript":{},"microsoft_teams_meeting_transcript":{},"zoom_meeting_bot_id":null,"google_meeting_bot_id":null,"webex_meeting_bot_id":null,"microsoft_teams_meeting_bot_id":null,"zoom_meeting_transcript_summary":null,"google_meeting_transcript_summary":null,"webex_meeting_transcript_summary":null,"microsoft_teams_meeting_transcript_summary":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"outlook_event_id":null,"outlook_event_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"created_from_slack_identifier":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"left_slack_channel_slack_user_ids":[],"using_redesigned_slack_announcement":true,"using_redesigned_slack_updates":true,"motion_task_id":null,"motion_task_url":null,"sub_status_id":"e31bf723-60e1-4d8d-92d0-021bc759cbaf","closed_at":null,"closed_by_user_id":null,"microsoft_teams_channel_id":null,"microsoft_teams_channel_name":null,"microsoft_teams_channel_url":null,"microsoft_teams_channel_short_url":null,"microsoft_teams_team_id":null,"triggered_from_microsoft_teams_channel_id":null,"microsoft_teams_summary_message_id":null,"slack_last_message_ts":null,"zoom_meeting_password":null,"microsoft_teams_channel_service_url":null,"raw_labels":null,"tutorial_steps":null}],"data":{},"started_at":"2025-01-07T14:43:50.714-08:00","ended_at":null,"external_id":null,"external_url":"http://strosin.test/lana","url":"https://test.rootly.com/account/alerts/3f42053e-e3ac-4938-b3dd-d2bed93d46f8","notification_target_type":null,"notification_target_id":null,"alert_urgency_id":"cde1efbc-8ca1-4905-bb03-58c305f6fee2","notified_users":[],"created_at":"2025-01-07T14:43:50.714-08:00","updated_at":"2025-01-07T14:43:57.147-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/alerts/%7Bid%7D/acknowledge \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alerts/%7Bid%7D/acknowledge\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alerts/%7Bid%7D/acknowledge\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alerts/%7Bid%7D/acknowledge\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/alerts/{id}/resolve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Resolves a alert","security":[{"bearer_auth":[]}],"tags":["Alerts"],"description":"Resolves a specific alert by id","operationId":"resolveAlert","parameters":[],"responses":{"200":{"description":"resolve acknowledged","content":{"application/vnd.api+json":{"example":{"data":{"id":"3f42053e-e3ac-4938-b3dd-d2bed93d46f8","type":"alerts","attributes":{"short_id":"x7ucu6","source":"pagerduty","summary":"Inventore ut iusto quia.","description":"Et reprehenderit dolor. Et provident culpa. Nam ipsa reiciendis.","labels":[],"services":[],"groups":[],"environments":[],"responders":[{"id":15,"email":"gabriel@cartwright.example","deleted_at":null,"created_at":"2025-01-07T14:43:46.777-08:00","updated_at":"2025-01-07T14:43:57.674-08:00","current_team_id":13,"first_name":"Ruben","last_name":"Kunde","time_zone":"UTC","last_seen_at":null,"profile_photo_id":null,"ability_cache":null,"last_notification_email_sent_at":null,"accept_terms":true,"onboarding_completed":true,"service_user":false,"accept_marketing":true,"teams_count":1,"created_through_sso":false,"scim_uid":null,"session_token":null,"incidents_example_count":0,"incidents_test_count":0,"incidents_normal_count":0,"incidents_scheduled_count":0,"incidents_backfilled_count":0,"incidents_count":0,"theme":"light_v2","skip_tutorial":false,"external_id":null,"jti":"444d606c-df68-4a69-9216-232601db22f9","is_super_admin":false,"has_impersonate_write_permission":false,"view_multiple_schedules":true,"push_notification_new_alert_sound":"default","push_notification_shift_starts_sound":"soft_bloob","push_notification_shift_ends_sound":"soft_bloob","how_did_you_hear_about_us":null,"push_notification_new_alert_volume":1,"opsgenie_id":null}],"incidents":[{"id":"022fc782-afe9-44a2-b74d-e81fbb85e296","user_id":17,"team_id":13,"title":"Ut commodi qui aut.","slug":"ut-commodi-qui-aut","summary":"Quod sed molestiae. Ipsum consectetur qui. Totam nostrum voluptatem.","status":"started","slack_channel_id":null,"started_at":"2025-01-07T14:43:48.656-08:00","mitigated_at":null,"resolved_at":null,"deleted_at":null,"created_at":"2025-01-07T14:43:48.656-08:00","updated_at":"2025-01-07T14:43:48.656-08:00","severity_id":"4a391427-2cdd-4020-8e35-a6c17f57053e","public_title":null,"zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"asana_task_id":null,"asana_task_url":null,"jira_issue_id":null,"jira_issue_url":null,"email_message_id":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"slack_channel_name":null,"service_now_incident_id":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_incident_responder_ids":[],"labels":{},"incidents_action_items_count":0,"incidents_tasks_count":0,"mitigation_message":null,"resolution_message":null,"pagerduty_incident_responder_ids":{},"victor_ops_incident_id":null,"victor_ops_incident_url":null,"victor_ops_incident_responder_ids":{},"pagerduty_incident_id":null,"pagerduty_incident_url":null,"status_pages_count":0,"mattermost_channel_id":null,"slack_summary_timestamp":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"slack_channel_url":null,"mattermost_summary_timestamp":null,"confluence_page_id":null,"confluence_page_url":null,"kind":"normal","scheduled_for":null,"scheduled_until":null,"scheduled_remind_prior":false,"scheduled_auto_in_progress":true,"scheduled_auto_completed":true,"detected_at":null,"acknowledged_at":null,"private":false,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_url":null,"summary_updated_at":null,"sequential_id":1,"slack_channels":[],"airtable_base_key":null,"airtable_table_name":null,"shortcut_task_id":null,"shortcut_task_url":null,"title_autogenerated":false,"view_source":null,"source":"web","microsoft_teams_meeting_url":null,"microsoft_teams_meeting_id":null,"dropbox_paper_id":null,"dropbox_paper_url":null,"subscribers_count":0,"status_page_io":{},"webex_meeting_id":null,"webex_meeting_url":null,"github_issue_id":null,"github_issue_url":null,"cancelled_at":null,"cancellation_message":null,"notion_page_id":null,"notion_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"notify_channels":{},"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"started_by_user_id":17,"mitigated_by_user_id":null,"resolved_by_user_id":null,"cancelled_by_user_id":null,"slack_aliases":[],"slack_channel_workspace_id":null,"google_calendar_event_url":null,"google_calendar_event_id":null,"short_url":null,"slack_channel_short_url":null,"go_to_meeting_id":null,"go_to_meeting_url":null,"jira_issue_key":null,"linear_issue_key":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"triggered_from_slack_channel_id":null,"service_now_incident_key":null,"quip_page_id":null,"quip_page_url":null,"pagertree_alert_id":null,"pagertree_alert_url":null,"duplicate_incident_id":null,"parent_incident_id":null,"ability_cache":null,"previous_attributes":{"incident_events":["Started date has been set to January 7 2:43 PM PST","Susannah Kovacek created this incident"],"user_avatar_url":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KICAgICAg\nPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8y\nMDAwL3N2ZyIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAg\nMCAyMDAgMjAwIj4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImdyYWRp\nZW50XzE3MzYyODk4MzFfNTI2MzU5IiBncmFkaWVudFRyYW5zZm9ybT0icm90\nYXRlKDQ1KSI+CiAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjZmY5YTll\nIiBvZmZzZXQ9IjAlIiAvPgogICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0i\nI2ZmOWE5ZSIgb2Zmc2V0PSIxMDAlIiAvPgogICAgICAgIDwvbGluZWFyR3Jh\nZGllbnQ+CiAgICAgICAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAw\nJSIgZmlsbD0idXJsKCNncmFkaWVudF8xNzM2Mjg5ODMxXzUyNjM1OSkiIC8+\nCiAgICAgICAgPHRleHQgZmlsbD0iIzQ0NCIgZm9udC1mYW1pbHk9Ik9wZW4g\nU2FucyxIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIx\nMDEiIGZvbnQtd2VpZ2h0PSI1MDAiIHg9IjUwJSIgeT0iNTUlIiBkb21pbmFu\ndC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4KICAg\nICAgICAgIFNLCiAgICAgICAgPC90ZXh0PgogICAgICA8L3N2Zz4KICAgIA==\n"},"genius_workflow_runs_count":0,"slack_channel_archived":false,"google_drive_parent_id":null,"in_triage_at":null,"in_triage_by_user_id":null,"external_id":null,"slack_channel_deep_link":null,"retrospective_progress_status":"not_started","users_assigned_count":0,"retrospective_completed_at":null,"retrospective_started_at":null,"pagerduty_incident_number":null,"current_tutorial_step":"not_started","clickup_task_id":null,"clickup_task_url":null,"slack_notify_ready_for_retrospective_timestamp":null,"notify_emails":[],"status_page_io_components":[],"retrospective_auto_skipped":false,"retrospective_mandatory":false,"embedding":null,"zoom_meeting_transcript":{},"google_meeting_transcript":{},"webex_meeting_transcript":{},"microsoft_teams_meeting_transcript":{},"zoom_meeting_bot_id":null,"google_meeting_bot_id":null,"webex_meeting_bot_id":null,"microsoft_teams_meeting_bot_id":null,"zoom_meeting_transcript_summary":null,"google_meeting_transcript_summary":null,"webex_meeting_transcript_summary":null,"microsoft_teams_meeting_transcript_summary":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"outlook_event_id":null,"outlook_event_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"created_from_slack_identifier":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"left_slack_channel_slack_user_ids":[],"using_redesigned_slack_announcement":true,"using_redesigned_slack_updates":true,"motion_task_id":null,"motion_task_url":null,"sub_status_id":"e31bf723-60e1-4d8d-92d0-021bc759cbaf","closed_at":null,"closed_by_user_id":null,"microsoft_teams_channel_id":null,"microsoft_teams_channel_name":null,"microsoft_teams_channel_url":null,"microsoft_teams_channel_short_url":null,"microsoft_teams_team_id":null,"triggered_from_microsoft_teams_channel_id":null,"microsoft_teams_summary_message_id":null,"slack_last_message_ts":null,"zoom_meeting_password":null,"microsoft_teams_channel_service_url":null,"raw_labels":null,"tutorial_steps":null}],"data":{},"started_at":"2025-01-07T14:43:50.714-08:00","ended_at":"2025-01-07T14:43:57.707-08:00","external_id":null,"external_url":"http://strosin.test/lana","url":"https://test.rootly.com/account/alerts/3f42053e-e3ac-4938-b3dd-d2bed93d46f8","notification_target_type":null,"notification_target_id":null,"alert_urgency_id":"cde1efbc-8ca1-4905-bb03-58c305f6fee2","notified_users":[],"created_at":"2025-01-07T14:43:50.714-08:00","updated_at":"2025-01-07T14:43:57.707-08:00"}}},"schema":{"$ref":"#/components/schemas/alert_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/resolve_alert"}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/alerts/%7Bid%7D/resolve \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/alerts/%7Bid%7D/resolve\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/alerts/%7Bid%7D/resolve\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/alerts/%7Bid%7D/resolve\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/audits":{"get":{"summary":"List audits","security":[{"bearer_auth":[]}],"tags":["Audits"],"description":"List audits","operationId":"listAudits","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[user_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[api_key_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[item_type]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/audits_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/audits?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_STRING_VALUE&filter%5Bapi_key_id%5D=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bitem_type%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/audits?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_STRING_VALUE&filter%5Bapi_key_id%5D=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bitem_type%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/audits?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_STRING_VALUE&filter%5Bapi_key_id%5D=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bitem_type%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/audits?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_STRING_VALUE&filter%5Bapi_key_id%5D=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bitem_type%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/authorizations":{"post":{"summary":"Creates a authorization","security":[{"bearer_auth":[]}],"tags":["Authorizations"],"description":"Creates a new authorization from provided data","operationId":"createAuthorization","parameters":[],"responses":{"201":{"description":"authorization created","content":{"application/vnd.api+json":{"example":{"data":{"id":"8a33e088-eea7-44b3-8b67-d08ee0b2fd1f","type":"authorizations","attributes":{"authorizable_id":"8d8ce026-ab2b-4fa0-b16b-a0e732b0a84c","authorizable_type":"Dashboard","grantee_id":"31","grantee_type":"User","permissions":["read"],"updated_at":"2025-01-07T14:44:02.161-08:00","created_at":"2025-01-07T14:44:02.161-08:00"}}},"schema":{"$ref":"#/components/schemas/authorization_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_authorization"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/authorizations \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/authorizations\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/authorizations\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/authorizations\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List authorizations","security":[{"bearer_auth":[]}],"tags":["Authorizations"],"description":"List authorizations","operationId":"listAuthorizations","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[authorizable_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[authorizable_type]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[grantee_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[grantee_type]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/authorization_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/authorizations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bauthorizable_id%5D=SOME_STRING_VALUE&filter%5Bauthorizable_type%5D=SOME_STRING_VALUE&filter%5Bgrantee_id%5D=SOME_STRING_VALUE&filter%5Bgrantee_type%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/authorizations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bauthorizable_id%5D=SOME_STRING_VALUE&filter%5Bauthorizable_type%5D=SOME_STRING_VALUE&filter%5Bgrantee_id%5D=SOME_STRING_VALUE&filter%5Bgrantee_type%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/authorizations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bauthorizable_id%5D=SOME_STRING_VALUE&filter%5Bauthorizable_type%5D=SOME_STRING_VALUE&filter%5Bgrantee_id%5D=SOME_STRING_VALUE&filter%5Bgrantee_type%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/authorizations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bauthorizable_id%5D=SOME_STRING_VALUE&filter%5Bauthorizable_type%5D=SOME_STRING_VALUE&filter%5Bgrantee_id%5D=SOME_STRING_VALUE&filter%5Bgrantee_type%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/authorizations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a authorization","security":[{"bearer_auth":[]}],"tags":["Authorizations"],"description":"Retrieves a specific authorization by id","operationId":"getAuthorization","responses":{"200":{"description":"authorization found","content":{"application/vnd.api+json":{"example":{"data":{"id":"516b6356-8105-46bc-9805-39a4df8b135c","type":"authorizations","attributes":{"authorizable_id":"885cf51c-b1fd-42d5-a42d-c820b4ca2d5a","authorizable_type":"Dashboard","grantee_id":"35","grantee_type":"User","permissions":["read","update","authorize","destroy"],"updated_at":"2025-01-07T14:44:03.697-08:00","created_at":"2025-01-07T14:44:03.697-08:00"}}},"schema":{"$ref":"#/components/schemas/authorization_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/authorizations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/authorizations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/authorizations/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/authorizations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a authorization","security":[{"bearer_auth":[]}],"tags":["Authorizations"],"description":"Update a specific authorization by id","operationId":"updateAuthorization","parameters":[],"responses":{"200":{"description":"authorization updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"5a7373fe-888e-42bb-919e-0bcb5efd5f4f","type":"authorizations","attributes":{"authorizable_id":"375805da-6198-4408-94a4-ab8d2df75626","authorizable_type":"Dashboard","grantee_id":"39","grantee_type":"User","permissions":["read","update"],"updated_at":"2025-01-07T14:44:06.035-08:00","created_at":"2025-01-07T14:44:05.876-08:00"}}},"schema":{"$ref":"#/components/schemas/authorization_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_authorization"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/authorizations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/authorizations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/authorizations/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/authorizations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a authorization","security":[{"bearer_auth":[]}],"tags":["Authorizations"],"description":"Delete a specific authorization by id","operationId":"deleteAuthorization","responses":{"200":{"description":"authorization deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"6dda665c-d3c1-476c-89cd-61f694f84848","type":"authorizations","attributes":{"authorizable_id":"5f4ff06f-71de-488a-9990-49c32d5bdd58","authorizable_type":"Dashboard","grantee_id":"44","grantee_type":"Team","permissions":["read","update","authorize","destroy"],"updated_at":"2025-01-07T14:44:08.010-08:00","created_at":"2025-01-07T14:44:08.010-08:00"}}},"schema":{"$ref":"#/components/schemas/authorization_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/authorizations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/authorizations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/authorizations/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/authorizations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalogs/{catalog_id}/entities":{"parameters":[{"name":"catalog_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a catalog_entity","security":[{"bearer_auth":[]}],"tags":["CatalogEntities"],"description":"Creates a new catalog_entity from provided data","operationId":"createCatalogEntity","parameters":[],"responses":{"201":{"description":"catalog_entity created","content":{"application/vnd.api+json":{"example":{"data":{"id":"c9710977-83af-47bc-bd95-09dcfd47a336","type":"catalog_entities","attributes":{"catalog_id":"369f9712-d708-413e-b193-6d5ed1d5e30a","name":"Test Item","slug":"test-item","position":2,"deleted_at":null,"updated_at":"2025-01-07T14:44:10.699-08:00","created_at":"2025-01-07T14:44:10.699-08:00"},"relationships":{"catalog":{"data":{"id":"369f9712-d708-413e-b193-6d5ed1d5e30a","type":"catalogs"}},"properties":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Name is too short (minimum is 1 character)","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_catalog_entity"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/entities \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/entities\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bcatalog_id%7D/entities\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/entities\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List catalog_entities","security":[{"bearer_auth":[]}],"tags":["CatalogEntities"],"description":"List catalog_entities","operationId":"listCatalogEntities","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: catalog,properties","schema":{"type":"string","enum":["catalog","properties"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","position","-position"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/catalog_entity_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/entities?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/entities?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bcatalog_id%7D/entities?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/entities?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalog_entities/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a catalog_entity","security":[{"bearer_auth":[]}],"tags":["CatalogEntities"],"description":"Retrieves a specific catalog_entity by id","operationId":"getCatalogEntity","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: catalog,properties","schema":{"type":"string","enum":["catalog","properties"]},"required":false}],"responses":{"200":{"description":"catalog_entity found","content":{"application/vnd.api+json":{"example":{"data":{"id":"665dc231-ca54-4f01-8164-ab2887626fd8","type":"catalog_entities","attributes":{"catalog_id":"369f9712-d708-413e-b193-6d5ed1d5e30a","name":"Test","slug":"test","position":1,"deleted_at":null,"updated_at":"2025-01-07T14:44:10.549-08:00","created_at":"2025-01-07T14:44:10.549-08:00"},"relationships":{"catalog":{"data":{"id":"369f9712-d708-413e-b193-6d5ed1d5e30a","type":"catalogs"}},"properties":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalog_entities/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entities/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entities/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entities/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a catalog_entity","security":[{"bearer_auth":[]}],"tags":["CatalogEntities"],"description":"Update a specific catalog_entity by id","operationId":"updateCatalogEntity","parameters":[],"responses":{"200":{"description":"catalog_entity updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"665dc231-ca54-4f01-8164-ab2887626fd8","type":"catalog_entities","attributes":{"catalog_id":"369f9712-d708-413e-b193-6d5ed1d5e30a","name":"Updated name","slug":"test","position":1,"deleted_at":null,"updated_at":"2025-01-07T14:44:11.820-08:00","created_at":"2025-01-07T14:44:10.549-08:00"},"relationships":{"catalog":{"data":{"id":"369f9712-d708-413e-b193-6d5ed1d5e30a","type":"catalogs"}},"properties":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_catalog_entity"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/catalog_entities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entities/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a catalog_entity","security":[{"bearer_auth":[]}],"tags":["CatalogEntities"],"description":"Delete a specific catalog_entity by id","operationId":"deleteCatalogEntity","responses":{"200":{"description":"catalog_entity deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"665dc231-ca54-4f01-8164-ab2887626fd8","type":"catalog_entities","attributes":{"catalog_id":"369f9712-d708-413e-b193-6d5ed1d5e30a","name":"Test","slug":"test","position":1,"deleted_at":"2025-01-07T14:44:12.388-08:00","updated_at":"2025-01-07T14:44:12.388-08:00","created_at":"2025-01-07T14:44:10.549-08:00"},"relationships":{"catalog":{"data":{"id":"369f9712-d708-413e-b193-6d5ed1d5e30a","type":"catalogs"}},"properties":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/catalog_entities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalog_entities/{catalog_entity_id}/properties":{"parameters":[{"name":"catalog_entity_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a catalog_entity_property","security":[{"bearer_auth":[]}],"tags":["CatalogEntityProperties"],"description":"Creates a new catalog_entity_property from provided data","operationId":"createCatalogEntityProperty","parameters":[],"responses":{"201":{"description":"catalog_entity_property created","content":{"application/vnd.api+json":{"example":{"data":{"id":"4dece85f-c050-45bf-b38e-a6110c54f3fd","type":"catalog_entity_properties","attributes":{"catalog_entity_id":"f048efee-02cf-4552-bb47-40b4b405b66b","catalog_field_id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","key":"text","value":"Test EntityProperty","deleted_at":null,"updated_at":"2025-01-07T14:44:13.727-08:00","created_at":"2025-01-07T14:44:13.727-08:00"},"relationships":{"catalog_entity":{"data":{"id":"f048efee-02cf-4552-bb47-40b4b405b66b","type":"catalog_entities"}},"catalog_field":{"data":{"id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","type":"catalog_fields"}}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_property_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Value can't be blank","status":"422"},{"title":"Value is too short (minimum is 1 character)","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_catalog_entity_property"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List catalog properties","security":[{"bearer_auth":[]}],"tags":["CatalogEntityProperties"],"description":"List catalog_entity_properties","operationId":"listCatalogEntityProperties","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: catalog_entity,catalog_field","schema":{"type":"string","enum":["catalog_entity","catalog_field"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[catalog_field_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[key]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/catalog_entity_property_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcatalog_field_id%5D=SOME_STRING_VALUE&filter%5Bkey%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcatalog_field_id%5D=SOME_STRING_VALUE&filter%5Bkey%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcatalog_field_id%5D=SOME_STRING_VALUE&filter%5Bkey%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entities/%7Bcatalog_entity_id%7D/properties?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcatalog_field_id%5D=SOME_STRING_VALUE&filter%5Bkey%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalog_entity_properties/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a catalog_entity_property","security":[{"bearer_auth":[]}],"tags":["CatalogEntityProperties"],"description":"Retrieves a specific catalog_entity_property by id","operationId":"getCatalogEntityProperty","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: catalog_entity,catalog_field","schema":{"type":"string","enum":["catalog_entity","catalog_field"]},"required":false}],"responses":{"200":{"description":"catalog_entity_property found","content":{"application/vnd.api+json":{"example":{"data":{"id":"45db5e05-87e4-47b5-b53a-f88afae10c96","type":"catalog_entity_properties","attributes":{"catalog_entity_id":"f048efee-02cf-4552-bb47-40b4b405b66b","catalog_field_id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","key":"text","value":"Test","deleted_at":null,"updated_at":"2025-01-07T14:44:13.582-08:00","created_at":"2025-01-07T14:44:13.582-08:00"},"relationships":{"catalog_entity":{"data":{"id":"f048efee-02cf-4552-bb47-40b4b405b66b","type":"catalog_entities"}},"catalog_field":{"data":{"id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","type":"catalog_fields"}}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_property_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entity_properties/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a catalog_entity_property","security":[{"bearer_auth":[]}],"tags":["CatalogEntityProperties"],"description":"Update a specific catalog_entity_property by id","operationId":"updateCatalogEntityProperty","parameters":[],"responses":{"200":{"description":"catalog_entity_property updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"45db5e05-87e4-47b5-b53a-f88afae10c96","type":"catalog_entity_properties","attributes":{"catalog_entity_id":"f048efee-02cf-4552-bb47-40b4b405b66b","catalog_field_id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","key":"text","value":"Updated value","deleted_at":null,"updated_at":"2025-01-07T14:44:14.896-08:00","created_at":"2025-01-07T14:44:13.582-08:00"},"relationships":{"catalog_entity":{"data":{"id":"f048efee-02cf-4552-bb47-40b4b405b66b","type":"catalog_entities"}},"catalog_field":{"data":{"id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","type":"catalog_fields"}}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_property_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_catalog_entity_property"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entity_properties/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a catalog_entity_property","security":[{"bearer_auth":[]}],"tags":["CatalogEntityProperties"],"description":"Delete a specific catalog_entity_property by id","operationId":"deleteCatalogEntityProperty","responses":{"200":{"description":"catalog_entity_property deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"45db5e05-87e4-47b5-b53a-f88afae10c96","type":"catalog_entity_properties","attributes":{"catalog_entity_id":"f048efee-02cf-4552-bb47-40b4b405b66b","catalog_field_id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","key":"text","value":"Test","deleted_at":"2025-01-07T14:44:15.615-08:00","updated_at":"2025-01-07T14:44:15.615-08:00","created_at":"2025-01-07T14:44:13.582-08:00"},"relationships":{"catalog_entity":{"data":{"id":"f048efee-02cf-4552-bb47-40b4b405b66b","type":"catalog_entities"}},"catalog_field":{"data":{"id":"2ebe76b1-ab44-40ce-8e74-8ab96cd160c2","type":"catalog_fields"}}}}},"schema":{"$ref":"#/components/schemas/catalog_entity_property_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_entity_properties/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_entity_properties/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalogs/{catalog_id}/fields":{"parameters":[{"name":"catalog_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a catalog_field","security":[{"bearer_auth":[]}],"tags":["CatalogFields"],"description":"Creates a new catalog_field from provided data","operationId":"createCatalogField","parameters":[],"responses":{"201":{"description":"catalog_field created","content":{"application/vnd.api+json":{"example":{"data":{"id":"0ad809c1-010d-4172-9706-8f4eb1e39b8d","type":"catalog_fields","attributes":{"catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","name":"Test Attribute","slug":"test-attribute","kind":"reference","kind_catalog_id":null,"multiple":false,"position":2,"deleted_at":null,"updated_at":"2025-01-07T14:44:17.221-08:00","created_at":"2025-01-07T14:44:17.221-08:00"},"relationships":{"catalog":{"data":{"id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","type":"catalogs"}}}}},"schema":{"$ref":"#/components/schemas/catalog_field_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Name is too short (minimum is 1 character)","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_catalog_field"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/fields \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/fields\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bcatalog_id%7D/fields\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/fields\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List catalog_fields","security":[{"bearer_auth":[]}],"tags":["CatalogFields"],"description":"List catalog_fields","operationId":"listCatalogFields","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: catalog","schema":{"type":"string","enum":["catalog"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","position","-position"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/catalog_field_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bcatalog_id%7D/fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bcatalog_id%7D/fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalog_fields/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a catalog_field","security":[{"bearer_auth":[]}],"tags":["CatalogFields"],"description":"Retrieves a specific catalog_field by id","operationId":"getCatalogField","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: catalog","schema":{"type":"string","enum":["catalog"]},"required":false}],"responses":{"200":{"description":"catalog_field found","content":{"application/vnd.api+json":{"example":{"data":{"id":"d94ff7b3-6b67-4041-b70e-1e071b39bba3","type":"catalog_fields","attributes":{"catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","name":"Test","slug":"test","kind":"reference","kind_catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","multiple":false,"position":1,"deleted_at":null,"updated_at":"2025-01-07T14:44:17.074-08:00","created_at":"2025-01-07T14:44:17.074-08:00"},"relationships":{"catalog":{"data":{"id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","type":"catalogs"}}}}},"schema":{"$ref":"#/components/schemas/catalog_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalog_fields/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_fields/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_fields/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_fields/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a catalog_field","security":[{"bearer_auth":[]}],"tags":["CatalogFields"],"description":"Update a specific catalog_field by id","operationId":"updateCatalogField","parameters":[],"responses":{"200":{"description":"catalog_field updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d94ff7b3-6b67-4041-b70e-1e071b39bba3","type":"catalog_fields","attributes":{"catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","name":"Updated name","slug":"test","kind":"reference","kind_catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","multiple":false,"position":1,"deleted_at":null,"updated_at":"2025-01-07T14:44:18.349-08:00","created_at":"2025-01-07T14:44:17.074-08:00"},"relationships":{"catalog":{"data":{"id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","type":"catalogs"}}}}},"schema":{"$ref":"#/components/schemas/catalog_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_catalog_field"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/catalog_fields/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_fields/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_fields/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_fields/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a catalog_field","security":[{"bearer_auth":[]}],"tags":["CatalogFields"],"description":"Delete a specific catalog_field by id","operationId":"deleteCatalogField","responses":{"200":{"description":"catalog_field deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"d94ff7b3-6b67-4041-b70e-1e071b39bba3","type":"catalog_fields","attributes":{"catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","name":"Test","slug":"test","kind":"reference","kind_catalog_id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","multiple":false,"position":1,"deleted_at":"2025-01-07T14:44:19.024-08:00","updated_at":"2025-01-07T14:44:19.024-08:00","created_at":"2025-01-07T14:44:17.074-08:00"},"relationships":{"catalog":{"data":{"id":"d9eb56d0-c7b8-46ee-a640-ea52a913e175","type":"catalogs"}}}}},"schema":{"$ref":"#/components/schemas/catalog_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/catalog_fields/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalog_fields/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalog_fields/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalog_fields/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalogs":{"post":{"summary":"Creates a catalog","security":[{"bearer_auth":[]}],"tags":["Catalogs"],"description":"Creates a new catalog from provided data","operationId":"createCatalog","parameters":[],"responses":{"201":{"description":"catalog created","content":{"application/vnd.api+json":{"example":{"data":{"id":"c95a838c-2791-48eb-991e-553246fbeee9","type":"catalogs","attributes":{"name":"Test","slug":"test","icon":"shapes","description":null,"position":2,"deleted_at":null,"updated_at":"2025-01-07T14:44:20.325-08:00","created_at":"2025-01-07T14:44:20.325-08:00"},"relationships":{"fields":{"data":[]},"entities":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Name is too short (minimum is 1 character)","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_catalog"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/catalogs \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List catalogs","security":[{"bearer_auth":[]}],"tags":["Catalogs"],"description":"List catalogs","operationId":"listCatalogs","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: fields,entities","schema":{"type":"string","enum":["fields","entities"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","position","-position"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/catalog_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/catalogs?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/catalogs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a catalog","security":[{"bearer_auth":[]}],"tags":["Catalogs"],"description":"Retrieves a specific catalog by id","operationId":"getCatalog","responses":{"200":{"description":"catalog found","content":{"application/vnd.api+json":{"example":{"data":{"id":"83a87bbf-b41a-40fc-8e09-c6c201645466","type":"catalogs","attributes":{"name":"Services","slug":"services","icon":"globe-alt","description":null,"position":1,"deleted_at":null,"updated_at":"2025-01-07T14:44:20.181-08:00","created_at":"2025-01-07T14:44:20.181-08:00"},"relationships":{"fields":{"data":[]},"entities":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/catalogs/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a catalog","security":[{"bearer_auth":[]}],"tags":["Catalogs"],"description":"Update a specific catalog by id","operationId":"updateCatalog","parameters":[],"responses":{"200":{"description":"catalog updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"83a87bbf-b41a-40fc-8e09-c6c201645466","type":"catalogs","attributes":{"name":"Services","slug":"services","icon":"globe-alt","description":"Updated description","position":1,"deleted_at":null,"updated_at":"2025-01-07T14:44:21.460-08:00","created_at":"2025-01-07T14:44:20.181-08:00"},"relationships":{"fields":{"data":[]},"entities":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_catalog"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/catalogs/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a catalog","security":[{"bearer_auth":[]}],"tags":["Catalogs"],"description":"Delete a specific catalog by id","operationId":"deleteCatalog","responses":{"200":{"description":"catalog deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"83a87bbf-b41a-40fc-8e09-c6c201645466","type":"catalogs","attributes":{"name":"Services","slug":"services","icon":"globe-alt","description":null,"position":1,"deleted_at":"2025-01-07T14:44:21.960-08:00","updated_at":"2025-01-07T14:44:21.960-08:00","created_at":"2025-01-07T14:44:20.181-08:00"},"relationships":{"fields":{"data":[]},"entities":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/catalog_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/catalogs/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/catalogs/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/catalogs/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/catalogs/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/causes":{"post":{"summary":"Creates a cause","security":[{"bearer_auth":[]}],"tags":["Causes"],"description":"Creates a new cause from provided data","operationId":"createCause","parameters":[],"responses":{"201":{"description":"cause created","content":{"application/vnd.api+json":{"example":{"data":{"id":"1b701e05-91ab-4b0f-9a2a-3ff2314f82b4","type":"causes","attributes":{"slug":"how-to-handle-customer-facing-incident","name":"How to handle customer-facing incident?","description":"This is a description","position":1,"created_at":"2025-01-07T14:44:25.200-08:00","updated_at":"2025-01-07T14:44:25.200-08:00"}}},"schema":{"$ref":"#/components/schemas/cause_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_cause"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/causes \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/causes\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/causes\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/causes\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List causes","security":[{"bearer_auth":[]}],"tags":["Causes"],"description":"List causes","operationId":"listCauses","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/cause_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/causes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/causes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/causes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/causes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/causes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a cause","security":[{"bearer_auth":[]}],"tags":["Causes"],"description":"Retrieves a specific cause by id","operationId":"getCause","responses":{"200":{"description":"cause found","content":{"application/vnd.api+json":{"example":{"data":{"id":"3975db78-d590-4398-bed4-911e113afedd","type":"causes","attributes":{"slug":"voluptas-soluta-dolore-dolor","name":"Voluptas soluta dolore dolor.","description":"Et laborum atque fuga.","position":1,"created_at":"2025-01-07T14:44:23.125-08:00","updated_at":"2025-01-07T14:44:23.125-08:00"}}},"schema":{"$ref":"#/components/schemas/cause_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/causes/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/causes/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/causes/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/causes/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a cause","security":[{"bearer_auth":[]}],"tags":["Causes"],"description":"Update a specific cause by id","operationId":"updateCause","parameters":[],"responses":{"200":{"description":"cause updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"3975db78-d590-4398-bed4-911e113afedd","type":"causes","attributes":{"slug":"how-to-handle-security-incident","name":"How to handle security incident?","description":"This is a description","position":2,"created_at":"2025-01-07T14:44:23.125-08:00","updated_at":"2025-01-07T14:44:26.337-08:00"}}},"schema":{"$ref":"#/components/schemas/cause_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_cause"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/causes/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/causes/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/causes/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/causes/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a cause","security":[{"bearer_auth":[]}],"tags":["Causes"],"description":"Delete a specific cause by id","operationId":"deleteCause","responses":{"200":{"description":"cause deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"3975db78-d590-4398-bed4-911e113afedd","type":"causes","attributes":{"slug":"voluptas-soluta-dolore-dolor","name":"Voluptas soluta dolore dolor.","description":"Et laborum atque fuga.","position":1,"created_at":"2025-01-07T14:44:23.125-08:00","updated_at":"2025-01-07T14:44:26.887-08:00"}}},"schema":{"$ref":"#/components/schemas/cause_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/causes/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/causes/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/causes/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/causes/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/custom_fields/{custom_field_id}/options":{"parameters":[{"name":"custom_field_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"[DEPRECATED] Creates a custom field option","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFieldOptions"],"description":"[DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data","deprecated":true,"operationId":"createCustomFieldOption","parameters":[],"responses":{"201":{"description":"custom_field_option created","content":{"application/vnd.api+json":{"example":{"data":{"id":"3","type":"custom_field_options","attributes":{"custom_field_id":1,"value":"Test option value","color":"#FBE4A0","default":false,"position":3,"updated_at":"2025-01-07T14:44:28.259-08:00","created_at":"2025-01-07T14:44:28.259-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_field_option_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Value can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_custom_field_option"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/custom_fields/%7Bcustom_field_id%7D/options \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields/%7Bcustom_field_id%7D/options\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields/%7Bcustom_field_id%7D/options\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields/%7Bcustom_field_id%7D/options\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"[DEPRECATED] List custom field options","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFieldOptions"],"description":"[DEPRECATED] Use form field endpoints instead. List custom field options","deprecated":true,"operationId":"listCustomFieldOptions","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[value]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[color]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/custom_field_option_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/custom_fields/%7Bcustom_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields/%7Bcustom_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields/%7Bcustom_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields/%7Bcustom_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/custom_field_options/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"[DEPRECATED] Retrieves a custom field option","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFieldOptions"],"description":"[DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id","deprecated":true,"operationId":"getCustomFieldOption","responses":{"200":{"description":"custom_field_option found","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"custom_field_options","attributes":{"custom_field_id":1,"value":"Possimus fugiat et nulla.","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:44:28.105-08:00","created_at":"2025-01-07T14:44:28.105-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_field_option_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/custom_field_options/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_field_options/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_field_options/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_field_options/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"[DEPRECATED] Update a custom field option","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFieldOptions"],"description":"[DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id","deprecated":true,"operationId":"updateCustomFieldOption","parameters":[],"responses":{"200":{"description":"custom_field_option updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"custom_field_options","attributes":{"custom_field_id":1,"value":"Test update option value","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:44:29.405-08:00","created_at":"2025-01-07T14:44:28.105-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_field_option_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_custom_field_option"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/custom_field_options/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_field_options/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_field_options/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_field_options/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"[DEPRECATED] Delete a custom field option","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFieldOptions"],"description":"[DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id","deprecated":true,"operationId":"deleteCustomFieldOption","responses":{"200":{"description":"custom_field_option deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"custom_field_options","attributes":{"custom_field_id":1,"value":"Possimus fugiat et nulla.","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:44:30.409-08:00","created_at":"2025-01-07T14:44:28.105-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_field_option_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/custom_field_options/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_field_options/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_field_options/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_field_options/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/custom_fields":{"post":{"summary":"[DEPRECATED] Creates a Custom Field","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFields"],"description":"[DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data","deprecated":true,"operationId":"createCustomField","parameters":[],"responses":{"201":{"description":"custom_field created","content":{"application/vnd.api+json":{"example":{"data":{"id":"3","type":"custom_fields","attributes":{"slug":"test-custom-field","description":null,"enabled":true,"position":2,"updated_at":"2025-01-07T14:44:33.737-08:00","created_at":"2025-01-07T14:44:33.737-08:00","kind":"text","label":"Test custom field","shown":["incident_form","incident_slack_form"],"required":[]},"relationships":{"options":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/custom_field_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_custom_field"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/custom_fields \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"[DEPRECATED] List Custom Fields","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFields"],"description":"[DEPRECATED] Use form field endpoints instead. List Custom fields","deprecated":true,"operationId":"listCustomFields","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: options","schema":{"type":"string","enum":["options"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","position","-position"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[label]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[enabled]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/custom_field_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/custom_fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Blabel%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Blabel%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Blabel%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Blabel%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/custom_fields/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"[DEPRECATED] Retrieves a Custom Field","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFields"],"description":"Retrieves a specific custom_field by id","deprecated":true,"operationId":"getCustomField","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: options","schema":{"type":"string","enum":["options"]},"required":false}],"responses":{"200":{"description":"custom_field found","content":{"application/vnd.api+json":{"example":{"data":{"id":"2","type":"custom_fields","attributes":{"slug":"et-neque-veniam-mollitia","description":"Tenetur voluptatum aut odio.","enabled":true,"position":1,"updated_at":"2025-01-07T14:44:31.553-08:00","created_at":"2025-01-07T14:44:31.553-08:00","kind":"text","label":"Et neque veniam mollitia.","shown":["incident_form","incident_slack_form"],"required":[]},"relationships":{"options":{"data":[{"id":"4","type":"custom_field_options"},{"id":"5","type":"custom_field_options"}]}}}},"schema":{"$ref":"#/components/schemas/custom_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/custom_fields/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"[DEPRECATED] Update a Custom Field","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFields"],"description":"[DEPRECATED] Use form field endpoints instead. Update a specific custom field by id","deprecated":true,"operationId":"updateCustomField","parameters":[],"responses":{"200":{"description":"custom_field updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"2","type":"custom_fields","attributes":{"slug":"test-update-custom-field","description":"Tenetur voluptatum aut odio.","enabled":true,"position":1,"updated_at":"2025-01-07T14:44:35.027-08:00","created_at":"2025-01-07T14:44:31.553-08:00","kind":"text","label":"Test update custom field","shown":["incident_form"],"required":[]},"relationships":{"options":{"data":[{"id":"4","type":"custom_field_options"},{"id":"5","type":"custom_field_options"}]}}}},"schema":{"$ref":"#/components/schemas/custom_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_custom_field"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/custom_fields/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"[DEPRECATED] Delete a Custom Field","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] CustomFields"],"description":"[DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id","deprecated":true,"operationId":"deleteCustomField","responses":{"200":{"description":"custom_field deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"2","type":"custom_fields","attributes":{"slug":"et-neque-veniam-mollitia","description":"Tenetur voluptatum aut odio.","enabled":true,"position":1,"updated_at":"2025-01-07T14:44:35.701-08:00","created_at":"2025-01-07T14:44:31.553-08:00","kind":"text","label":"Et neque veniam mollitia.","shown":[],"required":[]},"relationships":{"options":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/custom_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/custom_fields/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_fields/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_fields/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_fields/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/custom_forms":{"post":{"summary":"Creates a custom form","security":[{"bearer_auth":[]}],"tags":["CustomForms"],"description":"Creates a new custom form from provided data","operationId":"createCustomForm","parameters":[],"responses":{"201":{"description":"custom_form created","content":{"application/vnd.api+json":{"example":{"data":{"id":"209f01fe-77ef-45f3-beeb-477043134009","type":"custom_forms","attributes":{"slug":"test","name":"Test","description":null,"enabled":true,"command":"test","created_at":"2025-01-07T14:44:38.274-08:00","updated_at":"2025-01-07T14:44:38.274-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_form_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Command can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_custom_form"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/custom_forms \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_forms\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_forms\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_forms\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List custom forms","security":[{"bearer_auth":[]}],"tags":["CustomForms"],"description":"List custom forms","operationId":"listCustomForms","parameters":[{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[command]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"custom_form found","content":{"application/vnd.api+json":{"example":{"data":[],"links":{"self":"http://www.example.com/v1/custom_forms?page%5Bnumber%5D=1&page%5Bsize%5D=50","first":"http://www.example.com/v1/custom_forms?page%5Bnumber%5D=1&page%5Bsize%5D=50","prev":null,"last":"http://www.example.com/v1/custom_forms?page%5Bnumber%5D=1&page%5Bsize%5D=50","next":null},"meta":{"current_page":1,"next_page":null,"prev_page":null,"total_pages":1,"total_count":0}},"schema":{"$ref":"#/components/schemas/custom_form_list"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/custom_forms?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcommand%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_forms?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcommand%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_forms?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcommand%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_forms?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcommand%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/custom_forms/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a custom form","security":[{"bearer_auth":[]}],"tags":["CustomForms"],"description":"Retrieves a specific custom form by id","operationId":"getCustomForm","responses":{"200":{"description":"custom_form found","content":{"application/vnd.api+json":{"example":{"data":{"id":"c6fdf3ad-b570-4e5e-b576-0c18c44a8fbb","type":"custom_forms","attributes":{"slug":"optio-fugit-maiores-provident","name":"Optio fugit maiores provident.","description":"Ut neque provident ut.","enabled":true,"command":"optio-fugit-maiores-provident","created_at":"2025-01-07T14:44:40.003-08:00","updated_at":"2025-01-07T14:44:40.003-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_form_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/custom_forms/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_forms/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_forms/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_forms/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a custom form","security":[{"bearer_auth":[]}],"tags":["CustomForms"],"description":"Update a specific custom form by id","operationId":"updateCustomForm","parameters":[],"responses":{"200":{"description":"custom_form updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"3614ef50-b4a2-4850-a2b5-89f7f4758f88","type":"custom_forms","attributes":{"slug":"vel-dolorem-quam-aperiam","name":"Test Update","description":"Ea sequi necessitatibus animi.","enabled":true,"command":"vel-dolorem-quam-aperiam","created_at":"2025-01-07T14:44:42.060-08:00","updated_at":"2025-01-07T14:44:42.223-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_form_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_custom_form"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/custom_forms/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_forms/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_forms/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_forms/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a custom form","security":[{"bearer_auth":[]}],"tags":["CustomForms"],"description":"Delete a specific custom form by id","operationId":"deleteCustomForm","responses":{"200":{"description":"custom_form deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"3ec5b1fa-d00f-4f40-9d87-fcc6fb0f0312","type":"custom_forms","attributes":{"slug":"hic-sunt-quibusdam-quas","name":"Hic sunt quibusdam quas.","description":"Fugiat aperiam sit aut.","enabled":true,"command":"hic-sunt-quibusdam-quas","created_at":"2025-01-07T14:44:44.148-08:00","updated_at":"2025-01-07T14:44:44.300-08:00"}}},"schema":{"$ref":"#/components/schemas/custom_form_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/custom_forms/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/custom_forms/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/custom_forms/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/custom_forms/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboards/{dashboard_id}/panels":{"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a dashboard panel","security":[{"bearer_auth":[]}],"tags":["DashboardPanels"],"description":"Creates a new dashboard panel from provided data","operationId":"createDashboardPanel","parameters":[],"responses":{"201":{"description":"dashboard panel created","content":{"application/vnd.api+json":{"example":{"data":{"id":"0695321f-7d4a-434b-b3b0-377c046b0c29","type":"dashboard_panels","attributes":{"dashboard_id":"7c10a105-f73b-46b9-b1b5-576a1efcb97e","name":"test","params":{"display":"line_chart","datasets":[{"collection":"incidents","filter":[],"aggregate":{"operation":"count","key":"results","cumulative":false}}]},"position":null,"created_at":"2025-01-07T14:44:46.814-08:00","updated_at":"2025-01-07T14:44:46.814-08:00","data":[{"name":"Incidents","color":null,"data":{"2024-12-31":0,"2025-01-01":0,"2025-01-02":0,"2025-01-03":0,"2025-01-04":0,"2025-01-05":0,"2025-01-06":0,"2025-01-07":0}}]}}},"schema":{"$ref":"#/components/schemas/dashboard_panel_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_dashboard_panel"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/dashboards/%7Bdashboard_id%7D/panels \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bdashboard_id%7D/panels\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bdashboard_id%7D/panels\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bdashboard_id%7D/panels\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List dashboard panels","security":[{"bearer_auth":[]}],"tags":["DashboardPanels"],"description":"List dashboard panels","operationId":"listDashboardPanels","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/dashboard_panel_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/dashboards/%7Bdashboard_id%7D/panels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bdashboard_id%7D/panels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bdashboard_id%7D/panels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bdashboard_id%7D/panels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboard_panels/{id}/duplicate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Duplicates a dashboard panel","security":[{"bearer_auth":[]}],"tags":["DashboardPanels"],"description":"Duplicates a dashboard panel","operationId":"duplicateDashboardPanel","responses":{"201":{"description":"dashboard panel created","content":{"application/vnd.api+json":{"example":{"data":{"id":"6d729514-0b6a-4ca8-a695-c3f8c31d6a9d","type":"dashboard_panels","attributes":{"dashboard_id":"7c10a105-f73b-46b9-b1b5-576a1efcb97e","name":"Copy of Test panel","params":{"display":"line_chart","datasets":[{"collection":"incidents","filter":[],"aggregate":{"operation":"count","key":"results","cumulative":false}}]},"position":null,"created_at":"2025-01-07T14:44:47.797-08:00","updated_at":"2025-01-07T14:44:47.797-08:00","data":[{"name":"Incidents","color":null,"data":{"2024-12-31":0,"2025-01-01":0,"2025-01-02":0,"2025-01-03":0,"2025-01-04":0,"2025-01-05":0,"2025-01-06":0,"2025-01-07":0}}]}}},"schema":{"$ref":"#/components/schemas/dashboard_panel_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/dashboard_panels/%7Bid%7D/duplicate \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D/duplicate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboard_panels/%7Bid%7D/duplicate\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D/duplicate\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboard_panels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a dashboard panel","security":[{"bearer_auth":[]}],"tags":["DashboardPanels"],"description":"Retrieves a specific dashboard panel by id","operationId":"getDashboardPanel","parameters":[{"name":"range","in":"query","required":false,"description":"Date range for panel data, ISO8601 timestamps separated by the word 'to'. Ex: '2022-06-19T11:28:46.029Z to 2022-07-18T21:58:46.029Z'.","schema":{"type":"string"}},{"name":"period","in":"query","required":false,"description":"The time period to group data by. Accepts 'day', 'week', and 'month'","schema":{"type":"string"}},{"name":"time_zone","in":"query","required":false,"description":"The time zone to use for period","schema":{"type":"string"}}],"responses":{"200":{"description":"dashboard panel found","content":{"application/vnd.api+json":{"example":{"data":{"id":"d0277783-4911-4c41-b0e4-3b32ead7b626","type":"dashboard_panels","attributes":{"dashboard_id":"7c10a105-f73b-46b9-b1b5-576a1efcb97e","name":"Test panel","params":{"display":"line_chart","datasets":[{"collection":"incidents","filter":[],"aggregate":{"operation":"count","key":"results","cumulative":false}}]},"position":null,"created_at":"2025-01-07T14:44:46.637-08:00","updated_at":"2025-01-07T14:44:46.637-08:00","data":[{"name":"Incidents","color":null,"data":{"2024-12-07":0,"2024-12-08":0,"2024-12-09":0,"2024-12-10":0,"2024-12-11":0,"2024-12-12":0,"2024-12-13":0,"2024-12-14":0,"2024-12-15":0,"2024-12-16":0,"2024-12-17":0,"2024-12-18":0,"2024-12-19":0,"2024-12-20":0,"2024-12-21":0,"2024-12-22":0,"2024-12-23":0,"2024-12-24":0,"2024-12-25":0,"2024-12-26":0,"2024-12-27":0,"2024-12-28":0,"2024-12-29":0,"2024-12-30":0,"2024-12-31":0,"2025-01-01":0,"2025-01-02":0,"2025-01-03":0,"2025-01-04":0,"2025-01-05":0,"2025-01-06":0,"2025-01-07":0}}]}}},"schema":{"$ref":"#/components/schemas/dashboard_panel_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/dashboard_panels/%7Bid%7D?range=SOME_STRING_VALUE&period=SOME_STRING_VALUE&time_zone=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D?range=SOME_STRING_VALUE&period=SOME_STRING_VALUE&time_zone=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboard_panels/%7Bid%7D?range=SOME_STRING_VALUE&period=SOME_STRING_VALUE&time_zone=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D?range=SOME_STRING_VALUE&period=SOME_STRING_VALUE&time_zone=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a dashboard panel","security":[{"bearer_auth":[]}],"tags":["DashboardPanels"],"description":"Update a specific dashboard panel by id","operationId":"updateDashboardPanel","parameters":[],"responses":{"200":{"description":"dashboard panel updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d0277783-4911-4c41-b0e4-3b32ead7b626","type":"dashboard_panels","attributes":{"dashboard_id":"7c10a105-f73b-46b9-b1b5-576a1efcb97e","name":"test update","params":{"display":"line_chart","datasets":[{"collection":"incidents","filter":[],"aggregate":{"operation":"count","key":"results","cumulative":false}}]},"position":null,"created_at":"2025-01-07T14:44:46.637-08:00","updated_at":"2025-01-07T14:44:48.308-08:00","data":[{"name":"Incidents","color":null,"data":{"2024-12-31":0,"2025-01-01":0,"2025-01-02":0,"2025-01-03":0,"2025-01-04":0,"2025-01-05":0,"2025-01-06":0,"2025-01-07":0}}]}}},"schema":{"$ref":"#/components/schemas/dashboard_panel_response"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_dashboard_panel"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/dashboard_panels/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboard_panels/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a dashboard panel","security":[{"bearer_auth":[]}],"tags":["DashboardPanels"],"description":"Delete a specific dashboard panel by id","operationId":"deleteDashboardPanel","responses":{"200":{"description":"dashboard panel deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"d0277783-4911-4c41-b0e4-3b32ead7b626","type":"dashboard_panels","attributes":{"dashboard_id":"7c10a105-f73b-46b9-b1b5-576a1efcb97e","name":"Test panel","params":{"display":"line_chart","datasets":[{"collection":"incidents","filter":[],"aggregate":{"operation":"count","key":"results","cumulative":false}}]},"position":null,"created_at":"2025-01-07T14:44:46.637-08:00","updated_at":"2025-01-07T14:44:48.521-08:00","data":[{"name":"Incidents","color":null,"data":{"2024-12-31":0,"2025-01-01":0,"2025-01-02":0,"2025-01-03":0,"2025-01-04":0,"2025-01-05":0,"2025-01-06":0,"2025-01-07":0}}]}}},"schema":{"$ref":"#/components/schemas/dashboard_panel_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/dashboard_panels/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboard_panels/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboard_panels/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboards":{"post":{"summary":"Creates a dashboard","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"Creates a new dashboard from provided data","operationId":"createDashboard","parameters":[],"responses":{"201":{"description":"dashboard created","content":{"application/vnd.api+json":{"example":{"data":{"id":"1d48f6be-ef3f-4628-8513-a7f3e5044145","type":"dashboards","attributes":{"team_id":88,"user_id":87,"name":"Test dashboard","description":null,"slug":"test-dashboard","public":false,"owner":"user","range":"Last 30 Days","period":"day","color":"#D7F5E1","icon":"📊","auto_refresh":false,"updated_at":"2025-01-07T14:44:51.259-08:00","created_at":"2025-01-07T14:44:51.259-08:00"},"relationships":{"panels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/dashboard_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_dashboard"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/dashboards \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List dashboards","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"List dashboards","operationId":"listDashboards","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: panels","schema":{"type":"string","enum":["panels"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/dashboard_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/dashboards?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboards/{id}/duplicate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Duplicates a dashboard","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"Duplicates a dashboard","operationId":"duplicateDashboard","responses":{"201":{"description":"dashboard created","content":{"application/vnd.api+json":{"example":{"data":{"id":"7ec6e0d1-00fb-4760-8df6-0c277889489e","type":"dashboards","attributes":{"team_id":88,"user_id":87,"name":"Copy of Dashboard 10 - 2025-01-07","description":null,"slug":"copy-of-dashboard-10-2025-01-07","public":false,"owner":"user","range":"Last 30 Days","period":"day","color":"#D7F5E1","icon":"📊","auto_refresh":false,"updated_at":"2025-01-07T14:44:51.961-08:00","created_at":"2025-01-07T14:44:51.961-08:00"},"relationships":{"panels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/dashboard_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/dashboards/%7Bid%7D/duplicate \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bid%7D/duplicate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bid%7D/duplicate\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bid%7D/duplicate\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboards/{id}/set_default":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Sets dashboard to user default","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"Sets dashboard to user default","operationId":"setDefaultDashboard","responses":{"200":{"description":"dashboard created","content":{"application/vnd.api+json":{"example":{"data":{"id":"aee47f5b-2e43-4361-81d1-30eba268e645","type":"dashboards","attributes":{"team_id":88,"user_id":87,"name":"Dashboard 10","description":null,"slug":"dashboard-10","public":false,"owner":"team","range":"Last 30 Days","period":"day","color":"#D7F5E1","icon":"📊","auto_refresh":false,"updated_at":"2025-01-07T14:44:49.340-08:00","created_at":"2025-01-07T14:44:49.340-08:00"},"relationships":{"panels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/dashboard_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/dashboards/%7Bid%7D/set_default \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bid%7D/set_default\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bid%7D/set_default\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bid%7D/set_default\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/dashboards/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a dashboard","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"Retrieves a specific dashboard by id","operationId":"getDashboard","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: panels","schema":{"type":"string","enum":["panels"]},"required":false}],"responses":{"200":{"description":"dashboard found","content":{"application/vnd.api+json":{"example":{"data":{"id":"aee47f5b-2e43-4361-81d1-30eba268e645","type":"dashboards","attributes":{"team_id":88,"user_id":87,"name":"Dashboard 10","description":null,"slug":"dashboard-10","public":false,"owner":"team","range":"Last 30 Days","period":"day","color":"#D7F5E1","icon":"📊","auto_refresh":false,"updated_at":"2025-01-07T14:44:49.340-08:00","created_at":"2025-01-07T14:44:49.340-08:00"},"relationships":{"panels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/dashboard_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/dashboards/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a dashboard","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"Update a specific dashboard by id","operationId":"updateDashboard","parameters":[],"responses":{"200":{"description":"dashboard updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"aee47f5b-2e43-4361-81d1-30eba268e645","type":"dashboards","attributes":{"team_id":88,"user_id":87,"name":"Test update dashboard","description":null,"slug":"test-update-dashboard","public":false,"owner":"team","range":"Last 30 Days","period":"day","color":"#D7F5E1","icon":"📊","auto_refresh":false,"updated_at":"2025-01-07T14:44:53.118-08:00","created_at":"2025-01-07T14:44:49.340-08:00"},"relationships":{"panels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/dashboard_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_dashboard"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/dashboards/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a dashboard","security":[{"bearer_auth":[]}],"tags":["Dashboards"],"description":"Delete a specific dashboard by id","operationId":"deleteDashboard","responses":{"200":{"description":"dashboard deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"aee47f5b-2e43-4361-81d1-30eba268e645","type":"dashboards","attributes":{"team_id":88,"user_id":87,"name":"Dashboard 10","description":null,"slug":"dashboard-10","public":false,"owner":"user","range":"Last 30 Days","period":"day","color":"#D7F5E1","icon":"📊","auto_refresh":false,"updated_at":"2025-01-07T14:44:53.661-08:00","created_at":"2025-01-07T14:44:49.340-08:00"},"relationships":{"panels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/dashboard_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/dashboards/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/dashboards/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/dashboards/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/dashboards/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/environments":{"post":{"summary":"Creates a environment","security":[{"bearer_auth":[]}],"tags":["Environments"],"description":"Creates a new environment from provided data","operationId":"createEnvironment","parameters":[],"responses":{"201":{"description":"environment created","content":{"application/vnd.api+json":{"example":{"data":{"id":"fb94b094-3757-4664-bb10-656ce734dc09","type":"environments","attributes":{"slug":"us-east-1","name":"us-east-1","description":"East Coast Datacenter","color":"#FFF","position":1,"notify_emails":["hello@rootly.com","world@rootly.com"],"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"leadership"}],"created_at":"2025-01-07T14:44:56.997-08:00","updated_at":"2025-01-07T14:44:56.997-08:00"}}},"schema":{"$ref":"#/components/schemas/environment_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_environment"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/environments \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/environments\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/environments\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/environments\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List environments","security":[{"bearer_auth":[]}],"tags":["Environments"],"description":"List environments","operationId":"listEnvironments","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[color]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/environment_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/environments?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/environments?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/environments?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/environments?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/environments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a environment","security":[{"bearer_auth":[]}],"tags":["Environments"],"description":"Retrieves a specific environment by id","operationId":"getEnvironment","responses":{"200":{"description":"environment found","content":{"application/vnd.api+json":{"example":{"data":{"id":"470452c6-6a92-4be2-947f-1d1e5b5188ee","type":"environments","attributes":{"slug":"non-optio-nulla-qui","name":"Non optio nulla qui.","description":"Aut non illum praesentium.","color":"#6e0d0d","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:44:54.844-08:00","updated_at":"2025-01-07T14:44:54.844-08:00"}}},"schema":{"$ref":"#/components/schemas/environment_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/environments/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/environments/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/environments/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/environments/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a environment","security":[{"bearer_auth":[]}],"tags":["Environments"],"description":"Update a specific environment by id","operationId":"updateEnvironment","parameters":[],"responses":{"200":{"description":"environment updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"470452c6-6a92-4be2-947f-1d1e5b5188ee","type":"environments","attributes":{"slug":"us-east-1","name":"us-east-1","description":"East Coast Datacenter Region 1","color":"#000","position":2,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:44:54.844-08:00","updated_at":"2025-01-07T14:44:58.155-08:00"}}},"schema":{"$ref":"#/components/schemas/environment_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_environment"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/environments/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/environments/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/environments/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/environments/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a environment","security":[{"bearer_auth":[]}],"tags":["Environments"],"description":"Delete a specific environment by id","operationId":"deleteEnvironment","responses":{"200":{"description":"environment deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"470452c6-6a92-4be2-947f-1d1e5b5188ee","type":"environments","attributes":{"slug":"non-optio-nulla-qui","name":"Non optio nulla qui.","description":"Aut non illum praesentium.","color":"#6e0d0d","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:44:54.844-08:00","updated_at":"2025-01-07T14:44:58.675-08:00"}}},"schema":{"$ref":"#/components/schemas/environment_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/environments/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/environments/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/environments/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/environments/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_policies":{"post":{"summary":"Creates an escalation policy","security":[{"bearer_auth":[]}],"tags":["EscalationPolicies"],"description":"Creates a new escalation policy from provided data","operationId":"createEscalationPolicy","parameters":[],"responses":{"201":{"description":"escalation policy created","content":{"application/vnd.api+json":{"example":{"data":{"id":"6f2c8554-91d4-41c4-ad57-c70fafa43bd1","type":"escalation_policies","attributes":{"name":"Platform EP","description":"test","repeat_count":5,"created_by_user_id":97,"last_updated_by_user_id":97,"group_ids":[],"service_ids":[],"created_at":"2025-01-07T14:45:02.966-08:00","updated_at":"2025-01-07T14:45:02.966-08:00"},"relationships":{"escalation_levels":{"data":[]},"escalation_paths":{"data":[]},"groups":{"data":[]},"services":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"name":["can't be blank"]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_escalation_policy"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/escalation_policies \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List escalation policies","security":[{"bearer_auth":[]}],"tags":["EscalationPolicies"],"description":"List escalation policies","operationId":"listEscalationPolicies","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: escalation_policy_levels,escalation_policy_paths","schema":{"type":"string","enum":["escalation_policy_levels","escalation_policy_paths","groups","services"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/escalation_policy_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/escalation_policies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_policies/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an escalation policy","security":[{"bearer_auth":[]}],"tags":["EscalationPolicies"],"description":"Retrieves a specific escalation policy by id","operationId":"getEscalationPolicy","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: escalation_policy_levels,escalation_policy_paths","schema":{"type":"string","enum":["escalation_policy_levels","escalation_policy_paths","groups","services"]},"required":false}],"responses":{"200":{"description":"escalation policy found","content":{"application/vnd.api+json":{"example":{"data":{"id":"e79e51b0-ae8f-40ff-bfd0-29fe7f8a53bc","type":"escalation_policies","attributes":{"name":"Fugiat excepturi molestiae est.","description":null,"repeat_count":1,"created_by_user_id":99,"last_updated_by_user_id":100,"group_ids":[],"service_ids":[],"created_at":"2025-01-07T14:45:00.063-08:00","updated_at":"2025-01-07T14:45:00.063-08:00"},"relationships":{"escalation_levels":{"data":[]},"escalation_paths":{"data":[]},"groups":{"data":[]},"services":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/escalation_policies/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update an escalation policy","security":[{"bearer_auth":[]}],"tags":["EscalationPolicies"],"description":"Update a specific escalation policy by id","operationId":"updateEscalationPolicy","parameters":[],"responses":{"200":{"description":"escalation policy updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"e79e51b0-ae8f-40ff-bfd0-29fe7f8a53bc","type":"escalation_policies","attributes":{"name":"Platform EP","description":"test","repeat_count":2,"created_by_user_id":99,"last_updated_by_user_id":100,"group_ids":[],"service_ids":[],"created_at":"2025-01-07T14:45:00.063-08:00","updated_at":"2025-01-07T14:45:04.128-08:00"},"relationships":{"escalation_levels":{"data":[]},"escalation_paths":{"data":[]},"groups":{"data":[]},"services":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_escalation_policy"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/escalation_policies/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an escalation policy","security":[{"bearer_auth":[]}],"tags":["EscalationPolicies"],"description":"Delete a specific escalation policy by id","operationId":"deleteEscalationPolicy","responses":{"200":{"description":"escalation policy deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"e79e51b0-ae8f-40ff-bfd0-29fe7f8a53bc","type":"escalation_policies","attributes":{"name":"Fugiat excepturi molestiae est.","description":null,"repeat_count":1,"created_by_user_id":99,"last_updated_by_user_id":100,"group_ids":[],"service_ids":[],"created_at":"2025-01-07T14:45:00.063-08:00","updated_at":"2025-01-07T14:45:04.747-08:00"},"relationships":{"escalation_levels":{"data":[]},"escalation_paths":{"data":[]},"groups":{"data":[]},"services":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/escalation_policies/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_policies/{escalation_policy_id}/escalation_levels":{"parameters":[{"name":"escalation_policy_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates an escalation level for an Escalation Policy","security":[{"bearer_auth":[]}],"tags":["EscalationLevelsPolicies"],"description":"Creates a new escalation level from provided data","operationId":"createEscalationLevelPolicies","parameters":[],"responses":{"201":{"description":"escalation level created","content":{"application/vnd.api+json":{"example":{"data":{"id":"027fa018-5dab-4ba4-b8d3-1b5b49015541","type":"escalation_levels","attributes":{"escalation_policy_path_id":"9cf6e6e6-5bb7-4969-b308-36afd4cff15d","position":1,"delay":2,"escalation_policy_id":"bb81551c-f8a3-4355-b75e-74e8d7dbf94c","created_at":"2025-01-07T14:45:08.687-08:00","updated_at":"2025-01-07T14:45:08.687-08:00","notification_target_params":[{"id":"106","type":"user"},{"id":"c59b8a64-2f78-4e45-bf9e-0cd6f3290e34","type":"schedule"},{"id":"d5c73d3b-bc6a-50c9-aa6d-5d2347af9749","type":"slack_channel"}]}}},"schema":{"$ref":"#/components/schemas/escalation_policy_level_response"}}}},"401":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"notification_target":["You need at least 1 notification target"]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_escalation_policy_level"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List escalation levels for an Escalation Policy","security":[{"bearer_auth":[]}],"tags":["EscalationLevelsPolicies"],"description":"List escalation levels","operationId":"listEscalationLevelsPolicies","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/escalation_policy_level_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels":{"parameters":[{"name":"escalation_policy_path_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates an escalation level for an Escalation Path","security":[{"bearer_auth":[]}],"tags":["EscalationLevelsPath"],"description":"Creates a new escalation level from provided data","operationId":"createEscalationLevelPaths","parameters":[],"responses":{"201":{"description":"escalation level created","content":{"application/vnd.api+json":{"example":{"data":{"id":"d71d3a2e-ef06-4458-8d73-454baf380cff","type":"escalation_levels","attributes":{"escalation_policy_path_id":"28587d63-76a3-4d75-9f93-b1088a7e2a28","position":2,"delay":2,"escalation_policy_id":"bb81551c-f8a3-4355-b75e-74e8d7dbf94c","created_at":"2025-01-07T14:45:09.092-08:00","updated_at":"2025-01-07T14:45:09.092-08:00","notification_target_params":[{"id":"106","type":"user"},{"id":"c59b8a64-2f78-4e45-bf9e-0cd6f3290e34","type":"schedule"},{"id":"d5c73d3b-bc6a-50c9-aa6d-5d2347af9749","type":"slack_channel"}]}}},"schema":{"$ref":"#/components/schemas/escalation_policy_level_response"}}}},"401":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"notification_target":["You need at least 1 notification target"]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_escalation_policy_level"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List escalation levels for an Escalation Path","security":[{"bearer_auth":[]}],"tags":["EscalationLevelsPath"],"description":"List escalation levels","operationId":"listEscalationLevelsPaths","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/escalation_policy_level_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_paths/%7Bescalation_policy_path_id%7D/escalation_levels?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_levels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an escalation level","security":[{"bearer_auth":[]}],"tags":["EscalationLevels"],"description":"Retrieves a specific escalation level by id","operationId":"getEscalationLevel","responses":{"200":{"description":"escalation level found","content":{"application/vnd.api+json":{"example":{"data":{"id":"897c8d39-317b-4024-87ec-407c97ee4069","type":"escalation_levels","attributes":{"escalation_policy_path_id":null,"position":1,"delay":5,"escalation_policy_id":"bb81551c-f8a3-4355-b75e-74e8d7dbf94c","created_at":"2025-01-07T14:45:06.103-08:00","updated_at":"2025-01-07T14:45:06.103-08:00","notification_target_params":[{"id":"110","type":"user"}]}}},"schema":{"$ref":"#/components/schemas/escalation_policy_level_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/escalation_levels/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_levels/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_levels/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_levels/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update an escalation level","security":[{"bearer_auth":[]}],"tags":["EscalationLevels"],"description":"Update a specific escalation level by id","operationId":"updateEscalationLevel","parameters":[],"responses":{"200":{"description":"escalation policy updated with notification_target set with slack_channel_id instead of slack_channel uuid","content":{"application/vnd.api+json":{"example":{"data":{"id":"897c8d39-317b-4024-87ec-407c97ee4069","type":"escalation_levels","attributes":{"escalation_policy_path_id":null,"position":1,"delay":5,"escalation_policy_id":"bb81551c-f8a3-4355-b75e-74e8d7dbf94c","created_at":"2025-01-07T14:45:06.103-08:00","updated_at":"2025-01-07T14:45:06.103-08:00","notification_target_params":[{"id":"CX21345","type":"slack_channel"}]}}},"schema":{"$ref":"#/components/schemas/escalation_policy_level_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_escalation_policy_level"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/escalation_levels/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_levels/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_levels/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_levels/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an escalation level","security":[{"bearer_auth":[]}],"tags":["EscalationLevels"],"description":"Delete a specific escalation level by id","operationId":"deleteEscalationLevel","responses":{"200":{"description":"escalation level deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"897c8d39-317b-4024-87ec-407c97ee4069","type":"escalation_levels","attributes":{"escalation_policy_path_id":null,"position":1,"delay":5,"escalation_policy_id":"bb81551c-f8a3-4355-b75e-74e8d7dbf94c","created_at":"2025-01-07T14:45:06.103-08:00","updated_at":"2025-01-07T14:45:11.025-08:00","notification_target_params":[{"id":"110","type":"user"}]}}},"schema":{"$ref":"#/components/schemas/escalation_policy_level_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/escalation_levels/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_levels/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_levels/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_levels/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_policies/{escalation_policy_id}/escalation_paths":{"parameters":[{"name":"escalation_policy_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates an escalation path","security":[{"bearer_auth":[]}],"tags":["EscalationPaths"],"description":"Creates a new escalation path from provided data","operationId":"createEscalationPath","parameters":[],"responses":{"201":{"description":"escalation path created","content":{"application/vnd.api+json":{"example":{"data":{"id":"d102c4e2-3023-4fbc-a428-173537419003","type":"escalation_paths","attributes":{"name":"Test EP Path","default":false,"notification_type":"quiet","escalation_policy_id":"e425be78-2aad-4312-a82f-25be2b20295d","repeat":true,"repeat_count":3,"created_at":"2025-01-07T14:45:13.235-08:00","updated_at":"2025-01-07T14:45:13.271-08:00","rules":[{"rule_type":"alert_urgency","urgency_ids":["876fd269-4019-4b61-890a-39e42242f9c5"]},{"rule_type":"working_hour","within_working_hour":true},{"rule_type":"json_path","json_path":"$.title","operator":"is","value":"Test"}]},"relationships":{"escalation_levels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_path_response"}}}},"401":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"base":["You need at least 1 escalation path condition."]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_escalation_policy_path"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List escalation paths","security":[{"bearer_auth":[]}],"tags":["EscalationPaths"],"description":"List escalation paths","operationId":"listEscalationPaths","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: escalation_policy_levels","schema":{"type":"string","enum":["escalation_policy_levels"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/escalation_policy_path_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_policies/%7Bescalation_policy_id%7D/escalation_paths?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/escalation_paths/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an escalation path","security":[{"bearer_auth":[]}],"tags":["EscalationPaths"],"description":"Retrieves a specific escalation path by id","operationId":"getEscalationPath","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: escalation_policy_levels","schema":{"type":"string","enum":["escalation_policy_levels"]},"required":false}],"responses":{"200":{"description":"escalation path found","content":{"application/vnd.api+json":{"example":{"data":{"id":"85031c44-8bcc-44b0-9faf-691d6ba75049","type":"escalation_paths","attributes":{"name":"Error nostrum rerum molestias.","default":false,"notification_type":"audible","escalation_policy_id":"e425be78-2aad-4312-a82f-25be2b20295d","repeat":false,"repeat_count":1,"created_at":"2025-01-07T14:45:12.470-08:00","updated_at":"2025-01-07T14:45:12.470-08:00","rules":[{"rule_type":"alert_urgency","urgency_ids":["32e77a51-8f1b-46ab-958c-0342d41809d1"]}]},"relationships":{"escalation_levels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_path_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/escalation_paths/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_paths/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_paths/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_paths/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update an escalation path","security":[{"bearer_auth":[]}],"tags":["EscalationPaths"],"description":"Update a specific escalation path by id","operationId":"updateEscalationPath","parameters":[],"responses":{"200":{"description":"escalation policy updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"85031c44-8bcc-44b0-9faf-691d6ba75049","type":"escalation_paths","attributes":{"name":"Error nostrum rerum molestias.","default":false,"notification_type":"quiet","escalation_policy_id":"e425be78-2aad-4312-a82f-25be2b20295d","repeat":false,"repeat_count":1,"created_at":"2025-01-07T14:45:12.470-08:00","updated_at":"2025-01-07T14:45:15.032-08:00","rules":[{"rule_type":"alert_urgency","urgency_ids":["876fd269-4019-4b61-890a-39e42242f9c5"]}]},"relationships":{"escalation_levels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_path_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_escalation_policy_path"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/escalation_paths/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_paths/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_paths/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_paths/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an escalation path","security":[{"bearer_auth":[]}],"tags":["EscalationPaths"],"description":"Delete a specific escalation path by id","operationId":"deleteEscalationPath","responses":{"200":{"description":"escalation path deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"85031c44-8bcc-44b0-9faf-691d6ba75049","type":"escalation_paths","attributes":{"name":"Error nostrum rerum molestias.","default":false,"notification_type":"audible","escalation_policy_id":"e425be78-2aad-4312-a82f-25be2b20295d","repeat":false,"repeat_count":1,"created_at":"2025-01-07T14:45:12.470-08:00","updated_at":"2025-01-07T14:45:15.583-08:00","rules":[{"rule_type":"alert_urgency","urgency_ids":["32e77a51-8f1b-46ab-958c-0342d41809d1"]}]},"relationships":{"escalation_levels":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/escalation_policy_path_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/escalation_paths/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/escalation_paths/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/escalation_paths/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/escalation_paths/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_fields/{form_field_id}/options":{"parameters":[{"name":"form_field_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates FormField Options","security":[{"bearer_auth":[]}],"tags":["FormFieldOptions"],"description":"Creates a new form_field_option from provided data","operationId":"createFormFieldOption","parameters":[],"responses":{"201":{"description":"form_field_option created","content":{"application/vnd.api+json":{"example":{"data":{"id":"4d6af35c-c79a-4c3b-a8bd-af31110277ea","type":"form_field_options","attributes":{"form_field_id":"0a044094-95e1-455a-a0c5-e3963f97788c","value":"Test option value","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:45:16.984-08:00","created_at":"2025-01-07T14:45:16.984-08:00"}}},"schema":{"$ref":"#/components/schemas/form_field_option_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Value can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_field_option"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/options \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/options\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bform_field_id%7D/options\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/options\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List FormField Options","security":[{"bearer_auth":[]}],"tags":["FormFieldOptions"],"description":"List form_field_options","operationId":"listFormFieldOptions","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[value]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[color]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_field_option_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bform_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/options?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bvalue%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_field_options/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves FormField Options","security":[{"bearer_auth":[]}],"tags":["FormFieldOptions"],"description":"Retrieves a specific form_field_option by id","operationId":"getFormFieldOption","responses":{"200":{"description":"form_field_option found","content":{"application/vnd.api+json":{"example":{"data":{"id":"c166640a-cd95-4c5a-a85c-cad9d2160865","type":"form_field_options","attributes":{"form_field_id":"0a044094-95e1-455a-a0c5-e3963f97788c","value":"Fugit dolores sint repudiandae.","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:45:16.809-08:00","created_at":"2025-01-07T14:45:16.809-08:00"}}},"schema":{"$ref":"#/components/schemas/form_field_option_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/form_field_options/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_options/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_options/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_options/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update FormField Options","security":[{"bearer_auth":[]}],"tags":["FormFieldOptions"],"description":"Update a specific form_field_option by id","operationId":"updateFormFieldOption","parameters":[],"responses":{"200":{"description":"form_field_option updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"c166640a-cd95-4c5a-a85c-cad9d2160865","type":"form_field_options","attributes":{"form_field_id":"0a044094-95e1-455a-a0c5-e3963f97788c","value":"Test update option value","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:45:18.171-08:00","created_at":"2025-01-07T14:45:16.809-08:00"}}},"schema":{"$ref":"#/components/schemas/form_field_option_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_field_option"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_field_options/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_options/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_options/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_options/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete FormField Options","security":[{"bearer_auth":[]}],"tags":["FormFieldOptions"],"description":"Delete a specific form_field_option by id","operationId":"deleteFormFieldOption","responses":{"200":{"description":"form_field_option deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"c166640a-cd95-4c5a-a85c-cad9d2160865","type":"form_field_options","attributes":{"form_field_id":"0a044094-95e1-455a-a0c5-e3963f97788c","value":"Fugit dolores sint repudiandae.","color":"#FBE4A0","default":false,"position":1,"updated_at":"2025-01-07T14:45:18.720-08:00","created_at":"2025-01-07T14:45:16.809-08:00"}}},"schema":{"$ref":"#/components/schemas/form_field_option_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_field_options/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_options/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_options/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_options/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_field_placements/{form_field_placement_id}/conditions":{"parameters":[{"name":"form_field_placement_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacementConditions"],"description":"Creates a new form_field_placement_condition from provided data","operationId":"createFormFieldPlacementCondition","parameters":[],"responses":{"201":{"description":"form_field_placement_condition created","content":{"application/vnd.api+json":{"example":{"data":{"id":"c20b52f2-0d32-42ef-9c71-e8abe38ca652","type":"form_field_placement_conditions","attributes":{"form_field_placement_id":"af891ef2-953d-48d6-a05a-c29c0eedc260","conditioned":"placement","position":2,"form_field_id":"3909ef81-1bdd-4662-a850-28f3302d0afd","comparison":"equal","values":["test"]}}},"schema":{"$ref":"#/components/schemas/form_field_placement_condition_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_field_placement_condition"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List Form Set Conditions","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacementConditions"],"description":"List form_field_placement_conditions","operationId":"listFormFieldPlacementConditions","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[form_field_id]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_field_placement_condition_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placements/%7Bform_field_placement_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_field_placement_conditions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacementConditions"],"description":"Retrieves a specific form_field_placement_condition by id","operationId":"getFormFieldPlacementCondition","responses":{"200":{"description":"form_field_placement_condition found","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c64e997-d0c1-439c-b3cf-d913286d8841","type":"form_field_placement_conditions","attributes":{"form_field_placement_id":"af891ef2-953d-48d6-a05a-c29c0eedc260","conditioned":"placement","position":1,"form_field_id":"aa7b0c04-cef3-4abd-b9cf-853a88f9ca8c","comparison":"equal","values":["test"]}}},"schema":{"$ref":"#/components/schemas/form_field_placement_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placement_conditions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacementConditions"],"description":"Update a specific form_field_placement_condition by id","operationId":"updateFormFieldPlacementCondition","parameters":[],"responses":{"200":{"description":"form_field_placement_condition updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c64e997-d0c1-439c-b3cf-d913286d8841","type":"form_field_placement_conditions","attributes":{"form_field_placement_id":"af891ef2-953d-48d6-a05a-c29c0eedc260","conditioned":"placement","position":1,"form_field_id":"aa7b0c04-cef3-4abd-b9cf-853a88f9ca8c","comparison":"equal","values":["bar"]}}},"schema":{"$ref":"#/components/schemas/form_field_placement_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_field_placement_condition"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placement_conditions/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacementConditions"],"description":"Delete a specific form_field_placement_condition by id","operationId":"deleteFormFieldPlacementCondition","responses":{"200":{"description":"form_field_placement_condition deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c64e997-d0c1-439c-b3cf-d913286d8841","type":"form_field_placement_conditions","attributes":{"form_field_placement_id":"af891ef2-953d-48d6-a05a-c29c0eedc260","conditioned":"placement","position":1,"form_field_id":"aa7b0c04-cef3-4abd-b9cf-853a88f9ca8c","comparison":"equal","values":["test"]}}},"schema":{"$ref":"#/components/schemas/form_field_placement_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placement_conditions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placement_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_fields/{form_field_id}/placements":{"parameters":[{"name":"form_field_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a Form Field Placement","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacements"],"description":"Creates a new form_field_placement from provided data","operationId":"createFormFieldPlacement","parameters":[],"responses":{"201":{"description":"form_field_placement created","content":{"application/vnd.api+json":{"example":{"data":{"id":"a08111a8-b131-49cc-86be-81d7dae99b9a","type":"form_field_placements","attributes":{"form_field_id":"09fd74c4-e606-4269-955e-71f3d6f3893e","form_set_id":"78daabf9-d560-4f8e-bb0a-c46ef531a037","form":"web_update_incident_form","position":1,"required":false,"placement_operator":"and","required_operator":"and"}}},"schema":{"$ref":"#/components/schemas/form_field_placement_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Form \"blah\"is not a valid form","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_field_placement"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/placements \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/placements\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bform_field_id%7D/placements\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/placements\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List Form Field Placements","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacements"],"description":"List form_field_placements","operationId":"listFormFieldPlacements","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[form_field_id]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_field_placement_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/placements?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/placements?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bform_field_id%7D/placements?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/placements?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_field_placements/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Form Field Placement","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacements"],"description":"Retrieves a specific form_field_placement by id","operationId":"getFormFieldPlacement","responses":{"200":{"description":"form_field_placement found","content":{"application/vnd.api+json":{"example":{"data":{"id":"9dd5666b-9743-47a4-912b-1753b9c9f99a","type":"form_field_placements","attributes":{"form_field_id":"09fd74c4-e606-4269-955e-71f3d6f3893e","form_set_id":"78daabf9-d560-4f8e-bb0a-c46ef531a037","form":"web_new_incident_form","position":1,"required":false,"placement_operator":"and","required_operator":"and"}}},"schema":{"$ref":"#/components/schemas/form_field_placement_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/form_field_placements/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placements/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placements/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placements/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a Form Field Placement","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacements"],"description":"Update a specific form_field_placement by id","operationId":"updateFormFieldPlacement","parameters":[],"responses":{"200":{"description":"form_field_placement updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"9dd5666b-9743-47a4-912b-1753b9c9f99a","type":"form_field_placements","attributes":{"form_field_id":"09fd74c4-e606-4269-955e-71f3d6f3893e","form_set_id":"78daabf9-d560-4f8e-bb0a-c46ef531a037","form":"web_new_incident_form","position":5,"required":false,"placement_operator":"and","required_operator":"and"}}},"schema":{"$ref":"#/components/schemas/form_field_placement_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_field_placement"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_field_placements/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placements/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placements/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placements/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a Form Field Placement","security":[{"bearer_auth":[]}],"tags":["FormFieldPlacements"],"description":"Delete a specific form_field_placement by id","operationId":"deleteFormFieldPlacement","responses":{"200":{"description":"form_field_placement deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"9dd5666b-9743-47a4-912b-1753b9c9f99a","type":"form_field_placements","attributes":{"form_field_id":"09fd74c4-e606-4269-955e-71f3d6f3893e","form_set_id":"78daabf9-d560-4f8e-bb0a-c46ef531a037","form":"web_new_incident_form","position":1,"required":false,"placement_operator":"and","required_operator":"and"}}},"schema":{"$ref":"#/components/schemas/form_field_placement_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_field_placements/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_placements/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_placements/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_placements/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_fields/{form_field_id}/positions":{"parameters":[{"name":"form_field_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List FormField Position","security":[{"bearer_auth":[]}],"tags":["FormFieldPositions"],"description":"List form field positions","operationId":"listFormFieldPositions","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[form]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_field_position_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/positions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/positions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bform_field_id%7D/positions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/positions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"post":{"summary":"Creates FormField Positions","security":[{"bearer_auth":[]}],"tags":["FormFieldPositions"],"description":"Creates a new form field_position from provided data","operationId":"createFormFieldPosition","parameters":[],"responses":{"201":{"description":"form_field_position created","content":{"application/vnd.api+json":{"example":{"data":{"id":"717b035a-9c6c-4555-8f8a-7a7813b6be7b","type":"form_field_positions","attributes":{"form_field_id":"9e09defe-025f-4b3c-8651-a2529371cf28","form":"web_new_incident_form","position":2}}},"schema":{"$ref":"#/components/schemas/form_field_position_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_field_position"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/positions \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/positions\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bform_field_id%7D/positions\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bform_field_id%7D/positions\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_field_positions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a FormFieldPosition","security":[{"bearer_auth":[]}],"tags":["FormFieldPositions"],"description":"Retrieves a specific form field_position by id","operationId":"getFormFieldPosition","responses":{"200":{"description":"form_field_position found","content":{"application/vnd.api+json":{"example":{"data":{"id":"2b23752f-fb21-4be1-b94a-8bbfe7668512","type":"form_field_positions","attributes":{"form_field_id":"9e09defe-025f-4b3c-8651-a2529371cf28","form":"slack_new_incident_form","position":1}}},"schema":{"$ref":"#/components/schemas/form_field_position_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/form_field_positions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_positions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_positions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_positions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a FormFieldPosition","security":[{"bearer_auth":[]}],"tags":["FormFieldPositions"],"description":"Update a specific form_field position by id","operationId":"updateFormFieldPosition","parameters":[],"responses":{"200":{"description":"form_field_position updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"2b23752f-fb21-4be1-b94a-8bbfe7668512","type":"form_field_positions","attributes":{"form_field_id":"9e09defe-025f-4b3c-8651-a2529371cf28","form":"slack_new_incident_form","position":2}}},"schema":{"$ref":"#/components/schemas/form_field_position_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_field_position"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_field_positions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_positions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_positions/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_positions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a FormFieldPosition","security":[{"bearer_auth":[]}],"tags":["FormFieldPositions"],"description":"Delete a specific form_field position by id","operationId":"deleteFormFieldPosition","responses":{"200":{"description":"form_field_position deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"2b23752f-fb21-4be1-b94a-8bbfe7668512","type":"form_field_positions","attributes":{"form_field_id":"9e09defe-025f-4b3c-8651-a2529371cf28","form":"slack_new_incident_form","position":1}}},"schema":{"$ref":"#/components/schemas/form_field_position_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_field_positions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_field_positions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_field_positions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_field_positions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_fields":{"post":{"summary":"Creates a Form Field","security":[{"bearer_auth":[]}],"tags":["FormFields"],"description":"Creates a new form_field from provided data","operationId":"createFormField","parameters":[],"responses":{"201":{"description":"form_field created","content":{"application/vnd.api+json":{"example":{"data":{"id":"be1c3534-fc33-4db2-b7b1-f987bcbef586","type":"form_fields","attributes":{"team_id":117,"slug":"test-custom-field","kind":"custom","input_kind":"text","value_kind":"inherit","value_kind_catalog_id":null,"name":"Test custom field","description":null,"shown":["web_new_incident_form","slack_new_incident_form"],"required":[],"default_values":[],"show_on_incident_details":true,"enabled":true,"updated_at":"2025-01-07T14:45:32.771-08:00","created_at":"2025-01-07T14:45:32.771-08:00"},"relationships":{"options":{"data":[]},"positions":{"data":[{"id":"6f55d469-8383-417a-866b-c03cb675081a","type":"form_field_positions"},{"id":"a9ecdcb9-0431-4823-b6cb-05aef2108f44","type":"form_field_positions"}]}}}},"schema":{"$ref":"#/components/schemas/form_field_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_field"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_fields \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List Form Fields","security":[{"bearer_auth":[]}],"tags":["FormFields"],"description":"List form_fields","operationId":"listFormFields","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: options,positions","schema":{"type":"string","enum":["options","positions"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[enabled]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_field_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_fields?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_fields/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Form Field","security":[{"bearer_auth":[]}],"tags":["FormFields"],"description":"Retrieves a specific form_field by id","operationId":"getFormField","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: options,positions","schema":{"type":"string","enum":["options","positions"]},"required":false}],"responses":{"200":{"description":"form_field found","content":{"application/vnd.api+json":{"example":{"data":{"id":"630df2ef-f0d7-40a4-9469-dd8fb75403c9","type":"form_fields","attributes":{"team_id":117,"slug":"distinctio-molestiae-et-quidem","kind":"custom","input_kind":"text","value_kind":"inherit","value_kind_catalog_id":null,"name":"Distinctio molestiae et quidem.","description":"Nam et velit nesciunt.","shown":["web_new_incident_form","web_update_incident_form","slack_new_incident_form","slack_update_incident_form"],"required":[],"default_values":[],"show_on_incident_details":true,"enabled":true,"updated_at":"2025-01-07T14:45:30.441-08:00","created_at":"2025-01-07T14:45:30.441-08:00"},"relationships":{"options":{"data":[{"id":"e4e069c5-f2dd-4713-a37f-a7e9a572a2e4","type":"form_field_options"},{"id":"cb38270d-8c42-43fc-bb09-b06c92fb9833","type":"form_field_options"}]},"positions":{"data":[{"id":"4c331ab5-febb-431d-95c1-5a30a0425e66","type":"form_field_positions"},{"id":"1156bc91-971b-4db2-9479-a21e922691e7","type":"form_field_positions"},{"id":"48251b0b-8018-40ab-946e-bf992739afd8","type":"form_field_positions"},{"id":"77a265f5-65c7-441d-ba7c-0691c8e9bf62","type":"form_field_positions"}]}}}},"schema":{"$ref":"#/components/schemas/form_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_fields/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a Form Field","security":[{"bearer_auth":[]}],"tags":["FormFields"],"description":"Update a specific form_field by id","operationId":"updateFormField","parameters":[],"responses":{"200":{"description":"form_field updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"630df2ef-f0d7-40a4-9469-dd8fb75403c9","type":"form_fields","attributes":{"team_id":117,"slug":"test-update-custom-field","kind":"custom","input_kind":"text","value_kind":"inherit","value_kind_catalog_id":null,"name":"Test update custom field","description":"Nam et velit nesciunt.","shown":["web_new_incident_form","web_update_incident_form","slack_new_incident_form","slack_update_incident_form"],"required":[],"default_values":[],"show_on_incident_details":false,"enabled":true,"updated_at":"2025-01-07T14:45:34.027-08:00","created_at":"2025-01-07T14:45:30.441-08:00"},"relationships":{"options":{"data":[{"id":"e4e069c5-f2dd-4713-a37f-a7e9a572a2e4","type":"form_field_options"},{"id":"cb38270d-8c42-43fc-bb09-b06c92fb9833","type":"form_field_options"}]},"positions":{"data":[{"id":"4c331ab5-febb-431d-95c1-5a30a0425e66","type":"form_field_positions"},{"id":"1156bc91-971b-4db2-9479-a21e922691e7","type":"form_field_positions"},{"id":"48251b0b-8018-40ab-946e-bf992739afd8","type":"form_field_positions"},{"id":"77a265f5-65c7-441d-ba7c-0691c8e9bf62","type":"form_field_positions"}]}}}},"schema":{"$ref":"#/components/schemas/form_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_field"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_fields/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a Form Field","security":[{"bearer_auth":[]}],"tags":["FormFields"],"description":"Delete a specific form_field by id","operationId":"deleteFormField","responses":{"200":{"description":"form_field deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"630df2ef-f0d7-40a4-9469-dd8fb75403c9","type":"form_fields","attributes":{"team_id":117,"slug":"distinctio-molestiae-et-quidem","kind":"custom","input_kind":"text","value_kind":"inherit","value_kind_catalog_id":null,"name":"Distinctio molestiae et quidem.","description":"Nam et velit nesciunt.","shown":[],"required":[],"default_values":[],"show_on_incident_details":true,"enabled":true,"updated_at":"2025-01-07T14:45:34.656-08:00","created_at":"2025-01-07T14:45:30.441-08:00"},"relationships":{"options":{"data":[]},"positions":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/form_field_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_fields/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_fields/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_fields/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_fields/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_sets/{form_set_id}/conditions":{"parameters":[{"name":"form_set_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormSetConditions"],"description":"Creates a new form_set_condition from provided data","operationId":"createFormSetCondition","parameters":[],"responses":{"201":{"description":"form_set_condition created","content":{"application/vnd.api+json":{"example":{"data":{"id":"41a1589f-c263-4205-9f39-8dc10a9ab7d3","type":"form_set_conditions","attributes":{"form_set_id":"5c26b229-9a3b-4792-bb27-cf61dabd1161","form_field_id":"97cbcd9e-10ff-421f-98f2-904240620cd9","comparison":"equal","values":["test"]}}},"schema":{"$ref":"#/components/schemas/form_set_condition_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Values can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_set_condition"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_sets/%7Bform_set_id%7D/conditions \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets/%7Bform_set_id%7D/conditions\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets/%7Bform_set_id%7D/conditions\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets/%7Bform_set_id%7D/conditions\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List Form Set Conditions","security":[{"bearer_auth":[]}],"tags":["FormSetConditions"],"description":"List form_set_conditions","operationId":"listFormSetConditions","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[form_field_id]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_set_condition_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_sets/%7Bform_set_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets/%7Bform_set_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets/%7Bform_set_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets/%7Bform_set_id%7D/conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bform_field_id%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_set_conditions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormSetConditions"],"description":"Retrieves a specific form_set_condition by id","operationId":"getFormSetCondition","responses":{"200":{"description":"form_set_condition found","content":{"application/vnd.api+json":{"example":{"data":{"id":"b5ef6276-c028-4872-bb62-03f3f1c819ea","type":"form_set_conditions","attributes":{"form_set_id":"cb25b20b-d72e-49f4-9458-6dfd467c3b86","form_field_id":"d59f1072-32e7-41f4-87b0-89cb0889e31a","comparison":"equal","values":["test"]}}},"schema":{"$ref":"#/components/schemas/form_set_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/form_set_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_set_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_set_conditions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_set_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormSetConditions"],"description":"Update a specific form_set_condition by id","operationId":"updateFormSetCondition","parameters":[],"responses":{"200":{"description":"form_set_condition updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"b5ef6276-c028-4872-bb62-03f3f1c819ea","type":"form_set_conditions","attributes":{"form_set_id":"cb25b20b-d72e-49f4-9458-6dfd467c3b86","form_field_id":"d59f1072-32e7-41f4-87b0-89cb0889e31a","comparison":"equal","values":["test update"]}}},"schema":{"$ref":"#/components/schemas/form_set_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_set_condition"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_set_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_set_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_set_conditions/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_set_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a Form Set Condition","security":[{"bearer_auth":[]}],"tags":["FormSetConditions"],"description":"Delete a specific form_set_condition by id","operationId":"deleteFormSetCondition","responses":{"200":{"description":"form_set_condition deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"b5ef6276-c028-4872-bb62-03f3f1c819ea","type":"form_set_conditions","attributes":{"form_set_id":"cb25b20b-d72e-49f4-9458-6dfd467c3b86","form_field_id":"d59f1072-32e7-41f4-87b0-89cb0889e31a","comparison":"equal","values":["test"]}}},"schema":{"$ref":"#/components/schemas/form_set_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_set_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_set_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_set_conditions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_set_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_sets":{"post":{"summary":"Creates a Form Set","security":[{"bearer_auth":[]}],"tags":["FormSets"],"description":"Creates a new form_set from provided data","operationId":"createFormSet","parameters":[],"responses":{"201":{"description":"form_set created","content":{"application/vnd.api+json":{"example":{"data":{"id":"776f61c3-57b7-45ec-b12e-69252bf6a861","type":"form_sets","attributes":{"name":"Test custom form set","slug":"test-custom-form-set","is_default":false,"forms":["web_new_incident_form"],"updated_at":"2025-01-07T14:45:41.172-08:00","created_at":"2025-01-07T14:45:41.172-08:00"}}},"schema":{"$ref":"#/components/schemas/form_set_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Forms are required (at least one)","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_form_set"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/form_sets \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List Form Sets","security":[{"bearer_auth":[]}],"tags":["FormSets"],"description":"List form_sets","operationId":"listFormSets","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[is_default]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/form_set_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/form_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bis_default%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bis_default%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bis_default%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bis_default%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/form_sets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Form Set","security":[{"bearer_auth":[]}],"tags":["FormSets"],"description":"Retrieves a specific form_set by id","operationId":"getFormSet","responses":{"200":{"description":"form_set found","content":{"application/vnd.api+json":{"example":{"data":{"id":"ef3220f5-687c-4aa7-95d6-9ec8742500df","type":"form_sets","attributes":{"name":"Test","slug":"test","is_default":false,"forms":["web_new_incident_form"],"updated_at":"2025-01-07T14:45:39.355-08:00","created_at":"2025-01-07T14:45:39.355-08:00"}}},"schema":{"$ref":"#/components/schemas/form_set_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/form_sets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a Form Set","security":[{"bearer_auth":[]}],"tags":["FormSets"],"description":"Update a specific form_set by id","operationId":"updateFormSet","parameters":[],"responses":{"200":{"description":"form_set updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"ef3220f5-687c-4aa7-95d6-9ec8742500df","type":"form_sets","attributes":{"name":"Test update custom form set","slug":"test","is_default":false,"forms":["web_new_incident_form"],"updated_at":"2025-01-07T14:45:42.300-08:00","created_at":"2025-01-07T14:45:39.355-08:00"}}},"schema":{"$ref":"#/components/schemas/form_set_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_form_set"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/form_sets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a Form Set","security":[{"bearer_auth":[]}],"tags":["FormSets"],"description":"Delete a specific form_set by id","operationId":"deleteFormSet","responses":{"200":{"description":"form_set deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"ef3220f5-687c-4aa7-95d6-9ec8742500df","type":"form_sets","attributes":{"name":"Test","slug":"test","is_default":false,"forms":["web_new_incident_form"],"updated_at":"2025-01-07T14:45:42.865-08:00","created_at":"2025-01-07T14:45:39.355-08:00"}}},"schema":{"$ref":"#/components/schemas/form_set_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/form_sets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/form_sets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/form_sets/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/form_sets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/functionalities":{"post":{"summary":"Creates a functionality","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"Creates a new functionality from provided data","operationId":"createFunctionality","parameters":[],"responses":{"201":{"description":"functionality created","content":{"application/vnd.api+json":{"example":{"data":{"id":"e0bf9412-9e2e-4b72-9461-c4a283429ff0","type":"functionalities","attributes":{"name":"Add items to cart","slug":"add-items-to-cart","description":"Users should be able to add items to cart","public_description":"Public description","notify_emails":["john@rootly.com","doe@rootly.com"],"color":"#FFF","status":"operational","position":1,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"engineering"}],"backstage_id":null,"external_id":"d795fe69-acc2-4b30-92c9-3c25cbb92056","opsgenie_id":"8743a1b2-11da-480e-8493-744660987bef","pagerduty_id":"PQ9K7I8","cortex_id":null,"opslevel_id":null,"service_now_ci_sys_id":null,"environment_ids":["c0991c18-6c34-4332-8e97-fdeaa4e9c9a4"],"service_ids":["a49c3be5-5e11-4acd-ab34-34539d825bd3"],"owners_group_ids":["b7a06279-836b-453a-96c4-9794b8c8d6c0"],"owners_user_ids":[138],"incidents_count":0,"created_at":"2025-01-07T14:45:47.362-08:00","updated_at":"2025-01-07T14:45:47.362-08:00"}}},"schema":{"$ref":"#/components/schemas/functionality_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_functionality"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/functionalities \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List functionalities","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"List functionalities","operationId":"listFunctionalities","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[backstage_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[cortex_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[opslevel_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[external_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/functionality_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/functionalities/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a functionality","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"Retrieves a specific functionality by id","operationId":"getFunctionality","responses":{"200":{"description":"functionality found","content":{"application/vnd.api+json":{"example":{"data":{"id":"bcd11c26-927e-4d5e-913e-23322fe8596a","type":"functionalities","attributes":{"name":"Labore ut iure qui.","slug":"labore-ut-iure-qui","description":"Velit fuga est laudantium.","public_description":null,"notify_emails":[],"color":"#FAEBB7","status":"partial_outage","position":1,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[],"slack_aliases":[],"backstage_id":null,"external_id":null,"opsgenie_id":null,"pagerduty_id":null,"cortex_id":null,"opslevel_id":null,"service_now_ci_sys_id":null,"environment_ids":[],"service_ids":[],"owners_group_ids":[],"owners_user_ids":[],"incidents_count":1,"created_at":"2025-01-07T14:45:44.036-08:00","updated_at":"2025-01-07T14:45:44.191-08:00"}}},"schema":{"$ref":"#/components/schemas/functionality_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/functionalities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a functionality","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"Update a specific functionality by id","operationId":"updateFunctionality","parameters":[],"responses":{"200":{"description":"functionality updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"bcd11c26-927e-4d5e-913e-23322fe8596a","type":"functionalities","attributes":{"name":"Checkout","slug":"labore-ut-iure-qui","description":"Users should be able to checkout","public_description":"Public description updated","notify_emails":["hello@rootly.com","world@rootly.com"],"color":"#000","status":"partial_outage","position":2,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"leadership"}],"backstage_id":null,"external_id":"33bfcc62-cc35-46e6-a270-8c52a56fb358","opsgenie_id":"8743a1b2-11da-480e-8493-744660987bec","pagerduty_id":"PQ9K7I9","cortex_id":null,"opslevel_id":null,"service_now_ci_sys_id":null,"environment_ids":["c0991c18-6c34-4332-8e97-fdeaa4e9c9a4"],"service_ids":[],"owners_group_ids":[],"owners_user_ids":[],"incidents_count":1,"created_at":"2025-01-07T14:45:44.036-08:00","updated_at":"2025-01-07T14:45:49.227-08:00"}}},"schema":{"$ref":"#/components/schemas/functionality_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_functionality"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/functionalities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a functionality","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"Delete a specific functionality by id","operationId":"deleteFunctionality","responses":{"200":{"description":"functionality deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"bcd11c26-927e-4d5e-913e-23322fe8596a","type":"functionalities","attributes":{"name":"Labore ut iure qui.","slug":"labore-ut-iure-qui","description":"Velit fuga est laudantium.","public_description":null,"notify_emails":[],"color":"#FAEBB7","status":"partial_outage","position":1,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[],"slack_aliases":[],"backstage_id":null,"external_id":null,"opsgenie_id":null,"pagerduty_id":null,"cortex_id":null,"opslevel_id":null,"service_now_ci_sys_id":null,"environment_ids":[],"service_ids":[],"owners_group_ids":[],"owners_user_ids":[],"incidents_count":1,"created_at":"2025-01-07T14:45:44.036-08:00","updated_at":"2025-01-07T14:45:50.092-08:00"}}},"schema":{"$ref":"#/components/schemas/functionality_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/functionalities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/functionalities/{id}/incidents_chart":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get functionality incidents chart","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"Get functionality incidents chart","operationId":"getFunctionalityIncidentsChart","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"example":{"data":{"2024-11-08 00:00:00 UTC":0,"2024-11-15 00:00:00 UTC":0,"2024-11-22 00:00:00 UTC":0,"2024-11-29 00:00:00 UTC":0,"2024-12-06 00:00:00 UTC":0,"2024-12-13 00:00:00 UTC":0,"2024-12-20 00:00:00 UTC":0,"2024-12-27 00:00:00 UTC":0,"2025-01-03 00:00:00 UTC":1}},"schema":{"$ref":"#/components/schemas/incidents_chart_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/functionalities/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/functionalities/{id}/uptime_chart":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get functionality uptime chart","security":[{"bearer_auth":[]}],"tags":["Functionalities"],"description":"Get functionality uptime chart","operationId":"getFunctionalityUptimeChart","parameters":[{"name":"period","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"example":{"data":{"2024-12-23":100,"2024-12-24":100,"2024-12-25":100,"2024-12-26":100,"2024-12-27":100,"2024-12-28":100,"2024-12-29":100,"2024-12-30":100,"2024-12-31":100,"2025-01-01":100,"2025-01-02":100,"2025-01-03":100,"2025-01-04":50,"2025-01-05":0,"2025-01-06":100,"2025-01-07":100}},"schema":{"$ref":"#/components/schemas/uptime_chart_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/functionalities/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/functionalities/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/functionalities/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/functionalities/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflows/{workflow_id}/workflow_tasks":{"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a workflow task","security":[{"bearer_auth":[]}],"tags":["WorkflowTasks"],"description":"Creates a new workflow task from provided data","operationId":"createWorkflowTask","parameters":[],"responses":{"201":{"description":"workflow task created","content":{"application/vnd.api+json":{"example":{"data":{"id":"089ae296-324f-468b-8503-cc1197f3bc28","type":"workflow_tasks","attributes":{"workflow_id":"8ce481ea-d698-4369-878e-aa71a6812c53","task_params":{"task_type":"send_email","from":"Rootly ","to":["test@example.com"],"cc":[],"bcc":[],"subject":"Hello from Rootly","preheader":null,"body":"Hello from Rootly","include_header":true,"include_footer":true,"custom_logo_url":null},"name":"My Custom Name","position":2,"skip_on_failure":false,"enabled":true,"created_at":"2025-01-07T14:45:53.740-08:00","updated_at":"2025-01-07T14:45:53.740-08:00"}}},"schema":{"$ref":"#/components/schemas/workflow_task_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_workflow_task"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_tasks \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_tasks\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/workflow_tasks\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_tasks\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List workflow tasks","security":[{"bearer_auth":[]}],"tags":["WorkflowTasks"],"description":"List workflow tasks","operationId":"listWorkflowTasks","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/workflow_task_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/workflow_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflow_tasks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a workflow task","security":[{"bearer_auth":[]}],"tags":["WorkflowTasks"],"description":"Retrieves a specific workflow_task by id","operationId":"getWorkflowTask","responses":{"200":{"description":"workflow_task found","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3bf27ed-66d0-42d6-aa02-557f9070c0e6","type":"workflow_tasks","attributes":{"workflow_id":"8ce481ea-d698-4369-878e-aa71a6812c53","task_params":{"task_type":"send_email","from":"Rootly ","to":["tempora"],"cc":[],"bcc":[],"subject":"Itaque modi omnis quis.","preheader":null,"body":"Reiciendis id porro nisi.","include_header":true,"include_footer":true,"custom_logo_url":null},"name":"Send an email","position":1,"skip_on_failure":false,"enabled":true,"created_at":"2025-01-07T14:45:53.246-08:00","updated_at":"2025-01-07T14:45:53.246-08:00"}}},"schema":{"$ref":"#/components/schemas/workflow_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/workflow_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_tasks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a workflow task","security":[{"bearer_auth":[]}],"tags":["WorkflowTasks"],"description":"Update a specific workflow task by id","operationId":"updateWorkflowTask","parameters":[],"responses":{"200":{"description":"workflow_task updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3bf27ed-66d0-42d6-aa02-557f9070c0e6","type":"workflow_tasks","attributes":{"workflow_id":"8ce481ea-d698-4369-878e-aa71a6812c53","task_params":{"task_type":"send_email","from":"Rootly ","to":["tempora"],"cc":[],"bcc":[],"subject":"Itaque modi omnis quis.","preheader":null,"body":"updated","include_header":true,"include_footer":true,"custom_logo_url":null},"name":"Another name","position":2,"skip_on_failure":true,"enabled":false,"created_at":"2025-01-07T14:45:53.246-08:00","updated_at":"2025-01-07T14:45:54.919-08:00"}}},"schema":{"$ref":"#/components/schemas/workflow_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_workflow_task"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/workflow_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_tasks/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a workflow task","security":[{"bearer_auth":[]}],"tags":["WorkflowTasks"],"description":"Delete a specific workflow task by id","operationId":"deleteWorkflowTask","responses":{"200":{"description":"workflow_task deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3bf27ed-66d0-42d6-aa02-557f9070c0e6","type":"workflow_tasks","attributes":{"workflow_id":"8ce481ea-d698-4369-878e-aa71a6812c53","task_params":{"task_type":"send_email","from":"Rootly ","to":["tempora"],"cc":[],"bcc":[],"subject":"Itaque modi omnis quis.","preheader":null,"body":"Reiciendis id porro nisi.","include_header":true,"include_footer":true,"custom_logo_url":null},"name":"Send an email","position":1,"skip_on_failure":false,"enabled":true,"created_at":"2025-01-07T14:45:53.246-08:00","updated_at":"2025-01-07T14:45:56.057-08:00"}}},"schema":{"$ref":"#/components/schemas/workflow_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/workflow_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_tasks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflows/{workflow_id}/custom_field_selections":{"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"[DEPRECATED] Creates a workflow custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] WorkflowCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data","deprecated":true,"operationId":"createWorkflowCustomFieldSelection","parameters":[],"responses":{"201":{"description":"workflow_custom_field_selection created","content":{"application/vnd.api+json":{"example":{"data":{"id":"2","type":"workflow_custom_field_selections","attributes":{"custom_field_id":23,"workflow_id":"97760b48-98f6-4763-917b-b6f69c837e10","incident_condition":"ANY","values":[],"selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_custom_field_selection_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_workflow_custom_field_selection"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/custom_field_selections \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/custom_field_selections\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/custom_field_selections\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/custom_field_selections\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"[DEPRECATED] List workflow custom field selections","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] WorkflowCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. List workflow custom field selections","deprecated":true,"operationId":"listWorkflowCustomFieldSelections","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/workflow_custom_field_selection_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflow_custom_field_selections/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"[DEPRECATED] Retrieves a workflow custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] WorkflowCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id","deprecated":true,"operationId":"getWorkflowCustomFieldSelection","responses":{"200":{"description":"workflow_custom_field_selection found","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"workflow_custom_field_selections","attributes":{"custom_field_id":22,"workflow_id":"97760b48-98f6-4763-917b-b6f69c837e10","incident_condition":"ANY","values":[],"selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_custom_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_custom_field_selections/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"[DEPRECATED] Update a workflow custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] WorkflowCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id","deprecated":true,"operationId":"updateWorkflowCustomFieldSelection","parameters":[],"responses":{"200":{"description":"workflow_custom_field_selection updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"workflow_custom_field_selections","attributes":{"custom_field_id":22,"workflow_id":"97760b48-98f6-4763-917b-b6f69c837e10","incident_condition":"IS","values":[],"selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_custom_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_workflow_custom_field_selection"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_custom_field_selections/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"[DEPRECATED] Delete a workflow custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] WorkflowCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id","deprecated":true,"operationId":"deleteWorkflowCustomFieldSelection","responses":{"200":{"description":"workflow_custom_field_selection deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"workflow_custom_field_selections","attributes":{"custom_field_id":22,"workflow_id":"97760b48-98f6-4763-917b-b6f69c837e10","incident_condition":"ANY","values":[],"selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_custom_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_custom_field_selections/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_custom_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflows/{workflow_id}/form_field_conditions":{"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a workflow form field condition","security":[{"bearer_auth":[]}],"tags":["WorkflowFormFieldConditions"],"description":"Creates a new workflow form field condition from provided data","operationId":"createWorkflowFormFieldCondition","parameters":[],"responses":{"201":{"description":"workflow_form_field_condition created","content":{"application/vnd.api+json":{"example":{"data":{"id":"c5b42675-fb63-4092-9210-e65e4489b7a6","type":"workflow_form_field_conditions","attributes":{"workflow_id":"0cdb3a60-541a-4bcd-8290-56400d99495e","form_field_id":"c8b3fad1-1dfd-4b8c-8fa3-40cf687ab397","incident_condition":"ANY","values":[],"selected_group_ids":[],"selected_option_ids":[],"selected_service_ids":[],"selected_functionality_ids":[],"selected_user_ids":[],"selected_catalog_entity_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_form_field_condition_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_workflow_form_field_condition"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/form_field_conditions \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/form_field_conditions\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/form_field_conditions\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/form_field_conditions\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List workflow form field conditions","security":[{"bearer_auth":[]}],"tags":["WorkflowFormFieldConditions"],"description":"List workflow form field conditions","operationId":"listWorkflowFormFieldConditions","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/workflow_form_field_condition_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/form_field_conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/form_field_conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/form_field_conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/form_field_conditions?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflow_form_field_conditions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a workflow form field condition","security":[{"bearer_auth":[]}],"tags":["WorkflowFormFieldConditions"],"description":"Retrieves a specific workflow form field condition by id","operationId":"getWorkflowFormFieldCondition","responses":{"200":{"description":"workflow_form_field_condition found","content":{"application/vnd.api+json":{"example":{"data":{"id":"7d621934-aa0c-4822-9f34-82541bf4a621","type":"workflow_form_field_conditions","attributes":{"workflow_id":"0cdb3a60-541a-4bcd-8290-56400d99495e","form_field_id":"b3527b49-edce-4772-a049-f3519352c878","incident_condition":"ANY","values":[],"selected_group_ids":[],"selected_option_ids":[],"selected_service_ids":[],"selected_functionality_ids":[],"selected_user_ids":[],"selected_catalog_entity_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_form_field_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_form_field_conditions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a workflow form field condition","security":[{"bearer_auth":[]}],"tags":["WorkflowFormFieldConditions"],"description":"Update a specific workflow form field condition by id","operationId":"updateWorkflowFormFieldCondition","parameters":[],"responses":{"200":{"description":"workflow_form_field_condition updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"7d621934-aa0c-4822-9f34-82541bf4a621","type":"workflow_form_field_conditions","attributes":{"workflow_id":"0cdb3a60-541a-4bcd-8290-56400d99495e","form_field_id":"b3527b49-edce-4772-a049-f3519352c878","incident_condition":"IS","values":[],"selected_group_ids":[],"selected_option_ids":[],"selected_service_ids":[],"selected_functionality_ids":[],"selected_user_ids":[],"selected_catalog_entity_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_form_field_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_workflow_form_field_condition"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_form_field_conditions/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a workflow_form field condition","security":[{"bearer_auth":[]}],"tags":["WorkflowFormFieldConditions"],"description":"Delete a specific workflow form field condition by id","operationId":"deleteWorkflowFormFieldCondition","responses":{"200":{"description":"workflow_form_field_condition deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"7d621934-aa0c-4822-9f34-82541bf4a621","type":"workflow_form_field_conditions","attributes":{"workflow_id":"0cdb3a60-541a-4bcd-8290-56400d99495e","form_field_id":"b3527b49-edce-4772-a049-f3519352c878","incident_condition":"ANY","values":[],"selected_group_ids":[],"selected_option_ids":[],"selected_service_ids":[],"selected_functionality_ids":[],"selected_user_ids":[],"selected_catalog_entity_ids":[]}}},"schema":{"$ref":"#/components/schemas/workflow_form_field_condition_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_form_field_conditions/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_form_field_conditions/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflow_groups":{"post":{"summary":"Creates a workflow group","security":[{"bearer_auth":[]}],"tags":["WorkflowGroups"],"description":"Creates a new workflow group from provided data","operationId":"createWorkflowGroup","parameters":[],"responses":{"201":{"description":"workflow group created","content":{"application/vnd.api+json":{"example":{"data":{"id":"6966307f-05ca-43b9-b422-2eef3b501872","type":"workflow_groups","attributes":{"kind":"incident","name":"Test","description":null,"icon":"📁","slug":"test-incident","expanded":true,"position":1}}},"schema":{"$ref":"#/components/schemas/workflow_group_response"}}}},"401":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_workflow_group"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/workflow_groups \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_groups\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_groups\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_groups\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List workflow groups","security":[{"bearer_auth":[]}],"tags":["WorkflowGroups"],"description":"List workflow groups","operationId":"listWorkflowGroups","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[expanded]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"filter[position]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/workflow_group_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflow_groups?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bexpanded%5D=SOME_BOOLEAN_VALUE&filter%5Bposition%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_groups?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bexpanded%5D=SOME_BOOLEAN_VALUE&filter%5Bposition%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_groups?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bexpanded%5D=SOME_BOOLEAN_VALUE&filter%5Bposition%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_groups?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bexpanded%5D=SOME_BOOLEAN_VALUE&filter%5Bposition%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflow_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a workflow group","security":[{"bearer_auth":[]}],"tags":["WorkflowGroups"],"description":"Retrieves a specific workflow group by id","operationId":"getWorkflowGroup","responses":{"200":{"description":"workflow group found","content":{"application/vnd.api+json":{"example":{"data":{"id":"4368a5aa-e193-40f1-bdd6-7395e1ad0dbd","type":"workflow_groups","attributes":{"kind":"incident","name":"Default","description":null,"icon":"📁","slug":"default-incident","expanded":true,"position":1}}},"schema":{"$ref":"#/components/schemas/workflow_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/workflow_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_groups/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a workflow group","security":[{"bearer_auth":[]}],"tags":["WorkflowGroups"],"description":"Update a specific workflow group by id","operationId":"updateWorkflowGroup","parameters":[],"responses":{"200":{"description":"workflow group updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"4368a5aa-e193-40f1-bdd6-7395e1ad0dbd","type":"workflow_groups","attributes":{"kind":"incident","name":"Test update","description":null,"icon":"📁","slug":"default-incident","expanded":true,"position":1}}},"schema":{"$ref":"#/components/schemas/workflow_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_workflow_group"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/workflow_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_groups/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a workflow_group","security":[{"bearer_auth":[]}],"tags":["WorkflowGroups"],"description":"Delete a specific workflow group by id","operationId":"deleteWorkflowGroup","responses":{"200":{"description":"workflow group deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"4368a5aa-e193-40f1-bdd6-7395e1ad0dbd","type":"workflow_groups","attributes":{"kind":"incident","name":"Default","description":null,"icon":"📁","slug":"default-incident","expanded":true,"position":1}}},"schema":{"$ref":"#/components/schemas/workflow_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/workflow_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflow_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflow_groups/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflow_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflows/{workflow_id}/workflow_runs":{"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List workflow runs","security":[{"bearer_auth":[]}],"tags":["WorkflowRuns"],"description":"List workflow runs","operationId":"ListWorkflowRuns","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: genius_task_runs","schema":{"type":"string","enum":["genius_task_runs"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/workflow_runs_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_runs?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_runs?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/workflow_runs?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_runs?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"post":{"summary":"Creates a workflow run","security":[{"bearer_auth":[]}],"tags":["WorkflowRuns"],"description":"Creates a new workflow run from provided data","operationId":"createWorkflowRun","parameters":[],"responses":{"201":{"description":"workflow run created","content":{"application/vnd.api+json":{"example":{"data":{"id":"f3f4e65e-a1a5-471f-b096-27bcc7436425","type":"workflow_runs","attributes":{"kind":"incident","status":"queued","status_message":null,"triggered_by":"user","user_id":154,"queued_at":"2025-01-07T14:46:09.578-08:00","started_at":null,"completed_at":null,"failed_at":null,"canceled_at":null,"updated_at":"2025-01-07T14:46:09.578-08:00","created_at":"2025-01-07T14:46:09.578-08:00","incident_id":"cf3f4d40-4a25-4633-98d3-3c1effb9bec5","post_mortem_id":null,"action_item_id":null,"alert_id":null,"pulse_id":null,"workflow_id":"ed628f45-8e88-412b-beb2-59cbbb2bbbda","workflow_name":"Inglourious Basterds"},"relationships":{"task_runs":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/workflow_run_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"workflow run not created","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Incident conditions are not satisfied","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_workflow_run"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_runs \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_runs\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bworkflow_id%7D/workflow_runs\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bworkflow_id%7D/workflow_runs\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflows":{"post":{"summary":"Creates a workflow","security":[{"bearer_auth":[]}],"tags":["Workflows"],"description":"Creates a new workflow from provided data","operationId":"createWorkflow","parameters":[],"responses":{"201":{"description":"admins can set 'locked' while creating a workflow","content":{"application/vnd.api+json":{"example":{"data":{"id":"4c26428c-dad4-4bd6-945f-a5e79e4bcadb","type":"workflows","attributes":{"name":"Test","slug":"test","description":null,"command":"incident-test","command_feedback_enabled":true,"repeat_every_duration":null,"repeat_on":[],"wait":null,"enabled":true,"locked":true,"position":1,"workflow_group_id":"c0e84d8e-7ae8-43dc-b07f-9c0aa0ef5a61","trigger_params":{"trigger_type":"incident","triggers":[],"incident_visibilities":[],"incident_kinds":["normal"],"incident_statuses":[],"incident_inactivity_duration":null,"incident_condition":"ALL","incident_condition_visibility":"ANY","incident_condition_kind":"IS","incident_condition_status":"ANY","incident_condition_environment":"ANY","incident_condition_severity":"ANY","incident_condition_incident_type":"ANY","incident_condition_incident_roles":"ANY","incident_condition_service":"ANY","incident_condition_functionality":"ANY","incident_condition_group":"ANY","incident_condition_cause":"ANY","incident_condition_summary":null,"incident_condition_started_at":null,"incident_condition_detected_at":null,"incident_condition_acknowledged_at":null,"incident_condition_mitigated_at":null,"incident_condition_resolved_at":null,"incident_conditional_inactivity":null,"incident_post_mortem_condition_cause":"ANY"},"severity_ids":[],"environment_ids":[],"incident_type_ids":[],"incident_role_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"updated_at":"2025-01-07T14:46:16.372-08:00","created_at":"2025-01-07T14:46:16.372-08:00"},"relationships":{"custom_field_selections":{"data":[]},"workflow_tasks":{"data":[]},"workflow_runs":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/workflow_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"403":{"description":"non-admins can't set 'locked' while creating a workflow","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Unauthorized Action. Only admins can set locked","status":"403"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_workflow"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/workflows \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List workflows","security":[{"bearer_auth":[]}],"tags":["Workflows"],"description":"List workflows","operationId":"listWorkflows","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: form_field_conditions,genius_tasks","schema":{"type":"string","enum":["form_field_conditions","genius_tasks","genius_workflow_runs"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","position","-position"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/workflow_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflows?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/workflows/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a workflow","security":[{"bearer_auth":[]}],"tags":["Workflows"],"description":"Retrieves a specific workflow by id","operationId":"getWorkflow","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: form_field_conditions,genius_tasks","schema":{"type":"string","enum":["form_field_conditions","genius_tasks","genius_workflow_runs"]},"required":false}],"responses":{"200":{"description":"workflow found","content":{"application/vnd.api+json":{"example":{"data":{"id":"859d17f7-06d0-482f-a09b-8b6b6de77f54","type":"workflows","attributes":{"name":"Fargo","slug":"fargo","description":null,"command":"incident-fargo","command_feedback_enabled":true,"repeat_every_duration":null,"repeat_on":[],"wait":null,"enabled":true,"locked":false,"position":1,"workflow_group_id":null,"trigger_params":{"trigger_type":"incident","triggers":[],"incident_visibilities":[],"incident_kinds":["normal"],"incident_statuses":[],"incident_inactivity_duration":null,"incident_condition":"ALL","incident_condition_visibility":"ANY","incident_condition_kind":"IS","incident_condition_status":"ANY","incident_condition_environment":"ANY","incident_condition_severity":"ANY","incident_condition_incident_type":"ANY","incident_condition_incident_roles":"ANY","incident_condition_service":"ANY","incident_condition_functionality":"ANY","incident_condition_group":"ANY","incident_condition_cause":"ANY","incident_condition_summary":null,"incident_condition_started_at":null,"incident_condition_detected_at":null,"incident_condition_acknowledged_at":null,"incident_condition_mitigated_at":null,"incident_condition_resolved_at":null,"incident_conditional_inactivity":null,"incident_post_mortem_condition_cause":"ANY"},"severity_ids":[],"environment_ids":[],"incident_type_ids":[],"incident_role_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"updated_at":"2025-01-07T14:46:17.663-08:00","created_at":"2025-01-07T14:46:17.663-08:00"},"relationships":{"custom_field_selections":{"data":[]},"workflow_tasks":{"data":[]},"workflow_runs":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/workflow_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/workflows/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a workflow","security":[{"bearer_auth":[]}],"tags":["Workflows"],"description":"Update a specific workflow by id","operationId":"updateWorkflow","parameters":[],"responses":{"200":{"description":"admin can update 'locked' attribute","content":{"application/vnd.api+json":{"example":{"data":{"id":"ad140f59-fc91-441f-8c5f-43902fe65276","type":"workflows","attributes":{"name":"Updated","slug":"updated","description":null,"command":"incident-inception","command_feedback_enabled":true,"repeat_every_duration":null,"repeat_on":[],"wait":null,"enabled":true,"locked":true,"position":1,"workflow_group_id":null,"trigger_params":{"trigger_type":"incident","triggers":[],"incident_visibilities":[],"incident_kinds":["normal"],"incident_statuses":[],"incident_inactivity_duration":null,"incident_condition":"ALL","incident_condition_visibility":"ANY","incident_condition_kind":"IS","incident_condition_status":"ANY","incident_condition_environment":"ANY","incident_condition_severity":"ANY","incident_condition_incident_type":"ANY","incident_condition_incident_roles":"ANY","incident_condition_service":"ANY","incident_condition_functionality":"ANY","incident_condition_group":"ANY","incident_condition_cause":"ANY","incident_condition_summary":null,"incident_condition_started_at":null,"incident_condition_detected_at":null,"incident_condition_acknowledged_at":null,"incident_condition_mitigated_at":null,"incident_condition_resolved_at":null,"incident_conditional_inactivity":null,"incident_post_mortem_condition_cause":"ANY"},"severity_ids":[],"environment_ids":[],"incident_type_ids":[],"incident_role_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"updated_at":"2025-01-07T14:46:23.087-08:00","created_at":"2025-01-07T14:46:22.643-08:00"},"relationships":{"custom_field_selections":{"data":[]},"workflow_tasks":{"data":[]},"workflow_runs":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/workflow_response"}}}},"403":{"description":"non-admin can't update 'locked' attribute","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Unauthorized Action. Only admins can set locked","status":"403"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"404":{"description":"non-admin can't update locked workflow","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_workflow"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/workflows/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a workflow","security":[{"bearer_auth":[]}],"tags":["Workflows"],"description":"Delete a specific workflow by id","operationId":"deleteWorkflow","responses":{"200":{"description":"admin can destroy locked workflow","content":{"application/vnd.api+json":{"example":{"data":{"id":"e616ce29-6b59-4e3c-8742-fbe1c393e09e","type":"workflows","attributes":{"name":"Apocalypse Now","slug":"apocalypse-now","description":null,"command":null,"command_feedback_enabled":true,"repeat_every_duration":null,"repeat_on":[],"wait":null,"enabled":true,"locked":true,"position":1,"workflow_group_id":null,"trigger_params":{"trigger_type":"incident","triggers":[],"incident_visibilities":[],"incident_kinds":["normal"],"incident_statuses":[],"incident_inactivity_duration":null,"incident_condition":"ALL","incident_condition_visibility":"ANY","incident_condition_kind":"IS","incident_condition_status":"ANY","incident_condition_environment":"ANY","incident_condition_severity":"ANY","incident_condition_incident_type":"ANY","incident_condition_incident_roles":"ANY","incident_condition_service":"ANY","incident_condition_functionality":"ANY","incident_condition_group":"ANY","incident_condition_cause":"ANY","incident_condition_summary":null,"incident_condition_started_at":null,"incident_condition_detected_at":null,"incident_condition_acknowledged_at":null,"incident_condition_mitigated_at":null,"incident_condition_resolved_at":null,"incident_conditional_inactivity":null,"incident_post_mortem_condition_cause":"ANY"},"severity_ids":[],"environment_ids":[],"incident_type_ids":[],"incident_role_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"updated_at":"2025-01-07T14:46:25.657-08:00","created_at":"2025-01-07T14:46:25.055-08:00"},"relationships":{"custom_field_selections":{"data":[]},"workflow_tasks":{"data":[]},"workflow_runs":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/workflow_response"}}}},"404":{"description":"non-admin can't destroy locked workflow","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/workflows/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/workflows/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/workflows/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/workflows/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/heartbeats/{heartbeat_id}/ping":{"parameters":[{"name":"heartbeat_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Ping a heartbeat","security":[{"bearer_auth":[]}],"tags":["Heartbeats"],"description":"Ping a specific heartbeat by id","operationId":"pingHeartbeat","responses":{"204":{"description":"create ping"},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/heartbeats/%7Bheartbeat_id%7D/ping \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/heartbeats/%7Bheartbeat_id%7D/ping\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/heartbeats/%7Bheartbeat_id%7D/ping\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/heartbeats/%7Bheartbeat_id%7D/ping\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/heartbeats":{"post":{"summary":"Creates a heartbeat","security":[{"bearer_auth":[]}],"tags":["Heartbeats"],"description":"Creates a new heartbeat from provided data","operationId":"createHeartbeat","parameters":[],"responses":{"201":{"description":"heartbeat created","content":{"application/vnd.api+json":{"example":{"data":{"id":"7a0b867f-679c-455a-8f0f-b016dcc29a93","type":"heartbeats","attributes":{"slug":"api","name":"API","description":"This is a description","alert_summary":"API is down","alert_urgency_id":"67b72226-155d-444e-81d1-7aa6f8530966","interval":1,"interval_unit":"minutes","notification_target_id":"167","notification_target_type":"User","last_pinged_at":null,"expires_at":null,"enabled":false,"status":"waiting","updated_at":"2025-01-07T14:46:31.483-08:00","created_at":"2025-01-07T14:46:31.483-08:00"}}},"schema":{"$ref":"#/components/schemas/heartbeat_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_heartbeat"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/heartbeats \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/heartbeats\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/heartbeats\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/heartbeats\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List heartbeats","security":[{"bearer_auth":[]}],"tags":["Heartbeats"],"description":"List heartbeats","operationId":"listHeartbeats","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/heartbeat_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/heartbeats?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/heartbeats?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/heartbeats?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/heartbeats?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/heartbeats/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a heartbeat","security":[{"bearer_auth":[]}],"tags":["Heartbeats"],"description":"Retrieves a specific heartbeat by id","operationId":"getHeartbeat","responses":{"200":{"description":"heartbeat found","content":{"application/vnd.api+json":{"example":{"data":{"id":"ebbd44ba-948c-46c0-a07d-a60e8d5ae69c","type":"heartbeats","attributes":{"slug":"dolorem-alias-illum-cum","name":"Dolorem alias illum cum.","description":"Sed incidunt molestiae voluptatem.","alert_summary":"API is down","alert_urgency_id":"fa2c12f5-609b-4041-a0b1-8a2c587117cd","interval":4,"interval_unit":"hours","notification_target_id":"169","notification_target_type":"User","last_pinged_at":null,"expires_at":null,"enabled":false,"status":"waiting","updated_at":"2025-01-07T14:46:29.030-08:00","created_at":"2025-01-07T14:46:29.030-08:00"}}},"schema":{"$ref":"#/components/schemas/heartbeat_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/heartbeats/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/heartbeats/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/heartbeats/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/heartbeats/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a heartbeat","security":[{"bearer_auth":[]}],"tags":["Heartbeats"],"description":"Update a specific heartbeat by id","operationId":"updateHeartbeat","parameters":[],"responses":{"200":{"description":"heartbeat updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"ebbd44ba-948c-46c0-a07d-a60e8d5ae69c","type":"heartbeats","attributes":{"slug":"dolorem-alias-illum-cum","name":"api.rootly.com","description":"This is a description","alert_summary":"API is down","alert_urgency_id":"67b72226-155d-444e-81d1-7aa6f8530966","interval":10,"interval_unit":"minutes","notification_target_id":"169","notification_target_type":"User","last_pinged_at":null,"expires_at":null,"enabled":false,"status":"waiting","updated_at":"2025-01-07T14:46:32.629-08:00","created_at":"2025-01-07T14:46:29.030-08:00"}}},"schema":{"$ref":"#/components/schemas/heartbeat_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_heartbeat"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/heartbeats/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/heartbeats/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/heartbeats/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/heartbeats/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a heartbeat","security":[{"bearer_auth":[]}],"tags":["Heartbeats"],"description":"Delete a specific heartbeat by id","operationId":"deleteHeartbeat","responses":{"200":{"description":"heartbeat deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"ebbd44ba-948c-46c0-a07d-a60e8d5ae69c","type":"heartbeats","attributes":{"slug":"dolorem-alias-illum-cum","name":"Dolorem alias illum cum.","description":"Sed incidunt molestiae voluptatem.","alert_summary":"API is down","alert_urgency_id":"fa2c12f5-609b-4041-a0b1-8a2c587117cd","interval":4,"interval_unit":"hours","notification_target_id":"169","notification_target_type":"User","last_pinged_at":null,"expires_at":null,"enabled":false,"status":"waiting","updated_at":"2025-01-07T14:46:33.192-08:00","created_at":"2025-01-07T14:46:29.030-08:00"}}},"schema":{"$ref":"#/components/schemas/heartbeat_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/heartbeats/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/heartbeats/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/heartbeats/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/heartbeats/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/action_items":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident action item","security":[{"bearer_auth":[]}],"tags":["IncidentActionItems"],"description":"Creates a new action item from provided data","operationId":"createIncidentActionItem","parameters":[],"responses":{"201":{"description":"incident_action_item created","content":{"application/vnd.api+json":{"example":{"data":{"id":"e5050512-e7ab-4f76-a10f-14f2b32dd0e1","type":"incident_action_items","attributes":{"incident_id":"7d6fe4cd-0073-4db0-956e-1b8d6b05d871","incident_title":"Et rem fuga beatae.","description":"New action item description","assigned_to":{"id":174,"email":"alan@adams-bergstrom.test","deleted_at":null,"created_at":"2025-01-07T14:46:33.555-08:00","updated_at":"2025-01-07T14:46:36.849-08:00","current_team_id":164,"first_name":"Marvel","last_name":"Ziemann","time_zone":"UTC","last_seen_at":null,"profile_photo_id":null,"ability_cache":{"team_ids":[164],"administrating_team_ids":[]},"last_notification_email_sent_at":null,"accept_terms":true,"onboarding_completed":true,"service_user":false,"accept_marketing":true,"teams_count":1,"created_through_sso":false,"scim_uid":null,"session_token":null,"incidents_example_count":0,"incidents_test_count":0,"incidents_normal_count":0,"incidents_scheduled_count":0,"incidents_backfilled_count":0,"incidents_count":0,"theme":"light_v2","skip_tutorial":false,"external_id":null,"jti":"79eada2b-d927-433e-9d8f-b9521c2e87f8","is_super_admin":false,"has_impersonate_write_permission":false,"view_multiple_schedules":true,"push_notification_new_alert_sound":"default","push_notification_shift_starts_sound":"soft_bloob","push_notification_shift_ends_sound":"soft_bloob","how_did_you_hear_about_us":null,"push_notification_new_alert_volume":1,"opsgenie_id":null},"assigned_to_group_ids":["3c378b4e-124d-4069-882c-da1eb038e245","d8a50a49-aecb-4047-ac1b-864fc5265718"],"kind":"task","priority":"medium","status":"open","due_date":null,"jira_issue_id":null,"jira_issue_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"url":"https://test.rootly.com/account/incidents/et-rem-fuga-beatae#nav-action-items","short_url":null,"created_at":"2025-01-07T14:46:37.016-08:00","updated_at":"2025-01-07T14:46:37.016-08:00","summary":"New action item summary"}}},"schema":{"$ref":"#/components/schemas/incident_action_item_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Summary can't be blank","status":"422"},{"title":"Summary raw can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_action_item"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/action_items \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/action_items\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/action_items\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/action_items\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident action items","security":[{"bearer_auth":[]}],"tags":["IncidentActionItems"],"description":"List incident action items","operationId":"listIncidentActionItems","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_action_item_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/action_items/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident action item","security":[{"bearer_auth":[]}],"tags":["IncidentActionItems"],"description":"Retrieves a specific incident_action_item by id","operationId":"getIncidentActionItems","responses":{"200":{"description":"incident_action_item found","content":{"application/vnd.api+json":{"example":{"data":{"id":"c483a0f7-c5be-4559-bd29-9c5a07073a5a","type":"incident_action_items","attributes":{"incident_id":"7d6fe4cd-0073-4db0-956e-1b8d6b05d871","incident_title":"Et rem fuga beatae.","description":"shabby chic wolf locavore pickled twee poke. YOLO godard health goth pork belly cold-pressed swag","assigned_to":null,"assigned_to_group_ids":[],"kind":"follow_up","priority":"high","status":"open","due_date":null,"jira_issue_id":null,"jira_issue_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"url":"https://test.rootly.com/account/incidents/et-rem-fuga-beatae#nav-action-items","short_url":null,"created_at":"2025-01-07T14:46:36.060-08:00","updated_at":"2025-01-07T14:46:36.060-08:00","summary":"shabby chic wolf locavore pickled twee poke. YOLO godard health goth pork belly cold-pressed swag"}}},"schema":{"$ref":"#/components/schemas/incident_action_item_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/action_items/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/action_items/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/action_items/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/action_items/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident action item","security":[{"bearer_auth":[]}],"tags":["IncidentActionItems"],"description":"Update a specific incident action item by id","operationId":"updateIncidentActionItem","parameters":[],"responses":{"200":{"description":"incident_action_item updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"c483a0f7-c5be-4559-bd29-9c5a07073a5a","type":"incident_action_items","attributes":{"incident_id":"7d6fe4cd-0073-4db0-956e-1b8d6b05d871","incident_title":"Et rem fuga beatae.","description":"Action item description updated","assigned_to":null,"assigned_to_group_ids":[],"kind":"follow_up","priority":"high","status":"open","due_date":null,"jira_issue_id":null,"jira_issue_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"url":"https://test.rootly.com/account/incidents/et-rem-fuga-beatae#nav-action-items","short_url":null,"created_at":"2025-01-07T14:46:36.060-08:00","updated_at":"2025-01-07T14:46:39.081-08:00","summary":"Action item summary updated"}}},"schema":{"$ref":"#/components/schemas/incident_action_item_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_action_item"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/action_items/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/action_items/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/action_items/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/action_items/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident action item","security":[{"bearer_auth":[]}],"tags":["IncidentActionItems"],"description":"Delete a specific incident action item by id","operationId":"deleteIncidentActionItem","responses":{"200":{"description":"incident_action_item deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"c483a0f7-c5be-4559-bd29-9c5a07073a5a","type":"incident_action_items","attributes":{"incident_id":"7d6fe4cd-0073-4db0-956e-1b8d6b05d871","incident_title":"Et rem fuga beatae.","description":"shabby chic wolf locavore pickled twee poke. YOLO godard health goth pork belly cold-pressed swag","assigned_to":null,"assigned_to_group_ids":[],"kind":"follow_up","priority":"high","status":"open","due_date":null,"jira_issue_id":null,"jira_issue_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"url":"https://test.rootly.com/account/incidents/et-rem-fuga-beatae#nav-action-items","short_url":null,"created_at":"2025-01-07T14:46:36.060-08:00","updated_at":"2025-01-07T14:46:39.617-08:00","summary":"shabby chic wolf locavore pickled twee poke. YOLO godard health goth pork belly cold-pressed swag"}}},"schema":{"$ref":"#/components/schemas/incident_action_item_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/action_items/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/action_items/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/action_items/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/action_items/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/action_items":{"get":{"summary":"List all action items for an organization","security":[{"bearer_auth":[]}],"tags":["IncidentActionItems"],"description":"List all action items for an organization","operationId":"listAllIncidentActionItems","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[priority]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[incident_status]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[incident_created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[incident_created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[incident_created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[incident_created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[due_date][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[due_date][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[due_date][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[due_date][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_action_item_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bpriority%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bincident_status%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bpriority%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bincident_status%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bpriority%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bincident_status%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/action_items?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bpriority%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bincident_status%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bincident_created_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdue_date%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/custom_field_selections":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"[DEPRECATED] Creates a incident custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] IncidentCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data","deprecated":true,"operationId":"createIncidentCustomFieldSelection","parameters":[],"responses":{"201":{"description":"incident_custom_field_selection created","content":{"application/vnd.api+json":{"example":{"data":{"id":"2","type":"incident_custom_field_selections","attributes":{"custom_field_id":29,"incident_id":"5361432f-df2d-47e5-8a45-eb6219ca89d8","value":"Test custom field","selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/incident_custom_field_selection_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"requires either value or at least one selected option, group, service, or user","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_custom_field_selection"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/custom_field_selections \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/custom_field_selections\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/custom_field_selections\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/custom_field_selections\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"[DEPRECATED] List incident custom field selections","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] IncidentCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. List incident custom field selections","deprecated":true,"operationId":"listIncidentCustomFieldSelections","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_custom_field_selection_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/custom_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_custom_field_selections/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"[DEPRECATED] Retrieves a incident custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] IncidentCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id","deprecated":true,"operationId":"getIncidentCustomFieldSelection","responses":{"200":{"description":"incident_custom_field_selection found","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"incident_custom_field_selections","attributes":{"custom_field_id":28,"incident_id":"5361432f-df2d-47e5-8a45-eb6219ca89d8","value":"Velit accusamus eveniet sequi.","selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/incident_custom_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_custom_field_selections/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"[DEPRECATED] Update a incident custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] IncidentCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id","deprecated":true,"operationId":"updateIncidentCustomFieldSelection","parameters":[],"responses":{"200":{"description":"incident_custom_field_selection updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"incident_custom_field_selections","attributes":{"custom_field_id":28,"incident_id":"5361432f-df2d-47e5-8a45-eb6219ca89d8","value":"Test update custom field","selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/incident_custom_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_custom_field_selection"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_custom_field_selections/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"[DEPRECATED] Delete a incident custom field selection","security":[{"bearer_auth":[]}],"tags":["[DEPRECATED] IncidentCustomFieldSelections"],"description":"[DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id","deprecated":true,"operationId":"deleteIncidentCustomFieldSelection","responses":{"200":{"description":"incident_custom_field_selection deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"1","type":"incident_custom_field_selections","attributes":{"custom_field_id":28,"incident_id":"5361432f-df2d-47e5-8a45-eb6219ca89d8","value":"Velit accusamus eveniet sequi.","selected_option_ids":[]}}},"schema":{"$ref":"#/components/schemas/incident_custom_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_custom_field_selections/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_custom_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/events/{incident_event_id}/functionalities":{"parameters":[{"name":"incident_event_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident event functionality","security":[{"bearer_auth":[]}],"tags":["IncidentEventFunctionalities"],"description":"Creates a new event functionality from provided data","operationId":"createIncidentEventFunctionality","parameters":[],"responses":{"201":{"description":"incident_event_functionality created","content":{"application/vnd.api+json":{"example":{"data":{"id":"2204d627-c30f-4bc0-b2cc-0baf575d9817","type":"incident_event_functionalities","attributes":{"incident_event_id":"e9626f76-491a-4a14-9b86-d03b58355b3a","functionality_id":"fc2844fb-c327-4559-ac7c-464fddb6be06","status":"partial_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_functionality_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Functionality must exist","status":"422"},{"title":"Functionality can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_event_functionality"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/events/%7Bincident_event_id%7D/functionalities \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/functionalities\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bincident_event_id%7D/functionalities\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/functionalities\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident event functionalities","security":[{"bearer_auth":[]}],"tags":["IncidentEventFunctionalities"],"description":"List incident event functionalities","operationId":"listIncidentEventFunctionalities","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_event_functionality_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/events/%7Bincident_event_id%7D/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bincident_event_id%7D/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/functionalities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_event_functionalities/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident event functionality","security":[{"bearer_auth":[]}],"tags":["IncidentEventFunctionalities"],"description":"Retrieves a specific incident_event_functionality by id","operationId":"getIncidentEventFunctionalities","responses":{"200":{"description":"incident_event_functionality found","content":{"application/vnd.api+json":{"example":{"data":{"id":"31d5db9f-5858-4970-ae04-e3e3bed4cbb0","type":"incident_event_functionalities","attributes":{"incident_event_id":"e9626f76-491a-4a14-9b86-d03b58355b3a","functionality_id":"2dc120d5-5caa-4548-887f-1e1cf1fc2f4a","status":"partial_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_functionality_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_event_functionalities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident event","security":[{"bearer_auth":[]}],"tags":["IncidentEventFunctionalities"],"description":"Update a specific incident event functionality by id","operationId":"updateIncidentEventFunctionality","parameters":[],"responses":{"200":{"description":"incident_event_functionality updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"31d5db9f-5858-4970-ae04-e3e3bed4cbb0","type":"incident_event_functionalities","attributes":{"incident_event_id":"e9626f76-491a-4a14-9b86-d03b58355b3a","functionality_id":"2dc120d5-5caa-4548-887f-1e1cf1fc2f4a","status":"major_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_functionality_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_event_functionality"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_event_functionalities/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an incident event functionality","security":[{"bearer_auth":[]}],"tags":["IncidentEventFunctionalities"],"description":"Delete a specific incident event functionality by id","operationId":"deleteIncidentEventFunctionality","responses":{"200":{"description":"incident_event deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"31d5db9f-5858-4970-ae04-e3e3bed4cbb0","type":"incident_event_functionalities","attributes":{"incident_event_id":"e9626f76-491a-4a14-9b86-d03b58355b3a","functionality_id":"2dc120d5-5caa-4548-887f-1e1cf1fc2f4a","status":"partial_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_functionality_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_event_functionalities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_event_functionalities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/events/{incident_event_id}/services":{"parameters":[{"name":"incident_event_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident event service","security":[{"bearer_auth":[]}],"tags":["IncidentEventServices"],"description":"Creates a new event service from provided data","operationId":"createIncidentEventService","parameters":[],"responses":{"201":{"description":"incident_event_service created","content":{"application/vnd.api+json":{"example":{"data":{"id":"4940a4ea-b1cd-4572-9e3b-8f6bac4a3df0","type":"incident_event_services","attributes":{"incident_event_id":"482f5550-fc37-42f6-bf4a-5e78c9c05df1","service_id":"62374640-9908-4ec6-a6fa-2c82496e04bb","status":"partial_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_service_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Service must exist","status":"422"},{"title":"Service can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_event_service"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/events/%7Bincident_event_id%7D/services \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/services\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bincident_event_id%7D/services\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/services\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident event services","security":[{"bearer_auth":[]}],"tags":["IncidentEventServices"],"description":"List incident event services","operationId":"listIncidentEventServices","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_event_service_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/events/%7Bincident_event_id%7D/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bincident_event_id%7D/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bincident_event_id%7D/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_event_services/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident event service","security":[{"bearer_auth":[]}],"tags":["IncidentEventServices"],"description":"Retrieves a specific incident_event_service by id","operationId":"getIncidentEventServices","responses":{"200":{"description":"incident_event_service found","content":{"application/vnd.api+json":{"example":{"data":{"id":"81cd0c5d-4fc5-4277-afb0-c0c0891ea921","type":"incident_event_services","attributes":{"incident_event_id":"482f5550-fc37-42f6-bf4a-5e78c9c05df1","service_id":"0ca4b211-2d6c-44da-9e0c-187ec62d74e4","status":"partial_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_service_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_event_services/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_event_services/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_event_services/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_event_services/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident event","security":[{"bearer_auth":[]}],"tags":["IncidentEventServices"],"description":"Update a specific incident event service by id","operationId":"updateIncidentEventService","parameters":[],"responses":{"200":{"description":"incident_event_service updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"81cd0c5d-4fc5-4277-afb0-c0c0891ea921","type":"incident_event_services","attributes":{"incident_event_id":"482f5550-fc37-42f6-bf4a-5e78c9c05df1","service_id":"0ca4b211-2d6c-44da-9e0c-187ec62d74e4","status":"major_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_service_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_event_service"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_event_services/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_event_services/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_event_services/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_event_services/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an incident event functionalitu","security":[{"bearer_auth":[]}],"tags":["IncidentEventServices"],"description":"Delete a specific incident event service by id","operationId":"deleteIncidentEventService","responses":{"200":{"description":"incident_event deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"81cd0c5d-4fc5-4277-afb0-c0c0891ea921","type":"incident_event_services","attributes":{"incident_event_id":"482f5550-fc37-42f6-bf4a-5e78c9c05df1","service_id":"0ca4b211-2d6c-44da-9e0c-187ec62d74e4","status":"partial_outage"}}},"schema":{"$ref":"#/components/schemas/incident_event_service_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_event_services/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_event_services/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_event_services/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_event_services/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/events":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident event","security":[{"bearer_auth":[]}],"tags":["IncidentEvents"],"description":"Creates a new event from provided data","operationId":"createIncidentEvent","parameters":[],"responses":{"201":{"description":"incident_event created","content":{"application/vnd.api+json":{"example":{"data":{"id":"ec0ab41f-7ff4-4e2e-82b0-f134055e5499","type":"incident_events","attributes":{"event":"New Event","event_raw":"New Event","kind":"event","source":"web","visibility":"external","user_display_name":"Rootly","occurred_at":"2025-01-07T14:46:55.511-08:00","starred_at":null,"created_at":"2025-01-07T14:46:55.511-08:00","updated_at":"2025-01-07T14:46:55.511-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_event_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Event can't be blank","status":"422"},{"title":"Event raw can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_event"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/events \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/events\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/events\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/events\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident events","security":[{"bearer_auth":[]}],"tags":["IncidentEvents"],"description":"List incident events","operationId":"listIncidentEvents","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_event_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/events/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident event","security":[{"bearer_auth":[]}],"tags":["IncidentEvents"],"description":"Retrieves a specific incident_event by id","operationId":"getIncidentEvents","responses":{"200":{"description":"incident_event found","content":{"application/vnd.api+json":{"example":{"data":{"id":"eca647d1-fe9e-4143-a219-6a2ab6bb50ce","type":"incident_events","attributes":{"event":"Ad distinctio recusandae ut.","event_raw":"Ad distinctio recusandae ut.","kind":"event","source":"web","visibility":"internal","user_display_name":"Laurence Rath","occurred_at":"2025-01-07T14:46:54.752-08:00","starred_at":null,"created_at":"2025-01-07T14:46:54.752-08:00","updated_at":"2025-01-07T14:46:54.752-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_event_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/events/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident event","security":[{"bearer_auth":[]}],"tags":["IncidentEvents"],"description":"Update a specific incident event by id","operationId":"updateIncidentEvent","parameters":[],"responses":{"200":{"description":"incident_event updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"eca647d1-fe9e-4143-a219-6a2ab6bb50ce","type":"incident_events","attributes":{"event":"Event updated","event_raw":"Event updated","kind":"event","source":"web","visibility":"internal","user_display_name":"Laurence Rath","occurred_at":"2025-01-07T14:46:54.752-08:00","starred_at":null,"created_at":"2025-01-07T14:46:54.752-08:00","updated_at":"2025-01-07T14:46:57.593-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_event_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_event"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/events/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident event","security":[{"bearer_auth":[]}],"tags":["IncidentEvents"],"description":"Delete a specific incident event by id","operationId":"deleteIncidentEvent","responses":{"200":{"description":"incident_event deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"eca647d1-fe9e-4143-a219-6a2ab6bb50ce","type":"incident_events","attributes":{"event":"Ad distinctio recusandae ut.","event_raw":"Ad distinctio recusandae ut.","kind":"event","source":"web","visibility":"internal","user_display_name":"Laurence Rath","occurred_at":"2025-01-07T14:46:54.752-08:00","starred_at":null,"created_at":"2025-01-07T14:46:54.752-08:00","updated_at":"2025-01-07T14:46:58.156-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_event_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/events/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/events/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/events/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/events/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/feedbacks":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident feedback","security":[{"bearer_auth":[]}],"tags":["IncidentFeedbacks"],"description":"Creates a new feedback from provided data","operationId":"createIncidentFeedback","parameters":[],"responses":{"201":{"description":"incident_feedback created","content":{"application/vnd.api+json":{"example":{"data":{"id":"543081bb-39a0-42e3-b410-df212bb4ffca","type":"incident_feedbacks","attributes":{"rating":4,"rating_humanized":"Very satisfied","feedback":"New Feedback","anonymous":true,"updated_at":"2025-01-07T14:47:01.047-08:00","created_at":"2025-01-07T14:47:01.047-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_feedback_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Feedback can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_feedback"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/feedbacks \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/feedbacks\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/feedbacks\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/feedbacks\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident feedbacks","security":[{"bearer_auth":[]}],"tags":["IncidentFeedbacks"],"description":"List incident feedbacks","operationId":"listIncidentFeedbacks","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_feedback_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/feedbacks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/feedbacks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/feedbacks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/feedbacks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/feedbacks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident feedback","security":[{"bearer_auth":[]}],"tags":["IncidentFeedbacks"],"description":"Retrieves a specific incident_feedback by id","operationId":"getIncidentFeedbacks","responses":{"200":{"description":"incident_feedback found","content":{"application/vnd.api+json":{"example":{"data":{"id":"6eeb37a0-7fef-4920-9dca-f23169c198d0","type":"incident_feedbacks","attributes":{"rating":4,"rating_humanized":"Very satisfied","feedback":"Quia vel eaque aut.","anonymous":false,"updated_at":"2025-01-07T14:47:00.349-08:00","created_at":"2025-01-07T14:47:00.349-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_feedback_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/feedbacks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/feedbacks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/feedbacks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/feedbacks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident feedback","security":[{"bearer_auth":[]}],"tags":["IncidentFeedbacks"],"description":"Update a specific incident feedback by id","operationId":"updateIncidentFeedback","parameters":[],"responses":{"200":{"description":"incident_feedback updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"6eeb37a0-7fef-4920-9dca-f23169c198d0","type":"incident_feedbacks","attributes":{"rating":3,"rating_humanized":"Somewhat satisfied","feedback":"Feedback updated","anonymous":false,"updated_at":"2025-01-07T14:47:02.499-08:00","created_at":"2025-01-07T14:47:00.349-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_feedback_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_feedback"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/feedbacks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/feedbacks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/feedbacks/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/feedbacks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/form_field_selections":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident form field selection","security":[{"bearer_auth":[]}],"tags":["IncidentFormFieldSelections"],"description":"Creates a new incident form field selection from provided data","operationId":"createIncidentFormFieldSelection","parameters":[],"responses":{"201":{"description":"incident_form_field_selection created","content":{"application/vnd.api+json":{"example":{"data":{"id":"c0414eba-ca13-413d-a8a6-6bf80eb06fad","type":"incident_form_field_selections","attributes":{"incident_id":"6041060e-b7bb-43d9-8084-05530f3377d7","custom_field_id":32,"form_field_id":"fc540411-b481-4d3b-9cba-d3e6ccdc00c1","value":"Test custom field","selected_group_ids":[],"selected_groups":{"id":null,"value":"Test custom field"},"selected_option_ids":[],"selected_options":{"id":null,"value":"Test custom field"},"selected_service_ids":[],"selected_services":{"id":null,"value":"Test custom field"},"selected_functionality_ids":[],"selected_functionalities":{"id":null,"value":"Test custom field"},"selected_catalog_entity_ids":[],"selected_catalog_entities":{"id":null,"value":"Test custom field"},"selected_user_ids":[],"selected_users":{"id":null,"value":"Test custom field"}}}},"schema":{"$ref":"#/components/schemas/incident_form_field_selection_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Form field must exist","status":"422"},{"title":"requires either value or at least one selected option, group, service, or user","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_form_field_selection"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/form_field_selections \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/form_field_selections\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/form_field_selections\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/form_field_selections\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident form field selections","security":[{"bearer_auth":[]}],"tags":["IncidentFormFieldSelections"],"description":"List incident form field selections","operationId":"listIncidentFormFieldSelections","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_form_field_selection_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/form_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/form_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/form_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/form_field_selections?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_form_field_selections/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident form field selection","security":[{"bearer_auth":[]}],"tags":["IncidentFormFieldSelections"],"description":"Retrieves a specific incident form field selection by id","operationId":"getIncidentFormFieldSelection","responses":{"200":{"description":"incident_form_field_selection found","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c8b9350-db0f-4fc6-98e2-8c03c423c6f1","type":"incident_form_field_selections","attributes":{"incident_id":"6041060e-b7bb-43d9-8084-05530f3377d7","custom_field_id":31,"form_field_id":"ab1a34b7-68ac-48a4-87b4-038d18ae0e98","value":"Quo sequi beatae sit.","selected_group_ids":[],"selected_groups":{"id":null,"value":"Quo sequi beatae sit."},"selected_option_ids":[],"selected_options":{"id":null,"value":"Quo sequi beatae sit."},"selected_service_ids":[],"selected_services":{"id":null,"value":"Quo sequi beatae sit."},"selected_functionality_ids":[],"selected_functionalities":{"id":null,"value":"Quo sequi beatae sit."},"selected_catalog_entity_ids":[],"selected_catalog_entities":{"id":null,"value":"Quo sequi beatae sit."},"selected_user_ids":[],"selected_users":{"id":null,"value":"Quo sequi beatae sit."}}}},"schema":{"$ref":"#/components/schemas/incident_form_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_form_field_selections/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident form field selection","security":[{"bearer_auth":[]}],"tags":["IncidentFormFieldSelections"],"description":"Update a specific incident form field selection by id","operationId":"updateIncidentFormFieldSelection","parameters":[],"responses":{"200":{"description":"incident_form_field_selection updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c8b9350-db0f-4fc6-98e2-8c03c423c6f1","type":"incident_form_field_selections","attributes":{"incident_id":"6041060e-b7bb-43d9-8084-05530f3377d7","custom_field_id":31,"form_field_id":"ab1a34b7-68ac-48a4-87b4-038d18ae0e98","value":"Test update custom field","selected_group_ids":[],"selected_groups":{"id":null,"value":"Test update custom field"},"selected_option_ids":[],"selected_options":{"id":null,"value":"Test update custom field"},"selected_service_ids":[],"selected_services":{"id":null,"value":"Test update custom field"},"selected_functionality_ids":[],"selected_functionalities":{"id":null,"value":"Test update custom field"},"selected_catalog_entity_ids":[],"selected_catalog_entities":{"id":null,"value":"Test update custom field"},"selected_user_ids":[],"selected_users":{"id":null,"value":"Test update custom field"}}}},"schema":{"$ref":"#/components/schemas/incident_form_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_form_field_selection"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_form_field_selections/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident form field selection","security":[{"bearer_auth":[]}],"tags":["IncidentFormFieldSelections"],"description":"Delete a specific incident form field selection by id","operationId":"deleteIncidentFormFieldSelection","responses":{"200":{"description":"incident_form_field_selection deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c8b9350-db0f-4fc6-98e2-8c03c423c6f1","type":"incident_form_field_selections","attributes":{"incident_id":"6041060e-b7bb-43d9-8084-05530f3377d7","custom_field_id":31,"form_field_id":"ab1a34b7-68ac-48a4-87b4-038d18ae0e98","value":"Quo sequi beatae sit.","selected_group_ids":[],"selected_groups":{"id":null,"value":"Quo sequi beatae sit."},"selected_option_ids":[],"selected_options":{"id":null,"value":"Quo sequi beatae sit."},"selected_service_ids":[],"selected_services":{"id":null,"value":"Quo sequi beatae sit."},"selected_functionality_ids":[],"selected_functionalities":{"id":null,"value":"Quo sequi beatae sit."},"selected_catalog_entity_ids":[],"selected_catalog_entities":{"id":null,"value":"Quo sequi beatae sit."},"selected_user_ids":[],"selected_users":{"id":null,"value":"Quo sequi beatae sit."}}}},"schema":{"$ref":"#/components/schemas/incident_form_field_selection_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_form_field_selections/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_form_field_selections/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_permission_sets/{incident_permission_set_id}/booleans":{"parameters":[{"name":"incident_permission_set_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident_permission_set_boolean","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetBooleans"],"description":"Creates a new incident_permission_set_boolean from provided data","operationId":"createIncidentPermissionSetBoolean","parameters":[],"responses":{"201":{"description":"incident_permission_set_boolean created","content":{"application/vnd.api+json":{"example":{"data":{"id":"7fe8dead-67e9-49c4-b102-97e9b9fa1f20","type":"incident_permission_set_booleans","attributes":{"incident_permission_set_id":"948ae812-7637-4a6c-bfbf-2d1aaba4a472","kind":"update_summary","private":false,"enabled":false,"updated_at":"2025-01-07T14:47:09.004-08:00","created_at":"2025-01-07T14:47:09.004-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_boolean_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Kind can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_permission_set_boolean"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident_permission_set_booleans","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetBooleans"],"description":"List incident_permission_set_booleans","operationId":"listIncidentPermissionSetBooleans","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_permission_set_boolean_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/booleans?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_permission_set_booleans/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident_permission_set_boolean","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetBooleans"],"description":"Retrieves a specific incident_permission_set_boolean by id","operationId":"getIncidentPermissionSetBoolean","responses":{"200":{"description":"incident_permission_set_boolean found","content":{"application/vnd.api+json":{"example":{"data":{"id":"16244fb5-2f16-496e-92bb-e110f829a067","type":"incident_permission_set_booleans","attributes":{"incident_permission_set_id":"654a6992-53f2-48c4-b6ee-140f2685a250","kind":"update_summary","private":false,"enabled":false,"updated_at":"2025-01-07T14:47:11.212-08:00","created_at":"2025-01-07T14:47:11.212-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_boolean_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_set_booleans/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident_permission_set_boolean","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetBooleans"],"description":"Update a specific incident_permission_set_boolean by id","operationId":"updateIncidentPermissionSetBoolean","parameters":[],"responses":{"200":{"description":"incident_permission_set_boolean updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"8d2b926f-8a6e-4ecf-8e9d-e61ddde07edb","type":"incident_permission_set_booleans","attributes":{"incident_permission_set_id":"c138350b-fc90-4fc7-8b01-bbee2045419a","kind":"update_timeline","private":false,"enabled":false,"updated_at":"2025-01-07T14:47:13.543-08:00","created_at":"2025-01-07T14:47:13.377-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_boolean_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_permission_set_boolean"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_set_booleans/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident_permission_set_boolean","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetBooleans"],"description":"Delete a specific incident_permission_set_boolean by id","operationId":"deleteIncidentPermissionSetBoolean","responses":{"200":{"description":"incident_permission_set_boolean deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"986bd18b-9c71-4d8b-a796-506cbec3d45d","type":"incident_permission_set_booleans","attributes":{"incident_permission_set_id":"10dd2d41-5522-4405-b44e-ddd8c1d25fce","kind":"update_summary","private":false,"enabled":false,"updated_at":"2025-01-07T14:47:15.541-08:00","created_at":"2025-01-07T14:47:15.541-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_boolean_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_set_booleans/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_set_booleans/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_permission_sets/{incident_permission_set_id}/resources":{"parameters":[{"name":"incident_permission_set_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident_permission_set_resource","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetResources"],"description":"Creates a new incident_permission_set_resource from provided data","operationId":"createIncidentPermissionSetResource","parameters":[],"responses":{"201":{"description":"incident_permission_set_resource created","content":{"application/vnd.api+json":{"example":{"data":{"id":"84584d68-f668-4447-b85b-9563102980e0","type":"incident_permission_set_resources","attributes":{"incident_permission_set_id":"2ebe908d-602a-4014-9370-1a5342eddd15","kind":"incident_types","private":false,"resource_id":"313586d8-d211-4316-8489-f8c9d6e2cc15","resource_type":"IncidentType","updated_at":"2025-01-07T14:47:18.673-08:00","created_at":"2025-01-07T14:47:18.673-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_resource_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Resource must exist","status":"422"},{"title":"Kind can't be blank","status":"422"},{"title":"Kind is not included in the list","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_permission_set_resource"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident_permission_set_resources","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetResources"],"description":"List incident_permission_set_resources","operationId":"listIncidentPermissionSetResources","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_permission_set_resource_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bincident_permission_set_id%7D/resources?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_permission_set_resources/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident_permission_set_resource","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetResources"],"description":"Retrieves a specific incident_permission_set_resource by id","operationId":"getIncidentPermissionSetResource","responses":{"200":{"description":"incident_permission_set_resource found","content":{"application/vnd.api+json":{"example":{"data":{"id":"d5adb2b4-738b-491c-8a65-c4d665c603d0","type":"incident_permission_set_resources","attributes":{"incident_permission_set_id":"c8577436-0b0a-4c1e-805b-338d5e4651d9","kind":"incident_types","private":false,"resource_id":"ba91aad4-34e0-475a-8213-6d9e8c81a62b","resource_type":"IncidentType","updated_at":"2025-01-07T14:47:21.591-08:00","created_at":"2025-01-07T14:47:21.591-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_resource_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_set_resources/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident_permission_set_resource","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetResources"],"description":"Update a specific incident_permission_set_resource by id","operationId":"updateIncidentPermissionSetResource","parameters":[],"responses":{"200":{"description":"incident_permission_set_resource updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"3508fd50-f879-4344-bab5-3b95560377e3","type":"incident_permission_set_resources","attributes":{"incident_permission_set_id":"8a190f4e-e996-49cc-9b65-cc9ef57e34d7","kind":"statuses","private":false,"resource_id":"5981654c-9529-4cf4-b942-b68af5421cc7","resource_type":"IncidentType","updated_at":"2025-01-07T14:47:23.931-08:00","created_at":"2025-01-07T14:47:23.775-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_resource_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_permission_set_resource"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_set_resources/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident_permission_set_resource","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSetResources"],"description":"Delete a specific incident_permission_set_resource by id","operationId":"deleteIncidentPermissionSetResource","responses":{"200":{"description":"incident_permission_set_resource deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"85b48d45-4be2-448e-ab10-05d44de52848","type":"incident_permission_set_resources","attributes":{"incident_permission_set_id":"e297434f-4cde-4dce-8332-d8532faeee61","kind":"incident_types","private":false,"resource_id":"78cbf850-1983-467b-95b9-5ecf2b0da6b8","resource_type":"IncidentType","updated_at":"2025-01-07T14:47:25.949-08:00","created_at":"2025-01-07T14:47:25.949-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_resource_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_set_resources/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_set_resources/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_permission_sets":{"post":{"summary":"Creates a incident_permission_set","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSets"],"description":"Creates a new incident_permission_set from provided data","operationId":"createIncidentPermissionSet","parameters":[],"responses":{"201":{"description":"incident_permission_set created","content":{"application/vnd.api+json":{"example":{"data":{"id":"7e8d78fe-eb2f-4c13-b92b-704584c7e321","type":"incident_permission_sets","attributes":{"team_id":228,"name":"Infrastructure","slug":"infrastructure","description":null,"private_incident_permissions":["read"],"public_incident_permissions":["read"],"updated_at":"2025-01-07T14:47:29.939-08:00","created_at":"2025-01-07T14:47:29.939-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_permission_set"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incident_permission_sets \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident_permission_sets","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSets"],"description":"List incident_permission_sets","operationId":"listIncidentPermissionSets","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_permission_set_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_permission_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_permission_sets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident_permission_set","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSets"],"description":"Retrieves a specific incident_permission_set by id","operationId":"getIncidentPermissionSet","responses":{"200":{"description":"incident_permission_set found","content":{"application/vnd.api+json":{"example":{"data":{"id":"254c3b9c-6062-4f9b-bd47-5d43e29cecd5","type":"incident_permission_sets","attributes":{"team_id":231,"name":"Dolorem et exercitationem ex.","slug":"dolorem-et-exercitationem-ex","description":"Ex mollitia modi quia.","private_incident_permissions":["read"],"public_incident_permissions":["read"],"updated_at":"2025-01-07T14:47:31.737-08:00","created_at":"2025-01-07T14:47:31.737-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident_permission_set","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSets"],"description":"Update a specific incident_permission_set by id","operationId":"updateIncidentPermissionSet","parameters":[],"responses":{"200":{"description":"incident_permission_set updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"a61ce1eb-d81f-4cc8-ad5f-5ff2e999acd9","type":"incident_permission_sets","attributes":{"team_id":235,"name":"Security","slug":"quis-omnis-tempore-deleniti","description":"Delectus quo voluptas atque.","private_incident_permissions":["read"],"public_incident_permissions":["read"],"updated_at":"2025-01-07T14:47:34.597-08:00","created_at":"2025-01-07T14:47:34.056-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_permission_set"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident_permission_set","security":[{"bearer_auth":[]}],"tags":["IncidentPermissionSets"],"description":"Delete a specific incident_permission_set by id","operationId":"deleteIncidentPermissionSet","responses":{"200":{"description":"incident_permission_set deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"f5be6694-6170-41d3-a09c-d64c2c8ed336","type":"incident_permission_sets","attributes":{"team_id":239,"name":"Et non enim eaque.","slug":"et-non-enim-eaque","description":"Optio et et exercitationem.","private_incident_permissions":["read"],"public_incident_permissions":["read"],"updated_at":"2025-01-07T14:47:36.939-08:00","created_at":"2025-01-07T14:47:36.717-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_permission_set_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_permission_sets/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_permission_sets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/post_mortems":{"get":{"summary":"List incident retrospectives","security":[{"bearer_auth":[]}],"tags":["IncidentRetrospectives"],"description":"List incident retrospectives","operationId":"listIncidentPostMortems","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[severity]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[user_id]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[environments]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[functionalities]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[services]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[teams]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_post_mortem_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/post_mortems?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Btype%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortems?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Btype%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortems?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Btype%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortems?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Btype%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/post_mortems/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident retrospective","security":[{"bearer_auth":[]}],"tags":["IncidentRetrospectives"],"description":"List incidents retrospectives","operationId":"ListIncidentPostmortem","responses":{"200":{"description":"incident_post_mortem found","content":{"application/vnd.api+json":{"example":{"data":{"id":"e1b91510-1289-4c3a-9823-d2ede05de919","type":"incident_post_mortems","attributes":{"incident_id":"d91419b4-6d78-401a-8e60-fd3eaf676bfc","title":"Odio reiciendis deserunt placeat.","status":"draft","url":"https://test.rootly.com/account/post_mortems/odio-reiciendis-deserunt-placeat","short_url":null,"content":null,"published_at":null,"started_at":"2025-01-07T14:47:39.776-08:00","mitigated_at":null,"resolved_at":null,"cancelled_at":null,"show_timeline":true,"show_timeline_starred_only":false,"show_timeline_genius":true,"show_timeline_trail":true,"show_timeline_tasks":true,"show_timeline_action_items":true,"show_timeline_order":"desc","show_functionalities_impacted":true,"show_services_impacted":true,"show_groups_impacted":true,"show_action_items":true,"created_at":"2025-01-07T14:47:40.278-08:00","updated_at":"2025-01-07T14:47:40.284-08:00"},"relationships":{"incident_retrospective_steps":{"data":[{"id":"1d4a6094-9e34-4f89-a6a0-f491c1d35aff","type":"incident_retrospective_steps"}]}}}},"schema":{"$ref":"#/components/schemas/incident_post_mortem_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/post_mortems/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortems/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortems/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortems/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident retrospective","security":[{"bearer_auth":[]}],"tags":["IncidentRetrospectives"],"description":"Update a specific incident retrospective by id","operationId":"updateIncidentPostmortem","parameters":[],"responses":{"200":{"description":"incident_post_mortem updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"e1b91510-1289-4c3a-9823-d2ede05de919","type":"incident_post_mortems","attributes":{"incident_id":"d91419b4-6d78-401a-8e60-fd3eaf676bfc","title":"Retrospective updated","status":"draft","url":"https://test.rootly.com/account/post_mortems/odio-reiciendis-deserunt-placeat","short_url":null,"content":null,"published_at":null,"started_at":"2025-01-07T14:47:39.776-08:00","mitigated_at":null,"resolved_at":null,"cancelled_at":null,"show_timeline":false,"show_timeline_starred_only":false,"show_timeline_genius":true,"show_timeline_trail":true,"show_timeline_tasks":true,"show_timeline_action_items":true,"show_timeline_order":"desc","show_functionalities_impacted":true,"show_services_impacted":true,"show_groups_impacted":true,"show_action_items":true,"created_at":"2025-01-07T14:47:40.278-08:00","updated_at":"2025-01-07T14:47:45.985-08:00"},"relationships":{"incident_retrospective_steps":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_post_mortem_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_post_mortem"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/post_mortems/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortems/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortems/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortems/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_retrospective_steps/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident retrospective step","security":[{"bearer_auth":[]}],"tags":["IncidentRetrospectiveSteps"],"description":"Retrieves a specific incident retrospective step by id","operationId":"getIncidentRetrospectiveStep","responses":{"200":{"description":"incident retrospective_step found","content":{"application/vnd.api+json":{"example":{"data":{"id":"b0f4e451-ca18-4c25-9640-9c150bdc9f65","type":"incident_retrospective_steps","attributes":{"retrospective_step_id":"e39bbb4f-3ecb-4651-8cba-978c15d42bc8","incident_id":"4f20985d-9d3b-4c59-ac05-b9cab7d31db7","title":"Step 4","description":null,"due_date":null,"user_id":null,"kind":"custom","position":1,"skippable":false,"status":"todo","status_changed_at":null,"status_changed_by_id":null,"created_at":"2025-01-07T14:47:47.702-08:00","updated_at":"2025-01-07T14:47:47.702-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_retrospective_step_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_retrospective_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_retrospective_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_retrospective_steps/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_retrospective_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident retrospective step","security":[{"bearer_auth":[]}],"tags":["IncidentRetrospectiveSteps"],"description":"Update a specific incident retrospective step by id","operationId":"updateIncidentRetrospectiveStep","parameters":[],"responses":{"200":{"description":"incident_retrospective_step updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"b0f4e451-ca18-4c25-9640-9c150bdc9f65","type":"incident_retrospective_steps","attributes":{"retrospective_step_id":"e39bbb4f-3ecb-4651-8cba-978c15d42bc8","incident_id":"4f20985d-9d3b-4c59-ac05-b9cab7d31db7","title":"Step 2","description":"Step 2 description","due_date":"2024-12-05T08:10:58.323-08:00","user_id":null,"kind":"custom","position":2,"skippable":true,"status":"todo","status_changed_at":null,"status_changed_by_id":null,"created_at":"2025-01-07T14:47:47.702-08:00","updated_at":"2025-01-07T14:47:48.389-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_retrospective_step_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_retrospective_step"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_retrospective_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_retrospective_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_retrospective_steps/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_retrospective_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_roles/{incident_role_id}/incident_role_tasks":{"parameters":[{"name":"incident_role_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident role task","security":[{"bearer_auth":[]}],"tags":["IncidentRoleTasks"],"description":"Creates a new task from provided data","operationId":"createIncidentRoleTask","parameters":[],"responses":{"201":{"description":"incident_role_task created","content":{"application/vnd.api+json":{"example":{"data":{"id":"20ae750b-74dd-4cdf-945e-135f1e1bff9a","type":"incident_role_tasks","attributes":{"incident_role_id":"22b75e57-78ab-4705-8b6e-d9f09a10eee0","task":"New task","description":"New task description","priority":"high","created_at":"2025-01-07T14:47:49.758-08:00","updated_at":"2025-01-07T14:47:49.758-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_task_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Task can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_role_task"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident role tasks","security":[{"bearer_auth":[]}],"tags":["IncidentRoleTasks"],"description":"List incident_role tasks","operationId":"listIncidentRoleTasks","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_role_task_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles/%7Bincident_role_id%7D/incident_role_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_role_tasks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident role task","security":[{"bearer_auth":[]}],"tags":["IncidentRoleTasks"],"description":"Retrieves a specific incident_role_task by id","operationId":"getIncidentRoleTask","responses":{"200":{"description":"incident_role_task found","content":{"application/vnd.api+json":{"example":{"data":{"id":"2de98ef5-654f-451d-abea-db6241b5b33a","type":"incident_role_tasks","attributes":{"incident_role_id":"22b75e57-78ab-4705-8b6e-d9f09a10eee0","task":"Neque laudantium porro sint.","description":"Aspernatur qui omnis et.","priority":"medium","created_at":"2025-01-07T14:47:49.584-08:00","updated_at":"2025-01-07T14:47:49.595-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_role_tasks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident role task","security":[{"bearer_auth":[]}],"tags":["IncidentRoleTasks"],"description":"Update a specific incident_role task by id","operationId":"updateIncidentRoleTask","parameters":[],"responses":{"200":{"description":"incident_role_task updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"2de98ef5-654f-451d-abea-db6241b5b33a","type":"incident_role_tasks","attributes":{"incident_role_id":"22b75e57-78ab-4705-8b6e-d9f09a10eee0","task":"Task updated","description":"Task description updated","priority":"medium","created_at":"2025-01-07T14:47:49.584-08:00","updated_at":"2025-01-07T14:47:50.885-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_role_task"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_role_tasks/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident role task","security":[{"bearer_auth":[]}],"tags":["IncidentRoleTasks"],"description":"Delete a specific incident_role task by id","operationId":"deleteIncidentRoleTask","responses":{"200":{"description":"incident_role_task deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"2de98ef5-654f-451d-abea-db6241b5b33a","type":"incident_role_tasks","attributes":{"incident_role_id":"22b75e57-78ab-4705-8b6e-d9f09a10eee0","task":"Neque laudantium porro sint.","description":"Aspernatur qui omnis et.","priority":"medium","created_at":"2025-01-07T14:47:49.584-08:00","updated_at":"2025-01-07T14:47:51.455-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_role_tasks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_role_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_roles":{"post":{"summary":"Creates a incident role","security":[{"bearer_auth":[]}],"tags":["IncidentRoles"],"description":"Creates a new incident role from provided data","operationId":"createIncidentRole","parameters":[],"responses":{"201":{"description":"incident_role created","content":{"application/vnd.api+json":{"example":{"data":{"id":"8715deed-f3c8-48b2-9a7e-726636715ad3","type":"incident_roles","attributes":{"slug":"my-incident-role","name":"My Incident Role","summary":"My Incident Role summary","description":"My Incident Role description","position":1,"optional":false,"enabled":true,"allow_multi_user_assignment":true,"created_at":"2025-01-07T14:47:55.325-08:00","updated_at":"2025-01-07T14:47:55.325-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_role"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incident_roles \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident roles","security":[{"bearer_auth":[]}],"tags":["IncidentRoles"],"description":"List incident roles","operationId":"listIncidentRoles","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[enabled]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_role_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Benabled%5D=SOME_BOOLEAN_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_roles/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident role","security":[{"bearer_auth":[]}],"tags":["IncidentRoles"],"description":"Retrieves a specific incident_role by id","operationId":"getIncidentRole","responses":{"200":{"description":"incident_role found","content":{"application/vnd.api+json":{"example":{"data":{"id":"cb7cc137-d2c3-41e5-b68a-ec245a9917b1","type":"incident_roles","attributes":{"slug":"sint-necessitatibus-velit-occaecati","name":"Sint necessitatibus velit occaecati.","summary":null,"description":null,"position":1,"optional":false,"enabled":true,"allow_multi_user_assignment":false,"created_at":"2025-01-07T14:47:52.662-08:00","updated_at":"2025-01-07T14:47:52.662-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident role","security":[{"bearer_auth":[]}],"tags":["IncidentRoles"],"description":"Update a specific incident_role by id","operationId":"updateIncidentRole","parameters":[],"responses":{"200":{"description":"incident_role updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"cb7cc137-d2c3-41e5-b68a-ec245a9917b1","type":"incident_roles","attributes":{"slug":"my-incident-role-updated","name":"My Incident Role Updated","summary":"My Incident Role Summary Updated","description":"My Incident Role Description Updated","position":2,"optional":true,"enabled":true,"allow_multi_user_assignment":false,"created_at":"2025-01-07T14:47:52.662-08:00","updated_at":"2025-01-07T14:47:56.516-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_role"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident role","security":[{"bearer_auth":[]}],"tags":["IncidentRoles"],"description":"Delete a specific incident_role by id","operationId":"deleteIncidentRole","responses":{"200":{"description":"incident_role deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"cb7cc137-d2c3-41e5-b68a-ec245a9917b1","type":"incident_roles","attributes":{"slug":"sint-necessitatibus-velit-occaecati","name":"Sint necessitatibus velit occaecati.","summary":null,"description":null,"position":1,"optional":false,"enabled":true,"allow_multi_user_assignment":false,"created_at":"2025-01-07T14:47:52.662-08:00","updated_at":"2025-01-07T14:47:57.064-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_roles/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/status-page-events":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a incident status page event","security":[{"bearer_auth":[]}],"tags":["IncidentStatusPageEvents"],"description":"Creates a new event from provided data","operationId":"createIncidentStatusPage","parameters":[],"responses":{"201":{"description":"incident_status_page_event created","content":{"application/vnd.api+json":{"example":{"data":{"id":"1911f38d-9b78-4487-ab90-8488d5406621","type":"incident_status_page_events","attributes":{"incident_id":"e68e0618-f923-4ad3-995c-0848ad742a3c","status_page_id":"86b534b7-029b-4e96-9366-fa00485a8a45","status":"investigating","notify_subscribers":true,"should_tweet":false,"started_at":"2025-01-07T14:47:59.117-08:00","created_at":"2025-01-07T14:47:59.117-08:00","updated_at":"2025-01-07T14:47:59.117-08:00","event":"New Event"}}},"schema":{"$ref":"#/components/schemas/incident_status_page_event_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Status page must exist","status":"422"},{"title":"Event can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_status_page_event"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/status-page-events \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/status-page-events\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/status-page-events\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/status-page-events\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident status page events","security":[{"bearer_auth":[]}],"tags":["IncidentStatusPageEvents"],"description":"List incident status page events","operationId":"listIncidentStatusPages","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_status_page_event_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/status-page-events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/status-page-events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/status-page-events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/status-page-events?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/status-page-events/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident status page event","security":[{"bearer_auth":[]}],"tags":["IncidentStatusPageEvents"],"description":"Retrieves a specific incident_status_page_event by id","operationId":"getIncidentStatusPages","responses":{"200":{"description":"incident_status_page_event found","content":{"application/vnd.api+json":{"example":{"data":{"id":"d8c2bb2e-939b-4f24-8f85-5f38b1ceb764","type":"incident_status_page_events","attributes":{"incident_id":"e68e0618-f923-4ad3-995c-0848ad742a3c","status_page_id":"86b534b7-029b-4e96-9366-fa00485a8a45","status":"investigating","notify_subscribers":false,"should_tweet":false,"started_at":"2025-01-07T14:47:58.707-08:00","created_at":"2025-01-07T14:47:58.707-08:00","updated_at":"2025-01-07T14:47:58.707-08:00","event":"Doloremque quis quam veniam."}}},"schema":{"$ref":"#/components/schemas/incident_status_page_event_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/status-page-events/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-page-events/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-page-events/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-page-events/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident status page event","security":[{"bearer_auth":[]}],"tags":["IncidentStatusPageEvents"],"description":"Update a specific incident status page event by id","operationId":"updateIncidentStatusPage","parameters":[],"responses":{"200":{"description":"incident_status_page_event updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d8c2bb2e-939b-4f24-8f85-5f38b1ceb764","type":"incident_status_page_events","attributes":{"incident_id":"e68e0618-f923-4ad3-995c-0848ad742a3c","status_page_id":"76ad0c12-0151-469b-91f7-fffa62ec41a1","status":"investigating","notify_subscribers":false,"should_tweet":false,"started_at":"2025-01-07T14:47:58.707-08:00","created_at":"2025-01-07T14:47:58.707-08:00","updated_at":"2025-01-07T14:48:00.648-08:00","event":"Event updated"}}},"schema":{"$ref":"#/components/schemas/incident_status_page_event_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_status_page_event"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/status-page-events/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-page-events/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-page-events/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-page-events/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident status page event","security":[{"bearer_auth":[]}],"tags":["IncidentStatusPageEvents"],"description":"Delete a specific incident status page event by id","operationId":"deleteIncidentStatusPage","responses":{"200":{"description":"incident_status_page_event deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"d8c2bb2e-939b-4f24-8f85-5f38b1ceb764","type":"incident_status_page_events","attributes":{"incident_id":"e68e0618-f923-4ad3-995c-0848ad742a3c","status_page_id":"86b534b7-029b-4e96-9366-fa00485a8a45","status":"investigating","notify_subscribers":false,"should_tweet":false,"started_at":"2025-01-07T14:47:58.707-08:00","created_at":"2025-01-07T14:47:58.707-08:00","updated_at":"2025-01-07T14:48:01.301-08:00","event":"Doloremque quis quam veniam."}}},"schema":{"$ref":"#/components/schemas/incident_status_page_event_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/status-page-events/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-page-events/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-page-events/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-page-events/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{incident_id}/sub_statuses":{"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a sub-status assignment","security":[{"bearer_auth":[]}],"tags":["IncidentSubStatuses"],"description":"Creates a new sub-status assignment from provided data","operationId":"createIncidentSubStatus","parameters":[],"responses":{"201":{"description":"incident_sub_status created","content":{"application/vnd.api+json":{"example":{"data":{"id":"41808b1a-cdb9-4f49-a36c-16188fa7e02f","type":"incident_sub_statuses","attributes":{"sub_status_id":"ae366c7d-e915-4041-b48d-206ded14cd17","incident_id":"7565b182-2bf3-4477-a175-5752baab43f9","assigned_at":"2025-01-07T14:48:02.000-08:00","assigned_by_user_id":null},"relationships":{"sub_status":{"data":{"id":"ae366c7d-e915-4041-b48d-206ded14cd17","type":"sub_statuses"}},"assigned_by_user":{"data":null}}}},"schema":{"$ref":"#/components/schemas/incident_sub_status_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_sub_status"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bincident_id%7D/sub_statuses \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/sub_statuses\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/sub_statuses\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/sub_statuses\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident_sub_statuses","security":[{"bearer_auth":[]}],"tags":["IncidentSubStatuses"],"description":"List incident_sub_statuses","operationId":"listIncidentSubStatuses","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: sub_status,assigned_by_user","schema":{"type":"string","enum":["sub_status","assigned_by_user"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","assigned_at","-assigned_at"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[sub_status_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[assigned_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[assigned_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[assigned_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[assigned_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_sub_status_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bincident_id%7D/sub_statuses?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/sub_statuses?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bincident_id%7D/sub_statuses?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bincident_id%7D/sub_statuses?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bassigned_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_sub_statuses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves incident_sub_status","security":[{"bearer_auth":[]}],"tags":["IncidentSubStatuses"],"description":"Retrieves a specific incident_sub_status by id","operationId":"getIncidentSubStatus","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: sub_status,assigned_by_user","schema":{"type":"string","enum":["sub_status","assigned_by_user"]},"required":false}],"responses":{"200":{"description":"sub_status found","content":{"application/vnd.api+json":{"example":{"data":{"id":"c686a0a1-8626-4145-a89c-928a792f1594","type":"incident_sub_statuses","attributes":{"sub_status_id":"8c650b9c-f819-4524-a38e-6b319ec9ea24","incident_id":"7565b182-2bf3-4477-a175-5752baab43f9","assigned_at":"2025-01-07T14:48:02.778-08:00","assigned_by_user_id":298},"relationships":{"sub_status":{"data":{"id":"8c650b9c-f819-4524-a38e-6b319ec9ea24","type":"sub_statuses"}},"assigned_by_user":{"data":{"id":"298","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/incident_sub_status_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_sub_statuses/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update incident_sub_status","security":[{"bearer_auth":[]}],"tags":["IncidentSubStatuses"],"description":"Update a specific incident_sub_status by id","operationId":"updateIncidentSubStatus","parameters":[],"responses":{"200":{"description":"incident_sub_status updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"c686a0a1-8626-4145-a89c-928a792f1594","type":"incident_sub_statuses","attributes":{"sub_status_id":"8c650b9c-f819-4524-a38e-6b319ec9ea24","incident_id":"7565b182-2bf3-4477-a175-5752baab43f9","assigned_at":"2025-01-07T14:48:04.000-08:00","assigned_by_user_id":298},"relationships":{"sub_status":{"data":{"id":"8c650b9c-f819-4524-a38e-6b319ec9ea24","type":"sub_statuses"}},"assigned_by_user":{"data":{"id":"298","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/incident_sub_status_response"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_sub_status"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_sub_statuses/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident_sub_status","security":[{"bearer_auth":[]}],"tags":["IncidentSubStatuses"],"description":"Delete a specific incident_sub_status by id","operationId":"deleteIncidentSubStatus","responses":{"200":{"description":"incident_sub_status deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"c686a0a1-8626-4145-a89c-928a792f1594","type":"incident_sub_statuses","attributes":{"sub_status_id":"8c650b9c-f819-4524-a38e-6b319ec9ea24","incident_id":"7565b182-2bf3-4477-a175-5752baab43f9","assigned_at":"2025-01-07T14:48:02.778-08:00","assigned_by_user_id":298},"relationships":{"sub_status":{"data":{"id":"8c650b9c-f819-4524-a38e-6b319ec9ea24","type":"sub_statuses"}},"assigned_by_user":{"data":{"id":"298","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/incident_sub_status_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_sub_statuses/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_sub_statuses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_types":{"post":{"summary":"Creates a incident type","security":[{"bearer_auth":[]}],"tags":["IncidentTypes"],"description":"Creates a new incident_type from provided data","operationId":"createIncidentType","parameters":[],"responses":{"201":{"description":"incident_type created","content":{"application/vnd.api+json":{"example":{"data":{"id":"63983947-5b03-4564-9b8e-f4a710ff12fc","type":"incident_types","attributes":{"slug":"bug","name":"Bug","description":"Bug caused by a human","color":"#FFF","position":1,"notify_emails":["hello@rootly.com","world@rootly.com"],"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"leadership"}],"created_at":"2025-01-07T14:48:08.630-08:00","updated_at":"2025-01-07T14:48:08.630-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_type_response"}}}},"401":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident_type"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incident_types \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_types\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_types\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_types\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incident types","security":[{"bearer_auth":[]}],"tags":["IncidentTypes"],"description":"List incident types","operationId":"listIncident Types","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[color]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_type_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incident_types?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_types?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_types?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_types?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incident_types/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident type","security":[{"bearer_auth":[]}],"tags":["IncidentTypes"],"description":"Retrieves a specific incident_type by id","operationId":"getIncidentType","responses":{"200":{"description":"incident_type found","content":{"application/vnd.api+json":{"example":{"data":{"id":"760d1408-911b-4743-b767-5602b31b1f7d","type":"incident_types","attributes":{"slug":"ut-eos-autem-eligendi","name":"Ut eos autem eligendi.","description":"Voluptatibus et a assumenda.","color":"#D7F5E1","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:06.607-08:00","updated_at":"2025-01-07T14:48:06.607-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_type_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/incident_types/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_types/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_types/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_types/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident type","security":[{"bearer_auth":[]}],"tags":["IncidentTypes"],"description":"Update a specific incident_type by id","operationId":"updateIncidentType","parameters":[],"responses":{"200":{"description":"incident_type updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"760d1408-911b-4743-b767-5602b31b1f7d","type":"incident_types","attributes":{"slug":"p1","name":"P1","description":"Medium Priority","color":"#000","position":2,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:06.607-08:00","updated_at":"2025-01-07T14:48:09.810-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_type_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident_type"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incident_types/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_types/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_types/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_types/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident type","security":[{"bearer_auth":[]}],"tags":["IncidentTypes"],"description":"Delete a specific incident_type by id","operationId":"deleteIncidentType","responses":{"200":{"description":"incident_type deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"760d1408-911b-4743-b767-5602b31b1f7d","type":"incident_types","attributes":{"slug":"ut-eos-autem-eligendi","name":"Ut eos autem eligendi.","description":"Voluptatibus et a assumenda.","color":"#D7F5E1","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:06.607-08:00","updated_at":"2025-01-07T14:48:10.338-08:00"}}},"schema":{"$ref":"#/components/schemas/incident_type_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incident_types/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incident_types/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incident_types/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incident_types/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents":{"post":{"summary":"Creates a incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Creates a new incident from provided data","operationId":"createIncident","parameters":[],"responses":{"201":{"description":"incident created","content":{"application/vnd.api+json":{"example":{"data":{"id":"163d6ff2-ada2-4c0f-8c02-1eefd99d55b4","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":4,"title":"Oh no! Something is broken","slug":"oh-no-something-is-broken","kind":"normal","private":false,"summary":"this is the description and there are new lines\n\nthis is the next line\n\nthis is the 3rd line","status":"started","source":"api","url":"http://localhost:3001/account/incidents/4-oh-no-something-is-broken","short_url":null,"user":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:18.602-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"24b8f516-5572-411a-9942-7b89abc96989","type":"severities","attributes":{"name":"kvli3","slug":"kvli3","description":"Ut beatae omnis labore.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:13.420-08:00","updated_at":"2025-01-07T14:48:13.420-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:18.602-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:18.771-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:18.864-08:00","updated_at":"2025-01-07T14:48:18.919-08:00","labels":{"platform":"windows","version":"1.12","CaseSensitive":"preserve"}},"relationships":{"causes":{"data":[{"id":"a4023e2d-7c57-41ab-a37d-10768178c695","type":"causes"},{"id":"f450ff6e-3e8a-485e-b1c8-af66babb5103","type":"causes"}]},"subscribers":{"data":[]},"roles":{"data":[{"id":"32cf8421-de8f-4a51-842b-83c93f5fa9b2","type":"incident_role_assignments"}]},"environments":{"data":[{"id":"fdb9033e-3ed9-4412-bb22-e46c8213b18b","type":"environments"},{"id":"6e9f1cdc-0de6-420e-8023-07d701139281","type":"environments"}]},"incident_types":{"data":[{"id":"f1073722-6a86-4bbb-b0df-d1f23c78de2b","type":"incident_types"},{"id":"51411198-a830-4d71-a37b-57adf7c6ac99","type":"incident_types"}]},"services":{"data":[{"id":"88c1efa2-6a14-403d-a322-04b6bb191f02","type":"services"},{"id":"102f3616-c071-4be5-89e2-10ca36c03ed9","type":"services"}]},"functionalities":{"data":[{"id":"c0018e20-7ff1-4bce-9172-cc9376ee6122","type":"functionalities"},{"id":"e8abf714-e3ef-4653-8f84-63baceaea996","type":"functionalities"}]},"groups":{"data":[{"id":"63994c31-0759-4358-a415-5723a5b58f36","type":"groups"},{"id":"43eebc64-dfab-4c76-9d05-cf505f17130b","type":"groups"}]},"events":{"data":[{"id":"80caf3be-f681-4a6f-b59c-798a5f8ab554","type":"incident_events"},{"id":"6908d570-e177-4d28-937c-74f8c3cc6cd2","type":"incident_events"},{"id":"251c3988-c7bf-4b84-a9b2-06bc040eece8","type":"incident_events"},{"id":"10681e4a-130a-4cc8-9c02-1b235062aa36","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid causes association","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Detected at can not be before Started time","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List incidents","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"List incidents","operationId":"listIncidents","parameters":[{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[private]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[user_id]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[severity]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[severity_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[labels]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[types]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[type_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[environments]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[environment_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[functionalities]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[functionality_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[services]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[service_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[teams]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[team_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[cause]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[cause_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[custom_field_selected_option_ids]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[updated_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[updated_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[updated_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[updated_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[detected_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[detected_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[detected_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[detected_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[acknowledged_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[acknowledged_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[acknowledged_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[acknowledged_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[mitigated_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[resolved_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[in_triage_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[in_triage_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[in_triage_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[in_triage_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]},"required":false},{"name":"include","in":"query","description":"comma separated if needed. eg: sub_statuses,causes,subscribers","schema":{"type":"string","enum":["sub_statuses","causes","subscribers","incident_role_assignments","incident_slack_messages","environments","incident_types","services","functionalities","groups","events","action_items","form_field_selections","feedbacks","incident_post_mortem"]},"required":false}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/incident_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bprivate%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bseverity_id%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Btypes%5D=SOME_STRING_VALUE&filter%5Btype_ids%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Benvironment_ids%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bfunctionality_ids%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bservice_ids%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bteam_ids%5D=SOME_STRING_VALUE&filter%5Bcause%5D=SOME_STRING_VALUE&filter%5Bcause_ids%5D=SOME_STRING_VALUE&filter%5Bcustom_field_selected_option_ids%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bprivate%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bseverity_id%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Btypes%5D=SOME_STRING_VALUE&filter%5Btype_ids%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Benvironment_ids%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bfunctionality_ids%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bservice_ids%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bteam_ids%5D=SOME_STRING_VALUE&filter%5Bcause%5D=SOME_STRING_VALUE&filter%5Bcause_ids%5D=SOME_STRING_VALUE&filter%5Bcustom_field_selected_option_ids%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bprivate%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bseverity_id%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Btypes%5D=SOME_STRING_VALUE&filter%5Btype_ids%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Benvironment_ids%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bfunctionality_ids%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bservice_ids%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bteam_ids%5D=SOME_STRING_VALUE&filter%5Bcause%5D=SOME_STRING_VALUE&filter%5Bcause_ids%5D=SOME_STRING_VALUE&filter%5Bcustom_field_selected_option_ids%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5Bprivate%5D=SOME_STRING_VALUE&filter%5Buser_id%5D=SOME_INTEGER_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bseverity_id%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Btypes%5D=SOME_STRING_VALUE&filter%5Btype_ids%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Benvironment_ids%5D=SOME_STRING_VALUE&filter%5Bfunctionalities%5D=SOME_STRING_VALUE&filter%5Bfunctionality_ids%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Bservice_ids%5D=SOME_STRING_VALUE&filter%5Bteams%5D=SOME_STRING_VALUE&filter%5Bteam_ids%5D=SOME_STRING_VALUE&filter%5Bcause%5D=SOME_STRING_VALUE&filter%5Bcause_ids%5D=SOME_STRING_VALUE&filter%5Bcustom_field_selected_option_ids%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bupdated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bdetected_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Backnowledged_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bmitigated_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bresolved_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bin_triage_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Retrieves a specific incident by id","operationId":"getIncident","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: sub_statuses,causes,subscribers","schema":{"type":"string","enum":["sub_statuses","causes","subscribers","incident_role_assignments","incident_slack_messages","environments","incident_types","services","functionalities","groups","events","action_items","form_field_selections","feedbacks","incident_post_mortem"]},"required":false}],"responses":{"200":{"description":"incident found","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:11.859-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/incidents/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Update a specific incident by id","operationId":"updateIncident","parameters":[],"responses":{"200":{"description":"incident updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Oh no! Something is broken again","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":true,"summary":"What could it be again?","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:22.829-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"b3d69057-e955-4827-b793-674cdb2eddd1","type":"incident_events"},{"id":"53dab111-6de9-49b4-bd97-8c341b08d282","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Delete a specific incident by id","operationId":"deleteIncident","responses":{"200":{"description":"incident deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:23.918-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/mitigate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Mitigate an incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Mitigate a specific incident by id","operationId":"mitigateIncident","parameters":[],"responses":{"200":{"description":"incident mitigated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"mitigated","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:25.167-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":"Restart database fixed it!","resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":"2025-01-07T14:48:25.351-08:00","resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:25.362-08:00","labels":{}},"relationships":{"incident_post_mortem":{"data":{"id":"29cdf83a-54b5-4dee-bf0c-044b23491002","type":"incident_post_mortems"}},"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"dc32274c-d2f2-45ae-ba26-4f9c720920d4","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/mitigate_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/mitigate \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/mitigate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/mitigate\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/mitigate\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/resolve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Resolve an incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Resolve a specific incident by id","operationId":"resolveIncident","parameters":[],"responses":{"200":{"description":"incident resolved","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"resolved","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:26.187-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":"Restart database fixed it!","cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":"2025-01-07T14:48:26.356-08:00","resolved_at":"2025-01-07T14:48:26.356-08:00","closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:26.372-08:00","labels":{}},"relationships":{"incident_post_mortem":{"data":{"id":"29cdf83a-54b5-4dee-bf0c-044b23491002","type":"incident_post_mortems"}},"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"b1288dbe-34bc-45f0-a9f2-4aef76e2e86a","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/resolve_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/resolve \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/resolve\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/resolve\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/resolve\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Cancel an incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Cancel a specific incident by id","operationId":"cancelIncident","parameters":[],"responses":{"200":{"description":"incident cancel","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"cancelled","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:27.247-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigation_message":null,"resolution_message":null,"cancellation_message":"Nevermind!","public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":"2025-01-07T14:48:27.422-08:00","created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:27.432-08:00","labels":{}},"relationships":{"incident_post_mortem":{"data":{"id":"29cdf83a-54b5-4dee-bf0c-044b23491002","type":"incident_post_mortems"}},"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"49df54bc-721b-448d-9e71-58665078478f","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/cancel_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/cancel \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/cancel\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/cancel\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/cancel\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/in_triage":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Triage an incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Set a specific incident by ID to triage state","operationId":"triageIncident","parameters":[],"responses":{"200":{"description":"incident set to triage","content":{"application/vnd.api+json":{"example":{"data":{"id":"9c23c15e-8cfe-4e07-9738-6edda4b507eb","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":3,"title":"Voluptas ut aut voluptas.","slug":"voluptas-ut-aut-voluptas","kind":"normal","private":false,"summary":"Nobis numquam distinctio. Dicta ab molestiae. In deleniti quae.","status":"in_triage","source":"web","url":"http://localhost:3001/account/incidents/3-voluptas-ut-aut-voluptas","short_url":null,"user":{"data":{"id":"309","type":"users","attributes":{"name":"Ernesto Lebsack","email":"gussie@waelchi.example","phone":null,"phone_2":null,"full_name":"Ernesto Lebsack","full_name_with_team":"[Brown, Hackett and Lueilwitz] Ernesto Lebsack","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:13.231-08:00","created_at":"2025-01-07T14:48:12.811-08:00"},"relationships":{"email_addresses":{"data":[{"id":"7fdbb88a-4512-43cf-a38e-3679058ce9d0","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"2adf6bf0-0ca5-495a-945d-ed98bd3f86ca","type":"severities","attributes":{"name":"3hecl","slug":"3hecl","description":"Veniam quos ut mollitia.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:13.194-08:00","updated_at":"2025-01-07T14:48:13.194-08:00"}}},"in_triage_by":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:28.259-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"started_by":{"data":{"id":"309","type":"users","attributes":{"name":"Ernesto Lebsack","email":"gussie@waelchi.example","phone":null,"phone_2":null,"full_name":"Ernesto Lebsack","full_name_with_team":"[Brown, Hackett and Lueilwitz] Ernesto Lebsack","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:13.231-08:00","created_at":"2025-01-07T14:48:12.811-08:00"},"relationships":{"email_addresses":{"data":[{"id":"7fdbb88a-4512-43cf-a38e-3679058ce9d0","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":"2025-01-07T14:48:28.446-08:00","started_at":null,"detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:13.202-08:00","updated_at":"2025-01-07T14:48:28.458-08:00","labels":{}},"relationships":{"incident_post_mortem":{"data":{"id":"7c1595f6-ef95-4c19-b457-484a6d3612e3","type":"incident_post_mortems"}},"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"528807a0-da7d-4c62-8ee2-0cbee0cd2754","type":"incident_events"},{"id":"5e676a0a-0d41-4113-9cc1-0d2eab0b8da2","type":"incident_events"},{"id":"9afd66cb-d447-4d75-8f37-fedd0d3bb8f0","type":"incident_events"},{"id":"fcf3aaa4-1927-49a5-89fb-235f45f316d0","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/in_triage_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/in_triage \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/in_triage\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/in_triage\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/in_triage\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/restart":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Restart an incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Restart a specific incident by id","operationId":"restartIncident","parameters":[],"responses":{"200":{"description":"incident restarted","content":{"application/vnd.api+json":{"example":{"data":{"id":"9c23c15e-8cfe-4e07-9738-6edda4b507eb","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":3,"title":"Voluptas ut aut voluptas.","slug":"voluptas-ut-aut-voluptas","kind":"normal","private":false,"summary":"Nobis numquam distinctio. Dicta ab molestiae. In deleniti quae.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/3-voluptas-ut-aut-voluptas","short_url":null,"user":{"data":{"id":"309","type":"users","attributes":{"name":"Ernesto Lebsack","email":"gussie@waelchi.example","phone":null,"phone_2":null,"full_name":"Ernesto Lebsack","full_name_with_team":"[Brown, Hackett and Lueilwitz] Ernesto Lebsack","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:13.231-08:00","created_at":"2025-01-07T14:48:12.811-08:00"},"relationships":{"email_addresses":{"data":[{"id":"7fdbb88a-4512-43cf-a38e-3679058ce9d0","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"2adf6bf0-0ca5-495a-945d-ed98bd3f86ca","type":"severities","attributes":{"name":"3hecl","slug":"3hecl","description":"Veniam quos ut mollitia.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:13.194-08:00","updated_at":"2025-01-07T14:48:13.194-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:29.313-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:29.499-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:13.202-08:00","updated_at":"2025-01-07T14:48:29.512-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"2624e9b1-df7f-4934-84ac-4bd1a56ca67e","type":"incident_events"},{"id":"5e676a0a-0d41-4113-9cc1-0d2eab0b8da2","type":"incident_events"},{"id":"9afd66cb-d447-4d75-8f37-fedd0d3bb8f0","type":"incident_events"},{"id":"fcf3aaa4-1927-49a5-89fb-235f45f316d0","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/restart_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/restart \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/restart\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/restart\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/restart\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/duplicate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Mark an incident as a duplicate","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Mark an incident as a duplicate","operationId":"markAsDuplicateIncident","parameters":[],"responses":{"200":{"description":"incident marked as duplicated","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"cancelled","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":"Duplicate !","public_title":null,"duplicate_incident_id":"1374b8ad-7cf9-4b78-ad84-638042d6642b","retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":"2025-01-07T14:48:30.593-08:00","created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:30.599-08:00","labels":{}},"relationships":{"incident_post_mortem":{"data":{"id":"29cdf83a-54b5-4dee-bf0c-044b23491002","type":"incident_post_mortems"}},"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"157a7523-fa4a-45e7-b900-72384942a7c6","type":"incident_events"},{"id":"8acad6de-7ccf-406c-b385-f1a380dabcb3","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/resolve_incident"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/duplicate \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/duplicate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/duplicate\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/duplicate\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/add_subscribers":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Add subscribers to incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Add subscribers to incident","operationId":"addSubscribersToIncident","parameters":[],"responses":{"200":{"description":"add subscribers to incident","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:11.859-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[{"id":"9eb2c4b4-1175-44b2-a028-c01867708735","type":"incident_subscribers"}]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/add_subscribers"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/add_subscribers \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/add_subscribers\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/add_subscribers\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/add_subscribers\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/remove_subscribers":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Remove subscribers from incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Remove subscribers to incident","operationId":"removeSubscribersToIncident","parameters":[],"responses":{"200":{"description":"remove subscribers from incident","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:11.859-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/remove_subscribers"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/remove_subscribers \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/remove_subscribers\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/remove_subscribers\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/remove_subscribers\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/assign_role_to_user":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Assign user to incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Assign user to incident","operationId":"assignUserToIncident","parameters":[],"responses":{"200":{"description":"assign user to incident","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:34.118-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[{"id":"02e0b822-f21f-4358-a1a5-27c67c892f46","type":"incident_subscribers"}]},"roles":{"data":[{"id":"0c6cec23-53ea-4462-a3c0-ad140228cd8a","type":"incident_role_assignments"}]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"839b4134-2c55-4dc0-8636-3529bea26295","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}},"included":[{"id":"0c6cec23-53ea-4462-a3c0-ad140228cd8a","type":"incident_role_assignments","attributes":{"incident_role":{"data":{"id":"08d50e66-8ee8-400b-b28a-a34e7c17256d","type":"incident_roles","attributes":{"slug":"ad-aut-consequatur-natus","name":"Ad aut consequatur natus.","summary":null,"description":null,"position":1,"optional":false,"enabled":true,"allow_multi_user_assignment":false,"created_at":"2025-01-07T14:48:13.562-08:00","updated_at":"2025-01-07T14:48:13.562-08:00"}}},"user":{"data":{"id":"304","type":"users","attributes":{"name":"Gidget Fadel","email":"franklyn@huels.example","phone":null,"phone_2":null,"full_name":"Gidget Fadel","full_name_with_team":"[Brown, Hackett and Lueilwitz] Gidget Fadel","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:33.981-08:00","created_at":"2025-01-07T14:48:10.749-08:00"},"relationships":{"email_addresses":{"data":[{"id":"f1f0e700-9446-4705-afaa-69e7c0cbc759","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}}}}]},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/assign_role_to_user"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/assign_role_to_user \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/assign_role_to_user\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/assign_role_to_user\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/assign_role_to_user\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/incidents/{id}/unassign_role_from_user":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Remove assigned user from incident","security":[{"bearer_auth":[]}],"tags":["Incidents"],"description":"Remove assigned user from incident","operationId":"removeAssignedUserFromIncident","parameters":[],"responses":{"200":{"description":"remove assigned user from incident","content":{"application/vnd.api+json":{"example":{"data":{"id":"d3401c6f-96fc-4f22-b74f-e09b420c63d1","type":"incidents","attributes":{"parent_incident_id":null,"sequential_id":1,"title":"Voluptatem qui eos delectus.","slug":"voluptatem-qui-eos-delectus","kind":"normal","private":false,"summary":"Repellendus voluptas labore. Voluptates et sed. Consequatur et facere.","status":"started","source":"web","url":"http://localhost:3001/account/incidents/1-voluptatem-qui-eos-delectus","short_url":null,"user":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"severity":{"data":{"id":"28dbc179-640d-4813-afaa-0e3490314206","type":"severities","attributes":{"name":"7h0vp","slug":"7h0vp","description":"Dolorem libero sit debitis.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:48:11.852-08:00","updated_at":"2025-01-07T14:48:11.852-08:00"}}},"in_triage_by":null,"started_by":{"data":{"id":"306","type":"users","attributes":{"name":"Michel Heller","email":"jada.okeefe@funk.example","phone":null,"phone_2":null,"full_name":"Michel Heller","full_name_with_team":"[Brown, Hackett and Lueilwitz] Michel Heller","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:48:11.887-08:00","created_at":"2025-01-07T14:48:11.531-08:00"},"relationships":{"email_addresses":{"data":[{"id":"09544d77-344c-4878-b09e-aa9464d0acf4","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"mitigated_by":null,"resolved_by":null,"closed_by":null,"cancelled_by":null,"mitigation_message":null,"resolution_message":null,"cancellation_message":null,"public_title":null,"duplicate_incident_id":null,"retrospective_progress_status":"not_started","zoom_meeting_id":null,"zoom_meeting_start_url":null,"zoom_meeting_join_url":null,"zoom_meeting_password":null,"zoom_meeting_pstn_password":null,"zoom_meeting_h323_password":null,"zoom_meeting_global_dial_in_numbers":[],"shortcut_story_id":null,"shortcut_story_url":null,"shortcut_task_id":null,"shortcut_task_url":null,"asana_task_id":null,"asana_task_url":null,"github_issue_id":null,"github_issue_url":null,"gitlab_issue_id":null,"gitlab_issue_url":null,"jira_issue_key":null,"jira_issue_id":null,"jira_issue_url":null,"google_meeting_id":null,"google_meeting_url":null,"trello_card_id":null,"trello_card_url":null,"linear_issue_id":null,"linear_issue_url":null,"zendesk_ticket_id":null,"zendesk_ticket_url":null,"motion_task_id":null,"motion_task_url":null,"clickup_task_id":null,"clickup_task_url":null,"slack_channel_name":null,"slack_channel_id":null,"slack_channel_url":null,"slack_channel_short_url":null,"slack_channel_deep_link":null,"slack_channel_archived":false,"service_now_incident_id":null,"service_now_incident_key":null,"service_now_incident_url":null,"opsgenie_incident_id":null,"opsgenie_incident_url":null,"opsgenie_alert_id":null,"opsgenie_alert_url":null,"victor_ops_incident_id":null,"victor_ops_incident_url":null,"pagerduty_incident_id":null,"pagerduty_incident_number":null,"pagerduty_incident_url":null,"mattermost_channel_id":null,"mattermost_channel_name":null,"mattermost_channel_url":null,"confluence_page_id":null,"confluence_page_url":null,"quip_page_id":null,"quip_page_url":null,"airtable_base_key":null,"airtable_table_name":null,"airtable_record_id":null,"airtable_record_url":null,"google_drive_id":null,"google_drive_parent_id":null,"google_drive_url":null,"sharepoint_page_id":null,"sharepoint_page_url":null,"datadog_notebook_id":null,"datadog_notebook_url":null,"freshservice_ticket_id":null,"freshservice_ticket_url":null,"freshservice_task_id":null,"freshservice_task_url":null,"scheduled_for":null,"scheduled_until":null,"in_triage_at":null,"started_at":"2025-01-07T14:48:11.859-08:00","detected_at":null,"acknowledged_at":null,"mitigated_at":null,"resolved_at":null,"closed_at":null,"cancelled_at":null,"created_at":"2025-01-07T14:48:11.859-08:00","updated_at":"2025-01-07T14:48:35.106-08:00","labels":{}},"relationships":{"causes":{"data":[]},"subscribers":{"data":[{"id":"888d53d1-219d-417f-b467-944c86e8d829","type":"incident_subscribers"}]},"roles":{"data":[]},"environments":{"data":[]},"incident_types":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"events":{"data":[{"id":"67ad863f-b49d-4aca-9049-b3d7910f8fca","type":"incident_events"},{"id":"d40987cd-f393-46d3-91a5-5f3f63b88292","type":"incident_events"},{"id":"cc087d44-0ea8-44f9-b956-50946947dfe4","type":"incident_events"}]},"action_items":{"data":[]},"custom_field_selections":{"data":[]},"feedbacks":{"data":[]},"attachments":{"data":[]},"slack_messages":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/incident_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/unassign_role_from_user"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/incidents/%7Bid%7D/unassign_role_from_user \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/incidents/%7Bid%7D/unassign_role_from_user\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/incidents/%7Bid%7D/unassign_role_from_user\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/incidents/%7Bid%7D/unassign_role_from_user\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/ip_ranges":{"get":{"summary":"Retrieves IP ranges","security":[{"bearer_auth":[]}],"tags":["IpRanges"],"description":"Retrieves the IP ranges for rootly.com services","operationId":"getIpRanges","responses":{"200":{"description":"ip_ranges found","content":{"application/vnd.api+json":{"example":{"data":{"id":"ip_ranges","type":"ip_ranges","attributes":{"integrations_ipv4":["34.232.217.139","18.213.181.255"],"integrations_ipv6":[],"webhooks_ipv4":["34.232.217.139","18.213.181.255"],"webhooks_ipv6":[]}}},"schema":{"$ref":"#/components/schemas/ip_ranges_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/ip_ranges \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/ip_ranges\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/ip_ranges\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/ip_ranges\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/live_call_routers":{"post":{"summary":"Creates a live_call_router","security":[{"bearer_auth":[]}],"tags":["LiveCallRouters"],"description":"Creates a new live_call_router from provided data","operationId":"createLiveCallRouter","parameters":[],"responses":{"201":{"description":"live_call_router created","content":{"application/vnd.api+json":{"example":{"data":{"id":"3adb7138-0232-4976-a518-f3b34a7ae7d1","type":"live_call_routers","attributes":{"kind":"voicemail","name":"live_call_router-prod","country_code":"US","phone_type":"toll_free","phone_number":"+14155552344","voicemail_greeting":"hello","slug":"live_call_router-prod","enabled":true,"created_at":"2025-01-07T14:48:39.478-08:00","updated_at":"2025-01-07T14:48:39.478-08:00","alert_urgency_id":"ca401245-daad-44b7-92b3-5944352b0171","escalation_policy_trigger":{"id":"f7fee74d-dc15-4b79-83f7-5cd223b9701d","type":"service"}}}},"schema":{"$ref":"#/components/schemas/live_call_router_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_live_call_router"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/live_call_routers \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/live_call_routers\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/live_call_routers\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/live_call_routers\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List live_call_routers","security":[{"bearer_auth":[]}],"tags":["LiveCallRouters"],"description":"List live_call_routers","operationId":"listLiveCallRouters","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/live_call_router_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/live_call_routers?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/live_call_routers?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/live_call_routers?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/live_call_routers?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/live_call_routers/generate_phone_number":{"get":{"summary":"Generates a phone number for live_call_router","security":[{"bearer_auth":[]}],"tags":["LiveCallRouters"],"description":"Generates a phone number for live_call_router","operationId":"generatePhoneNumberLiveCallRouter","parameters":[{"name":"country_code","in":"query","required":true,"schema":{"type":"string","enum":["US","GB","NZ","CA","AU"]}},{"name":"phone_type","in":"query","required":true,"schema":{"type":"string","enum":["local","toll_free"]}}],"responses":{"200":{"description":"live_call_router phone number","content":{"application/vnd.api+json":{"example":{"phone_number":"+18001000052"}}}},"422":{"description":"live_call_router without required params","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid params","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/live_call_routers/generate_phone_number?country_code=SOME_STRING_VALUE&phone_type=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/live_call_routers/generate_phone_number?country_code=SOME_STRING_VALUE&phone_type=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/live_call_routers/generate_phone_number?country_code=SOME_STRING_VALUE&phone_type=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/live_call_routers/generate_phone_number?country_code=SOME_STRING_VALUE&phone_type=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/live_call_routers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a live_call_router","security":[{"bearer_auth":[]}],"tags":["LiveCallRouters"],"description":"Retrieves a specific live_call_router by id","operationId":"getLiveCallRouter","responses":{"200":{"description":"live_call_router found","content":{"application/vnd.api+json":{"example":{"data":{"id":"aeb63bcb-6d0d-4141-8b8e-dc198dcd5745","type":"live_call_routers","attributes":{"kind":"voicemail","name":"Sint et voluptatem sit.","country_code":"US","phone_type":"local","phone_number":"14155551234","voicemail_greeting":"Amet ea nemo nulla.","slug":"sint-et-voluptatem-sit","enabled":true,"created_at":"2025-01-07T14:48:42.468-08:00","updated_at":"2025-01-07T14:48:42.468-08:00","alert_urgency_id":"216d4f9c-06d8-418c-bb8b-a79f4a479f5a","escalation_policy_trigger":{"id":"2aea0d5d-30d8-4c8e-b259-3aca37238f14","type":"service"}}}},"schema":{"$ref":"#/components/schemas/live_call_router_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/live_call_routers/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/live_call_routers/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/live_call_routers/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/live_call_routers/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a live_call_router","security":[{"bearer_auth":[]}],"tags":["LiveCallRouters"],"description":"Update a specific live_call_router by id","operationId":"updateLiveCallRouter","parameters":[],"responses":{"200":{"description":"live_call_router updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"9a7fa9bb-49cf-452e-9c5e-58f2aeb68309","type":"live_call_routers","attributes":{"kind":"voicemail","name":"live_call_router-staging","country_code":"US","phone_type":"local","phone_number":"14155551234","voicemail_greeting":"Assumenda earum in consequatur.","slug":"id-unde-perferendis-non","enabled":true,"created_at":"2025-01-07T14:48:46.077-08:00","updated_at":"2025-01-07T14:48:46.253-08:00","alert_urgency_id":"ac1e101b-1cca-4298-acb5-1c1b4326f44c","escalation_policy_trigger":{"id":"0104f487-e980-44cf-9430-e3607290f89c","type":"service"}}}},"schema":{"$ref":"#/components/schemas/live_call_router_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_live_call_router"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/live_call_routers/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/live_call_routers/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/live_call_routers/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/live_call_routers/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a live_call_router","security":[{"bearer_auth":[]}],"tags":["LiveCallRouters"],"description":"Delete a specific live_call_router by id","operationId":"deleteLiveCallRouter","responses":{"200":{"description":"live_call_router deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"aaf8d311-d598-4c39-abd8-eab7861b7fd9","type":"live_call_routers","attributes":{"kind":"voicemail","name":"Corporis tenetur sit suscipit.","country_code":"US","phone_type":"local","phone_number":"14155551234","voicemail_greeting":"Odio corporis voluptas illo.","slug":"corporis-tenetur-sit-suscipit","enabled":true,"created_at":"2025-01-07T14:48:48.859-08:00","updated_at":"2025-01-07T14:48:49.038-08:00","alert_urgency_id":"b6258960-83d8-4d08-ad24-2b3b822c21d0","escalation_policy_trigger":{"id":"62c1f82d-9f17-4b36-94a1-06bb52b3578f","type":"service"}}}},"schema":{"$ref":"#/components/schemas/live_call_router_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/live_call_routers/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/live_call_routers/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/live_call_routers/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/live_call_routers/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/on_call_roles":{"post":{"summary":"Creates a on_call_role","security":[{"bearer_auth":[]}],"tags":["OnCallRoles"],"description":"Creates a new on_call_role from provided data","operationId":"createOnCallRole","parameters":[],"responses":{"201":{"description":"on_call_role created","content":{"application/vnd.api+json":{"example":{"data":{"id":"8e996fb5-c97e-4a9a-bc1b-8b168884a5ec","type":"on_call_roles","attributes":{"team_id":307,"name":"Infrastructure","slug":"infrastructure","system_role":"custom","alert_sources_permissions":[],"alert_urgency_permissions":[],"alerts_permissions":[],"api_keys_permissions":[],"audits_permissions":[],"contacts_permissions":[],"escalation_policies_permissions":[],"groups_permissions":[],"heartbeats_permissions":[],"integrations_permissions":[],"invitations_permissions":[],"live_call_routing_permissions":[],"schedule_override_permissions":[],"schedules_permissions":[],"services_permissions":[],"webhooks_permissions":[],"workflows_permissions":[],"updated_at":"2025-01-07T14:48:53.310-08:00","created_at":"2025-01-07T14:48:53.310-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_role_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_on_call_role"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/on_call_roles \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_roles\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_roles\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_roles\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List on_call_roles","security":[{"bearer_auth":[]}],"tags":["OnCallRoles"],"description":"List on_call_roles","operationId":"listOnCallRoles","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/on_call_role_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/on_call_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/on_call_roles/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an on_call_role","security":[{"bearer_auth":[]}],"tags":["OnCallRoles"],"description":"Retrieves a specific on_call_role by id","operationId":"getOnCallRole","responses":{"200":{"description":"on_call_role found","content":{"application/vnd.api+json":{"example":{"data":{"id":"7b3d7f7c-0595-4bd4-ab11-618f096ac2f0","type":"on_call_roles","attributes":{"team_id":307,"name":"On-Call Role 1","slug":"on-call-role-1","system_role":"admin","alert_sources_permissions":[],"alert_urgency_permissions":[],"alerts_permissions":[],"api_keys_permissions":[],"audits_permissions":[],"contacts_permissions":[],"escalation_policies_permissions":[],"groups_permissions":[],"heartbeats_permissions":[],"integrations_permissions":[],"invitations_permissions":[],"live_call_routing_permissions":[],"schedule_override_permissions":[],"schedules_permissions":[],"services_permissions":[],"webhooks_permissions":[],"workflows_permissions":[],"updated_at":"2025-01-07T14:48:53.850-08:00","created_at":"2025-01-07T14:48:53.850-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/on_call_roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_roles/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a on_call_role","security":[{"bearer_auth":[]}],"tags":["OnCallRoles"],"description":"Update a specific on_call_role by id","operationId":"updateOnCallRole","parameters":[],"responses":{"200":{"description":"on_call_role updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"2e35bb82-f868-4573-a38d-80666b045ff1","type":"on_call_roles","attributes":{"team_id":307,"name":"Security","slug":"on-call-role-3","system_role":"custom","alert_sources_permissions":[],"alert_urgency_permissions":[],"alerts_permissions":[],"api_keys_permissions":[],"audits_permissions":[],"contacts_permissions":[],"escalation_policies_permissions":[],"groups_permissions":[],"heartbeats_permissions":[],"integrations_permissions":[],"invitations_permissions":[],"live_call_routing_permissions":[],"schedule_override_permissions":[],"schedules_permissions":[],"services_permissions":[],"webhooks_permissions":[],"workflows_permissions":[],"updated_at":"2025-01-07T14:48:54.994-08:00","created_at":"2025-01-07T14:48:54.831-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_on_call_role"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/on_call_roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_roles/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an on_call_role","security":[{"bearer_auth":[]}],"tags":["OnCallRoles"],"description":"Delete a specific on_call_role by id","operationId":"deleteOnCallRole","responses":{"200":{"description":"on_call_role deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"f48dc41c-14b8-4d41-9487-18da9db64940","type":"on_call_roles","attributes":{"team_id":307,"name":"On-Call Role 5","slug":"on-call-role-5","system_role":"custom","alert_sources_permissions":[],"alert_urgency_permissions":[],"alerts_permissions":[],"api_keys_permissions":[],"audits_permissions":[],"contacts_permissions":[],"escalation_policies_permissions":[],"groups_permissions":[],"heartbeats_permissions":[],"integrations_permissions":[],"invitations_permissions":[],"live_call_routing_permissions":[],"schedule_override_permissions":[],"schedules_permissions":[],"services_permissions":[],"webhooks_permissions":[],"workflows_permissions":[],"updated_at":"2025-01-07T14:48:55.961-08:00","created_at":"2025-01-07T14:48:55.797-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/on_call_roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_roles/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedules/{schedule_id}/on_call_shadows":{"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"creates a shadow configuration","security":[{"bearer_auth":[]}],"tags":["OnCallShadows"],"description":"Creates a new on call shadow configuration from provided data","operationId":"createOnCallShadow","parameters":[],"responses":{"201":{"description":"shadow shift is created","content":{"application/vnd.api+json":{"example":{"data":{"id":"acb5ed04-f7f1-4e4c-a183-fd09ecf84d8d","type":"on_call_shadows","attributes":{"schedule_id":"4d9dbe40-3ca8-426f-a8f6-56d538df0d3c","shadowable_type":"User","shadowable_id":"347","shadow_user_id":346,"starts_at":"2025-01-09T14:48:58.102-08:00","ends_at":"2025-01-10T14:48:58.103-08:00","created_at":"2025-01-07T14:48:58.271-08:00","updated_at":"2025-01-07T14:48:58.271-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_shadow_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Shadow user must exist","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_on_call_shadow"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/on_call_shadows \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/on_call_shadows\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bschedule_id%7D/on_call_shadows\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/on_call_shadows\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List On Call Shadows for Shift","security":[{"bearer_auth":[]}],"tags":["OnCallShadows"],"description":"List shadow shifts for schedule","operationId":"listOnCallShadows","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/on_call_shadows_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/on_call_shadows?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/on_call_shadows?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bschedule_id%7D/on_call_shadows?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/on_call_shadows?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/on_call_shadows/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an On Call Shadow configuration by ID","security":[{"bearer_auth":[]}],"tags":["OnCallShadows"],"description":"Retrieves a specific On Call Shadow configuration by ID","operationId":"getOnCallShadow","responses":{"200":{"description":"override shift found","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c2a6e31-fefe-4464-ba3d-56b645109cee","type":"on_call_shadows","attributes":{"schedule_id":"4d9dbe40-3ca8-426f-a8f6-56d538df0d3c","shadowable_type":"User","shadowable_id":"347","shadow_user_id":346,"starts_at":"2025-01-07T16:48:57.000-08:00","ends_at":"2025-01-08T14:48:57.000-08:00","created_at":"2025-01-07T14:48:57.923-08:00","updated_at":"2025-01-07T14:48:57.923-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_shadow_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/on_call_shadows/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_shadows/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_shadows/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_shadows/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update an On Call Shadow configuration","security":[{"bearer_auth":[]}],"tags":["OnCallShadows"],"description":"Update a specific on call shadow configuration by id","operationId":"updateOnCallShadow","parameters":[],"responses":{"200":{"description":"on call shadows configuration is is updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c2a6e31-fefe-4464-ba3d-56b645109cee","type":"on_call_shadows","attributes":{"schedule_id":"4d9dbe40-3ca8-426f-a8f6-56d538df0d3c","shadowable_type":"Schedule","shadowable_id":"4d9dbe40-3ca8-426f-a8f6-56d538df0d3c","shadow_user_id":346,"starts_at":"2025-01-07T16:48:57.000-08:00","ends_at":"2025-01-08T14:48:57.000-08:00","created_at":"2025-01-07T14:48:57.923-08:00","updated_at":"2025-01-07T14:48:59.467-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_shadow_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_on_call_shadow"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/on_call_shadows/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_shadows/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_shadows/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_shadows/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an on call shadow configuration","security":[{"bearer_auth":[]}],"tags":["OverrideShifts"],"description":"Delete a specific on call shadow configuration by id","operationId":"deleteOnCallShadow","responses":{"200":{"description":"override shift deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"8c2a6e31-fefe-4464-ba3d-56b645109cee","type":"on_call_shadows","attributes":{"schedule_id":"4d9dbe40-3ca8-426f-a8f6-56d538df0d3c","shadowable_type":"User","shadowable_id":"347","shadow_user_id":346,"starts_at":"2025-01-07T16:48:57.000-08:00","ends_at":"2025-01-08T14:48:57.000-08:00","created_at":"2025-01-07T14:48:57.923-08:00","updated_at":"2025-01-07T14:48:57.923-08:00"}}},"schema":{"$ref":"#/components/schemas/on_call_shadow_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/on_call_shadows/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/on_call_shadows/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/on_call_shadows/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/on_call_shadows/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedules/{schedule_id}/override_shifts":{"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"creates an override shift","security":[{"bearer_auth":[]}],"tags":["OverrideShifts"],"description":"Creates a new override shift from provided data","operationId":"createOverrideShift","parameters":[],"responses":{"201":{"description":"override_shift created","content":{"application/vnd.api+json":{"example":{"data":{"id":"42697c59-e4c8-4453-bb20-62309f36009c","type":"shifts","attributes":{"schedule_id":"3dfc8905-b7cb-4a66-9537-78ef159c304e","rotation_id":null,"starts_at":"2025-01-07T16:49:03.000-08:00","ends_at":"2025-01-08T14:49:03.000-08:00","is_override":true},"relationships":{"shift_override":{"data":{"id":"368edb6a-322c-4254-a5f2-9f74131ea826","type":"shift_overrides"}},"user":{"data":{"id":"351","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/override_shift_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"User must exist","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_override_shift"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/override_shifts \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/override_shifts\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bschedule_id%7D/override_shifts\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/override_shifts\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List override shifts","security":[{"bearer_auth":[]}],"tags":["OverrideShifts"],"description":"List override shifts","operationId":"listOverrideShifts","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/override_shift_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/override_shifts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/override_shifts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bschedule_id%7D/override_shifts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/override_shifts?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/override_shifts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves an override shift","security":[{"bearer_auth":[]}],"tags":["OverrideShifts"],"description":"Retrieves a specific override shift by id","operationId":"getOverrideShift","responses":{"200":{"description":"override shift found","content":{"application/vnd.api+json":{"example":{"data":{"id":"cdddcb17-0e49-4a89-93fe-98b0b1db23c4","type":"shifts","attributes":{"schedule_id":"3dfc8905-b7cb-4a66-9537-78ef159c304e","rotation_id":"b079d41b-b65e-4d60-a12a-04f367ff3b89","starts_at":"2025-01-07T08:49:02.000-08:00","ends_at":"2025-01-07T16:49:02.000-08:00","is_override":true},"relationships":{"shift_override":{"data":null},"user":{"data":{"id":"359","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/override_shift_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/override_shifts/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/override_shifts/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/override_shifts/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/override_shifts/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update an override shift","security":[{"bearer_auth":[]}],"tags":["OverrideShifts"],"description":"Update a specific override shift by id","operationId":"updateOverrideShift","parameters":[],"responses":{"200":{"description":"override shift updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"cdddcb17-0e49-4a89-93fe-98b0b1db23c4","type":"shifts","attributes":{"schedule_id":"3dfc8905-b7cb-4a66-9537-78ef159c304e","rotation_id":"b079d41b-b65e-4d60-a12a-04f367ff3b89","starts_at":"2025-01-07T08:49:02.000-08:00","ends_at":"2025-01-07T16:49:02.000-08:00","is_override":true},"relationships":{"shift_override":{"data":{"id":"b1edf071-dc56-4928-a068-972c8d24887e","type":"shift_overrides"}},"user":{"data":{"id":"360","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/override_shift_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_override_shift"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/override_shifts/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/override_shifts/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/override_shifts/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/override_shifts/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete an override shift","security":[{"bearer_auth":[]}],"tags":["OverrideShifts"],"description":"Delete a specific override shift by id","operationId":"deleteOverrideShift","responses":{"200":{"description":"override shift deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"cdddcb17-0e49-4a89-93fe-98b0b1db23c4","type":"shifts","attributes":{"schedule_id":"3dfc8905-b7cb-4a66-9537-78ef159c304e","rotation_id":"b079d41b-b65e-4d60-a12a-04f367ff3b89","starts_at":"2025-01-07T08:49:02.000-08:00","ends_at":"2025-01-07T16:49:02.000-08:00","is_override":true},"relationships":{"shift_override":{"data":null},"user":{"data":{"id":"359","type":"users"}}}}},"schema":{"$ref":"#/components/schemas/override_shift_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/override_shifts/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/override_shifts/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/override_shifts/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/override_shifts/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/playbooks/{playbook_id}/playbook_tasks":{"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a playbook task","security":[{"bearer_auth":[]}],"tags":["PlaybookTasks"],"description":"Creates a new task from provided data","operationId":"createPlaybookTask","parameters":[],"responses":{"201":{"description":"playbook_task created","content":{"application/vnd.api+json":{"example":{"data":{"id":"2fb84ca7-86ef-4d17-aaa2-b2ce13685748","type":"playbook_tasks","attributes":{"playbook_id":"38ec00e1-0ad9-4010-b1a3-022e8d7ecf2c","task":"New task","description":"New task description","position":1,"created_at":"2025-01-07T14:49:06.949-08:00","updated_at":"2025-01-07T14:49:06.949-08:00"}}},"schema":{"$ref":"#/components/schemas/playbook_task_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Task can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_playbook_task"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List playbook tasks","security":[{"bearer_auth":[]}],"tags":["PlaybookTasks"],"description":"List playbook tasks","operationId":"listPlaybookTasks","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/playbook_task_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks/%7Bplaybook_id%7D/playbook_tasks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/playbook_tasks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a playbook task","security":[{"bearer_auth":[]}],"tags":["PlaybookTasks"],"description":"Retrieves a specific playbook_task by id","operationId":"getPlaybookTask","responses":{"200":{"description":"playbook_task found","content":{"application/vnd.api+json":{"example":{"data":{"id":"7c8b5482-273b-4001-85fc-d2b53e889cfe","type":"playbook_tasks","attributes":{"playbook_id":"38ec00e1-0ad9-4010-b1a3-022e8d7ecf2c","task":"Quae et vel quia.","description":"Aperiam autem voluptas animi.","position":3,"created_at":"2025-01-07T14:49:06.649-08:00","updated_at":"2025-01-07T14:49:06.662-08:00"}}},"schema":{"$ref":"#/components/schemas/playbook_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/playbook_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbook_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbook_tasks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbook_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a playbook task","security":[{"bearer_auth":[]}],"tags":["PlaybookTasks"],"description":"Update a specific playbook task by id","operationId":"updatePlaybookTask","parameters":[],"responses":{"200":{"description":"playbook_task updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"7c8b5482-273b-4001-85fc-d2b53e889cfe","type":"playbook_tasks","attributes":{"playbook_id":"38ec00e1-0ad9-4010-b1a3-022e8d7ecf2c","task":"Task updated","description":"Task description updated","position":2,"created_at":"2025-01-07T14:49:06.649-08:00","updated_at":"2025-01-07T14:49:08.669-08:00"}}},"schema":{"$ref":"#/components/schemas/playbook_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_playbook_task"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/playbook_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbook_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbook_tasks/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbook_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a playbook task","security":[{"bearer_auth":[]}],"tags":["PlaybookTasks"],"description":"Delete a specific playbook task by id","operationId":"deletePlaybookTask","responses":{"200":{"description":"playbook_task deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"7c8b5482-273b-4001-85fc-d2b53e889cfe","type":"playbook_tasks","attributes":{"playbook_id":"38ec00e1-0ad9-4010-b1a3-022e8d7ecf2c","task":"Quae et vel quia.","description":"Aperiam autem voluptas animi.","position":3,"created_at":"2025-01-07T14:49:06.649-08:00","updated_at":"2025-01-07T14:49:09.398-08:00"}}},"schema":{"$ref":"#/components/schemas/playbook_task_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/playbook_tasks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbook_tasks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbook_tasks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbook_tasks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/playbooks":{"post":{"summary":"Creates a playbook","security":[{"bearer_auth":[]}],"tags":["Playbooks"],"description":"Creates a new playbook from provided data","operationId":"createPlaybook","parameters":[],"responses":{"201":{"description":"playbook created","content":{"application/vnd.api+json":{"example":{"data":{"id":"9c813de9-9700-4b0b-a18f-0816ef9d0e30","type":"playbooks","attributes":{"title":"How to handle customer-facing incident?","summary":"This is a summary","external_url":null,"severity_ids":[],"environment_ids":["bce798ff-a040-4d70-b044-27f174f2befc","5f283807-52a0-44a8-8a4a-2e4b956adfd7"],"service_ids":["b4672077-aa1c-41ec-8fc2-a6613f7d17b9","a2ea04bb-e083-4a0e-8e79-c0e15481b8c3"],"functionality_ids":["35627b3d-be2e-4ca0-8cf6-e0fc2bc2ab68","cf4cd08e-28d5-4412-aec8-5139a9df45ab"],"group_ids":[],"incident_type_ids":[],"cause_ids":[],"created_at":"2025-01-07T14:49:13.193-08:00","updated_at":"2025-01-07T14:49:13.193-08:00"},"relationships":{"severities":{"data":[]},"environments":{"data":[{"id":"bce798ff-a040-4d70-b044-27f174f2befc","type":"environments"},{"id":"5f283807-52a0-44a8-8a4a-2e4b956adfd7","type":"environments"}]},"services":{"data":[{"id":"b4672077-aa1c-41ec-8fc2-a6613f7d17b9","type":"services"},{"id":"a2ea04bb-e083-4a0e-8e79-c0e15481b8c3","type":"services"}]},"functionalities":{"data":[{"id":"35627b3d-be2e-4ca0-8cf6-e0fc2bc2ab68","type":"functionalities"},{"id":"cf4cd08e-28d5-4412-aec8-5139a9df45ab","type":"functionalities"}]},"groups":{"data":[]},"causes":{"data":[]},"incident_types":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/playbook_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Title can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_playbook"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/playbooks \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List playbooks","security":[{"bearer_auth":[]}],"tags":["Playbooks"],"description":"List playbooks","operationId":"listPlaybooks","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: severities,environments,services","schema":{"type":"string","enum":["severities","environments","services","functionalities","groups","causes","incident_types"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/playbook_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/playbooks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/playbooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a playbook","security":[{"bearer_auth":[]}],"tags":["Playbooks"],"description":"Retrieves a specific playbook by id","operationId":"getPlaybook","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: severities,environments,services","schema":{"type":"string","enum":["severities","environments","services","functionalities","groups","causes","incident_types"]},"required":false}],"responses":{"200":{"description":"playbook found","content":{"application/vnd.api+json":{"example":{"data":{"id":"7a65275b-a965-4684-b5c4-363d48bbc887","type":"playbooks","attributes":{"title":"Vero sint eaque unde.","summary":null,"external_url":null,"severity_ids":[],"environment_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"incident_type_ids":[],"cause_ids":[],"created_at":"2025-01-07T14:49:10.744-08:00","updated_at":"2025-01-07T14:49:10.744-08:00"},"relationships":{"severities":{"data":[]},"environments":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"causes":{"data":[]},"incident_types":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/playbook_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/playbooks/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a playbook","security":[{"bearer_auth":[]}],"tags":["Playbooks"],"description":"Update a specific playbook by id","operationId":"updatePlaybook","parameters":[],"responses":{"200":{"description":"playbook updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"7a65275b-a965-4684-b5c4-363d48bbc887","type":"playbooks","attributes":{"title":"How to handle security incident?","summary":"This is a summary","external_url":null,"severity_ids":[],"environment_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"incident_type_ids":[],"cause_ids":[],"created_at":"2025-01-07T14:49:10.744-08:00","updated_at":"2025-01-07T14:49:15.741-08:00"},"relationships":{"severities":{"data":[]},"environments":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"causes":{"data":[]},"incident_types":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/playbook_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_playbook"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/playbooks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a playbook","security":[{"bearer_auth":[]}],"tags":["Playbooks"],"description":"Delete a specific playbook by id","operationId":"deletePlaybook","responses":{"200":{"description":"playbook deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"7a65275b-a965-4684-b5c4-363d48bbc887","type":"playbooks","attributes":{"title":"Vero sint eaque unde.","summary":null,"external_url":null,"severity_ids":[],"environment_ids":[],"service_ids":[],"functionality_ids":[],"group_ids":[],"incident_type_ids":[],"cause_ids":[],"created_at":"2025-01-07T14:49:10.744-08:00","updated_at":"2025-01-07T14:49:16.587-08:00"},"relationships":{"severities":{"data":[]},"environments":{"data":[]},"services":{"data":[]},"functionalities":{"data":[]},"groups":{"data":[]},"causes":{"data":[]},"incident_types":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/playbook_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/playbooks/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/playbooks/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/playbooks/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/playbooks/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/post_mortem_templates":{"post":{"summary":"Creates a retrospective template","security":[{"bearer_auth":[]}],"tags":["RetrospectiveTemplates"],"description":"Creates a new Retrospective Template from provided data","operationId":"createPostmortemTemplate","parameters":[],"responses":{"201":{"description":"post_mortem_template created","content":{"application/vnd.api+json":{"example":{"data":{"id":"583f2850-0a89-4f25-9166-f8f13bfb8a3c","type":"post_mortem_templates","attributes":{"name":"My Retrospective Template","default":false,"format":"markdown","created_at":"2025-01-07T14:49:20.043-08:00","updated_at":"2025-01-07T14:49:20.047-08:00","content":"
\n

Test template

\n\n

Test new line

\n
\n"}}},"schema":{"$ref":"#/components/schemas/post_mortem_template_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_post_mortem_template"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/post_mortem_templates \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortem_templates\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortem_templates\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortem_templates\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List Retrospective Templates","security":[{"bearer_auth":[]}],"tags":["RetrospectiveTemplates"],"description":"List Retrospective Templates","operationId":"listPostmortemTemplates","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/post_mortem_template_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/post_mortem_templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortem_templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortem_templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortem_templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/post_mortem_templates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Retrospective Template","security":[{"bearer_auth":[]}],"tags":["RetrospectiveTemplates"],"description":"Retrieves a specific Retrospective Template by id","operationId":"getPostmortemTemplate","responses":{"200":{"description":"Retrospective Template found","content":{"application/vnd.api+json":{"example":{"data":{"id":"b34719e0-51e5-4d8e-8602-3fff432d2603","type":"post_mortem_templates","attributes":{"name":"Aut laborum nihil laboriosam.","default":false,"format":"html","created_at":"2025-01-07T14:49:18.043-08:00","updated_at":"2025-01-07T14:49:18.049-08:00","content":""}}},"schema":{"$ref":"#/components/schemas/post_mortem_template_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortem_templates/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a Retrospective Template","security":[{"bearer_auth":[]}],"tags":["RetrospectiveTemplates"],"description":"Update a specific Retrospective Template by id","operationId":"updatePostmortemTemplate","parameters":[],"responses":{"200":{"description":"Retrospective Template updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"b34719e0-51e5-4d8e-8602-3fff432d2603","type":"post_mortem_templates","attributes":{"name":"My Retrospective Template Updated","default":false,"format":"markdown","created_at":"2025-01-07T14:49:18.043-08:00","updated_at":"2025-01-07T14:49:21.204-08:00","content":"
\n

Test update template

\n\n

Test new line

\n
\n"}}},"schema":{"$ref":"#/components/schemas/post_mortem_template_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_post_mortem_template"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortem_templates/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a Retrospective Template","security":[{"bearer_auth":[]}],"tags":["RetrospectiveTemplates"],"description":"Delete a specific Retrospective Template by id","operationId":"deletePostmortemTemplate","responses":{"200":{"description":"Retrospective Template deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"b34719e0-51e5-4d8e-8602-3fff432d2603","type":"post_mortem_templates","attributes":{"name":"Aut laborum nihil laboriosam.","default":false,"format":"html","created_at":"2025-01-07T14:49:18.043-08:00","updated_at":"2025-01-07T14:49:21.765-08:00","content":""}}},"schema":{"$ref":"#/components/schemas/post_mortem_template_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/post_mortem_templates/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/post_mortem_templates/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/pulses":{"post":{"summary":"Creates a pulse","security":[{"bearer_auth":[]}],"tags":["Pulses"],"description":"Creates a new pulse from provided data","operationId":"createPulse","parameters":[],"responses":{"201":{"description":"pulse created","content":{"application/vnd.api+json":{"example":{"data":{"id":"bcf4cffd-75ac-4921-9ecb-a34c19426a8f","type":"pulses","attributes":{"short_id":null,"source":"k8s","summary":"Deploy k8s","labels":[{"key":"status","value":"succeeded"}],"refs":[{"key":"sha","value":"cd62148cbc5eb42168fe99fdb50a364e12b206ac"},{"key":"image","value":"registry.rootly.com/rootly/my-service:cd6214"}],"services":[{"id":"f7b56d6a-7c64-4f3d-a17f-ba536bda4ebc","team_id":331,"name":"Non at voluptas sit.","slug":"non-at-voluptas-sit","description":"Expedita vitae et ducimus.","deleted_at":null,"created_at":"2025-01-07T14:49:22.965-08:00","updated_at":"2025-01-07T14:49:22.965-08:00","opsgenie_id":null,"pagerduty_id":null,"public_description":null,"github_repository_branch":"master","github_repository_name":null,"color":"#FAEBB7","heroku_app_name":null,"gitlab_repository_name":null,"gitlab_repository_branch":"master","kubernetes_deployment_name":null,"incidents_count":0,"position":1,"slack_channels":[],"slack_aliases":[],"backstage_id":null,"show_uptime":true,"show_uptime_last_days":60,"status":"operational","external_id":null,"notify_emails":[],"cortex_id":null,"alerts_email_enabled":false,"alerts_email_address":"service-6ec493796617c79cfea8a98a4fcf18bc@email.rootly.com","opsgenie_team_id":null,"service_now_ci_sys_id":null,"alert_urgency_id":null,"opslevel_id":null}],"environments":[{"id":"771c1919-4807-4a24-ace1-a3ba09db23a3","team_id":331,"name":"Nostrum et deleniti totam.","slug":"nostrum-et-deleniti-totam","description":"Et amet soluta libero.","color":"#1e6b6b","deleted_at":null,"created_at":"2025-01-07T14:49:22.979-08:00","updated_at":"2025-01-07T14:49:22.979-08:00","incidents_count":0,"position":1,"slack_channels":[],"slack_aliases":[],"external_id":null,"notify_emails":[]}],"data":{"url":"https://additionaldata.com"},"external_url":"https://external-url.com","started_at":"2025-01-07T14:41:30.000-08:00","ended_at":"2025-01-07T14:43:30.000-08:00","created_at":"2025-01-07T14:49:25.072-08:00","updated_at":"2025-01-07T14:49:25.072-08:00"}}},"schema":{"$ref":"#/components/schemas/pulse_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Summary can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_pulse"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/pulses \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/pulses\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/pulses\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/pulses\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List pulses","security":[{"bearer_auth":[]}],"tags":["Pulses"],"description":"List pulses","operationId":"listPulses","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[services]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[environments]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[labels]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[refs]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[started_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[ended_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/pulse_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/pulses?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Brefs%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/pulses?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Brefs%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/pulses?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Brefs%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/pulses?include=SOME_STRING_VALUE&filter%5Bsource%5D=SOME_STRING_VALUE&filter%5Bservices%5D=SOME_STRING_VALUE&filter%5Benvironments%5D=SOME_STRING_VALUE&filter%5Blabels%5D=SOME_STRING_VALUE&filter%5Brefs%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bstarted_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bended_at%5D%5Blte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/pulses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a pulse","security":[{"bearer_auth":[]}],"tags":["Pulses"],"description":"Retrieves a specific pulse by id","operationId":"getPulse","responses":{"200":{"description":"pulse found","content":{"application/vnd.api+json":{"example":{"data":{"id":"a37f9c73-8369-4873-9414-d34305c5213f","type":"pulses","attributes":{"short_id":null,"source":"unknown","summary":"Ut commodi asperiores quia.","labels":[],"refs":[],"services":[],"environments":[],"data":{},"external_url":null,"started_at":"2025-01-07T14:49:22.950-08:00","ended_at":null,"created_at":"2025-01-07T14:49:22.950-08:00","updated_at":"2025-01-07T14:49:22.950-08:00"}}},"schema":{"$ref":"#/components/schemas/pulse_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/pulses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/pulses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/pulses/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/pulses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a pulse","security":[{"bearer_auth":[]}],"tags":["Pulses"],"description":"Update a specific pulse by id","operationId":"updatePulse","parameters":[],"responses":{"200":{"description":"pulse updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"a37f9c73-8369-4873-9414-d34305c5213f","type":"pulses","attributes":{"short_id":null,"source":"unknown","summary":"Deploy k8s","labels":[],"refs":[],"services":[{"id":"0f3f72a5-6028-4588-9e42-d442a9f8105a","team_id":331,"name":"Unde sit totam et.","slug":"unde-sit-totam-et","description":"Necessitatibus quisquam dolorem eligendi.","deleted_at":null,"created_at":"2025-01-07T14:49:22.990-08:00","updated_at":"2025-01-07T14:49:22.990-08:00","opsgenie_id":null,"pagerduty_id":null,"public_description":null,"github_repository_branch":"master","github_repository_name":null,"color":"#D7E7F5","heroku_app_name":null,"gitlab_repository_name":null,"gitlab_repository_branch":"master","kubernetes_deployment_name":null,"incidents_count":0,"position":2,"slack_channels":[],"slack_aliases":[],"backstage_id":null,"show_uptime":true,"show_uptime_last_days":60,"status":"operational","external_id":null,"notify_emails":[],"cortex_id":null,"alerts_email_enabled":false,"alerts_email_address":"service-edf633517b822c1c22ec4dac7430730a@email.rootly.com","opsgenie_team_id":null,"service_now_ci_sys_id":null,"alert_urgency_id":null,"opslevel_id":null}],"environments":[{"id":"bdf78541-787c-4d52-b3d8-22012af76e6c","team_id":331,"name":"Suscipit nostrum dolore veritatis.","slug":"suscipit-nostrum-dolore-veritatis","description":"Ullam voluptatem recusandae harum.","color":"#190619","deleted_at":null,"created_at":"2025-01-07T14:49:23.004-08:00","updated_at":"2025-01-07T14:49:23.004-08:00","incidents_count":0,"position":2,"slack_channels":[],"slack_aliases":[],"external_id":null,"notify_emails":[]}],"data":{},"external_url":null,"started_at":"2025-01-07T14:49:22.950-08:00","ended_at":null,"created_at":"2025-01-07T14:49:22.950-08:00","updated_at":"2025-01-07T14:49:26.273-08:00"}}},"schema":{"$ref":"#/components/schemas/pulse_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_pulse"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/pulses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/pulses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/pulses/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/pulses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_configurations":{"get":{"summary":"List retrospective configurations","security":[{"bearer_auth":[]}],"tags":["RetrospectiveConfigurations"],"description":"List retrospective configurations","operationId":"listRetrospectiveConfigurations","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: severities,groups","schema":{"type":"string","enum":["severities","groups","incident_types"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[kind]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/retrospective_configuration_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_configurations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_configurations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_configurations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_configurations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bkind%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_configurations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a Retrospective Configuration","security":[{"bearer_auth":[]}],"tags":["RetrospectiveConfigurations"],"description":"Retrieves a specific retrospective_configuration by id","operationId":"getRetrospectiveConfiguration","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: severities,groups","schema":{"type":"string","enum":["severities","groups","incident_types"]},"required":false}],"responses":{"200":{"description":"retrospective_configuration found","content":{"application/vnd.api+json":{"example":{"data":{"id":"4a4dcdc3-a03d-4040-ab6f-59c439474b12","type":"retrospective_configurations","attributes":{"kind":"skip","severity_ids":["f0d72ba0-67bc-4cbf-9eec-c4e96ccd1a2b"],"incident_type_ids":[],"group_ids":[],"created_at":"2025-01-07T14:49:27.733-08:00","updated_at":"2025-01-07T14:49:27.733-08:00"},"relationships":{"severities":{"data":[{"id":"f0d72ba0-67bc-4cbf-9eec-c4e96ccd1a2b","type":"severities"}]},"groups":{"data":[]},"incident_types":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/retrospective_configuration_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_configurations/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_configurations/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_configurations/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_configurations/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a retrospective configuration","security":[{"bearer_auth":[]}],"tags":["RetrospectiveConfigurations"],"description":"Update a specific retrospective configuration by id","operationId":"updateRetrospectiveConfiguration","parameters":[],"responses":{"200":{"description":"retrospective configuration updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"f9458be4-faf5-4b47-8022-6aabb9486a1d","type":"retrospective_configurations","attributes":{"kind":"skip","severity_ids":[],"incident_type_ids":[],"group_ids":["05e08570-cddd-44ca-b5d6-0ef445e8b6ae"],"created_at":"2025-01-07T14:49:30.359-08:00","updated_at":"2025-01-07T14:49:30.359-08:00"},"relationships":{"severities":{"data":[]},"groups":{"data":[{"id":"05e08570-cddd-44ca-b5d6-0ef445e8b6ae","type":"groups"}]},"incident_types":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/retrospective_configuration_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_retrospective_configuration"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/retrospective_configurations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_configurations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_configurations/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_configurations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_process_groups/{retrospective_process_group_id}/steps":{"parameters":[{"name":"retrospective_process_group_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a retrospective process group step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroupSteps"],"description":"Creates a new retrospective process group step from provided data","operationId":"createRetrospectiveProcessGroupStep","parameters":[],"responses":{"201":{"description":"retrospective_process_group_step created","content":{"application/vnd.api+json":{"example":{"data":{"id":"c924b03d-b8ba-464a-8068-3db2f07b0a66","type":"retrospective_process_group_steps","attributes":{"retrospective_process_group_id":"054f94ce-e34d-4c99-9810-8fdf93d09e84","retrospective_step_id":"4c94aee6-8231-4a8f-8fa9-30a211d0b11f","position":1,"updated_at":"2025-01-07T14:49:34.267-08:00","created_at":"2025-01-07T14:49:34.267-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_step_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_retrospective_process_group_step"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List retrospective_process_group_steps","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroupSteps"],"description":"List retrospective_process_group_steps","operationId":"listRetrospectiveProcessGroupSteps","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[retrospective_step_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/retrospective_process_group_step_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bretrospective_step_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bretrospective_step_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bretrospective_step_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_groups/%7Bretrospective_process_group_id%7D/steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bretrospective_step_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_process_group_steps/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves retrospective_process_group_step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroupSteps"],"description":"Retrieves a specific retrospective_process_group_step by id","operationId":"getRetrospectiveProcessGroupStep","responses":{"200":{"description":"sub_status found","content":{"application/vnd.api+json":{"example":{"data":{"id":"f00a98d4-eb1e-4a4e-b5df-cfeba597e7e4","type":"retrospective_process_group_steps","attributes":{"retrospective_process_group_id":"054f94ce-e34d-4c99-9810-8fdf93d09e84","retrospective_step_id":"21bd9918-d5b4-40cb-9ee5-4ae2be8efa0e","position":1,"updated_at":"2025-01-07T14:49:34.832-08:00","created_at":"2025-01-07T14:49:34.832-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_step_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_group_steps/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update retrospective_process_group_step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroupSteps"],"description":"Update a specific retrospective_process_group_step by id","operationId":"updateRetrospectiveProcessGroupStep","parameters":[],"responses":{"200":{"description":"retrospective_process_group_step updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"707cf1b5-27cc-4c07-b2c9-23db5781599f","type":"retrospective_process_group_steps","attributes":{"retrospective_process_group_id":"054f94ce-e34d-4c99-9810-8fdf93d09e84","retrospective_step_id":"15632d77-6123-4d0f-b4a9-02ec32e2ab31","position":2,"updated_at":"2025-01-07T14:49:35.391-08:00","created_at":"2025-01-07T14:49:35.249-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_step_response"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_retrospective_process_group_step"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_group_steps/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a retrospective_process_group_step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroupSteps"],"description":"Delete a specific retrospective_process_group_step by id","operationId":"deleteRetrospectiveProcessGroupStep","responses":{"200":{"description":"retrospective_process_group_step deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"7ba18e61-ab37-486c-850f-fef6e2c4aae3","type":"retrospective_process_group_steps","attributes":{"retrospective_process_group_id":"054f94ce-e34d-4c99-9810-8fdf93d09e84","retrospective_step_id":"762e2c23-61b7-4e99-96f3-613cd486cf96","position":1,"updated_at":"2025-01-07T14:49:35.855-08:00","created_at":"2025-01-07T14:49:35.709-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_step_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_group_steps/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_group_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_processes/{retrospective_process_id}/groups":{"parameters":[{"name":"retrospective_process_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a retrospective process group","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroups"],"description":"Creates a new retrospective process group from provided data","operationId":"createRetrospectiveProcessGroup","parameters":[],"responses":{"201":{"description":"retrospective_process_group created","content":{"application/vnd.api+json":{"example":{"data":{"id":"23e72f14-6d16-4384-9651-1398d9167aca","type":"retrospective_process_groups","attributes":{"retrospective_process_id":"2c9d6f81-ff0b-4731-b94a-d0054dda88dd","sub_status_id":"9fc4c52a-265c-4687-965e-015960c35634","position":3,"updated_at":"2025-01-07T14:49:37.895-08:00","created_at":"2025-01-07T14:49:37.895-08:00"},"relationships":{"retrospective_process_group_steps":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_retrospective_process_group"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List retrospective_process_groups","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroups"],"description":"List retrospective_process_groups","operationId":"listRetrospectiveProcessGroups","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: retrospective_process_group_steps","schema":{"type":"string","enum":["retrospective_process_group_steps"]},"required":false},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at","position","-position"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[sub_status_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/retrospective_process_group_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/groups?include=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsub_status_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_process_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves retrospective_process_group","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroups"],"description":"Retrieves a specific retrospective_process_group by id","operationId":"getRetrospectiveProcessGroup","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: retrospective_process_group_steps","schema":{"type":"string","enum":["retrospective_process_group_steps"]},"required":false}],"responses":{"200":{"description":"sub_status found","content":{"application/vnd.api+json":{"example":{"data":{"id":"08d0a972-a171-42ed-a98c-1afebd97525f","type":"retrospective_process_groups","attributes":{"retrospective_process_id":"2c9d6f81-ff0b-4731-b94a-d0054dda88dd","sub_status_id":"c782f10d-a01c-4d1c-a1c2-213a7a81d800","position":1,"updated_at":"2025-01-07T14:49:37.464-08:00","created_at":"2025-01-07T14:49:37.464-08:00"},"relationships":{"retrospective_process_group_steps":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_groups/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update retrospective_process_group","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroups"],"description":"Update a specific retrospective_process_group by id","operationId":"updateRetrospectiveProcessGroup","parameters":[],"responses":{"200":{"description":"retrospective_process_group updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"08d0a972-a171-42ed-a98c-1afebd97525f","type":"retrospective_process_groups","attributes":{"retrospective_process_id":"2c9d6f81-ff0b-4731-b94a-d0054dda88dd","sub_status_id":"c782f10d-a01c-4d1c-a1c2-213a7a81d800","position":1,"updated_at":"2025-01-07T14:49:37.464-08:00","created_at":"2025-01-07T14:49:37.464-08:00"},"relationships":{"retrospective_process_group_steps":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_response"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_retrospective_process_group"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_groups/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a retrospective_process_group","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcessGroups"],"description":"Delete a specific retrospective_process_group by id","operationId":"deleteRetrospectiveProcessGroup","responses":{"200":{"description":"retrospective_process_group deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"08d0a972-a171-42ed-a98c-1afebd97525f","type":"retrospective_process_groups","attributes":{"retrospective_process_id":"2c9d6f81-ff0b-4731-b94a-d0054dda88dd","sub_status_id":"c782f10d-a01c-4d1c-a1c2-213a7a81d800","position":1,"updated_at":"2025-01-07T14:49:38.745-08:00","created_at":"2025-01-07T14:49:37.464-08:00"},"relationships":{"retrospective_process_group_steps":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_group_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_process_groups/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_process_groups/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_processes":{"post":{"summary":"Creates a retrospective process","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcesses"],"description":"Creates a new retrospective process from provided data","operationId":"createRetrospectiveProcess","parameters":[],"responses":{"201":{"description":"retrospective_process created","content":{"application/vnd.api+json":{"example":{"data":{"id":"0c62728c-9e29-4c8c-a988-734c46e6ce39","type":"retrospective_processes","attributes":{"name":"Retrospective Process 1","description":"Retrospective Process 1 Description","is_default":false,"created_at":"2025-01-07T14:49:42.690-08:00","updated_at":"2025-01-07T14:49:42.690-08:00","retrospective_process_matching_criteria":{"severity_ids":["88f01129-d64a-4e71-8b76-c9547524320c"]}},"relationships":{"retrospective_steps":{"data":[{"id":"da78e9e1-2353-48dc-b031-dfc9d3b697a6","type":"retrospective_steps"},{"id":"4146637c-81df-4026-a1ed-cf4d9052d260","type":"retrospective_steps"}]},"severities":{"data":[{"id":"88f01129-d64a-4e71-8b76-c9547524320c","type":"severities"}]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"name":["can't be blank"]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_retrospective_process"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/retrospective_processes \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List retrospective processes","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcesses"],"description":"List retrospective processes","operationId":"listRetrospectiveProcesses","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: retrospective_steps,severities","schema":{"type":"string","enum":["retrospective_steps","severities","incident_types","groups"]},"required":false},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/retrospective_process_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_processes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_processes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a retrospective process","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcesses"],"description":"Retrieves a specific retrospective process by id","operationId":"getRetrospectiveProcess","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: retrospective_steps,severities","schema":{"type":"string","enum":["retrospective_steps","severities","incident_types","groups"]},"required":false}],"responses":{"200":{"description":"retrospective_process found","content":{"application/vnd.api+json":{"example":{"data":{"id":"cb1ac20e-1873-45b7-af91-a6a88865b9c2","type":"retrospective_processes","attributes":{"name":"Voluptas deleniti sunt dolor.","description":"In voluptas commodi. Dolores ipsa non. Est commodi libero.","is_default":false,"created_at":"2025-01-07T14:49:40.651-08:00","updated_at":"2025-01-07T14:49:40.651-08:00","retrospective_process_matching_criteria":{"incident_type_ids":["6e844fd4-664b-4bf1-9f24-2df0e3f1c572"]}},"relationships":{"retrospective_steps":{"data":[{"id":"2f01a7b7-b4f8-446c-b11e-817c4f352592","type":"retrospective_steps"},{"id":"49c2dcdd-a696-446e-8afb-bc5f8273135c","type":"retrospective_steps"}]},"incident_types":{"data":[{"id":"6e844fd4-664b-4bf1-9f24-2df0e3f1c572","type":"incident_types"}]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_processes/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a retrospective process","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcesses"],"description":"Updates a specific retrospective process by id","operationId":"updateRetrospectiveProcess","parameters":[],"responses":{"200":{"description":"retrospective_process updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"cb1ac20e-1873-45b7-af91-a6a88865b9c2","type":"retrospective_processes","attributes":{"name":"Retrospective Process 2","description":"Retrospective Process 2 description","is_default":false,"created_at":"2025-01-07T14:49:40.651-08:00","updated_at":"2025-01-07T14:49:43.960-08:00","retrospective_process_matching_criteria":{"group_ids":["c2099daf-d95f-42a8-af32-faf5ce2a8b30"]}},"relationships":{"retrospective_steps":{"data":[{"id":"2f01a7b7-b4f8-446c-b11e-817c4f352592","type":"retrospective_steps"},{"id":"49c2dcdd-a696-446e-8afb-bc5f8273135c","type":"retrospective_steps"}]},"groups":{"data":[{"id":"c2099daf-d95f-42a8-af32-faf5ce2a8b30","type":"groups"}]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_retrospective_process"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/retrospective_processes/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a retrospective process","security":[{"bearer_auth":[]}],"tags":["RetrospectiveProcesses"],"description":"Delete a specific retrospective process by id","operationId":"deleteRetrospectiveProcess","responses":{"200":{"description":"retrospective_process deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"cb1ac20e-1873-45b7-af91-a6a88865b9c2","type":"retrospective_processes","attributes":{"name":"Voluptas deleniti sunt dolor.","description":"In voluptas commodi. Dolores ipsa non. Est commodi libero.","is_default":false,"created_at":"2025-01-07T14:49:40.651-08:00","updated_at":"2025-01-07T14:49:44.482-08:00","retrospective_process_matching_criteria":{"incident_type_ids":["6e844fd4-664b-4bf1-9f24-2df0e3f1c572"]}},"relationships":{"retrospective_steps":{"data":[{"id":"2f01a7b7-b4f8-446c-b11e-817c4f352592","type":"retrospective_steps"},{"id":"49c2dcdd-a696-446e-8afb-bc5f8273135c","type":"retrospective_steps"}]},"incident_types":{"data":[{"id":"6e844fd4-664b-4bf1-9f24-2df0e3f1c572","type":"incident_types"}]}}}},"schema":{"$ref":"#/components/schemas/retrospective_process_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/retrospective_processes/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps":{"parameters":[{"name":"retrospective_process_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a retrospective step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveSteps"],"description":"Creates a new retrospective step from provided data","operationId":"createRetrospectiveStep","parameters":[],"responses":{"201":{"description":"retrospective_step created","content":{"application/vnd.api+json":{"example":{"data":{"id":"e4ea7c7d-0d26-4a85-9ec6-8dbfc1b2783f","type":"retrospective_steps","attributes":{"retrospective_process_id":"0df04b6e-6dff-4322-8e96-bd2a5e39a0a7","title":"Step 1","description":"Step 1 description","incident_role_id":"cb44b4aa-f2f5-4607-886f-dcc39822774b","due_after_days":5,"position":1,"skippable":false,"created_at":"2025-01-07T14:49:45.903-08:00","updated_at":"2025-01-07T14:49:45.903-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_step_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Title can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_retrospective_step"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List retrospective steps","security":[{"bearer_auth":[]}],"tags":["RetrospectiveSteps"],"description":"List retrospective steps","operationId":"listRetrospectiveSteps","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/retrospective_step_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_processes/%7Bretrospective_process_id%7D/retrospective_steps?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/retrospective_steps/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a retrospective step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveSteps"],"description":"Retrieves a specific retrospective step by id","operationId":"getRetrospectiveStep","responses":{"200":{"description":"retrospective_step found","content":{"application/vnd.api+json":{"example":{"data":{"id":"63dff423-b344-4617-a6ff-81a2bd78498a","type":"retrospective_steps","attributes":{"retrospective_process_id":"0df04b6e-6dff-4322-8e96-bd2a5e39a0a7","title":"Step 11","description":"Bar","incident_role_id":"cb44b4aa-f2f5-4607-886f-dcc39822774b","due_after_days":null,"position":1,"skippable":true,"created_at":"2025-01-07T14:49:45.721-08:00","updated_at":"2025-01-07T14:49:45.722-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_step_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/retrospective_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_steps/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a retrospective step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveSteps"],"description":"Update a specific retrospective step by id","operationId":"updateRetrospectiveStep","parameters":[],"responses":{"200":{"description":"retrospective_step updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"63dff423-b344-4617-a6ff-81a2bd78498a","type":"retrospective_steps","attributes":{"retrospective_process_id":"0df04b6e-6dff-4322-8e96-bd2a5e39a0a7","title":"Step 2","description":"Step 2 description","incident_role_id":"199a4a8a-4d63-4e16-917e-5d3a1c2554d9","due_after_days":7,"position":2,"skippable":true,"created_at":"2025-01-07T14:49:45.721-08:00","updated_at":"2025-01-07T14:49:47.088-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_step_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_retrospective_step"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/retrospective_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_steps/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a retrospective step","security":[{"bearer_auth":[]}],"tags":["RetrospectiveSteps"],"description":"Delete a specific retrospective step by id","operationId":"deleteRetrospectiveStep","responses":{"200":{"description":"retrospective_step deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"63dff423-b344-4617-a6ff-81a2bd78498a","type":"retrospective_steps","attributes":{"retrospective_process_id":"0df04b6e-6dff-4322-8e96-bd2a5e39a0a7","title":"Step 11","description":"Bar","incident_role_id":"cb44b4aa-f2f5-4607-886f-dcc39822774b","due_after_days":null,"position":1,"skippable":true,"created_at":"2025-01-07T14:49:45.721-08:00","updated_at":"2025-01-07T14:49:47.619-08:00"}}},"schema":{"$ref":"#/components/schemas/retrospective_step_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/retrospective_steps/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/retrospective_steps/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/retrospective_steps/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/retrospective_steps/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/roles":{"post":{"summary":"Creates a role","security":[{"bearer_auth":[]}],"tags":["Roles"],"description":"Creates a new role from provided data","operationId":"createRole","parameters":[],"responses":{"201":{"description":"role created","content":{"application/vnd.api+json":{"example":{"data":{"id":"b77fd9b1-3289-4ec0-9824-86eeb232e46e","type":"roles","attributes":{"team_id":366,"name":"Infrastructure","slug":"infrastructure","is_deletable":true,"is_editable":true,"api_keys_permissions":["read"],"audits_permissions":[],"billing_permissions":["update"],"environments_permissions":["read"],"form_fields_permissions":["read"],"functionalities_permissions":["read"],"groups_permissions":["read"],"incident_causes_permissions":["read"],"incident_feedbacks_permissions":["read","create","update"],"incident_permission_set_id":"8f2c173e-ac73-47b7-81d6-163ff8ead4ad","incident_roles_permissions":["read"],"incident_types_permissions":["read"],"incidents_permissions":["read"],"invitations_permissions":["read"],"playbooks_permissions":["read"],"private_incidents_permissions":[],"pulses_permissions":["create","update","read"],"alerts_permissions":["create","read"],"retrospective_permissions":["read"],"roles_permissions":["read"],"secrets_permissions":["create"],"services_permissions":["read"],"severities_permissions":["read"],"status_pages_permissions":["read"],"webhooks_permissions":["read"],"workflows_permissions":["read"],"updated_at":"2025-01-07T14:49:50.621-08:00","created_at":"2025-01-07T14:49:50.621-08:00"}}},"schema":{"$ref":"#/components/schemas/role_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_role"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/roles \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/roles\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/roles\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/roles\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List roles","security":[{"bearer_auth":[]}],"tags":["Roles"],"description":"List roles","operationId":"listRoles","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/role_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/roles?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/roles/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a role","security":[{"bearer_auth":[]}],"tags":["Roles"],"description":"Retrieves a specific role by id","operationId":"getRole","responses":{"200":{"description":"role found","content":{"application/vnd.api+json":{"example":{"data":{"id":"dabfc60c-7b6a-4eb2-9ee2-91611b4ff74a","type":"roles","attributes":{"team_id":369,"name":"Role 1","slug":"role-1","is_deletable":true,"is_editable":true,"api_keys_permissions":["read"],"audits_permissions":[],"billing_permissions":["update"],"environments_permissions":["read"],"form_fields_permissions":["read"],"functionalities_permissions":["read"],"groups_permissions":["read"],"incident_causes_permissions":["read"],"incident_feedbacks_permissions":["read","create","update"],"incident_permission_set_id":"4e1dea3b-7249-48b7-a205-b66c379ebd3f","incident_roles_permissions":["read"],"incident_types_permissions":["read"],"incidents_permissions":["read"],"invitations_permissions":["read"],"playbooks_permissions":["read"],"private_incidents_permissions":[],"pulses_permissions":["create","update","read"],"alerts_permissions":["create","read"],"retrospective_permissions":["read"],"roles_permissions":["read"],"secrets_permissions":["create"],"services_permissions":["read"],"severities_permissions":["read"],"status_pages_permissions":["read"],"webhooks_permissions":["read"],"workflows_permissions":["read"],"updated_at":"2025-01-07T14:49:52.624-08:00","created_at":"2025-01-07T14:49:52.624-08:00"}}},"schema":{"$ref":"#/components/schemas/role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/roles/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a role","security":[{"bearer_auth":[]}],"tags":["Roles"],"description":"Update a specific role by id","operationId":"updateRole","parameters":[],"responses":{"200":{"description":"role updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"ad848a17-29fa-4047-9f6e-b9641de1e9bc","type":"roles","attributes":{"team_id":373,"name":"Security","slug":"role-3","is_deletable":true,"is_editable":true,"api_keys_permissions":["read"],"audits_permissions":[],"billing_permissions":["update"],"environments_permissions":["read"],"form_fields_permissions":["read"],"functionalities_permissions":["read"],"groups_permissions":["read"],"incident_causes_permissions":["read"],"incident_feedbacks_permissions":["read","create","update"],"incident_permission_set_id":"0b3a2095-667d-4309-8b60-10d4899203df","incident_roles_permissions":["read"],"incident_types_permissions":["read"],"incidents_permissions":["read"],"invitations_permissions":["read"],"playbooks_permissions":["read"],"private_incidents_permissions":[],"pulses_permissions":["create","update","read"],"alerts_permissions":["create","read"],"retrospective_permissions":["read"],"roles_permissions":["read"],"secrets_permissions":["create"],"services_permissions":["read"],"severities_permissions":["read"],"status_pages_permissions":["read"],"webhooks_permissions":["read"],"workflows_permissions":["read"],"updated_at":"2025-01-07T14:49:54.918-08:00","created_at":"2025-01-07T14:49:54.750-08:00"}}},"schema":{"$ref":"#/components/schemas/role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_role"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/roles/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a role","security":[{"bearer_auth":[]}],"tags":["Roles"],"description":"Delete a specific role by id","operationId":"deleteRole","responses":{"200":{"description":"role deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"e77e5736-b664-4fdd-82dd-1bbf4db76352","type":"roles","attributes":{"team_id":377,"name":"Role 5","slug":"role-5","is_deletable":true,"is_editable":true,"api_keys_permissions":["read"],"audits_permissions":[],"billing_permissions":["update"],"environments_permissions":["read"],"form_fields_permissions":["read"],"functionalities_permissions":["read"],"groups_permissions":["read"],"incident_causes_permissions":["read"],"incident_feedbacks_permissions":["read","create","update"],"incident_permission_set_id":"1a887466-a59a-4f6e-ad45-105b0d77d7d7","incident_roles_permissions":["read"],"incident_types_permissions":["read"],"incidents_permissions":["read"],"invitations_permissions":["read"],"playbooks_permissions":["read"],"private_incidents_permissions":[],"pulses_permissions":["create","update","read"],"alerts_permissions":["create","read"],"retrospective_permissions":["read"],"roles_permissions":["read"],"secrets_permissions":["create"],"services_permissions":["read"],"severities_permissions":["read"],"status_pages_permissions":["read"],"webhooks_permissions":["read"],"workflows_permissions":["read"],"updated_at":"2025-01-07T14:49:57.040-08:00","created_at":"2025-01-07T14:49:56.879-08:00"}}},"schema":{"$ref":"#/components/schemas/role_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/roles/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/roles/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/roles/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/roles/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days":{"parameters":[{"name":"schedule_rotation_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a schedule rotation active day","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationActiveDays"],"description":"Creates a new schedule rotation active day from provided data","operationId":"createScheduleRotationActiveDay","parameters":[],"responses":{"201":{"description":"schedule_rotation_active_day created","content":{"application/vnd.api+json":{"example":{"data":{"id":"65357180-93b1-43a5-a805-d64a7888c5ff","type":"schedule_rotation_active_days","attributes":{"schedule_rotation_id":"b0f55820-520a-4f93-b3ad-26d0d89ca142","day_name":"M","created_at":"2025-01-07T14:49:59.921-08:00","updated_at":"2025-01-07T14:49:59.921-08:00","active_time_attributes":[{"start_time":"07:30","end_time":"16:30"},{"start_time":"17:00","end_time":"20:00"}]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_active_day_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Day name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_schedule_rotation_active_day"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List schedule rotation active days","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationActiveDays"],"description":"List schedule rotation active days","operationId":"listScheduleRotationActiveDays","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/schedule_rotation_active_day_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_active_days?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedule_rotation_active_days/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a schedule rotation active day","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationActiveDays"],"description":"Retrieves a specific schedule rotation active day by id","operationId":"getScheduleRotationActiveDay","responses":{"200":{"description":"schedule_rotation_active_day found","content":{"application/vnd.api+json":{"example":{"data":{"id":"0360404d-7e7c-4a17-84cc-4c217f25436e","type":"schedule_rotation_active_days","attributes":{"schedule_rotation_id":"b0f55820-520a-4f93-b3ad-26d0d89ca142","day_name":"S","created_at":"2025-01-07T14:49:59.763-08:00","updated_at":"2025-01-07T14:49:59.763-08:00","active_time_attributes":[]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_active_day_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotation_active_days/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a schedule rotation active day","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationActiveDays"],"description":"Update a specific schedule rotation active day by id","operationId":"updateScheduleRotationActiveDay","parameters":[],"responses":{"200":{"description":"schedule_rotation_active_day updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"0360404d-7e7c-4a17-84cc-4c217f25436e","type":"schedule_rotation_active_days","attributes":{"schedule_rotation_id":"b0f55820-520a-4f93-b3ad-26d0d89ca142","day_name":"M","created_at":"2025-01-07T14:49:59.763-08:00","updated_at":"2025-01-07T14:50:01.254-08:00","active_time_attributes":[{"start_time":"10:30","end_time":"03:30"}]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_active_day_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_schedule_rotation_active_day"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotation_active_days/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a schedule rotation active day","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationActiveDays"],"description":"Delete a specific schedule rotation active day","operationId":"deleteScheduleRotationActiveDay","responses":{"200":{"description":"schedule_rotation_active_day deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"0360404d-7e7c-4a17-84cc-4c217f25436e","type":"schedule_rotation_active_days","attributes":{"schedule_rotation_id":"b0f55820-520a-4f93-b3ad-26d0d89ca142","day_name":"S","created_at":"2025-01-07T14:49:59.763-08:00","updated_at":"2025-01-07T14:50:02.446-08:00","active_time_attributes":[]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_active_day_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotation_active_days/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotation_active_days/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users":{"parameters":[{"name":"schedule_rotation_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a schedule rotation user","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationUsers"],"description":"Creates a new schedule rotation user from provided data","operationId":"createScheduleRotationUser","parameters":[],"responses":{"201":{"description":"schedule_rotation_user created","content":{"application/vnd.api+json":{"example":{"data":{"id":"f0b0415e-1719-421e-a1e8-7590ed32aeb1","type":"schedule_rotation_users","attributes":{"schedule_rotation_id":"a4a3f253-80f9-4734-9839-85174fffbbaf","user_id":425,"position":2,"created_at":"2025-01-07T14:50:04.150-08:00","updated_at":"2025-01-07T14:50:04.150-08:00"}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_user_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"User must exist","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_schedule_rotation_user"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List schedule rotation users","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationUsers"],"operationId":"listScheduleRotationUsers","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/schedule_rotation_user_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bschedule_rotation_id%7D/schedule_rotation_users?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedule_rotation_users/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a schedule rotation user","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationUsers"],"description":"Retrieves a specific schedule rotation user by id","operationId":"getScheduleRotationUser","responses":{"200":{"description":"schedule_rotation_user found","content":{"application/vnd.api+json":{"example":{"data":{"id":"50a57be3-ccda-4c6c-8ece-5995475cb67d","type":"schedule_rotation_users","attributes":{"schedule_rotation_id":"a4a3f253-80f9-4734-9839-85174fffbbaf","user_id":425,"position":2,"created_at":"2025-01-07T14:50:03.987-08:00","updated_at":"2025-01-07T14:50:03.993-08:00"}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_user_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotation_users/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update schedule rotation user","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationUsers"],"description":"Update a specific schedule rotation user by id","operationId":"updateScheduleRotationUser","parameters":[],"responses":{"200":{"description":"schedule_rotation_user updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"50a57be3-ccda-4c6c-8ece-5995475cb67d","type":"schedule_rotation_users","attributes":{"schedule_rotation_id":"a4a3f253-80f9-4734-9839-85174fffbbaf","user_id":425,"position":2,"created_at":"2025-01-07T14:50:03.987-08:00","updated_at":"2025-01-07T14:50:03.993-08:00"}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_user_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_schedule_rotation_user"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotation_users/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a schedule rotation user","security":[{"bearer_auth":[]}],"tags":["ScheduleRotationUsers"],"description":"Delete a specific schedule rotation user by id","operationId":"deleteScheduleRotationUser","responses":{"200":{"description":"schedule_rotation_user deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"50a57be3-ccda-4c6c-8ece-5995475cb67d","type":"schedule_rotation_users","attributes":{"schedule_rotation_id":"a4a3f253-80f9-4734-9839-85174fffbbaf","user_id":425,"position":2,"created_at":"2025-01-07T14:50:03.987-08:00","updated_at":"2025-01-07T14:50:06.017-08:00"}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_user_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotation_users/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotation_users/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedules/{schedule_id}/schedule_rotations":{"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a schedule rotation","security":[{"bearer_auth":[]}],"tags":["ScheduleRotations"],"description":"Creates a new schedule rotation from provided data","operationId":"createScheduleRotation","parameters":[],"responses":{"201":{"description":"schedule_rotation created with custom active times","content":{"application/vnd.api+json":{"example":{"data":{"id":"4142c6fe-0895-4a74-9b5b-22a4bef730ca","type":"schedule_rotations","attributes":{"schedule_id":"c3440e2a-8b39-4002-88be-452ab7463fda","name":"Schedule Rotation Name","position":1,"schedule_rotationable_type":"ScheduleWeeklyRotation","active_all_week":false,"active_days":["M","T"],"active_time_type":"same_time","time_zone":"American Samoa","schedule_rotationable_attributes":{"handoff_time":"21:30","handoff_day":"T"},"active_time_attributes":[{"start_time":"07:30","end_time":"16:30"},{"start_time":"17:00","end_time":"21:00"}]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_schedule_rotation"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bschedule_id%7D/schedule_rotations\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List schedule rotations","security":[{"bearer_auth":[]}],"tags":["ScheduleRotations"],"description":"List schedule rotations","operationId":"listScheduleRotations","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/schedule_rotation_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bschedule_id%7D/schedule_rotations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bschedule_id%7D/schedule_rotations?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedule_rotations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a schedule rotation","security":[{"bearer_auth":[]}],"tags":["ScheduleRotations"],"description":"Retrieves a specific schedule rotation by id","operationId":"getScheduleRotation","responses":{"200":{"description":"schedule_rotation found","content":{"application/vnd.api+json":{"example":{"data":{"id":"b8e9f8f9-9233-4eda-917c-ff224ffc158e","type":"schedule_rotations","attributes":{"schedule_id":"c3440e2a-8b39-4002-88be-452ab7463fda","name":"Schedule Rotation 10","position":1,"schedule_rotationable_type":"ScheduleDailyRotation","active_all_week":true,"active_days":[],"active_time_type":"all_day","time_zone":"UTC","schedule_rotationable_attributes":{"handoff_time":"17:00"},"active_time_attributes":[]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/schedule_rotations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a schedule rotation","security":[{"bearer_auth":[]}],"tags":["ScheduleRotations"],"description":"Update a specific schedule rotation by id","operationId":"updateScheduleRotation","parameters":[],"responses":{"200":{"description":"schedule_rotation updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"b8e9f8f9-9233-4eda-917c-ff224ffc158e","type":"schedule_rotations","attributes":{"schedule_id":"c3440e2a-8b39-4002-88be-452ab7463fda","name":"Updated Schedule Rotation Name","position":1,"schedule_rotationable_type":"ScheduleWeeklyRotation","active_all_week":false,"active_days":["M","T"],"active_time_type":"same_time","time_zone":"American Samoa","schedule_rotationable_attributes":{"handoff_time":"22:30","handoff_day":"T"},"active_time_attributes":[{"start_time":"07:30","end_time":"20:30"}]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_schedule_rotation"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/schedule_rotations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a schedule rotation","security":[{"bearer_auth":[]}],"tags":["ScheduleRotations"],"description":"Delete a specific schedule rotation by id","operationId":"deleteScheduleRotation","responses":{"200":{"description":"schedule_rotation deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"b8e9f8f9-9233-4eda-917c-ff224ffc158e","type":"schedule_rotations","attributes":{"schedule_id":"c3440e2a-8b39-4002-88be-452ab7463fda","name":"Schedule Rotation 10","position":1,"schedule_rotationable_type":"ScheduleDailyRotation","active_all_week":true,"active_days":[],"active_time_type":"all_day","time_zone":"UTC","schedule_rotationable_attributes":{"handoff_time":"17:00"},"active_time_attributes":[]}}},"schema":{"$ref":"#/components/schemas/schedule_rotation_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/schedule_rotations/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedule_rotations/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedule_rotations/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedule_rotations/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedules":{"post":{"summary":"Creates a schedule","security":[{"bearer_auth":[]}],"tags":["Schedules"],"description":"Creates a new schedule from provided data","operationId":"createSchedule","parameters":[],"responses":{"201":{"description":"schedule created","content":{"application/vnd.api+json":{"example":{"data":{"id":"205e5285-57f8-48e5-a34e-9764a8c2bfc4","type":"schedules","attributes":{"name":"Schedule Name","description":"Schedule Description","all_time_coverage":true,"slack_user_group":null,"owner_user_id":435,"created_at":"2025-01-07T14:50:16.758-08:00","updated_at":"2025-01-07T14:50:16.758-08:00"},"relationships":{"owner_user":{"data":{"id":"435","type":"users"}},"escalation_policies":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/schedule_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"name":["can't be blank"]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_schedule"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/schedules \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List schedules","security":[{"bearer_auth":[]}],"tags":["Schedules"],"description":"List schedules","operationId":"listSchedules","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/schedule_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedules/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a schedule","security":[{"bearer_auth":[]}],"tags":["Schedules"],"description":"Retrieves a specific schedule by id","operationId":"getSchedule","responses":{"200":{"description":"schedule found","content":{"application/vnd.api+json":{"example":{"data":{"id":"3992b24f-84d0-460c-b995-1fda9126de2b","type":"schedules","attributes":{"name":"Schedule 8","description":"Schedule description","all_time_coverage":false,"slack_user_group":null,"owner_user_id":435,"created_at":"2025-01-07T14:50:12.860-08:00","updated_at":"2025-01-07T14:50:12.860-08:00"},"relationships":{"owner_user":{"data":{"id":"435","type":"users"}},"escalation_policies":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/schedule_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/schedules/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a schedule","security":[{"bearer_auth":[]}],"tags":["Schedules"],"description":"Updates a specific schedule by id","operationId":"updateSchedule","parameters":[],"responses":{"200":{"description":"schedule updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"3992b24f-84d0-460c-b995-1fda9126de2b","type":"schedules","attributes":{"name":"Updated schedule name","description":"Updated schedule description","all_time_coverage":true,"slack_user_group":null,"owner_user_id":435,"created_at":"2025-01-07T14:50:12.860-08:00","updated_at":"2025-01-07T14:50:17.943-08:00"},"relationships":{"owner_user":{"data":{"id":"435","type":"users"}},"escalation_policies":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/schedule_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_schedule"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/schedules/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a schedule","security":[{"bearer_auth":[]}],"tags":["Schedules"],"description":"Delete a specific schedule by id","operationId":"deleteSchedule","responses":{"200":{"description":"schedule deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"3992b24f-84d0-460c-b995-1fda9126de2b","type":"schedules","attributes":{"name":"Schedule 8","description":"Schedule description","all_time_coverage":false,"slack_user_group":null,"owner_user_id":435,"created_at":"2025-01-07T14:50:12.860-08:00","updated_at":"2025-01-07T14:50:18.475-08:00"},"relationships":{"owner_user":{"data":{"id":"435","type":"users"}},"escalation_policies":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/schedule_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/schedules/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/schedules/{id}/shifts":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a schedule shifts","security":[{"bearer_auth":[]}],"tags":["Shifts"],"description":"Retrieves schedule shifts","operationId":"getScheduleShifts","parameters":[{"name":"to","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"schedule shifts found","content":{"application/vnd.api+json":{"example":{"data":[{"id":"bf27aa02-3ec8-4f71-ab77-dfbbe9ce6817","type":"shifts","attributes":{"schedule_id":"3992b24f-84d0-460c-b995-1fda9126de2b","rotation_id":"94e35bf8-1cb1-441b-8b31-7d20284ff08a","starts_at":"2025-01-07T12:50:12.000-08:00","ends_at":"2025-01-07T16:50:12.000-08:00","is_override":true},"relationships":{"shift_override":{"data":null},"user":{"data":{"id":"442","type":"users"}}}},{"id":"49860eb5-75d9-430e-aee4-a6971a87aca0","type":"shifts","attributes":{"schedule_id":"3992b24f-84d0-460c-b995-1fda9126de2b","rotation_id":"e4f295f1-8f2e-4434-a023-5f879fe76ab3","starts_at":"2025-01-07T17:50:13.000-08:00","ends_at":"2025-01-07T21:50:13.000-08:00","is_override":false},"relationships":{"shift_override":{"data":null},"user":{"data":{"id":"446","type":"users"}}}}]},"schema":{"$ref":"#/components/schemas/shift_list"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/schedules/%7Bid%7D/shifts?to=SOME_STRING_VALUE&from=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/schedules/%7Bid%7D/shifts?to=SOME_STRING_VALUE&from=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/schedules/%7Bid%7D/shifts?to=SOME_STRING_VALUE&from=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/schedules/%7Bid%7D/shifts?to=SOME_STRING_VALUE&from=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/secrets":{"post":{"summary":"Creates a secret","security":[{"bearer_auth":[]}],"tags":["Secrets"],"description":"Creates a new secret from provided data","operationId":"createSecret","parameters":[],"responses":{"201":{"description":"secret created","content":{"application/vnd.api+json":{"example":{"data":{"id":"79b9caab-15c5-4667-9518-63772dc43ee3","type":"secrets","attributes":{"kind":"built_in","name":"cgwxeahahk","secret":"[REDACTED]","hashicorp_vault_mount":"secret","hashicorp_vault_path":null,"hashicorp_vault_version":0,"created_at":"2025-01-07T14:50:22.112-08:00","updated_at":"2025-01-07T14:50:22.112-08:00"}}},"schema":{"$ref":"#/components/schemas/secret_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name only allows letters, numbers, and underscore","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_secret"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/secrets \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/secrets\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/secrets\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/secrets\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List secrets","security":[{"bearer_auth":[]}],"tags":["Secrets"],"description":"List secrets","operationId":"listSecrets","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/secret_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/secrets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/secrets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/secrets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/secrets?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/secrets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a secret","security":[{"bearer_auth":[]}],"tags":["Secrets"],"description":"Retrieve a specific secret by id","operationId":"getSecret","responses":{"200":{"description":"secret found","content":{"application/vnd.api+json":{"example":{"data":{"id":"60d27fb4-9afe-4a36-b335-5035d4ee7fd8","type":"secrets","attributes":{"kind":"built_in","name":"ceuljofhdi","secret":"[REDACTED]","hashicorp_vault_mount":"secret","hashicorp_vault_path":null,"hashicorp_vault_version":0,"created_at":"2025-01-07T14:50:20.228-08:00","updated_at":"2025-01-07T14:50:20.228-08:00"}}},"schema":{"$ref":"#/components/schemas/secret_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/secrets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/secrets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/secrets/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/secrets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a secret","security":[{"bearer_auth":[]}],"tags":["Secrets"],"description":"Update a specific secret by id","operationId":"updateSecret","parameters":[],"responses":{"200":{"description":"secret updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"60d27fb4-9afe-4a36-b335-5035d4ee7fd8","type":"secrets","attributes":{"kind":"built_in","name":"foo_bar","secret":"[REDACTED]","hashicorp_vault_mount":"secret","hashicorp_vault_path":null,"hashicorp_vault_version":0,"created_at":"2025-01-07T14:50:20.228-08:00","updated_at":"2025-01-07T14:50:23.323-08:00"}}},"schema":{"$ref":"#/components/schemas/secret_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_secret"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/secrets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/secrets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/secrets/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/secrets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a secret","security":[{"bearer_auth":[]}],"tags":["Secrets"],"description":"Delete a specific secret by id","operationId":"deleteSecret","responses":{"200":{"description":"secret deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"60d27fb4-9afe-4a36-b335-5035d4ee7fd8","type":"secrets","attributes":{"kind":"built_in","name":"ceuljofhdi","secret":"[REDACTED]","hashicorp_vault_mount":"secret","hashicorp_vault_path":null,"hashicorp_vault_version":0,"created_at":"2025-01-07T14:50:20.228-08:00","updated_at":"2025-01-07T14:50:23.907-08:00"}}},"schema":{"$ref":"#/components/schemas/secret_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/secrets/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/secrets/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/secrets/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/secrets/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/services":{"post":{"summary":"Creates a service","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"Creates a new service from provided data","operationId":"createService","parameters":[],"responses":{"201":{"description":"service created","content":{"application/vnd.api+json":{"example":{"data":{"id":"b511ed40-f4a2-4bc4-8801-ce96523b9672","type":"services","attributes":{"name":"elasticsearch-prod","slug":"elasticsearch-prod","description":"Elastisearch","public_description":"Public description","notify_emails":["john@rootly.com","doe@rootly.com"],"color":"#FFF","status":"operational","position":1,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"engineering"}],"github_repository_name":"rootlyhq/my-github-service","github_repository_branch":"main","gitlab_repository_name":"rootlyhq/my-gitlab-service","gitlab_repository_branch":"main","opsgenie_id":"8743a1b2-11da-480e-8493-744660987bef","pagerduty_id":"PQ9K7I8","backstage_id":null,"external_id":"d795fe69-acc2-4b30-92c9-3c25cbb92056","cortex_id":null,"service_now_ci_sys_id":null,"environment_ids":["87c51507-5e96-49b6-b973-3ab6f6d2dd3a"],"service_ids":["035931fc-be14-4de8-a842-417dc26c6cf5"],"owners_group_ids":["3e35f00b-dd56-4242-babc-ec017bb01c6a"],"owners_user_ids":[455],"incidents_count":0,"alert_urgency_id":null,"alerts_email_enabled":true,"alerts_email_address":"service-a8a7853ce58be87ad354991f25e06eb4@test.email.rootly.io","created_at":"2025-01-07T14:50:30.758-08:00","updated_at":"2025-01-07T14:50:30.758-08:00"}}},"schema":{"$ref":"#/components/schemas/service_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_service"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/services \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List services","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"List services","operationId":"listServices","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[backstage_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[cortex_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[opslevel_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[external_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/service_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/services/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a service","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"Retrieves a specific service by id","operationId":"getService","responses":{"200":{"description":"service found","content":{"application/vnd.api+json":{"example":{"data":{"id":"035931fc-be14-4de8-a842-417dc26c6cf5","type":"services","attributes":{"name":"Esse mollitia similique eius.","slug":"esse-mollitia-similique-eius","description":"Corporis odit impedit voluptas.","public_description":null,"notify_emails":[],"color":"#D7E7F5","status":"partial_outage","position":1,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[],"slack_aliases":[],"github_repository_name":null,"github_repository_branch":"master","gitlab_repository_name":null,"gitlab_repository_branch":"master","opsgenie_id":null,"pagerduty_id":null,"backstage_id":null,"external_id":null,"cortex_id":null,"service_now_ci_sys_id":null,"environment_ids":[],"service_ids":[],"owners_group_ids":[],"owners_user_ids":[],"incidents_count":1,"alert_urgency_id":null,"alerts_email_enabled":false,"alerts_email_address":"service-230149d518aaf9bd0a03455611f74bcb@email.rootly.com","created_at":"2025-01-07T14:50:25.093-08:00","updated_at":"2025-01-07T14:50:25.228-08:00"}}},"schema":{"$ref":"#/components/schemas/service_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/services/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a service","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"Update a specific service by id","operationId":"updateService","parameters":[],"responses":{"200":{"description":"service updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"035931fc-be14-4de8-a842-417dc26c6cf5","type":"services","attributes":{"name":"elasticsearch-staging","slug":"esse-mollitia-similique-eius","description":"Elastisearch","public_description":"Public description updated","notify_emails":["hello@rootly.com","world@rootly.com"],"color":"#FFF","status":"partial_outage","position":2,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"leadership"}],"github_repository_name":"rootlyhq/my-another-github-service","github_repository_branch":"master","gitlab_repository_name":"rootlyhq/my-another-gitlab-service","gitlab_repository_branch":"master","opsgenie_id":"8743a1b2-11da-480e-8493-744660987bec","pagerduty_id":"PQ9K7I9","backstage_id":null,"external_id":"33bfcc62-cc35-46e6-a270-8c52a56fb358","cortex_id":null,"service_now_ci_sys_id":null,"environment_ids":["87c51507-5e96-49b6-b973-3ab6f6d2dd3a"],"service_ids":["035931fc-be14-4de8-a842-417dc26c6cf5"],"owners_group_ids":[],"owners_user_ids":[],"incidents_count":1,"alert_urgency_id":null,"alerts_email_enabled":false,"alerts_email_address":"service-230149d518aaf9bd0a03455611f74bcb@email.rootly.com","created_at":"2025-01-07T14:50:25.093-08:00","updated_at":"2025-01-07T14:50:32.649-08:00"}}},"schema":{"$ref":"#/components/schemas/service_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_service"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/services/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a service","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"Delete a specific service by id","operationId":"deleteService","responses":{"200":{"description":"service deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"035931fc-be14-4de8-a842-417dc26c6cf5","type":"services","attributes":{"name":"Esse mollitia similique eius.","slug":"esse-mollitia-similique-eius","description":"Corporis odit impedit voluptas.","public_description":null,"notify_emails":[],"color":"#D7E7F5","status":"partial_outage","position":1,"show_uptime":true,"show_uptime_last_days":60,"slack_channels":[],"slack_aliases":[],"github_repository_name":null,"github_repository_branch":"master","gitlab_repository_name":null,"gitlab_repository_branch":"master","opsgenie_id":null,"pagerduty_id":null,"backstage_id":null,"external_id":null,"cortex_id":null,"service_now_ci_sys_id":null,"environment_ids":[],"service_ids":[],"owners_group_ids":[],"owners_user_ids":[],"incidents_count":1,"alert_urgency_id":null,"alerts_email_enabled":false,"alerts_email_address":"service-230149d518aaf9bd0a03455611f74bcb@email.rootly.com","created_at":"2025-01-07T14:50:25.093-08:00","updated_at":"2025-01-07T14:50:33.513-08:00"}}},"schema":{"$ref":"#/components/schemas/service_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/services/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/services/{id}/incidents_chart":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get service incidents chart","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"Get service incidents chart","operationId":"getServiceIncidentsChart","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"example":{"data":{"2024-11-08 00:00:00 UTC":0,"2024-11-15 00:00:00 UTC":0,"2024-11-22 00:00:00 UTC":0,"2024-11-29 00:00:00 UTC":0,"2024-12-06 00:00:00 UTC":0,"2024-12-13 00:00:00 UTC":0,"2024-12-20 00:00:00 UTC":0,"2024-12-27 00:00:00 UTC":0,"2025-01-03 00:00:00 UTC":1}},"schema":{"$ref":"#/components/schemas/incidents_chart_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/services/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/services/{id}/uptime_chart":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get service uptime chart","security":[{"bearer_auth":[]}],"tags":["Services"],"description":"Get service uptime chart","operationId":"getServiceUptimeChart","parameters":[{"name":"period","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"example":{"data":{"2024-12-23":100,"2024-12-24":100,"2024-12-25":100,"2024-12-26":100,"2024-12-27":100,"2024-12-28":100,"2024-12-29":100,"2024-12-30":100,"2024-12-31":100,"2025-01-01":100,"2025-01-02":100,"2025-01-03":100,"2025-01-04":50,"2025-01-05":0,"2025-01-06":100,"2025-01-07":100}},"schema":{"$ref":"#/components/schemas/uptime_chart_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/services/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/services/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/services/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/services/%7Bid%7D/uptime_chart?period=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/severities":{"post":{"summary":"Creates a severity","security":[{"bearer_auth":[]}],"tags":["Severities"],"description":"Creates a new severity from provided data","operationId":"createSeverity","parameters":[],"responses":{"201":{"description":"severity created","content":{"application/vnd.api+json":{"example":{"data":{"id":"37dfbf78-af9e-4070-9f88-9464a786288b","type":"severities","attributes":{"name":"P0","slug":"p0","description":"High Priority","severity":"medium","color":"#E58A1F","position":1,"notify_emails":["hello@rootly.com","world@rootly.com"],"slack_channels":[{"id":"C03MKDSEJE8","name":"elastisearch"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"leadership"}],"created_at":"2025-01-07T14:50:38.718-08:00","updated_at":"2025-01-07T14:50:38.718-08:00"}}},"schema":{"$ref":"#/components/schemas/severity_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_severity"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/severities \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/severities\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/severities\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/severities\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List severities","security":[{"bearer_auth":[]}],"tags":["Severities"],"description":"List severities","operationId":"listSeverities","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[severity]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[color]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/severity_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/severities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/severities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/severities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/severities?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bseverity%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/severities/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a severity","security":[{"bearer_auth":[]}],"tags":["Severities"],"description":"Retrieves a specific severity by id","operationId":"getSeverity","responses":{"200":{"description":"severity found","content":{"application/vnd.api+json":{"example":{"data":{"id":"7852dfbd-2d65-4772-9ef7-e21afcb57c49","type":"severities","attributes":{"name":"vz2dg","slug":"vz2dg","description":"Eius consectetur dolor voluptas.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:50:36.647-08:00","updated_at":"2025-01-07T14:50:36.647-08:00"}}},"schema":{"$ref":"#/components/schemas/severity_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/severities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/severities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/severities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/severities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a severity","security":[{"bearer_auth":[]}],"tags":["Severities"],"description":"Update a specific severity by id","operationId":"updateSeverity","parameters":[],"responses":{"200":{"description":"severity updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"7852dfbd-2d65-4772-9ef7-e21afcb57c49","type":"severities","attributes":{"name":"P1","slug":"p1","description":"Medium Priority","severity":"medium","color":"#000","position":2,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:50:36.647-08:00","updated_at":"2025-01-07T14:50:39.881-08:00"}}},"schema":{"$ref":"#/components/schemas/severity_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_severity"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/severities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/severities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/severities/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/severities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a severity","security":[{"bearer_auth":[]}],"tags":["Severities"],"description":"Delete a specific severity by id","operationId":"deleteSeverity","responses":{"200":{"description":"severity deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"7852dfbd-2d65-4772-9ef7-e21afcb57c49","type":"severities","attributes":{"name":"vz2dg","slug":"vz2dg","description":"Eius consectetur dolor voluptas.","severity":"medium","color":"#E58A1F","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"created_at":"2025-01-07T14:50:36.647-08:00","updated_at":"2025-01-07T14:50:40.427-08:00"}}},"schema":{"$ref":"#/components/schemas/severity_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/severities/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/severities/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/severities/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/severities/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/shifts":{"get":{"summary":"List shifts","security":[{"bearer_auth":[]}],"tags":["Shifts"],"description":"List shifts","operationId":"listShifts","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: shift_override,user","schema":{"type":"string","enum":["shift_override","user"]},"required":false},{"name":"to","in":"query","description":"Start range for shifts","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"End range for shifts","required":false,"schema":{"type":"string"}},{"name":"user_ids[]","in":"query","schema":{"type":"array","items":{"type":"integer"}},"style":"form","explode":true,"required":false},{"name":"schedule_ids[]","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"required":false}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"example":{"data":[{"id":"87fa8a8a-2fa1-49a8-9ca2-466dbbdacea6","type":"shifts","attributes":{"schedule_id":"0cebeb8a-8452-4640-9ee0-32fa2718e081","rotation_id":"1254b8bd-5050-48eb-a0cc-7c99cbfc9b83","starts_at":"2024-07-02T21:00:00.000-07:00","ends_at":"2024-07-02T23:00:00.000-07:00","is_override":true},"relationships":{"shift_override":{"data":null},"user":{"data":{"id":"467","type":"users"}}}},{"id":"ba5720f7-cca3-4ffb-8a7e-94538f69dac2","type":"shifts","attributes":{"schedule_id":"0cebeb8a-8452-4640-9ee0-32fa2718e081","rotation_id":"c4d278ae-7960-4413-a1b0-664fcaef9044","starts_at":"2024-07-02T19:00:00.000-07:00","ends_at":"2024-07-02T21:00:00.000-07:00","is_override":false},"relationships":{"shift_override":{"data":null},"user":{"data":{"id":"467","type":"users"}}}}]},"schema":{"$ref":"#/components/schemas/shift_list"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/shifts?include=SOME_STRING_VALUE&to=SOME_STRING_VALUE&from=SOME_STRING_VALUE&user_ids%5B%5D=SOME_ARRAY_VALUE&schedule_ids%5B%5D=SOME_ARRAY_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/shifts?include=SOME_STRING_VALUE&to=SOME_STRING_VALUE&from=SOME_STRING_VALUE&user_ids%5B%5D=SOME_ARRAY_VALUE&schedule_ids%5B%5D=SOME_ARRAY_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/shifts?include=SOME_STRING_VALUE&to=SOME_STRING_VALUE&from=SOME_STRING_VALUE&user_ids%5B%5D=SOME_ARRAY_VALUE&schedule_ids%5B%5D=SOME_ARRAY_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/shifts?include=SOME_STRING_VALUE&to=SOME_STRING_VALUE&from=SOME_STRING_VALUE&user_ids%5B%5D=SOME_ARRAY_VALUE&schedule_ids%5B%5D=SOME_ARRAY_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/status-pages/{status_page_id}/templates":{"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a status page template","security":[{"bearer_auth":[]}],"tags":["StatusPageTemplates"],"description":"Creates a new template from provided data","operationId":"createStatusPageTemplate","parameters":[],"responses":{"201":{"description":"incident_event created","content":{"application/vnd.api+json":{"example":{"data":{"id":"38951d75-cdbc-4d36-b9e2-b11abc5890e6","type":"status_page_templates","attributes":{"status_page_id":"ad24c0d6-2540-4393-9a4c-d56c7d0aad8c","title":"Created from API","body":"This was created from API.","update_status":null,"should_notify_subscribers":false,"position":4,"enabled":true,"created_at":"2025-01-07T14:50:45.872-08:00","updated_at":"2025-01-07T14:50:45.872-08:00","kind":"normal"}}},"schema":{"$ref":"#/components/schemas/status_page_template_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Title can't be blank","status":"422"},{"title":"Body can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/status_page_template"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/status-pages/%7Bstatus_page_id%7D/templates \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages/%7Bstatus_page_id%7D/templates\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages/%7Bstatus_page_id%7D/templates\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages/%7Bstatus_page_id%7D/templates\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List status page templates","security":[{"bearer_auth":[]}],"tags":["StatusPageTemplates"],"description":"List status page templates","operationId":"listStatusPageTemplates","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/status_page_template_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/status-pages/%7Bstatus_page_id%7D/templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages/%7Bstatus_page_id%7D/templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages/%7Bstatus_page_id%7D/templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages/%7Bstatus_page_id%7D/templates?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/templates/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a status page template","security":[{"bearer_auth":[]}],"tags":["StatusPageTemplates"],"description":"Retrieves a specific status_page_template by id","operationId":"getStatusPageTemplate","responses":{"200":{"description":"status page template found","content":{"application/vnd.api+json":{"example":{"data":{"id":"a0701f21-e275-4d32-adb4-d20a5b18f0f8","type":"status_page_templates","attributes":{"status_page_id":"ad24c0d6-2540-4393-9a4c-d56c7d0aad8c","title":"Ut","body":"Expedita id exercitationem temporibus.","update_status":null,"should_notify_subscribers":false,"position":1,"enabled":true,"created_at":"2025-01-07T14:50:45.584-08:00","updated_at":"2025-01-07T14:50:45.584-08:00","kind":"normal"}}},"schema":{"$ref":"#/components/schemas/status_page_template_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/templates/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/templates/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/templates/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/templates/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update status page template","security":[{"bearer_auth":[]}],"tags":["StatusPageTemplates"],"description":"Update a specific template event by id","operationId":"updateStatusPageTemplate","parameters":[],"responses":{"200":{"description":"incident_event updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"a0701f21-e275-4d32-adb4-d20a5b18f0f8","type":"status_page_templates","attributes":{"status_page_id":"ad24c0d6-2540-4393-9a4c-d56c7d0aad8c","title":"Update template title","body":"Update template body","update_status":null,"should_notify_subscribers":false,"position":1,"enabled":true,"created_at":"2025-01-07T14:50:45.584-08:00","updated_at":"2025-01-07T14:50:47.580-08:00","kind":"normal"}}},"schema":{"$ref":"#/components/schemas/status_page_template_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/status_page_template"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/templates/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/templates/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/templates/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/templates/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a incident event","security":[{"bearer_auth":[]}],"tags":["StatusPageTemplates"],"description":"Delete a specific template event by id","operationId":"deleteStatusPageTemplate","responses":{"200":{"description":"incident_event deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"a0701f21-e275-4d32-adb4-d20a5b18f0f8","type":"status_page_templates","attributes":{"status_page_id":"ad24c0d6-2540-4393-9a4c-d56c7d0aad8c","title":"Ut","body":"Expedita id exercitationem temporibus.","update_status":null,"should_notify_subscribers":false,"position":1,"enabled":true,"created_at":"2025-01-07T14:50:45.584-08:00","updated_at":"2025-01-07T14:50:48.309-08:00","kind":"normal"}}},"schema":{"$ref":"#/components/schemas/status_page_template_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/templates/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/templates/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/templates/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/templates/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/status-pages":{"post":{"summary":"Creates a status page","security":[{"bearer_auth":[]}],"tags":["StatusPages"],"description":"Creates a new status page from provided data","operationId":"createStatusPage","parameters":[],"responses":{"201":{"description":"status_page created","content":{"application/vnd.api+json":{"example":{"data":{"id":"7f29e4cd-7b58-4ebb-a5b2-e1ed389288b5","type":"status_pages","attributes":{"title":"My Status Page","public_title":null,"description":"My Status Page description","public_description":null,"header_color":"#0061F2","footer_color":"#1F2F41","allow_search_engine_index":true,"public":false,"website_url":null,"website_privacy_url":null,"website_support_url":null,"ga_tracking_id":null,"time_zone":"Etc/UTC","success_message":"All Systems Operational","failure_message":"Something's not quite right","authentication_enabled":false,"authentication_password":"[REDACTED]","enabled":true,"functionality_ids":["b3e71081-82c2-4e49-9898-2720454f4e49"],"service_ids":["a4e8ef4c-eb3f-413b-be99-75b36e4b2acc"],"allow_email_subscribers":true,"allow_sms_subscribers":true,"allow_rss_atom_feeds":true,"created_at":"2025-01-07T14:50:52.165-08:00","updated_at":"2025-01-07T14:50:52.165-08:00"}}},"schema":{"$ref":"#/components/schemas/status_page_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Title can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_status_page"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/status-pages \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List status pages","security":[{"bearer_auth":[]}],"tags":["StatusPages"],"description":"List status pages","operationId":"listStatusPages","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/status_page_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/status-pages?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/status-pages/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a status page","security":[{"bearer_auth":[]}],"tags":["StatusPages"],"description":"Retrieves a specific status page by id","operationId":"getStatusPage","responses":{"200":{"description":"status_page found","content":{"application/vnd.api+json":{"example":{"data":{"id":"81a9d39d-7d0c-4be2-8718-5b2989b6ec0d","type":"status_pages","attributes":{"title":"Nostrum harum esse unde.","public_title":null,"description":null,"public_description":null,"header_color":"#0061F2","footer_color":"#1F2F41","allow_search_engine_index":true,"public":false,"website_url":null,"website_privacy_url":null,"website_support_url":null,"ga_tracking_id":null,"time_zone":"Etc/UTC","success_message":"All Systems Operational","failure_message":"Something's not quite right","authentication_enabled":false,"authentication_password":"[REDACTED]","enabled":true,"functionality_ids":[],"service_ids":[],"allow_email_subscribers":true,"allow_sms_subscribers":true,"allow_rss_atom_feeds":true,"created_at":"2025-01-07T14:50:49.611-08:00","updated_at":"2025-01-07T14:50:49.611-08:00"}}},"schema":{"$ref":"#/components/schemas/status_page_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/status-pages/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a status page","security":[{"bearer_auth":[]}],"tags":["StatusPages"],"description":"Update a specific status page by id","operationId":"updateStatusPage","parameters":[],"responses":{"200":{"description":"status_page updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"81a9d39d-7d0c-4be2-8718-5b2989b6ec0d","type":"status_pages","attributes":{"title":"My Status Page Updated","public_title":null,"description":"My Status Page Description Updated","public_description":null,"header_color":"#0061F2","footer_color":"#1F2F41","allow_search_engine_index":true,"public":false,"website_url":null,"website_privacy_url":null,"website_support_url":null,"ga_tracking_id":null,"time_zone":"Etc/UTC","success_message":"All Systems Operational","failure_message":"Something's not quite right","authentication_enabled":false,"authentication_password":"[REDACTED]","enabled":true,"functionality_ids":[],"service_ids":[],"allow_email_subscribers":true,"allow_sms_subscribers":true,"allow_rss_atom_feeds":true,"created_at":"2025-01-07T14:50:49.611-08:00","updated_at":"2025-01-07T14:50:54.707-08:00"}}},"schema":{"$ref":"#/components/schemas/status_page_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_status_page"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/status-pages/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a status page","security":[{"bearer_auth":[]}],"tags":["StatusPages"],"description":"Delete a specific status page by id","operationId":"deleteStatusPage","responses":{"200":{"description":"status_page deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"81a9d39d-7d0c-4be2-8718-5b2989b6ec0d","type":"status_pages","attributes":{"title":"Nostrum harum esse unde.","public_title":null,"description":null,"public_description":null,"header_color":"#0061F2","footer_color":"#1F2F41","allow_search_engine_index":true,"public":false,"website_url":null,"website_privacy_url":null,"website_support_url":null,"ga_tracking_id":null,"time_zone":"Etc/UTC","success_message":"All Systems Operational","failure_message":"Something's not quite right","authentication_enabled":false,"authentication_password":"[REDACTED]","enabled":true,"functionality_ids":[],"service_ids":[],"allow_email_subscribers":true,"allow_sms_subscribers":true,"allow_rss_atom_feeds":true,"created_at":"2025-01-07T14:50:49.611-08:00","updated_at":"2025-01-07T14:50:55.598-08:00"}}},"schema":{"$ref":"#/components/schemas/status_page_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/status-pages/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/status-pages/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/status-pages/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/status-pages/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/sub_statuses":{"post":{"summary":"Creates a sub_status","security":[{"bearer_auth":[]}],"tags":["SubStatuses"],"description":"Creates a new sub_status from provided data","operationId":"createSubStatus","parameters":[],"responses":{"201":{"description":"sub_status created","content":{"application/vnd.api+json":{"example":{"data":{"id":"a93f28f1-c7cf-4548-a96c-f11b7ecbf269","type":"sub_statuses","attributes":{"name":"Test","description":"This is a description","slug":"test","parent_status":"started","position":4,"deleted_at":null,"updated_at":"2025-01-07T14:50:58.826-08:00","created_at":"2025-01-07T14:50:58.826-08:00"}}},"schema":{"$ref":"#/components/schemas/sub_status_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"Name is too short (minimum is 1 character)","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_sub_status"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/sub_statuses \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/sub_statuses\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/sub_statuses\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/sub_statuses\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List sub_statuses","security":[{"bearer_auth":[]}],"tags":["SubStatuses"],"description":"List sub_statuses","operationId":"listSubStatuses","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[parent_status]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/sub_status_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/sub_statuses?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bparent_status%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/sub_statuses?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bparent_status%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/sub_statuses?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bparent_status%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/sub_statuses?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bparent_status%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/sub_statuses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a sub_status","security":[{"bearer_auth":[]}],"tags":["SubStatuses"],"description":"Retrieves a specific sub_status by id","operationId":"getSubStatus","responses":{"200":{"description":"sub_status found","content":{"application/vnd.api+json":{"example":{"data":{"id":"bc92acbb-7190-4038-9857-85ef5130e8b9","type":"sub_statuses","attributes":{"name":"zhvj4","description":"Cum enim explicabo velit.","slug":"zhvj4","parent_status":"started","position":3,"deleted_at":null,"updated_at":"2025-01-07T14:50:56.994-08:00","created_at":"2025-01-07T14:50:56.994-08:00"}}},"schema":{"$ref":"#/components/schemas/sub_status_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/sub_statuses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/sub_statuses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/sub_statuses/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/sub_statuses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a sub_status","security":[{"bearer_auth":[]}],"tags":["SubStatuses"],"description":"Update a specific sub_status by id","operationId":"updateSubStatus","parameters":[],"responses":{"200":{"description":"sub_status updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"bc92acbb-7190-4038-9857-85ef5130e8b9","type":"sub_statuses","attributes":{"name":"zhvj4","description":"Updated description","slug":"zhvj4","parent_status":"started","position":3,"deleted_at":null,"updated_at":"2025-01-07T14:50:59.944-08:00","created_at":"2025-01-07T14:50:56.994-08:00"}}},"schema":{"$ref":"#/components/schemas/sub_status_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_sub_status"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/sub_statuses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/sub_statuses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/sub_statuses/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/sub_statuses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a sub_status","security":[{"bearer_auth":[]}],"tags":["SubStatuses"],"description":"Delete a specific sub_status by id","operationId":"deleteSubStatus","responses":{"200":{"description":"sub_status deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"bc92acbb-7190-4038-9857-85ef5130e8b9","type":"sub_statuses","attributes":{"name":"zhvj4","description":"Cum enim explicabo velit.","slug":"zhvj4","parent_status":"started","position":3,"deleted_at":"2025-01-07T14:51:00.471-08:00","updated_at":"2025-01-07T14:51:00.471-08:00","created_at":"2025-01-07T14:50:56.994-08:00"}}},"schema":{"$ref":"#/components/schemas/sub_status_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/sub_statuses/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/sub_statuses/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/sub_statuses/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/sub_statuses/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/teams":{"post":{"summary":"Creates a team","security":[{"bearer_auth":[]}],"tags":["Teams"],"description":"Creates a new team from provided data","operationId":"createTeam","parameters":[],"responses":{"201":{"description":"team created","content":{"application/vnd.api+json":{"example":{"data":{"id":"b9ffb511-c126-499b-971c-5ae57fdc56f3","type":"groups","attributes":{"slug":"infrastructure","name":"Infrastructure","description":"Everything infrastructure related","color":"#FFF","position":1,"notify_emails":["john@rootly.com","doe@rootly.com"],"slack_channels":[{"id":"C03MKDSEJE8","name":"infrastructure"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"infrastructure"}],"pagerduty_id":"PQ9K7I8","pagerduty_service_id":null,"backstage_id":null,"external_id":"d795fe69-acc2-4b30-92c9-3c25cbb92056","opsgenie_id":"8743a1b2-11da-480e-8493-744660987bef","victor_ops_id":"e877c558-12e2-44d2-8723-5c86f7473c54","pagertree_id":"daa8bcd6-bf4a-4716-976c-812832ae115e","cortex_id":null,"service_now_ci_sys_id":null,"user_ids":[494,495],"incidents_count":0,"alert_urgency_id":null,"alerts_email_enabled":true,"alerts_email_address":"group-ad8b0a4cdd6bf3531367b1a54e3a8e3e@test.email.rootly.io","created_at":"2025-01-07T14:51:07.292-08:00","updated_at":"2025-01-07T14:51:07.292-08:00"},"relationships":{"users":{"data":[{"id":"494","type":"users"},{"id":"495","type":"users"}]}}}},"schema":{"$ref":"#/components/schemas/team_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid association","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_team"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/teams \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/teams\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/teams\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/teams\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List teams","security":[{"bearer_auth":[]}],"tags":["Teams"],"description":"List teams","operationId":"listTeams","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[backstage_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[cortex_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[opslevel_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[external_id]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[color]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/team_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/teams?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/teams?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/teams?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/teams?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE&filter%5Bbackstage_id%5D=SOME_STRING_VALUE&filter%5Bcortex_id%5D=SOME_STRING_VALUE&filter%5Bopslevel_id%5D=SOME_STRING_VALUE&filter%5Bexternal_id%5D=SOME_STRING_VALUE&filter%5Bcolor%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/teams/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a team","security":[{"bearer_auth":[]}],"tags":["Teams"],"description":"Retrieves a specific team by id","operationId":"getTeam","responses":{"200":{"description":"team found","content":{"application/vnd.api+json":{"example":{"data":{"id":"42f9edc3-d40a-4d19-8da8-629ff56b69e9","type":"groups","attributes":{"slug":"possimus-sit-et-incidunt","name":"Possimus sit et incidunt.","description":null,"color":"#F5D9C4","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"pagerduty_id":null,"pagerduty_service_id":null,"backstage_id":null,"external_id":null,"opsgenie_id":null,"victor_ops_id":null,"pagertree_id":null,"cortex_id":null,"service_now_ci_sys_id":null,"user_ids":[],"incidents_count":1,"alert_urgency_id":null,"alerts_email_enabled":false,"alerts_email_address":"group-432b9585601fba38b5cd41182d3f1659@email.rootly.com","created_at":"2025-01-07T14:51:02.624-08:00","updated_at":"2025-01-07T14:51:02.624-08:00"},"relationships":{"users":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/team_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/teams/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/teams/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/teams/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/teams/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a team","security":[{"bearer_auth":[]}],"tags":["Teams"],"description":"Update a specific team by id","operationId":"updateTeam","parameters":[],"responses":{"200":{"description":"team updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"42f9edc3-d40a-4d19-8da8-629ff56b69e9","type":"groups","attributes":{"slug":"security","name":"Security","description":"Everything security related","color":"#000","position":2,"notify_emails":["hello@rootly.com","world@rootly.com"],"slack_channels":[{"id":"C03MKDSEJE8","name":"infrastructure"}],"slack_aliases":[{"id":"S03F7QUV7F1","name":"infrastructure"}],"pagerduty_id":"PQ9K7I9","pagerduty_service_id":null,"backstage_id":null,"external_id":"95ee00ee-4b35-40f7-bd0f-a919f9b8008d","opsgenie_id":"a6edf90f-1a61-4592-99a7-bcf101c81bca","victor_ops_id":"0ae4de13-145a-4214-9cd5-c982ef95a740","pagertree_id":"c4378a92-505c-49e4-a46e-c44c830bbc99","cortex_id":null,"service_now_ci_sys_id":null,"user_ids":[494],"incidents_count":1,"alert_urgency_id":null,"alerts_email_enabled":false,"alerts_email_address":"group-432b9585601fba38b5cd41182d3f1659@email.rootly.com","created_at":"2025-01-07T14:51:02.624-08:00","updated_at":"2025-01-07T14:51:10.254-08:00"},"relationships":{"users":{"data":[{"id":"494","type":"users"}]}}}},"schema":{"$ref":"#/components/schemas/team_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_team"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/teams/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/teams/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/teams/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/teams/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a team","security":[{"bearer_auth":[]}],"tags":["Teams"],"description":"Delete a specific team by id","operationId":"deleteTeam","responses":{"200":{"description":"team deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"42f9edc3-d40a-4d19-8da8-629ff56b69e9","type":"groups","attributes":{"slug":"possimus-sit-et-incidunt","name":"Possimus sit et incidunt.","description":null,"color":"#F5D9C4","position":1,"notify_emails":[],"slack_channels":[],"slack_aliases":[],"pagerduty_id":null,"pagerduty_service_id":null,"backstage_id":null,"external_id":null,"opsgenie_id":null,"victor_ops_id":null,"pagertree_id":null,"cortex_id":null,"service_now_ci_sys_id":null,"user_ids":[],"incidents_count":1,"alert_urgency_id":null,"alerts_email_enabled":false,"alerts_email_address":"group-432b9585601fba38b5cd41182d3f1659@email.rootly.com","created_at":"2025-01-07T14:51:02.624-08:00","updated_at":"2025-01-07T14:51:11.112-08:00"},"relationships":{"users":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/team_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/teams/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/teams/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/teams/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/teams/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/teams/{id}/incidents_chart":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get team incidents chart","security":[{"bearer_auth":[]}],"tags":["Teams"],"description":"Get team incidents chart","operationId":"getTeamIncidentsChart","parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"example":{"data":{"2024-12-07":0,"2024-12-08":0,"2024-12-09":0,"2024-12-10":0,"2024-12-11":0,"2024-12-12":0,"2024-12-13":0,"2024-12-14":0,"2024-12-15":0,"2024-12-16":0,"2024-12-17":0,"2024-12-18":0,"2024-12-19":0,"2024-12-20":0,"2024-12-21":0,"2024-12-22":0,"2024-12-23":0,"2024-12-24":0,"2024-12-25":0,"2024-12-26":0,"2024-12-27":0,"2024-12-28":0,"2024-12-29":0,"2024-12-30":0,"2024-12-31":0,"2025-01-01":0,"2025-01-02":0,"2025-01-03":0,"2025-01-04":1,"2025-01-05":0,"2025-01-06":0,"2025-01-07":0}},"schema":{"$ref":"#/components/schemas/incidents_chart_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/teams/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/teams/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/teams/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/teams/%7Bid%7D/incidents_chart?period=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/users/{user_id}/notification_rules":{"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Creates a user notification rule","security":[{"bearer_auth":[]}],"tags":["UserNotificationRules"],"description":"Creates a new user notification rule from provided data","operationId":"createUserNotificationRule","parameters":[],"responses":{"201":{"description":"user_notification_rule created","content":{"application/vnd.api+json":{"example":{"data":{"id":"1112c1db-80eb-444a-a10b-a6b3ecb8fcc7","type":"user_notification_rules","attributes":{"user_id":502,"delay":2,"position":1,"user_email_address_id":"5dfd2c23-9258-4e16-8ff9-46f5ec20f6fd","user_call_number_id":"27888490-38b7-443c-b8b3-ac461d4974ab","user_sms_number_id":"27888490-38b7-443c-b8b3-ac461d4974ab","user_device_id":"e2c8114f-c1a2-4f6a-9b7b-bb93047a9bff","enabled_contact_types":["email"],"created_at":"2025-01-07T14:51:13.650-08:00","updated_at":"2025-01-07T14:51:13.650-08:00"}}},"schema":{"$ref":"#/components/schemas/user_notification_rule_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Enabled contact types You must select at least 1 contact type","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_user_notification_rule"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/users/%7Buser_id%7D/notification_rules \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/users/%7Buser_id%7D/notification_rules\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/users/%7Buser_id%7D/notification_rules\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/users/%7Buser_id%7D/notification_rules\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List user notification rules","security":[{"bearer_auth":[]}],"tags":["UserNotificationRules"],"description":"List user notification rules","operationId":"listUserNotificationRules","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/user_notification_rule_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/users/%7Buser_id%7D/notification_rules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/users/%7Buser_id%7D/notification_rules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/users/%7Buser_id%7D/notification_rules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/users/%7Buser_id%7D/notification_rules?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/notification_rules/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a user notification rule","security":[{"bearer_auth":[]}],"tags":["UserNotificationRules"],"description":"Retrieves a specific user notification rule by id","operationId":"getUserNotificationRule","responses":{"200":{"description":"user_notification_rule found","content":{"application/vnd.api+json":{"example":{"data":{"id":"ee63f07b-25de-4ce8-826c-dbf3548aee2f","type":"user_notification_rules","attributes":{"user_id":502,"delay":1,"position":2,"user_email_address_id":null,"user_call_number_id":null,"user_sms_number_id":null,"user_device_id":null,"enabled_contact_types":["email"],"created_at":"2025-01-07T14:51:13.478-08:00","updated_at":"2025-01-07T14:51:13.490-08:00"}}},"schema":{"$ref":"#/components/schemas/user_notification_rule_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/notification_rules/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/notification_rules/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/notification_rules/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/notification_rules/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a user notification rule","security":[{"bearer_auth":[]}],"tags":["UserNotificationRules"],"description":"Update a specific user notification rule by id","operationId":"updateUserNotificationRule","parameters":[],"responses":{"200":{"description":"user_notification_rule updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"ee63f07b-25de-4ce8-826c-dbf3548aee2f","type":"user_notification_rules","attributes":{"user_id":502,"delay":2,"position":1,"user_email_address_id":"5dfd2c23-9258-4e16-8ff9-46f5ec20f6fd","user_call_number_id":"27888490-38b7-443c-b8b3-ac461d4974ab","user_sms_number_id":null,"user_device_id":"e2c8114f-c1a2-4f6a-9b7b-bb93047a9bff","enabled_contact_types":["device"],"created_at":"2025-01-07T14:51:13.478-08:00","updated_at":"2025-01-07T14:51:14.736-08:00"}}},"schema":{"$ref":"#/components/schemas/user_notification_rule_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_user_notification_rule"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/notification_rules/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/notification_rules/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/notification_rules/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/notification_rules/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a user notification rule","security":[{"bearer_auth":[]}],"tags":["UserNotificationRules"],"description":"Delete a specific user notification rule by id","operationId":"deleteUserNotificationRule","responses":{"200":{"description":"user_notification_rule deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"ee63f07b-25de-4ce8-826c-dbf3548aee2f","type":"user_notification_rules","attributes":{"user_id":502,"delay":1,"position":2,"user_email_address_id":null,"user_call_number_id":null,"user_sms_number_id":null,"user_device_id":null,"enabled_contact_types":["email"],"created_at":"2025-01-07T14:51:13.478-08:00","updated_at":"2025-01-07T14:51:13.490-08:00"}}},"schema":{"$ref":"#/components/schemas/user_notification_rule_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/notification_rules/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/notification_rules/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/notification_rules/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/notification_rules/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/users":{"get":{"summary":"List users","security":[{"bearer_auth":[]}],"tags":["Users"],"description":"List users","operationId":"listUsers","parameters":[{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[search]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[email]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][gte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lt]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[created_at][lte]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"comma separated if needed. eg: created_at,updated_at","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]},"required":false},{"name":"include","in":"query","description":"comma separated if needed. eg: email_addresses,phone_numbers","schema":{"type":"string","enum":["email_addresses","phone_numbers","devices"]},"required":false}],"responses":{"200":{"description":"user found","content":{"application/vnd.api+json":{"example":{"data":[{"id":"505","type":"users","attributes":{"name":"Nakesha Howell","email":"rigoberto.mcdermott@considine.example","phone":null,"phone_2":null,"full_name":"Nakesha Howell","full_name_with_team":"[Johnston Inc] Nakesha Howell","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:51:16.070-08:00","created_at":"2025-01-07T14:51:16.070-08:00"},"relationships":{"email_addresses":{"data":[{"id":"57346db6-897b-4dda-80ca-328508bb7534","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}},{"id":"504","type":"users","attributes":{"name":"Viviana Schoen","email":"marti@considine-simonis.test","phone":null,"phone_2":null,"full_name":"Viviana Schoen","full_name_with_team":"[Johnston Inc] Viviana Schoen","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:51:18.444-08:00","created_at":"2025-01-07T14:51:15.706-08:00"},"relationships":{"email_addresses":{"data":[{"id":"ffb9e7d4-ee99-4ac7-9a81-88e73303971b","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}],"links":{"self":"http://www.example.com/v1/users?page%5Bnumber%5D=1&page%5Bsize%5D=50","first":"http://www.example.com/v1/users?page%5Bnumber%5D=1&page%5Bsize%5D=50","prev":null,"last":"http://www.example.com/v1/users?page%5Bnumber%5D=1&page%5Bsize%5D=50","next":null},"meta":{"current_page":1,"next_page":null,"prev_page":null,"total_pages":1,"total_count":2}},"schema":{"$ref":"#/components/schemas/user_list"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/users?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/users?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/users?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/users?page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Bgte%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blt%5D=SOME_STRING_VALUE&filter%5Bcreated_at%5D%5Blte%5D=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/users/me":{"get":{"summary":"Get current user","security":[{"bearer_auth":[]}],"tags":["Users"],"description":"Get current user","operationId":"getCurrentUser","responses":{"200":{"description":"user found","content":{"application/vnd.api+json":{"example":{"data":{"id":"504","type":"users","attributes":{"name":"Viviana Schoen","email":"marti@considine-simonis.test","phone":null,"phone_2":null,"full_name":"Viviana Schoen","full_name_with_team":"[Johnston Inc] Viviana Schoen","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:51:18.750-08:00","created_at":"2025-01-07T14:51:15.706-08:00"},"relationships":{"email_addresses":{"data":[{"id":"ffb9e7d4-ee99-4ac7-9a81-88e73303971b","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/user_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/users/me \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/users/me\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/users/me\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/users/me\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/users/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a user","security":[{"bearer_auth":[]}],"tags":["Users"],"description":"Retrieves a specific user by id","operationId":"getUser","parameters":[{"name":"include","in":"query","description":"comma separated if needed. eg: email_addresses,phone_numbers","schema":{"type":"string","enum":["email_addresses","phone_numbers","devices"]},"required":false}],"responses":{"200":{"description":"user found","content":{"application/vnd.api+json":{"example":{"data":{"id":"504","type":"users","attributes":{"name":"Viviana Schoen","email":"marti@considine-simonis.test","phone":null,"phone_2":null,"full_name":"Viviana Schoen","full_name_with_team":"[Johnston Inc] Viviana Schoen","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:51:19.043-08:00","created_at":"2025-01-07T14:51:15.706-08:00"},"relationships":{"email_addresses":{"data":[{"id":"ffb9e7d4-ee99-4ac7-9a81-88e73303971b","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/user_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/users/%7Bid%7D?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/users/%7Bid%7D?include=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/users/%7Bid%7D?include=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/users/%7Bid%7D?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a user","security":[{"bearer_auth":[]}],"tags":["Users"],"description":"Delete a specific user by id","operationId":"deleteUser","responses":{"200":{"description":"user deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"505","type":"users","attributes":{"name":"Nakesha Howell","email":"rigoberto.mcdermott@considine.example","phone":null,"phone_2":null,"full_name":"Nakesha Howell","full_name_with_team":"[Johnston Inc] Nakesha Howell","slack_id":null,"time_zone":"UTC","updated_at":"2025-01-07T14:51:16.070-08:00","created_at":"2025-01-07T14:51:16.070-08:00"},"relationships":{"email_addresses":{"data":[{"id":"57346db6-897b-4dda-80ca-328508bb7534","type":"user_email_addresses"}]},"phone_numbers":{"data":[]},"devices":{"data":[]}}}},"schema":{"$ref":"#/components/schemas/user_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/users/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/users/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/users/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/users/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/webhooks/endpoints/{endpoint_id}/deliveries":{"get":{"summary":"List webhook deliveries","security":[{"bearer_auth":[]}],"tags":["WebhooksDeliveries"],"description":"List webhook deliveries for given endpoint","operationId":"listWebhooksDeliveries","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/webhooks_delivery_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/webhooks/endpoints/%7Bendpoint_id%7D/deliveries?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/endpoints/%7Bendpoint_id%7D/deliveries?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/endpoints/%7Bendpoint_id%7D/deliveries?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/endpoints/%7Bendpoint_id%7D/deliveries?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/webhooks/deliveries/{id}/deliver":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Retries a webhook delivery","security":[{"bearer_auth":[]}],"tags":["WebhooksDeliveries"],"description":"Retries a webhook delivery","operationId":"deliverWebhooksDelivery","responses":{"200":{"description":"webhooks_delivery delivered","content":{"application/vnd.api+json":{"example":{"data":{"id":"b83b8380-46fa-4929-82a4-56adc8bde13d","type":"webhooks_deliveries","attributes":{"endpoint_id":"de62f0b9-7c1f-47e9-9fda-6db8a92c666b","payload":"{\"event\":{\"id\":\"f58f26b5-1633-4b5c-9cc2-80fda146b3c8\",\"type\":\"incident.created\",\"issued_at\":\"2025-01-07T14:51:21.540-08:00\"},\"data\":{\"id\":null,\"sequential_id\":null,\"title\":\"Comforting Splendor\",\"slug\":\"comforting-splendor\",\"kind\":\"normal\",\"private\":false,\"summary\":null,\"status\":\"started\",\"url\":\"http://localhost:3001/account/incidents\",\"short_url\":null,\"mitigation_message\":null,\"resolution_message\":null,\"cancellation_message\":null,\"public_title\":null,\"zoom_meeting_id\":null,\"zoom_meeting_start_url\":null,\"zoom_meeting_join_url\":null,\"zoom_meeting_password\":null,\"zoom_meeting_pstn_password\":null,\"zoom_meeting_h323_password\":null,\"zoom_meeting_global_dial_in_numbers\":[],\"shortcut_story_id\":null,\"shortcut_story_url\":null,\"shortcut_task_id\":null,\"shortcut_task_url\":null,\"asana_task_id\":null,\"asana_task_url\":null,\"github_issue_id\":null,\"github_issue_url\":null,\"gitlab_issue_id\":null,\"gitlab_issue_url\":null,\"jira_issue_id\":null,\"jira_issue_url\":null,\"google_meeting_id\":null,\"google_meeting_url\":null,\"trello_card_id\":null,\"trello_card_url\":null,\"linear_issue_id\":null,\"linear_issue_url\":null,\"zendesk_ticket_id\":null,\"zendesk_ticket_url\":null,\"motion_task_id\":null,\"motion_task_url\":null,\"clickup_task_id\":null,\"clickup_task_url\":null,\"slack_channel_name\":null,\"slack_channel_id\":null,\"slack_channel_url\":null,\"slack_channel_short_url\":null,\"slack_channel_deep_link\":null,\"slack_channel_archived\":false,\"service_now_incident_id\":null,\"service_now_incident_key\":null,\"service_now_incident_url\":null,\"opsgenie_incident_id\":null,\"opsgenie_incident_url\":null,\"opsgenie_alert_id\":null,\"opsgenie_alert_url\":null,\"victor_ops_incident_id\":null,\"victor_ops_incident_url\":null,\"pagerduty_incident_id\":null,\"pagerduty_incident_number\":null,\"pagerduty_incident_url\":null,\"mattermost_channel_id\":null,\"mattermost_channel_name\":null,\"mattermost_channel_url\":null,\"confluence_page_id\":null,\"confluence_page_url\":null,\"quip_page_id\":null,\"quip_page_url\":null,\"airtable_base_key\":null,\"airtable_table_name\":null,\"airtable_record_id\":null,\"airtable_record_url\":null,\"google_drive_id\":null,\"google_drive_parent_id\":null,\"google_drive_url\":null,\"sharepoint_page_id\":null,\"sharepoint_page_url\":null,\"datadog_notebook_id\":null,\"datadog_notebook_url\":null,\"freshservice_ticket_id\":null,\"freshservice_ticket_url\":null,\"freshservice_task_id\":null,\"freshservice_task_url\":null,\"started_at\":\"2025-01-07T14:51:21.520-08:00\",\"detected_at\":null,\"acknowledged_at\":null,\"mitigated_at\":null,\"resolved_at\":null,\"cancelled_at\":null,\"created_at\":null,\"updated_at\":null,\"labels\":{},\"severity\":null,\"user\":null,\"started_by\":null,\"mitigated_by\":null,\"resolved_by\":null,\"cancelled_by\":null,\"causes\":[],\"roles\":[],\"environments\":[],\"incident_types\":[],\"services\":[],\"functionalities\":[],\"groups\":[],\"events\":[],\"action_items\":[],\"form_field_selections\":[],\"feedbacks\":[]}}","delivered_at":"2025-01-07T14:51:21.904-08:00","created_at":"2025-01-07T14:51:21.561-08:00","updated_at":"2025-01-07T14:51:21.905-08:00"}}},"schema":{"$ref":"#/components/schemas/webhooks_delivery_response"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/webhooks/deliveries/%7Bid%7D/deliver \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/deliveries/%7Bid%7D/deliver\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/deliveries/%7Bid%7D/deliver\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/deliveries/%7Bid%7D/deliver\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/webhooks/deliveries/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a webhook delivery","security":[{"bearer_auth":[]}],"tags":["WebhooksDeliveries"],"description":"Retrieves a specific webhook delivery by id","operationId":"getWebhooksDelivery","responses":{"200":{"description":"webhooks_delivery found","content":{"application/vnd.api+json":{"example":{"data":{"id":"b83b8380-46fa-4929-82a4-56adc8bde13d","type":"webhooks_deliveries","attributes":{"endpoint_id":"de62f0b9-7c1f-47e9-9fda-6db8a92c666b","payload":"{\"event\":{\"id\":\"f58f26b5-1633-4b5c-9cc2-80fda146b3c8\",\"type\":\"incident.created\",\"issued_at\":\"2025-01-07T14:51:21.540-08:00\"},\"data\":{\"id\":null,\"sequential_id\":null,\"title\":\"Comforting Splendor\",\"slug\":\"comforting-splendor\",\"kind\":\"normal\",\"private\":false,\"summary\":null,\"status\":\"started\",\"url\":\"http://localhost:3001/account/incidents\",\"short_url\":null,\"mitigation_message\":null,\"resolution_message\":null,\"cancellation_message\":null,\"public_title\":null,\"zoom_meeting_id\":null,\"zoom_meeting_start_url\":null,\"zoom_meeting_join_url\":null,\"zoom_meeting_password\":null,\"zoom_meeting_pstn_password\":null,\"zoom_meeting_h323_password\":null,\"zoom_meeting_global_dial_in_numbers\":[],\"shortcut_story_id\":null,\"shortcut_story_url\":null,\"shortcut_task_id\":null,\"shortcut_task_url\":null,\"asana_task_id\":null,\"asana_task_url\":null,\"github_issue_id\":null,\"github_issue_url\":null,\"gitlab_issue_id\":null,\"gitlab_issue_url\":null,\"jira_issue_id\":null,\"jira_issue_url\":null,\"google_meeting_id\":null,\"google_meeting_url\":null,\"trello_card_id\":null,\"trello_card_url\":null,\"linear_issue_id\":null,\"linear_issue_url\":null,\"zendesk_ticket_id\":null,\"zendesk_ticket_url\":null,\"motion_task_id\":null,\"motion_task_url\":null,\"clickup_task_id\":null,\"clickup_task_url\":null,\"slack_channel_name\":null,\"slack_channel_id\":null,\"slack_channel_url\":null,\"slack_channel_short_url\":null,\"slack_channel_deep_link\":null,\"slack_channel_archived\":false,\"service_now_incident_id\":null,\"service_now_incident_key\":null,\"service_now_incident_url\":null,\"opsgenie_incident_id\":null,\"opsgenie_incident_url\":null,\"opsgenie_alert_id\":null,\"opsgenie_alert_url\":null,\"victor_ops_incident_id\":null,\"victor_ops_incident_url\":null,\"pagerduty_incident_id\":null,\"pagerduty_incident_number\":null,\"pagerduty_incident_url\":null,\"mattermost_channel_id\":null,\"mattermost_channel_name\":null,\"mattermost_channel_url\":null,\"confluence_page_id\":null,\"confluence_page_url\":null,\"quip_page_id\":null,\"quip_page_url\":null,\"airtable_base_key\":null,\"airtable_table_name\":null,\"airtable_record_id\":null,\"airtable_record_url\":null,\"google_drive_id\":null,\"google_drive_parent_id\":null,\"google_drive_url\":null,\"sharepoint_page_id\":null,\"sharepoint_page_url\":null,\"datadog_notebook_id\":null,\"datadog_notebook_url\":null,\"freshservice_ticket_id\":null,\"freshservice_ticket_url\":null,\"freshservice_task_id\":null,\"freshservice_task_url\":null,\"started_at\":\"2025-01-07T14:51:21.520-08:00\",\"detected_at\":null,\"acknowledged_at\":null,\"mitigated_at\":null,\"resolved_at\":null,\"cancelled_at\":null,\"created_at\":null,\"updated_at\":null,\"labels\":{},\"severity\":null,\"user\":null,\"started_by\":null,\"mitigated_by\":null,\"resolved_by\":null,\"cancelled_by\":null,\"causes\":[],\"roles\":[],\"environments\":[],\"incident_types\":[],\"services\":[],\"functionalities\":[],\"groups\":[],\"events\":[],\"action_items\":[],\"form_field_selections\":[],\"feedbacks\":[]}}","delivered_at":null,"created_at":"2025-01-07T14:51:21.561-08:00","updated_at":"2025-01-07T14:51:21.561-08:00"}}},"schema":{"$ref":"#/components/schemas/webhooks_delivery_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/webhooks/deliveries/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/deliveries/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/deliveries/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/deliveries/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/webhooks/endpoints":{"post":{"summary":"Creates a webhook endpoint","security":[{"bearer_auth":[]}],"tags":["WebhooksEndpoints"],"description":"Creates a new webhook endpoint from provided data","operationId":"createWebhooksEndpoint","parameters":[],"responses":{"201":{"description":"webhooks_endpoint created","content":{"application/vnd.api+json":{"example":{"data":{"id":"9ad704ab-5f5f-4ec2-aaf2-6762edb382da","type":"webhooks_endpoints","attributes":{"team_id":444,"slug":"test-9ab4995f-6195-4e5c-a07f-9f1ccd128178","name":"Test","url":"https://test.com/test","secret":"1DKqgbQY5MGG7LgB","event_types":["incident.created"],"enabled":true,"created_at":"2025-01-07T14:51:23.384-08:00","updated_at":"2025-01-07T14:51:23.384-08:00"}}},"schema":{"$ref":"#/components/schemas/webhooks_endpoint_response"}}}},"401":{"description":"responds with unauthorized for invalid token","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Invalid token","status":"401"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}},"422":{"description":"invalid request","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Name can't be blank","status":"422"},{"title":"URL is not a valid URL","status":"422"},{"title":"URL can't be blank","status":"422"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/new_webhooks_endpoint"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n --url https://api.rootly.com/v1/webhooks/endpoints \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/endpoints\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"POST\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/endpoints\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/endpoints\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"get":{"summary":"List webhook endpoints","security":[{"bearer_auth":[]}],"tags":["WebhooksEndpoints"],"description":"List webhook endpoints","operationId":"listWebhooksEndpoints","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[number]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/webhooks_endpoint_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url 'https://api.rootly.com/v1/webhooks/endpoints?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/endpoints?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/endpoints?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/endpoints?include=SOME_STRING_VALUE&page%5Bnumber%5D=SOME_INTEGER_VALUE&page%5Bsize%5D=SOME_INTEGER_VALUE&filter%5Bslug%5D=SOME_STRING_VALUE&filter%5Bname%5D=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}},"/v1/webhooks/endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Retrieves a webhook endpoint","security":[{"bearer_auth":[]}],"tags":["WebhooksEndpoints"],"description":"Retrieves a specific webhook endpoint by id","operationId":"getWebhooksEndpoint","responses":{"200":{"description":"webhooks_endpoint found","content":{"application/vnd.api+json":{"example":{"data":{"id":"e3b50986-41a6-409d-b2ce-705043b8d4fc","type":"webhooks_endpoints","attributes":{"team_id":444,"slug":"test","name":"test","url":"https://test.com","secret":"jzPsBHaxcrEWroiQ","event_types":[],"enabled":true,"created_at":"2025-01-07T14:51:23.231-08:00","updated_at":"2025-01-07T14:51:23.231-08:00"}}},"schema":{"$ref":"#/components/schemas/webhooks_endpoint_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n --url https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"GET\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/endpoints/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"put":{"summary":"Update a webhook endpoint","security":[{"bearer_auth":[]}],"tags":["WebhooksEndpoints"],"description":"Update a specific webhook endpoint by id","operationId":"updateWebhooksEndpoint","parameters":[],"responses":{"200":{"description":"webhooks_endpoint updated","content":{"application/vnd.api+json":{"example":{"data":{"id":"e3b50986-41a6-409d-b2ce-705043b8d4fc","type":"webhooks_endpoints","attributes":{"team_id":444,"slug":"test","name":"Updated","url":"https://test.com","secret":"jzPsBHaxcrEWroiQ","event_types":[],"enabled":true,"created_at":"2025-01-07T14:51:23.231-08:00","updated_at":"2025-01-07T14:51:24.496-08:00"}}},"schema":{"$ref":"#/components/schemas/webhooks_endpoint_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"requestBody":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/update_webhooks_endpoint"}}},"required":true},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n --url https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n --header 'content-type: application/vnd.api+json'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/vnd.api+json'\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"PUT\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/endpoints/%7Bid%7D\",\n \"headers\": {\n \"content-type\": \"application/vnd.api+json\",\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/vnd.api+json\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]},"delete":{"summary":"Delete a webhook endpoint","security":[{"bearer_auth":[]}],"tags":["WebhooksEndpoints"],"description":"Delete a specific webhook endpoint by id","operationId":"deleteWebhooksEndpoint","responses":{"200":{"description":"webhooks_endpoint deleted","content":{"application/vnd.api+json":{"example":{"data":{"id":"e3b50986-41a6-409d-b2ce-705043b8d4fc","type":"webhooks_endpoints","attributes":{"team_id":444,"slug":"test","name":"test","url":"https://test.com","secret":"jzPsBHaxcrEWroiQ","event_types":[],"enabled":true,"created_at":"2025-01-07T14:51:23.231-08:00","updated_at":"2025-01-07T14:51:24.987-08:00"}}},"schema":{"$ref":"#/components/schemas/webhooks_endpoint_response"}}}},"404":{"description":"resource not found","content":{"application/vnd.api+json":{"example":{"errors":[{"title":"Not found or unauthorized","status":"404"}]},"schema":{"$ref":"#/components/schemas/errors_list"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n --url https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D \\\n --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Authorization\"] = 'Bearer REPLACE_BEARER_TOKEN'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n \"method\": \"DELETE\",\n \"hostname\": \"api.rootly.com\",\n \"port\": null,\n \"path\": \"/v1/webhooks/endpoints/%7Bid%7D\",\n \"headers\": {\n \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n }\n};\n\nconst req = http.request(options, function (res) {\n const chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n const body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.rootly.com/v1/webhooks/endpoints/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"}]}}},"servers":[{"url":"https://api.rootly.com"}],"components":{"securitySchemes":{"bearer_auth":{"type":"http","scheme":"bearer"}},"schemas":{"attach_alert":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alerts"]},"attributes":{"type":"object","properties":{"alert_ids":{"type":"array","description":"Alert Id to attach to the incident","items":{"type":"string"},"nullable":true}},"additionalProperties":false,"required":["alert_ids"]}},"required":["type","attributes"]}},"required":["data"]},"new_alert":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alerts"]},"attributes":{"type":"object","properties":{"source":{"type":"string","description":"The source of the alert","enum":["rootly","manual","web","slack","email","workflow","live_call_routing","pagerduty","opsgenie","victorops","pagertree","datadog","nobl9","zendesk","asana","clickup","sentry","rollbar","jira","honeycomb","service_now","linear","grafana","alertmanager","google_cloud","generic_webhook","cloud_watch","azure","splunk"]},"status":{"type":"string","enum":["open","triggered","acknowledged","resolved"],"description":"Only available for organizations with Rootly On-Call enabled. Can be one of open, triggered, acknowledged or resolved."},"summary":{"type":"string","description":"The summary of the alert"},"description":{"type":"string","description":"The description of the alert","nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the alert. If your organization has On-Call enabled and your notification target is a Service. This field will be automatically set for you.","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Group ID's to attach to the alert. If your organization has On-Call enabled and your notification target is a Group. This field will be automatically set for you.","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the alert","items":{"type":"string"},"nullable":true},"started_at":{"type":"string","description":"Alert start datetime","format":"date-time","nullable":true},"ended_at":{"type":"string","description":"Alert end datetime","format":"date-time","nullable":true},"external_id":{"type":"string","description":"External ID","nullable":true},"external_url":{"type":"string","description":"External Url","nullable":true},"alert_urgency_id":{"type":"string","description":"The ID of the alert urgency","nullable":true},"notification_target_type":{"type":"string","enum":["User","Group","EscalationPolicy","Service"],"description":"Only available for organizations with Rootly On-Call enabled. Can be one of Group, Service, EscalationPolicy, User.","nullable":true},"notification_target_id":{"type":"string","description":"Only available for organizations with Rootly On-Call enabled. The _identifier_ of the notification target object.","nullable":true},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the tag"},"value":{"type":"string","description":"Value of the tag"}},"required":["key","value"],"nullable":true}},"data":{"type":"object","description":"Additional data","nullable":true}},"additionalProperties":false,"required":["source","summary"]}},"required":["type","attributes"]}},"required":["data"]},"update_alert":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alerts"]},"attributes":{"type":"object","properties":{"source":{"type":"string","description":"The source of the alert","enum":["rootly","manual","web","slack","email","workflow","live_call_routing","pagerduty","opsgenie","victorops","pagertree","datadog","nobl9","zendesk","asana","clickup","sentry","rollbar","jira","honeycomb","service_now","linear","grafana","alertmanager","google_cloud","generic_webhook","cloud_watch","azure","splunk"]},"summary":{"type":"string","description":"The summary of the alert"},"description":{"type":"string","description":"The description of the alert","nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the alert","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Group ID's to attach to the alert","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the alert","items":{"type":"string"},"nullable":true},"started_at":{"type":"string","description":"Alert start datetime","format":"date-time","nullable":true},"ended_at":{"type":"string","description":"Alert end datetime","format":"date-time","nullable":true},"external_id":{"type":"string","description":"External ID","nullable":true},"external_url":{"type":"string","description":"External Url","nullable":true},"alert_urgency_id":{"type":"string","description":"The ID of the alert urgency","nullable":true},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the tag"},"value":{"type":"string","description":"Value of the tag"}},"required":["key","value"],"nullable":true}},"data":{"type":"object","description":"Additional data","nullable":true}},"additionalProperties":false}},"required":["source","summary","attributes"]}},"required":["data"]},"alert":{"type":"object","properties":{"source":{"type":"string","description":"The source of the alert","enum":["rootly","manual","web","slack","email","workflow","live_call_routing","pagerduty","opsgenie","victorops","pagertree","datadog","nobl9","zendesk","asana","clickup","sentry","rollbar","jira","honeycomb","service_now","linear","grafana","alertmanager","google_cloud","generic_webhook","cloud_watch","azure","splunk"]},"summary":{"type":"string","description":"The summary of the alert"},"description":{"type":"string","description":"The description of the alert","nullable":true},"services":{"type":"array","description":"Services attached to the alert","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/service"}]}},"groups":{"type":"array","description":"Groups attached to the alert","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/team"}]}},"environments":{"type":"array","description":"Environments attached to the alert","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/environment"}]}},"external_id":{"type":"string","description":"External ID","nullable":true},"external_url":{"type":"string","description":"External Url","nullable":true},"alert_urgency_id":{"type":"string","description":"The ID of the alert urgency","nullable":true},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the tag"},"value":{"type":"string","description":"Value of the tag"}},"required":["key","value"],"nullable":true}},"data":{"type":"object","description":"Additional data","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["source","summary","created_at","updated_at"]},"alert_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert"},"source":{"type":"string","description":"The source of the alert","enum":["rootly","manual","web","slack","email","workflow","live_call_routing","pagerduty","opsgenie","victorops","pagertree","datadog","nobl9","zendesk","asana","clickup","sentry","rollbar","jira","honeycomb","service_now","linear","grafana","alertmanager","google_cloud","generic_webhook","cloud_watch","azure","splunk"]},"type":{"type":"string","enum":["alerts"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alert"}]}},"required":["id","type","attributes"]}},"required":["data"]},"alert_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert"},"source":{"type":"string","description":"The source of the alert","enum":["rootly","manual","web","slack","email","workflow","live_call_routing","pagerduty","opsgenie","victorops","pagertree","datadog","nobl9","zendesk","asana","clickup","sentry","rollbar","jira","honeycomb","service_now","linear","grafana","alertmanager","google_cloud","generic_webhook","cloud_watch","azure","splunk"]},"type":{"type":"string","enum":["alerts"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alert"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"resolve_alert":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alerts"]},"attributes":{"type":"object","properties":{"resolution_message":{"type":"string","description":"How was the alert resolved?","nullable":true},"resolve_related_incidents":{"type":"boolean","description":"Resolve all associated incidents","nullable":true}},"additionalProperties":false}}}}},"new_alerts_source":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alert_sources"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert source"},"source_type":{"type":"string","description":"The alert source type","enum":["datadog","alertmanager","google_cloud","grafana","sentry","generic_webhook","cloud_watch","checkly","azure","new_relic","splunk"]},"alert_urgency_id":{"type":"string","description":"ID for the default alert urgency assigned to this alert source"},"alert_source_urgency_rules_attributes":{"type":"array","description":"List of rules that define the conditions under which the alert urgency will be set automatically based on the alert payload","items":{"type":"object","properties":{"json_path":{"type":"string","description":"JSON path expression to extract a specific value from the alert's payload for evaluation"},"operator":{"type":"string","description":"Comparison operator used to evaluate the extracted value against the specified condition","enum":["is","is_not","contains","does_not_contain"]},"value":{"type":"string","description":"Value that the extracted payload data is compared to using the specified operator to determine a match"}}}},"sourceable_attributes":{"type":"object","description":"Provide additional attributes for generic_webhook alerts source","properties":{"auto_resolve":{"type":"boolean","description":"Set this to true to auto-resolve alerts based on field_mappings_attributes conditions"},"resolve_state":{"type":"string","description":"This value is matched with the value extracted from alerts payload using JSON path in field_mappings_attributes"},"field_mappings_attributes":{"type":"array","description":"Specify rules to auto resolve alerts","items":{"type":"object","properties":{"field":{"type":"string","description":"Select the field on which the condition to be evaluated","enum":["external_id","state","alert_title","alert_external_url","notification_target_type","notification_target_id"]},"json_path":{"type":"string","description":"JSON path expression to extract a specific value from the alert's payload for evaluation"}}}}}}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_alerts_source":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alert_sources"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert source"},"source_type":{"type":"string","description":"The alert source type","enum":["datadog","alertmanager","google_cloud","grafana","sentry","generic_webhook","cloud_watch","checkly","azure","new_relic","splunk"]},"alert_urgency_id":{"type":"string","description":"ID for the default alert urgency assigned to this alert source"},"alert_source_urgency_rules_attributes":{"type":"array","description":"List of rules that define the conditions under which the alert urgency will be set automatically based on the alert payload","items":{"type":"object","properties":{"json_path":{"type":"string","description":"JSON path expression to extract a specific value from the alert's payload for evaluation"},"operator":{"type":"string","description":"Comparison operator used to evaluate the extracted value against the specified condition","enum":["is","is_not","contains","does_not_contain"]},"value":{"type":"string","description":"Value that the extracted payload data is compared to using the specified operator to determine a match"}}}},"sourceable_attributes":{"type":"object","description":"Provide additional attributes for generic_webhook alerts source","properties":{"auto_resolve":{"type":"boolean","description":"Set this to true to auto-resolve alerts based on field_mappings_attributes conditions"},"resolve_state":{"type":"string","description":"This value is matched with the value extracted from alerts payload using JSON path in field_mappings_attributes"},"field_mappings_attributes":{"type":"array","description":"Specify rules to auto resolve alerts","items":{"type":"object","properties":{"field":{"type":"string","description":"Select the field on which the condition to be evaluated","enum":["external_id","state","alert_title","alert_external_url","notification_target_type","notification_target_id"]},"json_path":{"type":"string","description":"JSON path expression to extract a specific value from the alert's payload for evaluation"}}}}}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"alerts_source":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert source"},"source_type":{"type":"string","description":"The alert source type"},"status":{"type":"string","description":"The current status of the alert source"},"secret":{"type":"string","description":"A secret key used to authenticate incoming requests to this alerts source"},"webhook_endpoint":{"type":"string","description":"The URL endpoint of the alert source"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"},"sourceable_attributes":{"type":"object","description":"Additional attributes specific to certain alert sources (e.g., generic_webhook), encapsulating source-specific configurations or details"}},"required":["name","status","secret","webhook_endpoint","created_at","updated_at"]},"alerts_source_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert source"},"type":{"type":"string","enum":["alert_sources"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alerts_source"}]}},"required":["id","type","attributes"]}},"required":["data"]},"alerts_source_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert source"},"type":{"type":"string","enum":["alert_sources"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alerts_source"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_alert_urgency":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alert_urgencies"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert urgency"},"description":{"type":"string","description":"The description of the alert urgency"},"position":{"type":"integer","description":"Position of the alert urgency","nullable":true}},"additionalProperties":false,"required":["name","description"]}},"required":["type","attributes"]}},"required":["data"]},"update_alert_urgency":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alert_urgencies"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert urgency"},"description":{"type":"string","description":"The description of the alert urgency"},"position":{"type":"integer","description":"Position of the alert urgency","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"alert_urgency":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert urgency"},"description":{"type":"string","description":"The description of the alert urgency"},"position":{"type":"integer","description":"Position of the alert urgency"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","description","position","created_at","updated_at"]},"alert_urgency_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert urgency"},"type":{"type":"string","enum":["alert_urgencies"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alert_urgency"}]}},"required":["id","type","attributes"]}},"required":["data"]},"alert_urgency_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert urgency"},"type":{"type":"string","enum":["alert_urgencies"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alert_urgency"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_alert_group":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alert_groups"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert group"},"description":{"type":"string","description":"The description of the alert urgency","nullable":true},"time_window":{"type":"integer","description":"The length of time an Alert Group should stay open and accept new alerts"},"alert_group_targets_attributes":{"type":"object","description":"Attributes for alert group targets","properties":{"target_type":{"type":"string","description":"The type of the target.","enum":["Group","Service","EscalationPolicy"]},"target_id":{"type":"string","format":"uuid","description":"id for the Group, Service or EscalationPolicy"}}},"group_by_alert_title":{"type":"integer","enum":[1,0],"description":"Whether the alerts should be grouped by titles."},"group_by_alert_urgency":{"type":"integer","enum":[1,0],"description":"Whether the alerts should be grouped by urgencies."},"condition_type":{"type":"string","enum":["all","any"],"description":"Group alerts when ANY or ALL of the fields are matching."}},"additionalProperties":false,"required":["name","alert_group_targets_attributes"]}},"required":["type","attributes"]}},"required":["data"]},"update_alert_group":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["alert_groups"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert group"},"description":{"type":"string","description":"The description of the alert group","nullable":true},"time_window":{"type":"integer","description":"The length of time an Alert Group should stay open and accept new alerts"},"alert_group_targets_attributes":{"type":"object","description":"Attributes for alert group targets","properties":{"target_type":{"type":"string","description":"The type of the target.","enum":["Group","Service","EscalationPolicy"]},"target_id":{"type":"string","format":"uuid","description":"id for the Group, Service or EscalationPolicy"}}},"group_by_alert_title":{"type":"integer","enum":[1,0],"description":"Whether the alerts should be grouped by titles."},"group_by_alert_urgency":{"type":"integer","enum":[1,0],"description":"Whether the alerts should be grouped by urgencies."},"condition_type":{"type":"string","enum":["all","any"],"description":"Group alerts when ANY or ALL of the fields are matching."}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"alert_group":{"type":"object","properties":{"name":{"type":"string","description":"The name of the alert group"},"description":{"type":"string","description":"The description of the alert group","nullable":true},"slug":{"type":"string","description":"The slug of the alert group"},"condition_type":{"type":"string","description":"Grouping condition for the alert group"},"time_window":{"type":"integer","description":"Time window for the alert grouping"},"group_by_alert_title":{"type":"boolean","description":"Whether the alerts are grouped by title or not"},"group_by_alert_urgency":{"type":"boolean","description":"Whether the alerts are grouped by urgency or not"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"},"deleted_at":{"type":"string","nullable":true,"description":"Date or deletion"}},"required":["name","description","slug","created_at","updated_at","deleted_at","condition_type","time_window","group_by_alert_title","group_by_alert_urgency"]},"alert_group_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert group"},"type":{"type":"string","enum":["alert_groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alert_group"}]}},"required":["id","type","attributes"]}},"required":["data"]},"alert_group_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the alert group"},"type":{"type":"string","enum":["alert_groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/alert_group"}]}},"required":["id","type","attributes"]}}},"required":["data"]},"audit":{"type":"object","properties":{"event":{"type":"string","description":"Describes the action that was taken."},"item_type":{"type":"string","description":"Describes the object in which the action was taken on","enum":["Cause","CustomField","CustomFieldOption","CustomForm","Dashboard","Environment","EscalationPolicy","EscalationPolicyPath","ExportJob","FormField","Functionality","GeniusWorkflow","GeniusWorkflowGroup","GeniusWorkflowRun","Group","Heartbeat","Incident","IncidentActionItem","IncidentEvent","IncidentFormFieldSelection","IncidentFormFieldSelectionUser","IncidentPostMortem","IncidentRoleAssignment","IncidentRoleTask","IncidentStatusPageEvent","IncidentTask","IncidentType","LiveCallRouter","OnCallRole","Playbook","PlaybookTask","Role","Schedule","Service","Severity","StatusPage"],"nullable":true},"object":{"type":"object","description":"The object in which the action was taken on","nullable":true},"object_changes":{"type":"object","description":"The changes that occurred on the object","nullable":true},"user_id":{"type":"integer","description":"The ID of who took action on the object. Together with whodunnit_type can be used to find the user","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"item_id":{"type":"string","description":"ID of the affected object","nullable":true},"id":{"type":"integer","description":"ID of audit","nullable":true}},"required":["event","created_at"]},"audits_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the audit log item"},"type":{"type":"string","enum":["audits"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/audit"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_authorization":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["authorizations"]},"attributes":{"type":"object","properties":{"authorizable_id":{"type":"string","description":"The id of the resource being accessed."},"authorizable_type":{"type":"string","description":"The type of resource being accessed.","enum":["Dashboard"]},"grantee_id":{"type":"string","description":"The resource id granted access."},"grantee_type":{"type":"string","description":"The type of resource granted access.","enum":["User","Team"]},"permissions":{"type":"array","items":{"type":"string","enum":["read","update","authorize","destroy"]}}},"additionalProperties":false,"required":["authorizable_id","authorizable_type","grantee_id","grantee_type","permissions"]}},"required":["type","attributes"]}},"required":["data"]},"update_authorization":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["authorizations"]},"attributes":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string","enum":["read","update","authorize","destroy"]}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"authorization":{"type":"object","properties":{"authorizable_id":{"type":"string","description":"The id of the resource being accessed."},"authorizable_type":{"type":"string","description":"The type of resource being accessed.","enum":["Dashboard"]},"grantee_id":{"type":"string","description":"The resource id granted access."},"grantee_type":{"type":"string","description":"The type of resource granted access.","enum":["User","Team"]},"permissions":{"type":"array","items":{"type":"string","enum":["read","update","authorize","destroy"]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["authorizable_id","authorizable_type","grantee_id","grantee_type","permissions","created_at","updated_at"]},"authorization_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the authorization"},"type":{"type":"string","enum":["authorizations"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/authorization"}]}},"required":["id","type","attributes"]}},"required":["data"]},"authorization_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the authorization"},"type":{"type":"string","enum":["authorizations"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/authorization"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_catalog":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalogs"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"icon":{"type":"string","enum":["globe-alt","server-stack","users","user-group","chart-bar","shapes","light-bulb","cursor-arrow-ripple"]},"position":{"type":"integer","description":"Default position of the catalog when displayed in a list.","nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_catalog":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalogs"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"icon":{"type":"string","enum":["globe-alt","server-stack","users","user-group","chart-bar","shapes","light-bulb","cursor-arrow-ripple"]},"position":{"type":"integer","description":"Default position of the catalog when displayed in a list.","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"catalog":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"icon":{"type":"string","enum":["globe-alt","server-stack","users","user-group","chart-bar","shapes","light-bulb","cursor-arrow-ripple"]},"position":{"type":"integer","description":"Default position of the catalog when displayed in a list.","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["name","icon","position","created_at","updated_at"]},"catalog_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog"},"type":{"type":"string","enum":["catalogs"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog"}]}},"required":["id","type","attributes"]}},"required":["data"]},"catalog_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog"},"type":{"type":"string","enum":["catalogs"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_catalog_field":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalog_fields"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["text","reference"]},"kind_catalog_id":{"type":"string","description":"Restricts values to items of specified catalog.","nullable":true},"multiple":{"type":"boolean","description":"Whether the attribute accepts multiple values."},"position":{"type":"integer","description":"Default position of the item when displayed in a list.","nullable":true}},"additionalProperties":false,"required":["name","kind"]}},"required":["type","attributes"]}},"required":["data"]},"update_catalog_field":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalog_fields"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"kind":{"type":"string","enum":["text","reference"]},"kind_catalog_id":{"type":"string","description":"Restricts values to items of specified catalog.","nullable":true},"position":{"type":"integer","description":"Default position of the item when displayed in a list.","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"catalog_field":{"type":"object","properties":{"catalog_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"kind":{"type":"string","enum":["text","reference"]},"kind_catalog_id":{"type":"string","description":"Restricts values to items of specified catalog.","nullable":true},"multiple":{"type":"boolean","description":"Whether the attribute accepts multiple values."},"position":{"type":"integer","description":"Default position of the item when displayed in a list.","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["catalog_id","name","slug","kind","multiple","position","created_at","updated_at"]},"catalog_field_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog_field"},"type":{"type":"string","enum":["catalog_fields"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog_field"}]}},"required":["id","type","attributes"]}},"required":["data"]},"catalog_field_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog_field"},"type":{"type":"string","enum":["catalog_fields"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog_field"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_catalog_entity":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalog_entities"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"integer","description":"Default position of the item when displayed in a list.","nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_catalog_entity":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalog_entities"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"integer","description":"Default position of the item when displayed in a list.","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"catalog_entity":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"integer","description":"Default position of the item when displayed in a list.","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["name","position","created_at","updated_at"]},"catalog_entity_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog_entity"},"type":{"type":"string","enum":["catalog_entities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog_entity"}]}},"required":["id","type","attributes"]}},"required":["data"]},"catalog_entity_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog_entity"},"type":{"type":"string","enum":["catalog_entities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog_entity"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_catalog_entity_property":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalog_entity_properties"]},"attributes":{"type":"object","properties":{"catalog_entity_id":{"type":"string"},"catalog_field_id":{"type":"string"},"key":{"type":"string","enum":["text","catalog_entity"]},"value":{"type":"string"}},"additionalProperties":false,"required":["catalog_field_id","key","value"]}},"required":["type","attributes"]}},"required":["data"]},"update_catalog_entity_property":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["catalog_entity_properties"]},"attributes":{"type":"object","properties":{"key":{"type":"string","enum":["text","catalog_entity"]},"value":{"type":"string"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"catalog_entity_property":{"type":"object","properties":{"catalog_entity_id":{"type":"string"},"catalog_field_id":{"type":"string"},"key":{"type":"string","enum":["text","catalog_entity"]},"value":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["catalog_entity_id","catalog_field_id","key","value","created_at","updated_at"]},"catalog_entity_property_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog_entity_property"},"type":{"type":"string","enum":["catalog_entity_properties"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog_entity_property"}]}},"required":["id","type","attributes"]}},"required":["data"]},"catalog_entity_property_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the catalog_entity_property"},"type":{"type":"string","enum":["catalog_entity_properties"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/catalog_entity_property"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_cause":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["causes"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the cause"},"description":{"type":"string","description":"The description of the cause","nullable":true},"position":{"type":"integer","description":"Position of the cause","nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_cause":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["causes"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the cause"},"description":{"type":"string","description":"The description of the cause","nullable":true},"position":{"type":"integer","description":"Position of the cause","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"cause":{"type":"object","properties":{"name":{"type":"string","description":"The name of the cause"},"slug":{"type":"string","description":"The slug of the cause"},"description":{"type":"string","description":"The description of the cause","nullable":true},"position":{"type":"integer","description":"Position of the cause","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"cause_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the cause"},"type":{"type":"string","enum":["causes"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/cause"}]}},"required":["id","type","attributes"]}},"required":["data"]},"cause_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the cause"},"type":{"type":"string","enum":["causes"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/cause"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_custom_field_option":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["custom_field_options"]},"attributes":{"type":"object","properties":{"value":{"type":"string","description":"The value of the custom_field_option"},"color":{"type":"string","description":"The hex color of the custom_field_option"},"default":{"type":"boolean"},"position":{"type":"integer","description":"The position of the custom_field_option"}},"additionalProperties":false,"required":["value"]}},"required":["type","attributes"]}},"required":["data"]},"update_custom_field_option":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["custom_field_options"]},"attributes":{"type":"object","properties":{"value":{"type":"string","description":"The value of the custom_field_option"},"color":{"type":"string","description":"The hex color of the custom_field_option"},"default":{"type":"boolean"},"position":{"type":"integer","description":"The position of the custom_field_option"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"custom_field_option":{"type":"object","properties":{"custom_field_id":{"type":"integer","description":"The ID of the parent custom field"},"value":{"type":"string","description":"The value of the custom_field_option"},"color":{"type":"string","description":"The hex color of the custom_field_option"},"default":{"type":"boolean"},"position":{"type":"integer","description":"The position of the custom_field_option"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["value","color","position","created_at","updated_at"]},"custom_field_option_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the custom_field_option"},"type":{"type":"string","enum":["custom_field_options"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/custom_field_option"}]}},"required":["id","type","attributes"]}},"required":["data"]},"custom_field_option_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the custom_field_option"},"type":{"type":"string","enum":["custom_field_options"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/custom_field_option"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_custom_field":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["custom_fields"]},"attributes":{"type":"object","properties":{"label":{"type":"string","description":"The name of the custom_field"},"description":{"type":"string","description":"The description of the custom_field","nullable":true},"shown":{"type":"array","items":{"type":"string","description":"Where the custom_field is shown","enum":["incident_form","incident_mitigation_form","incident_resolution_form","incident_post_mortem_form","incident_slack_form","incident_mitigation_slack_form","incident_resolution_slack_form","incident_post_mortem"]}},"required":{"type":"array","items":{"type":"string","description":"Where the custom_field is required","enum":["incident_form","incident_mitigation_form","incident_resolution_form","incident_post_mortem_form","incident_slack_form","incident_mitigation_slack_form","incident_resolution_slack_form"]},"nullable":true},"default":{"type":"string","description":"The default value for text field kinds","nullable":true},"position":{"type":"integer","description":"The position of the custom_field"}},"additionalProperties":false,"required":["label"]}},"required":["type","attributes"]}},"required":["data"]},"update_custom_field":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["custom_fields"]},"attributes":{"type":"object","properties":{"label":{"type":"string","description":"The name of the custom_field"},"slug":{"type":"string","description":"The slug of the custom_field"},"description":{"type":"string","description":"The description of the custom_field","nullable":true},"shown":{"type":"array","items":{"type":"string","description":"Where the custom_field is shown","enum":["incident_form","incident_mitigation_form","incident_resolution_form","incident_post_mortem_form","incident_slack_form","incident_mitigation_slack_form","incident_resolution_slack_form","incident_post_mortem"]}},"required":{"type":"array","items":{"type":"string","description":"Where the custom_field is required","enum":["incident_form","incident_mitigation_form","incident_resolution_form","incident_post_mortem_form","incident_slack_form","incident_mitigation_slack_form","incident_resolution_slack_form"]},"nullable":true},"default":{"type":"string","description":"The default value for text field kinds","nullable":true},"position":{"type":"integer","description":"The position of the custom_field"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"custom_field":{"type":"object","properties":{"label":{"type":"string","description":"The name of the custom_field"},"kind":{"type":"string","description":"The kind of the custom_field"},"enabled":{"type":"boolean","description":"Whether the custom_field is enabled"},"slug":{"type":"string","description":"The slug of the custom_field"},"description":{"type":"string","description":"The description of the custom_field","nullable":true},"shown":{"type":"array","items":{"type":"string","description":"Where the custom_field is shown","enum":["incident_form","incident_mitigation_form","incident_resolution_form","incident_post_mortem_form","incident_slack_form","incident_mitigation_slack_form","incident_resolution_slack_form","incident_post_mortem"]}},"required":{"type":"array","items":{"type":"string","description":"Where the custom_field is required","enum":["incident_form","incident_mitigation_form","incident_resolution_form","incident_post_mortem_form","incident_slack_form","incident_mitigation_slack_form","incident_resolution_slack_form"]},"nullable":true},"default":{"type":"string","description":"The default value for text field kinds","nullable":true},"position":{"type":"integer","description":"The position of the custom_field"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["label","slug","shown","required","position","created_at","updated_at"]},"custom_field_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the custom_field"},"type":{"type":"string","enum":["custom_fields"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/custom_field"}]}},"required":["id","type","attributes"]}},"required":["data"]},"custom_field_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the custom_field"},"type":{"type":"string","enum":["custom_fields"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/custom_field"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_custom_form":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["custom_forms"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom form."},"slug":{"type":"string","description":"The custom form slug. Add this to form_field.shown or form_field.required to associate form fields with custom forms."},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"command":{"type":"string","description":"The Slack command used to trigger this form."}},"additionalProperties":false,"required":["name","command"]}},"required":["type","attributes"]}},"required":["data"]},"update_custom_form":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["custom_forms"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom form."},"slug":{"type":"string","description":"The custom form slug. Add this to form_field.shown or form_field.required to associate form fields with custom forms."},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"command":{"type":"string","description":"The Slack command used to trigger this form."}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"custom_form":{"type":"object","properties":{"name":{"type":"string","description":"The name of the custom form."},"slug":{"type":"string","description":"The custom form slug. Add this to form_field.shown or form_field.required to associate form fields with custom forms."},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"command":{"type":"string","description":"The Slack command used to trigger this form."},"created_at":{"type":"string","description":"Date of creation."},"updated_at":{"type":"string","description":"Date of last update."}},"required":["name","slug","command","enabled","created_at","updated_at"]},"custom_form_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique id of the custom form."},"type":{"type":"string","enum":["custom_forms"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/custom_form"}]}},"required":["id","type","attributes"]}},"required":["data"]},"custom_form_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique id of the custom form."},"type":{"type":"string","enum":["custom_forms"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/custom_form"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_dashboard_panel":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["dashboard_panels"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the dashboard_panel","nullable":true},"params":{"type":"object","properties":{"display":{"type":"string","enum":["line_chart","line_stepped_chart","column_chart","stacked_column_chart","pie_chart","table","aggregate_value"]},"description":{"type":"string"},"table_fields":{"type":"array","items":{"type":"string"}},"legend":{"type":"object","properties":{"groups":{"type":"string","enum":["all","charted"],"default":"all"}}},"datalabels":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"datasets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"collection":{"type":"string","enum":["alerts","incidents","incident_post_mortems","incident_action_items","users"]},"filter":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","enum":["and","or"]},"rules":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","enum":["and","or"]},"condition":{"type":"string","enum":["=","!=",">=","<=","exists","not_exists","contains","not_contains"]},"key":{"type":"string"},"value":{"type":"string"}}}}}}},"group_by":{"type":"string","nullable":true},"aggregate":{"type":"object","properties":{"operation":{"type":"string","enum":["count","sum","average"]},"key":{"type":"string","nullable":true},"cumulative":{"type":"boolean","nullable":true}},"nullable":true}}}}}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"nullable":true}},"additionalProperties":false,"required":["params"]}},"required":["type","attributes"]}},"required":["data"]},"update_dashboard_panel":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["dashboard_panels"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the dashboard_panel","nullable":true},"params":{"type":"object","properties":{"display":{"type":"string","enum":["line_chart","line_stepped_chart","column_chart","stacked_column_chart","pie_chart","table","aggregate_value"]},"description":{"type":"string"},"table_fields":{"type":"array","items":{"type":"string"}},"legend":{"type":"object","properties":{"groups":{"type":"string","enum":["all","charted"],"default":"all"}}},"datalabels":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"datasets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"collection":{"type":"string","enum":["alerts","incidents","incident_post_mortems","incident_action_items","users"]},"filter":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","enum":["and","or"]},"rules":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","enum":["and","or"]},"condition":{"type":"string","enum":["=","!=",">=","<=","exists","not_exists","contains","not_contains"]},"key":{"type":"string"},"value":{"type":"string"}}}}}}},"group_by":{"type":"string","nullable":true},"aggregate":{"type":"object","properties":{"operation":{"type":"string","enum":["count","sum","average"]},"key":{"type":"string","nullable":true},"cumulative":{"type":"boolean","nullable":true}},"nullable":true}}}}}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"nullable":true}},"additionalProperties":false}}}},"required":["data"]},"dashboard_panel":{"type":"object","properties":{"dashboard_id":{"type":"string","description":"The panel dashboard"},"name":{"type":"string","description":"The name of the dashboard_panel","nullable":true},"params":{"type":"object","properties":{"display":{"type":"string","enum":["line_chart","line_stepped_chart","column_chart","stacked_column_chart","pie_chart","table","aggregate_value"]},"description":{"type":"string"},"table_fields":{"type":"array","items":{"type":"string"}},"legend":{"type":"object","properties":{"groups":{"type":"string","enum":["all","charted"],"default":"all"}}},"datalabels":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"datasets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"collection":{"type":"string","enum":["alerts","incidents","incident_post_mortems","incident_action_items","users"]},"filter":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","enum":["and","or"]},"rules":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","enum":["and","or"]},"condition":{"type":"string","enum":["=","!=",">=","<=","exists","not_exists","contains","not_contains"]},"key":{"type":"string"},"value":{"type":"string"}}}}}}},"group_by":{"type":"string","nullable":true},"aggregate":{"type":"object","properties":{"operation":{"type":"string","enum":["count","sum","average"]},"key":{"type":"string","nullable":true},"cumulative":{"type":"boolean","nullable":true}},"nullable":true}}}}}},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"nullable":true},"data":{"type":"array","items":{"type":"object"}}},"required":["params"]},"dashboard_panel_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the dashboard_panel"},"type":{"type":"string","enum":["dashboard_panels"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/dashboard_panel"}]}},"required":["id","type","attributes"]}},"required":["data"]},"dashboard_panel_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the dashboard_panel"},"type":{"type":"string","enum":["dashboard_panels"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/dashboard_panel"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_dashboard":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["dashboards"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the dashboard"},"description":{"type":"string","description":"The description of the dashboard","nullable":true},"owner":{"type":"string","description":"The owner type of the dashboard","enum":["user","team"]},"public":{"type":"boolean","description":"Whether the dashboard is public"},"range":{"type":"string","description":"The date range for dashboard panel data","nullable":true},"auto_refresh":{"type":"boolean","description":"Whether the dashboard auto-updates the UI with new data."},"color":{"type":"string","description":"The hex color of the dashboard","enum":["#FCF2CF","#D7F5E1","#E9E2FF","#FAE6E8","#FAEEE6"],"nullable":true},"icon":{"type":"string","description":"The emoji icon of the dashboard"},"period":{"type":"string","description":"The grouping period for dashboard panel data","enum":["day","week","month"],"nullable":true}},"additionalProperties":false,"required":["name","owner"]}},"required":["type","attributes"]}},"required":["data"]},"update_dashboard":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["dashboards"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the dashboard"},"description":{"type":"string","description":"The description of the dashboard","nullable":true},"owner":{"type":"string","description":"The owner type of the dashboard","enum":["user","team"]},"public":{"type":"boolean","description":"Whether the dashboard is public"},"range":{"type":"string","description":"The date range for dashboard panel data","nullable":true},"auto_refresh":{"type":"boolean","description":"Whether the dashboard auto-updates the UI with new data."},"color":{"type":"string","description":"The hex color of the dashboard","enum":["#FCF2CF","#D7F5E1","#E9E2FF","#FAE6E8","#FAEEE6"],"nullable":true},"icon":{"type":"string","description":"The emoji icon of the dashboard"},"period":{"type":"string","description":"The grouping period for dashboard panel data","enum":["day","week","month"],"nullable":true}},"additionalProperties":false}}}},"required":["data"]},"dashboard":{"type":"object","properties":{"team_id":{"type":"integer","description":"The dashboard team"},"user_id":{"type":"integer","description":"The dashboard user owner if owner is of type user","nullable":true},"name":{"type":"string","description":"The name of the dashboard"},"description":{"type":"string","description":"The description of the dashboard","nullable":true},"owner":{"type":"string","description":"The owner type of the dashboard","enum":["user","team"]},"public":{"type":"boolean","description":"Whether the dashboard is public"},"range":{"type":"string","description":"The date range for dashboard panel data","nullable":true},"period":{"type":"string","description":"The grouping period for dashboard panel data","nullable":true},"auto_refresh":{"type":"boolean","description":"Whether the dashboard auto-updates the UI with new data."},"color":{"type":"string","description":"The hex color of the dashboard","enum":["#FCF2CF","#D7F5E1","#E9E2FF","#FAE6E8","#FAEEE6"],"nullable":true},"icon":{"type":"string","description":"The emoji icon of the dashboard"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","owner","public"]},"dashboard_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the dashboard"},"type":{"type":"string","enum":["dashboards"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/dashboard"}]}},"required":["id","type","attributes"]}},"required":["data"]},"dashboard_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the dashboard"},"type":{"type":"string","enum":["dashboards"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/dashboard"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_environment":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["environments"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment"},"description":{"type":"string","description":"The description of the environment","nullable":true},"color":{"type":"string","description":"The hex color of the environment","nullable":true},"position":{"type":"integer","description":"Position of the environment","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the environment","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this environment","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this environment","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_environment":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["environments"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment"},"description":{"type":"string","description":"The description of the environment","nullable":true},"color":{"type":"string","description":"The hex color of the environment","nullable":true},"position":{"type":"integer","description":"Position of the environment","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the environment","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this environment","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this environment","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"environment":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment"},"slug":{"type":"string","description":"The slug of the environment"},"description":{"type":"string","description":"The description of the environment","nullable":true},"notify_emails":{"type":"array","description":"Emails attached to the environment","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the environment","nullable":true},"position":{"type":"integer","description":"Position of the environment","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this environment","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this environment","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"environment_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the environment"},"type":{"type":"string","enum":["environments"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/environment"}]}},"required":["id","type","attributes"]}},"required":["data"]},"environment_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the environment"},"type":{"type":"string","enum":["environments"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/environment"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"errors_list":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"status":{"type":"string"},"code":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["title","status"]}}}},"new_escalation_policy":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["escalation_policies"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the escalation policy"},"description":{"type":"string","description":"The description of the escalation policy","nullable":true},"repeat_count":{"type":"integer","description":"The number of times this policy will be executed until someone acknowledges the alert"},"group_ids":{"type":"array","items":{"type":"string"},"description":"Associated groups (alerting the group will trigger escalation policy)"},"service_ids":{"type":"array","items":{"type":"string"},"description":"Associated services (alerting the service will trigger escalation policy)"}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_escalation_policy":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["escalation_policies"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the escalation policy"},"description":{"type":"string","description":"The description of the escalation policy","nullable":true},"repeat_count":{"type":"integer","description":"The number of times this policy will be executed until someone acknowledges the alert"},"group_ids":{"type":"array","items":{"type":"string"},"description":"Associated groups (alerting the group will trigger escalation policy)"},"service_ids":{"type":"array","items":{"type":"string"},"description":"Associated services (alerting the service will trigger escalation policy)"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"escalation_policy":{"type":"object","properties":{"name":{"type":"string","description":"The name of the escalation policy"},"description":{"type":"string","description":"The description of the escalation policy","nullable":true},"repeat_count":{"type":"integer","description":"The number of times this policy will be executed until someone acknowledges the alert"},"created_by_user_id":{"type":"integer","description":"User who created the escalation policy"},"last_updated_by_user_id":{"type":"integer","description":"User who updated the escalation policy"},"group_ids":{"type":"array","items":{"type":"string"},"description":"Associated groups (alerting the group will trigger escalation policy)"},"service_ids":{"type":"array","items":{"type":"string"},"description":"Associated services (alerting the service will trigger escalation policy)"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","repeat_count","created_by_user_id"]},"escalation_policy_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the escalation policy"},"type":{"type":"string","enum":["escalation_policies"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/escalation_policy"}]}},"required":["id","type","attributes"]}},"required":["data"]},"escalation_policy_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the escalation policy"},"type":{"type":"string","enum":["escalation_policies"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/escalation_policy"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_escalation_policy_path":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["escalation_paths"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the escalation path"},"notification_type":{"type":"string","description":"Notification rule type to be used","enum":["audible","quiet"],"default":"audible"},"repeat":{"type":"boolean","description":"Whether this path should be repeated until someone acknowledges the alert","nullable":true},"repeat_count":{"type":"integer","description":"The number of times this path will be executed until someone acknowledges the alert","nullable":true},"rules":{"type":"array","description":"Escalation path conditions","items":{"type":"object","anyOf":[{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["alert_urgency"]},"urgency_ids":{"type":"array","description":"Alert urgency ids for which this escalation path should be used"}},"required":["rule_type","urgency_ids"]},{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["working_hour"]},"within_working_hour":{"type":"boolean","description":"Whether the escalation path should be used within working hours"}},"required":["rule_type","within_working_hour"]},{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["json_path"]},"json_path":{"type":"string","description":"JSON path to extract value from payload"},"operator":{"type":"string","description":"How JSON path value should be matched","enum":["is","is_not","contains","does_not_contain"]},"value":{"type":"string","description":"Value with which JSON path value should be matched"}},"required":["rule_type","json_path","operator","value"]}]}}},"required":["name","rules"],"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"update_escalation_policy_path":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["escalation_paths"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the escalation path"},"notification_type":{"type":"string","description":"Position of the escalation policy level","enum":["audible","quiet"],"default":"audible"},"repeat":{"type":"boolean","description":"Whether this path should be repeated until someone acknowledges the alert","nullable":true},"repeat_count":{"type":"integer","description":"The number of times this path will be executed until someone acknowledges the alert","nullable":true},"rules":{"type":"array","description":"Escalation path conditions","items":{"type":"object","anyOf":[{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["alert_urgency"]},"urgency_ids":{"type":"array","description":"Alert urgency ids for which this escalation path should be used"}},"required":["rule_type","urgency_ids"]},{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["working_hour"]},"within_working_hour":{"type":"boolean","description":"Whether the escalation path should be used within working hours"}},"required":["rule_type","within_working_hour"]},{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["json_path"]},"json_path":{"type":"string","description":"JSON path to extract value from payload"},"operator":{"type":"string","description":"How JSON path value should be matched","enum":["is","is_not","contains","does_not_contain"]},"value":{"type":"string","description":"Value with which JSON path value should be matched"}},"required":["rule_type","json_path","operator","value"]}],"nullable":true}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"escalation_policy_path":{"type":"object","properties":{"name":{"type":"string","description":"The name of the escalation path"},"default":{"type":"boolean","description":"Whether this escalation path is the default path"},"notification_type":{"type":"string","description":"Notification rule type"},"escalation_policy_id":{"type":"string","description":"The ID of the escalation policy"},"repeat":{"type":"boolean","description":"Whether this path should be repeated until someone acknowledges the alert","nullable":true},"repeat_count":{"type":"integer","description":"The number of times this path will be executed until someone acknowledges the alert","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"},"rules":{"type":"array","description":"Escalation path rules","items":{"type":"object","anyOf":[{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["alert_urgency"]},"urgency_ids":{"type":"array","description":"Alert urgency ids for which this escalation path should be used","items":{"type":"string"}}},"required":["rule_type","urgency_ids"]},{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["working_hour"]},"within_working_hour":{"type":"boolean","description":"Whether the escalation path should be used within working hours"}},"required":["rule_type","within_working_hour"]},{"properties":{"rule_type":{"type":"string","description":"The type of the escalation path rule","enum":["json_path"]},"json_path":{"type":"string","description":"JSON path to extract value from payload"},"operator":{"type":"string","description":"How JSON path value should be matched","enum":["is","is_not","contains","does_not_contain"]},"value":{"type":"string","description":"Value with which JSON path value should be matched"}},"required":["rule_type","json_path","operator","value"]}],"nullable":true}}},"required":["name","default","notification_type","escalation_policy_id","repeat","repeat_count"]},"escalation_policy_path_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the escalation policy path"},"type":{"type":"string","enum":["escalation_paths"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/escalation_policy_path"}]}},"required":["id","attributes"]}},"required":["data"]},"escalation_policy_path_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the escalation policy path"},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/escalation_policy_path"}]}},"required":["id","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_escalation_policy_level":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["escalation_levels"]},"attributes":{"type":"object","properties":{"delay":{"type":"integer","description":"Delay before notification targets will be alerted."},"position":{"type":"integer","description":"Position of the escalation policy level"},"escalation_policy_path_id":{"type":"string","description":"The ID of the dynamic escalation policy path the level will belong to. If nothing is specified it will add the level to your default path.","nullable":true},"notification_target_params":{"type":"array","description":"Escalation level's notification targets","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of notification target. If Slack channel, then id of the slack channel (eg. C06Q2JK7RQW)"},"type":{"type":"string","description":"The type of the notification target","enum":["user","schedule","slack_channel"]}},"required":["id","type"],"nullable":true}}},"required":["position","notification_target_params"],"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"update_escalation_policy_level":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["escalation_levels"]},"attributes":{"type":"object","properties":{"delay":{"type":"integer","description":"Delay before notification targets will be alerted."},"position":{"type":"integer","description":"Position of the escalation policy level"},"escalation_policy_path_id":{"type":"string","description":"The ID of the dynamic escalation policy path the level will belong to. If nothing is specified it will add the level to your default path.","nullable":true},"notification_target_params":{"type":"array","description":"Escalation level's notification targets","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of notification target"},"type":{"type":"string","description":"The type of the notification target","enum":["user","schedule","slack_channel"]}},"required":["id","type"],"nullable":true}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"escalation_policy_level":{"type":"object","properties":{"escalation_policy_id":{"type":"string","description":"The ID of the escalation policy"},"escalation_policy_path_id":{"type":"string","description":"The ID of the dynamic escalation policy path the level will belong to. If nothing is specified it will add the level to your default path.","nullable":true},"delay":{"type":"integer","description":"Delay before notification targets will be alerted."},"position":{"type":"integer","description":"Position of the escalation policy level"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"},"notification_target_params":{"type":"array","description":"Escalation level's notification targets","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of notification target"},"type":{"type":"string","description":"The type of the notification target","enum":["user","schedule","slack_channel"]}},"required":["id","type"],"nullable":true}}},"required":["escalation_policy_id","position","delay","notification_target_params"]},"escalation_policy_level_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the escalation policy level"},"type":{"type":"string","enum":["escalation_levels"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/escalation_policy_level"}]}},"required":["id","attributes"]}},"required":["data"]},"escalation_policy_level_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the escalation policy level"},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/escalation_policy_level"}]}},"required":["id","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_field_option":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_options"]},"attributes":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The ID of the form field"},"value":{"type":"string","description":"The value of the form_field_option"},"color":{"type":"string","description":"The hex color of the form_field_option"},"default":{"type":"boolean"},"position":{"type":"integer","description":"The position of the form_field_option"}},"additionalProperties":false,"required":["form_field_id","value"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_field_option":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_options"]},"attributes":{"type":"object","properties":{"value":{"type":"string","description":"The value of the form_field_option"},"color":{"type":"string","description":"The hex color of the form_field_option"},"default":{"type":"boolean"},"position":{"type":"integer","description":"The position of the form_field_option"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_field_option":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The ID of the parent custom field"},"value":{"type":"string","description":"The value of the form_field_option"},"color":{"type":"string","description":"The hex color of the form_field_option"},"default":{"type":"boolean"},"position":{"type":"integer","description":"The position of the form_field_option"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["value","color","position","created_at","updated_at"]},"form_field_option_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form_field_option"},"type":{"type":"string","enum":["form_field_options"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_option"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_field_option_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form_field_option"},"type":{"type":"string","enum":["form_field_options"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_option"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_field_placement_condition":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_placement_conditions"]},"attributes":{"type":"object","properties":{"conditioned":{"type":"string","description":"The resource or attribute the condition applies.","enum":["placement","required"]},"position":{"type":"integer","description":"The condition position."},"form_field_id":{"type":"string","description":"The condition field."},"comparison":{"type":"string","description":"The condition comparison.","enum":["equal","is_set","is_not_set"]},"values":{"type":"array","description":"The values for comparison.","items":{"type":"string","description":"The value for comparison."}}},"required":["conditioned","form_field_id","comparison","values"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_field_placement_condition":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_placement_conditions"]},"attributes":{"type":"object","properties":{"conditioned":{"type":"string","description":"The resource or attribute the condition applies.","enum":["placement","required"]},"position":{"type":"integer","description":"The condition position."},"form_field_id":{"type":"string","description":"The condition field."},"comparison":{"type":"string","description":"The condition comparison.","enum":["equal","is_set","is_not_set"]},"values":{"type":"array","description":"The values for comparison.","items":{"type":"string","description":"The value for comparison."}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_field_placement_condition":{"type":"object","properties":{"form_field_placement_id":{"type":"string","description":"The form field placement this condition applies."},"conditioned":{"type":"string","description":"The resource or attribute the condition applies.","enum":["placement","required"]},"position":{"type":"integer","description":"The condition position."},"form_field_id":{"type":"string","description":"The condition field."},"comparison":{"type":"string","description":"The condition comparison.","enum":["equal","is_set","is_not_set"]},"values":{"type":"array","description":"The values for comparison.","items":{"type":"string","description":"The value for comparison."}}},"required":["form_field_placement_id","conditioned","position","form_field_id","comparison","values"]},"form_field_placement_condition_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form set condition"},"type":{"type":"string","enum":["form_field_placement_conditions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_placement_condition"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_field_placement_condition_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form set condition"},"type":{"type":"string","enum":["form_field_placement_conditions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_placement_condition"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_field_placement":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_placements"]},"attributes":{"type":"object","properties":{"form_set_id":{"type":"string","description":"The form set this field is placed in."},"form":{"type":"string","description":"The form this field is placed on."},"position":{"type":"integer","description":"The position of the field placement."},"required":{"type":"boolean","description":"Whether the field is unconditionally required on this form."},"required_operator":{"type":"string","description":"Logical operator when evaluating multiple form_field_placement_conditions with conditioned=required","enum":["and","or"]},"placement_operator":{"type":"string","description":"Logical operator when evaluating multiple form_field_placement_conditions with conditioned=placement","enum":["and","or"]}},"required":["form_set_id","form"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_field_placement":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_placements"]},"attributes":{"type":"object","properties":{"form_set_id":{"type":"string","description":"The form set this field is placed in."},"form":{"type":"string","description":"The form this field is placed on."},"position":{"type":"integer","description":"The position of the field placement."},"required":{"type":"boolean","description":"Whether the field is unconditionally required on this form."},"required_operator":{"type":"string","description":"Logical operator when evaluating multiple form_field_placement_conditions with conditioned=required","enum":["and","or"]},"placement_operator":{"type":"string","description":"Logical operator when evaluating multiple form_field_placement_conditions with conditioned=placement","enum":["and","or"]}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_field_placement":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The form field that is placed."},"form_set_id":{"type":"string","description":"The form set this field is placed in."},"form":{"type":"string","description":"The form this field is placed on."},"position":{"type":"integer","description":"The position of the field placement."},"required":{"type":"boolean","description":"Whether the field is unconditionally required on this form."},"required_operator":{"type":"string","description":"Logical operator when evaluating multiple form_field_placement_conditions with conditioned=required","enum":["and","or"]},"placement_operator":{"type":"string","description":"Logical operator when evaluating multiple form_field_placement_conditions with conditioned=placement","enum":["and","or"]}},"required":["form_field_id","form_set_id","form","position","required"]},"form_field_placement_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form field placement"},"type":{"type":"string","enum":["form_field_placements"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_placement"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_field_placement_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form field placement"},"type":{"type":"string","enum":["form_field_placements"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_placement"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_field_position":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_positions"]},"attributes":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The ID of the form field."},"form":{"type":"string","description":"The form for the position","enum":["web_new_incident_form","web_update_incident_form","web_incident_post_mortem_form","web_incident_mitigation_form","web_incident_resolution_form","web_incident_cancellation_form","web_scheduled_incident_form","web_update_scheduled_incident_form","incident_post_mortem","slack_new_incident_form","slack_update_incident_form","slack_update_incident_status_form","slack_incident_mitigation_form","slack_incident_resolution_form","slack_incident_cancellation_form","slack_scheduled_incident_form","slack_update_scheduled_incident_form"]},"position":{"type":"integer","description":"The position of the form_field_position"}},"additionalProperties":false,"required":["form_field_id","position","form"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_field_position":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_field_positions"]},"attributes":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The ID of the form field."},"form":{"type":"string","description":"The form for the position","enum":["web_new_incident_form","web_update_incident_form","web_incident_post_mortem_form","web_incident_mitigation_form","web_incident_resolution_form","web_incident_cancellation_form","web_scheduled_incident_form","web_update_scheduled_incident_form","incident_post_mortem","slack_new_incident_form","slack_update_incident_form","slack_update_incident_status_form","slack_incident_mitigation_form","slack_incident_resolution_form","slack_incident_cancellation_form","slack_scheduled_incident_form","slack_update_scheduled_incident_form"]},"position":{"type":"integer","description":"The position of the form_field_position"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_field_position":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The ID of the form field."},"form":{"type":"string","description":"The form for the position","enum":["web_new_incident_form","web_update_incident_form","web_incident_post_mortem_form","web_incident_mitigation_form","web_incident_resolution_form","web_incident_cancellation_form","web_scheduled_incident_form","web_update_scheduled_incident_form","incident_post_mortem","slack_new_incident_form","slack_update_incident_form","slack_update_incident_status_form","slack_incident_mitigation_form","slack_incident_resolution_form","slack_incident_cancellation_form","slack_scheduled_incident_form","slack_update_scheduled_incident_form"]},"position":{"type":"integer","description":"The position of the form_field_position"}},"required":["form_field_id","position","form"]},"form_field_position_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form_field_position"},"type":{"type":"string","enum":["form_field_positions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_position"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_field_position_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form_field_position"},"type":{"type":"string","enum":["form_field_positions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field_position"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_field":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_fields"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the form field","enum":["custom","title","summary","mitigation_message","resolution_message","severity","environments","types","services","causes","functionalities","teams","visibility","mark_as_test","mark_as_backfilled","labels","notify_emails","trigger_manual_workflows","show_ongoing_incidents","attach_alerts","mark_as_in_triage","in_triage_at","started_at","detected_at","acknowledged_at","mitigated_at","resolved_at","manual_starting_datetime_field"]},"input_kind":{"type":"string","description":"The input kind of the form field","enum":["text","textarea","select","multi_select","date","datetime","number","checkbox","tags","rich_text"]},"value_kind":{"type":"string","description":"The value kind of the form field","enum":["inherit","group","service","functionality","user","catalog_entity"]},"value_kind_catalog_id":{"type":"string","description":"The ID of the catalog used when value_kind is `catalog_entity`","nullable":true},"name":{"type":"string","description":"The name of the form field"},"description":{"type":"string","description":"The description of the form field","nullable":true},"shown":{"type":"array","items":{"type":"string","description":"Where the form field is shown. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `incident_post_mortem`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"required":{"type":"array","items":{"type":"string","description":"Where the form field is required. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"show_on_incident_details":{"type":"boolean","description":"Whether the form field is shown on the incident details panel"},"enabled":{"type":"boolean","description":"Whether the form field is enabled"},"default_values":{"type":"array","items":{"type":"string","description":"The default values."}}},"additionalProperties":false,"required":["kind","name"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_field":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_fields"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the form field","enum":["custom","title","summary","mitigation_message","resolution_message","severity","environments","types","services","causes","functionalities","teams","visibility","mark_as_test","mark_as_backfilled","labels","notify_emails","trigger_manual_workflows","show_ongoing_incidents","attach_alerts","mark_as_in_triage","in_triage_at","started_at","detected_at","acknowledged_at","mitigated_at","resolved_at","manual_starting_datetime_field"]},"input_kind":{"type":"string","description":"The input kind of the form field","enum":["text","textarea","select","multi_select","date","datetime","number","checkbox","tags","rich_text"]},"value_kind":{"type":"string","description":"The value kind of the form field","enum":["inherit","group","service","functionality","user","catalog_entity"]},"value_kind_catalog_id":{"type":"string","description":"The ID of the catalog used when value_kind is `catalog_entity`","nullable":true},"name":{"type":"string","description":"The name of the form field"},"description":{"type":"string","description":"The description of the form field","nullable":true},"shown":{"type":"array","items":{"type":"string","description":"Where the form field is shown. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `incident_post_mortem`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"required":{"type":"array","items":{"type":"string","description":"Where the form field is required. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"show_on_incident_details":{"type":"boolean","description":"Whether the form field is shown on the incident details panel"},"enabled":{"type":"boolean","description":"Whether the form field is enabled"},"default_values":{"type":"array","items":{"type":"string","description":"The default values."}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_field":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the form field","enum":["custom","title","summary","mitigation_message","resolution_message","severity","environments","types","services","causes","functionalities","teams","visibility","mark_as_test","mark_as_backfilled","labels","notify_emails","trigger_manual_workflows","show_ongoing_incidents","attach_alerts","mark_as_in_triage","in_triage_at","started_at","detected_at","acknowledged_at","mitigated_at","resolved_at","manual_starting_datetime_field"]},"input_kind":{"type":"string","description":"The input kind of the form field","enum":["text","textarea","select","multi_select","date","datetime","number","checkbox","tags","rich_text"]},"value_kind":{"type":"string","description":"The value kind of the form field","enum":["inherit","group","service","functionality","user","catalog_entity"]},"value_kind_catalog_id":{"type":"string","description":"The ID of the catalog used when value_kind is `catalog_entity`","nullable":true},"name":{"type":"string","description":"The name of the form field"},"slug":{"type":"string","description":"The slug of the form field"},"description":{"type":"string","description":"The description of the form field","nullable":true},"shown":{"type":"array","items":{"type":"string","description":"Where the form field is shown. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `incident_post_mortem`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"required":{"type":"array","items":{"type":"string","description":"Where the form field is required. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"show_on_incident_details":{"type":"boolean","description":"Whether the form field is shown on the incident details panel"},"enabled":{"type":"boolean","description":"Whether the form field is enabled"},"default_values":{"type":"array","items":{"type":"string","description":"The default values."}},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["kind","input_kind","value_kind","slug","name","shown","required","default_values","created_at","updated_at"]},"form_field_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form field"},"type":{"type":"string","enum":["form_fields"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_field_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form field"},"type":{"type":"string","enum":["form_fields"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_field"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_set_condition":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_set_conditions"]},"attributes":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The form field this condition applies."},"comparison":{"type":"string","description":"The condition comparison.","enum":["equal"]},"values":{"type":"array","description":"The values for comparison.","items":{"type":"string","description":"The value for comparison."}}},"required":["form_field_id","comparison","values"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_set_condition":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_set_conditions"]},"attributes":{"type":"object","properties":{"form_field_id":{"type":"string","description":"The form field this condition applies."},"comparison":{"type":"string","description":"The condition comparison.","enum":["equal"]},"values":{"type":"array","description":"The values for comparison.","items":{"type":"string","description":"The value for comparison."}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_set_condition":{"type":"object","properties":{"form_set_id":{"type":"string","description":"The form set this condition applies."},"form_field_id":{"type":"string","description":"The form field this condition applies."},"comparison":{"type":"string","description":"The condition comparison.","enum":["equal"]},"values":{"type":"array","description":"The values for comparison.","items":{"type":"string","description":"The value for comparison."}}},"required":["form_set_id","form_field_id","comparison","values"]},"form_set_condition_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form set condition"},"type":{"type":"string","enum":["form_set_conditions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_set_condition"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_set_condition_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form set condition"},"type":{"type":"string","enum":["form_set_conditions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_set_condition"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_form_set":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_sets"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the form set"},"forms":{"type":"array","description":"The forms included in the form set. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`","items":{"type":"string","description":"The form included in the form set. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}}},"additionalProperties":false,"required":["name","forms"]}},"required":["type","attributes"]}},"required":["data"]},"update_form_set":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["form_sets"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the form set"},"forms":{"type":"array","description":"The forms included in the form set. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`","items":{"type":"string","description":"The form included in the form set. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"form_set":{"type":"object","properties":{"name":{"type":"string","description":"The name of the form set"},"slug":{"type":"string","description":"The slug of the form set"},"is_default":{"type":"boolean","description":"Whether the form set is default"},"forms":{"type":"array","description":"The forms included in the form set. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`","items":{"type":"string","description":"The form included in the form set. Add custom forms using the custom form's `slug` field. Or choose a built-in form: `web_new_incident_form`, `web_update_incident_form`, `web_incident_post_mortem_form`, `web_incident_mitigation_form`, `web_incident_resolution_form`, `web_incident_cancellation_form`, `web_scheduled_incident_form`, `web_update_scheduled_incident_form`, `slack_new_incident_form`, `slack_update_incident_form`, `slack_update_incident_status_form`, `slack_incident_mitigation_form`, `slack_incident_resolution_form`, `slack_incident_cancellation_form`, `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`"}},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","slug","is_default","forms","created_at","updated_at"]},"form_set_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form set"},"type":{"type":"string","enum":["form_sets"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_set"}]}},"required":["id","type","attributes"]}},"required":["data"]},"form_set_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the form set"},"type":{"type":"string","enum":["form_sets"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/form_set"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_functionality":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["functionalities"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the functionality"},"description":{"type":"string","description":"The description of the functionality","nullable":true},"public_description":{"type":"string","description":"The public description of the functionality","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the functionality","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the functionality","nullable":true},"position":{"type":"integer","description":"Position of the functionality","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this functionality. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this functionality","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty service id associated to this functionality","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie service id associated to this functionality","nullable":true},"opsgenie_team_id":{"type":"string","description":"The Opsgenie team id associated to this functionality","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this functionality","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this functionality","nullable":true},"show_uptime":{"type":"boolean","description":"Show uptime","nullable":true},"show_uptime_last_days":{"type":"integer","description":"Show uptime over x days","enum":[30,60,90],"nullable":true,"default":60},"environment_ids":{"type":"array","description":"Environments associated with this functionality","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"Services associated with this functionality","items":{"type":"string"},"nullable":true},"owners_group_ids":{"type":"array","description":"Owner Teams associated with this functionality","items":{"type":"string"},"nullable":true},"owners_user_ids":{"type":"array","description":"Owner Users associated with this functionality","items":{"type":"integer"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this functionality","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this functionality","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_functionality":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["functionalities"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the functionality"},"description":{"type":"string","description":"The description of the functionality","nullable":true},"public_description":{"type":"string","description":"The public description of the functionality","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the functionality","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the functionality","nullable":true},"position":{"type":"integer","description":"Position of the functionality","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this functionality. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this functionality","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty service id associated to this functionality","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie service id associated to this functionality","nullable":true},"opsgenie_team_id":{"type":"string","description":"The Opsgenie team id associated to this functionality","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this functionality","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this functionality","nullable":true},"environment_ids":{"type":"array","description":"Environments associated with this functionality","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"Services associated with this functionality","items":{"type":"string"},"nullable":true},"owners_group_ids":{"type":"array","description":"Owner Teams associated with this functionality","items":{"type":"string"},"nullable":true},"owners_user_ids":{"type":"array","description":"Owner Users associated with this functionality","items":{"type":"integer"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this functionality","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this functionality","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"functionality":{"type":"object","properties":{"name":{"type":"string","description":"The name of the functionality"},"slug":{"type":"string","description":"The slug of the functionality"},"description":{"type":"string","description":"The description of the functionality","nullable":true},"public_description":{"type":"string","description":"The public description of the functionality","nullable":true},"notify_emails":{"type":"array","description":"Emails attached to the functionality","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the functionality","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this functionality. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this functionality","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty service id associated to this functionality","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie service id associated to this functionality","nullable":true},"opsgenie_team_id":{"type":"string","description":"The Opsgenie team id associated to this functionality","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this functionality","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this functionality","nullable":true},"position":{"type":"integer","description":"Position of the functionality","nullable":true},"environment_ids":{"type":"array","description":"Environments associated with this functionality","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"Services associated with this functionality","items":{"type":"string"},"nullable":true},"owners_group_ids":{"type":"array","description":"Owner Teams associated with this functionality","items":{"type":"string"},"nullable":true},"owners_user_ids":{"type":"array","description":"Owner Users associated with this functionality","items":{"type":"integer"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this functionality","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this functionality","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"incidents_chart_response":{"type":"object","required":["data"]},"uptime_chart_response":{"type":"object","required":["data"]},"functionality_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the functionality"},"type":{"type":"string","enum":["functionalities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/functionality"}]}},"required":["id","type","attributes"]}},"required":["data"]},"functionality_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the functionality"},"type":{"type":"string","enum":["functionalities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/functionality"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"add_action_item_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["add_action_item"]},"attribute_to_query_by":{"type":"string","description":"Attribute of the Incident to match against","enum":["jira_issue_id"],"nullable":true},"query_value":{"type":"string","description":"Value that attribute_to_query_by to uses to match against","nullable":true},"incident_role_id":{"type":"string","description":"The role id this action item is associated with"},"assigned_to_user_id":{"type":"string","description":"[DEPRECATED] Use assigned_to_user attribute instead. The user id this action item is assigned to"},"assigned_to_user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":" The user this action item is assigned to"},"priority":{"type":"string","description":"The action item priority","enum":["high","medium","low"]},"kind":{"type":"string","description":"The action item kind"},"summary":{"type":"string","description":"The action item summary"},"description":{"type":"string","description":"The action item description"},"status":{"type":"string","description":"The action item status","enum":["open","in_progress","cancelled","done"]},"post_to_incident_timeline":{"type":"boolean"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["summary","status","priority"]},"update_action_item_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_action_item"]},"query_value":{"type":"string","description":"Value that attribute_to_query_by to uses to match against"},"attribute_to_query_by":{"type":"string","description":"Attribute of the action item to match against","enum":["id","jira_issue_id","asana_task_id","shortcut_task_id","linear_issue_id","zendesk_ticket_id","motion_task_id","trello_card_id","airtable_record_id","shortcut_story_id","github_issue_id","gitlab_issue_id","freshservice_ticket_id","freshservice_task_id","clickup_task_id"],"default":"id"},"summary":{"type":"string","description":"Brief description of the action item"},"assigned_to_user_id":{"type":"string","description":"[DEPRECATED] Use assigned_to_user attribute instead. The user id this action item is assigned to"},"assigned_to_user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":" The user this action item is assigned to"},"group_ids":{"type":"array","items":{"type":"string"},"nullable":true},"description":{"type":"string","description":"The action item description"},"priority":{"type":"string","description":"The action item priority","enum":["high","medium","low"]},"status":{"type":"string","description":"The action item status","enum":["open","in_progress","cancelled","done"]},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"post_to_incident_timeline":{"type":"boolean"}},"required":["query_value","attribute_to_query_by"]},"add_role_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["add_role"]},"incident_role_id":{"type":"string","description":"The role id to add to the incident"},"assigned_to_user_id":{"type":"string","description":"[DEPRECATED] Use assigned_to_user attribute instead. The user id this role is assigned to"},"assigned_to_user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":" The user this role is assigned to"}},"required":["incident_role_id"]},"add_slack_bookmark_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["add_slack_bookmark"]},"playbook_id":{"type":"string","description":"The playbook id if bookmark is of an incident playbook"},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"The bookmark title. Required if not a playbook bookmark","nullable":true},"link":{"type":"string","description":"The bookmark link. Required if not a playbook bookmark","nullable":true},"emoji":{"type":"string","description":"The bookmark emoji"}},"required":["channel"],"anyOf":[{"required":["title","link"]},{"required":["playbook_id"]}]},"add_team_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["add_team"]},"group_id":{"type":"string","description":"The team id"}},"required":["group_id"]},"add_to_timeline_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["add_to_timeline"]},"event":{"type":"string","description":"The timeline event description"},"url":{"type":"string","description":"A URL for the timeline event"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["event"]},"archive_slack_channels_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["archive_slack_channels"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["channels"]},"attach_datadog_dashboards_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["attach_datadog_dashboards"]},"dashboards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["dashboards"]},"auto_assign_role_opsgenie_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["auto_assign_role_opsgenie"]},"incident_role_id":{"type":"string","description":"The role id"},"schedule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["incident_role_id","schedule"]},"auto_assign_role_rootly_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["auto_assign_role_rootly"]},"incident_role_id":{"type":"string","description":"The role id"},"escalation_policy_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"service_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"user_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"group_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"schedule_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["incident_role_id"]},"auto_assign_role_pagerduty_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["auto_assign_role_pagerduty"]},"incident_role_id":{"type":"string","description":"The role id"},"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"schedule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"escalation_policy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["incident_role_id"],"anyOf":[{"required":["schedule"]},{"required":["escalation_policy"]}]},"update_pagerduty_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_pagerduty_incident"]},"pagerduty_incident_id":{"type":"string","description":"Pagerduty incident id"},"title":{"type":"string","description":"Title to update to"},"status":{"type":"string","enum":["resolved","acknowledged","auto"]},"resolution":{"type":"string","description":"A message outlining the incident's resolution in PagerDuty"},"escalation_level":{"type":"integer","description":"Escalation level of policy attached to incident","minimum":1,"maximum":20,"example":1},"urgency":{"type":"string","description":"PagerDuty incident urgency, selecting auto will let Rootly auto map our incident severity","enum":["high","low","auto"]},"priority":{"type":"string","description":"PagerDuty incident priority, selecting auto will let Rootly auto map our incident severity"}},"required":["pagerduty_incident_id"]},"create_pagerduty_status_update_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_pagerduty_status_update"]},"pagerduty_incident_id":{"type":"string","description":"PagerDuty incident id"},"message":{"type":"string","description":"A message outlining the incident's resolution in PagerDuty"}},"required":["pagerduty_incident_id","message"]},"create_pagertree_alert_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_pagertree_alert"]},"title":{"type":"string","description":"Title of alert as text"},"description":{"type":"string","description":"Description of alert as text"},"urgency":{"type":"string","enum":["auto","critical","high","medium","low"]},"severity":{"type":"string","enum":["auto","SEV-1","SEV-2","SEV-3","SEV-4"]},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"incident":{"type":"boolean","description":"Setting to true makes an alert a Pagertree incident"}}},"update_pagertree_alert_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_pagertree_alert"]},"pagertree_alert_id":{"type":"string","description":"The prefix ID of the Pagertree alert"},"title":{"type":"string","description":"Title of alert as text"},"description":{"type":"string","description":"Description of alert as text"},"urgency":{"type":"string","enum":["auto","critical","high","medium","low"]},"severity":{"type":"string","enum":["auto","SEV-1","SEV-2","SEV-3","SEV-4"]},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"incident":{"type":"boolean","description":"Setting to true makes an alert a Pagertree incident"}}},"auto_assign_role_victor_ops_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["auto_assign_role_victor_ops"]},"incident_role_id":{"type":"string","description":"The role id"},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["incident_role_id","team"]},"call_people_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["call_people"]},"phone_numbers":{"type":"array","items":{"type":"string","description":"A recipient phone number","example":["14150001111"]}},"name":{"type":"string","description":"The name"},"content":{"type":"string","description":"The message to be read by text-to-voice"}},"required":["phone_numbers","name","content"]},"create_airtable_table_record_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_airtable_table_record"]},"base":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"table":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["base","table"]},"create_asana_subtask_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_asana_subtask"]},"parent_task_id":{"type":"string","description":"The parent task id"},"title":{"type":"string","description":"The subtask title"},"notes":{"type":"string"},"assign_user_email":{"type":"string","description":"The assigned user's email"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"due_date":{"type":"string","description":"The due date"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"dependency_direction":{"type":"string","enum":["blocking","blocked_by"],"default":"blocking"},"dependent_task_ids":{"type":"array","description":"Dependent task ids. Supports liquid syntax","items":{"type":"string"},"nullable":true}},"required":["parent_task_id","title","completion"]},"create_asana_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_asana_task"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"title":{"type":"string","description":"The task title"},"notes":{"type":"string"},"assign_user_email":{"type":"string","description":"The assigned user's email"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"due_date":{"type":"string","description":"The due date"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"dependency_direction":{"type":"string","enum":["blocking","blocked_by"],"default":"blocking"},"dependent_task_ids":{"type":"array","description":"Dependent task ids. Supports liquid syntax","items":{"type":"string"},"nullable":true}},"required":["workspace","projects","title","completion"]},"create_confluence_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_confluence_page"]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"Specify integration id if you have more than one Confluence instance"},"space":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"ancestor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"The page title"},"content":{"type":"string","description":"The page content"},"post_mortem_template_id":{"type":"string","description":"The Retrospective template to use"},"mark_post_mortem_as_published":{"type":"boolean","default":true}},"required":["space","title"]},"create_datadog_notebook_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_datadog_notebook"]},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating notebook, if desired"},"mark_post_mortem_as_published":{"type":"boolean","default":true},"template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"The notebook title"},"kind":{"type":"string","description":"The notebook kind","enum":["postmortem","runbook","investigation","documentation","report"]},"content":{"type":"string","description":"The notebook content"}},"required":["title","kind"]},"create_dropbox_paper_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_dropbox_paper_page"]},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating page task, if desired"},"mark_post_mortem_as_published":{"type":"boolean","default":true},"title":{"type":"string","description":"The page task title"},"content":{"type":"string","description":"The page content"},"namespace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"parent_folder":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["title"]},"create_github_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_github_issue"]},"title":{"type":"string","description":"The issue title"},"body":{"type":"string","description":"The issue body"},"repository":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["repository","title"]},"create_gitlab_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_gitlab_issue"]},"issue_type":{"type":"string","description":"The issue type","enum":["issue","incident","test_case","task"]},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"repository":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"labels":{"type":"string","description":"The issue labels"},"due_date":{"type":"string","description":"The due date"}},"required":["repository","title"]},"create_outlook_event_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_outlook_event"]},"calendar":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"attendees":{"type":"array","description":"Emails of attendees","items":{"type":"string"}},"time_zone":{"type":"string","description":"A valid IANA time zone name.","nullable":true},"days_until_meeting":{"type":"integer","description":"The days until meeting","minimum":0,"maximum":31},"time_of_meeting":{"type":"string","description":"Time of meeting in format HH:MM","example":"14:30"},"meeting_duration":{"type":"string","description":"Meeting duration in format like '1 hour', '30 minutes'","example":"1 hour"},"summary":{"type":"string","description":"The event summary"},"description":{"type":"string","description":"The event description"},"exclude_weekends":{"type":"boolean"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["calendar","days_until_meeting","time_of_meeting","meeting_duration","summary","description"]},"create_google_calendar_event_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_google_calendar_event"]},"attendees":{"type":"array","description":"Emails of attendees","items":{"type":"string"}},"time_zone":{"type":"string","description":"A valid IANA time zone name.","nullable":true},"calendar_id":{"type":"string","nullable":true,"default":"primary"},"days_until_meeting":{"type":"integer","description":"The days until meeting","minimum":0,"maximum":31},"time_of_meeting":{"type":"string","description":"Time of meeting in format HH:MM","example":"14:30"},"meeting_duration":{"type":"string","description":"Meeting duration in format like '1 hour', '30 minutes'","example":"1 hour"},"send_updates":{"type":"boolean","description":"Send an email to the attendees notifying them of the event"},"can_guests_modify_event":{"type":"boolean"},"can_guests_see_other_guests":{"type":"boolean"},"can_guests_invite_others":{"type":"boolean"},"summary":{"type":"string","description":"The event summary"},"description":{"type":"string","description":"The event description"},"exclude_weekends":{"type":"boolean"},"conference_solution_key":{"type":"string","enum":["eventHangout","eventNamedHangout","hangoutsMeet","addOn"],"description":"Sets the video conference type attached to the meeting","nullable":true},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["days_until_meeting","time_of_meeting","meeting_duration","summary","description"]},"update_google_docs_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_google_docs_page"]},"file_id":{"type":"string","description":"The Google Doc file ID"},"title":{"type":"string","description":"The Google Doc title"},"content":{"type":"string","description":"The Google Doc content"},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when updating page, if desired"},"template_id":{"type":"string","description":"The Google Doc file ID to use as a template."}},"required":["file_id"]},"update_google_calendar_event_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_google_calendar_event"]},"calendar_id":{"type":"string","nullable":true,"default":"primary"},"event_id":{"type":"string","description":"The event ID"},"summary":{"type":"string","description":"The event summary"},"description":{"type":"string","description":"The event description"},"adjustment_days":{"type":"integer","description":"Days to adjust meeting by","minimum":0,"maximum":31},"time_of_meeting":{"type":"string","description":"Time of meeting in format HH:MM"},"meeting_duration":{"type":"string","description":"Meeting duration in format like '1 hour', '30 minutes'","example":"1 hour"},"send_updates":{"type":"boolean","description":"Send an email to the attendees notifying them of the event"},"can_guests_modify_event":{"type":"boolean"},"can_guests_see_other_guests":{"type":"boolean"},"can_guests_invite_others":{"type":"boolean"},"attendees":{"type":"array","description":"Emails of attendees","items":{"type":"string"}},"replace_attendees":{"type":"boolean"},"conference_solution_key":{"type":"string","enum":["eventHangout","eventNamedHangout","hangoutsMeet","addOn"],"description":"Sets the video conference type attached to the meeting","nullable":true},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["event_id"]},"create_sharepoint_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_sharepoint_page"]},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating page, if desired"},"mark_post_mortem_as_published":{"type":"boolean","default":true},"title":{"type":"string","description":"The page title"},"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"drive":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"parent_folder":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"content":{"type":"string","description":"The page content"},"template_id":{"type":"string","description":"The SharePoint file ID to use as a template"}},"required":["title","site","drive"]},"create_google_docs_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_google_docs_page"]},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating page, if desired"},"mark_post_mortem_as_published":{"type":"boolean","default":true},"title":{"type":"string","description":"The page title"},"drive":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"parent_folder":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"content":{"type":"string","description":"The page content"},"template_id":{"type":"string","description":"The Google Doc file ID to use as a template"},"permissions":{"type":"string","description":"Page permissions JSON"}},"required":["title"]},"create_google_docs_permissions_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_google_docs_permissions"]},"file_id":{"type":"string","description":"The Google Doc file ID"},"permissions":{"type":"string","description":"Page permissions JSON"},"send_notification_email":{"type":"boolean"},"email_message":{"type":"string","description":"Email message notification","nullable":true}},"required":["file_id","permissions"]},"remove_google_docs_permissions_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["remove_google_docs_permissions"]},"file_id":{"type":"string","description":"The Google Doc file ID"},"attribute_to_query_by":{"type":"string","enum":["type","role","email_address"],"default":"email_address"},"value":{"type":"string"}},"required":["file_id","attribute_to_query_by","value"]},"create_quip_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_google_docs_page"]},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating page, if desired"},"title":{"type":"string","description":"The page title"},"parent_folder_id":{"type":"string","description":"The parent folder id"},"content":{"type":"string","description":"The page content"},"template_id":{"type":"string","description":"The Quip file ID to use as a template"},"mark_post_mortem_as_published":{"type":"boolean","default":true}},"required":["title"]},"create_google_meeting_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_google_meeting"]},"summary":{"type":"string","description":"[DEPRECATED] The meeting summary","nullable":true},"description":{"type":"string","description":"[DEPRECATED] The meeting description","nullable":true},"conference_solution_key":{"type":"string","enum":["eventHangout","eventNamedHangout","hangoutsMeet","addOn"],"description":"[DEPRECATED] Sets the video conference type attached to the meeting","nullable":true},"record_meeting":{"type":"boolean","description":"Rootly AI will record the meeting and automatically generate a transcript and summary from your meeting"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["summary","description"]},"create_go_to_meeting_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_go_to_meeting_task"]},"subject":{"type":"string","description":"The meeting subject"},"conference_call_info":{"type":"string","enum":["ptsn","free","hyrid","voip"],"default":"voip","example":"voip","nullable":true},"password_required":{"type":"boolean","nullable":true},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["subject"]},"create_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_incident"]},"title":{"type":"string","description":"The incident title"},"summary":{"type":"string","description":"The incident summary"},"severity_id":{"type":"string"},"incident_type_ids":{"type":"array","items":{"type":"string"}},"service_ids":{"type":"array","items":{"type":"string"}},"functionality_ids":{"type":"array","items":{"type":"string"}},"environment_ids":{"type":"array","items":{"type":"string"}},"group_ids":{"type":"array","items":{"type":"string"}},"private":{"type":"boolean"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["title"]},"create_incident_postmortem_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_incident_postmortem"]},"incident_id":{"type":"string","description":"UUID of the incident that needs a retrospective"},"title":{"type":"string","description":"The retrospective title"},"status":{"type":"string","nullable":true},"template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"Retrospective template to use","nullable":true}},"required":["incident_id","title"]},"create_jira_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_jira_issue"]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"Specify integration id if you have more than one Jira instance"},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"labels":{"type":"string","description":"The issue labels"},"assign_user_email":{"type":"string","description":"The assigned user's email"},"reporter_user_email":{"type":"string","description":"The reporter user's email"},"project_key":{"type":"string","description":"The project key"},"due_date":{"type":"string","description":"The due date"},"issue_type":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The issue type id and display name"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"status":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The status id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"update_payload":{"type":"string","description":"Update payload. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["project_key","title","issue_type"]},"create_jira_subtask_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_jira_subtask"]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"Specify integration id if you have more than one Jira instance"},"project_key":{"type":"string","description":"The project key"},"parent_issue_id":{"type":"string","description":"The parent issue"},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"subtask_issue_type":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The issue type id and display name"},"labels":{"type":"string","description":"The issue labels"},"due_date":{"type":"string","description":"The due date"},"assign_user_email":{"type":"string","description":"The assigned user's email"},"reporter_user_email":{"type":"string","description":"The reporter user's email"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"status":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The status id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"update_payload":{"type":"string","description":"Update payload. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["project_key","parent_issue_id","title","subtask_issue_type"]},"create_linear_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_linear_issue"]},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The team id and display name"},"state":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The state id and display name"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The project id and display name"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"assign_user_email":{"type":"string","description":"The assigned user's email"}},"required":["title","team","state"]},"create_linear_subtask_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_linear_subtask_issue"]},"parent_issue_id":{"type":"string","description":"The parent issue"},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"state":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The state id and display name"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"assign_user_email":{"type":"string","description":"The assigned user's email"}},"required":["parent_issue_id","title","state"]},"create_linear_issue_comment_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_linear_issue_comment"]},"issue_id":{"type":"string","description":"The issue id"},"body":{"type":"string","description":"The issue description"}},"required":["issue_id","body"]},"create_microsoft_teams_meeting_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_microsoft_teams_meeting"]},"name":{"type":"string","description":"The meeting name"},"subject":{"type":"string","description":"The meeting subject"},"record_meeting":{"type":"boolean","description":"Rootly AI will record the meeting and automatically generate a transcript and summary from your meeting"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["name","subject"]},"create_microsoft_teams_channel_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_microsoft_teams_channel"]},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"Microsoft Team channel title"},"description":{"type":"string","description":"Microsoft Team channel description"},"private":{"type":"string","enum":["auto","true","false"],"default":"auto"}},"required":["workspace","title"]},"add_microsoft_teams_tab_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["add_microsoft_teams_tab"]},"playbook_id":{"type":"string","description":"The playbook id if tab is of an incident playbook"},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"The tab title. Required if not a playbook tab","nullable":true},"link":{"type":"string","description":"The tab link. Required if not a playbook tab","nullable":true}},"required":["team","channel"],"anyOf":[{"required":["title","link"]},{"required":["playbook_id"]}]},"archive_microsoft_teams_channels_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["archive_microsoft_teams_channels"]},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["team","channels"]},"rename_microsoft_teams_channel_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["rename_microsoft_teams_channel"]},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string"}},"required":["title","team","channel"]},"invite_to_microsoft_teams_channel_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["invite_to_microsoft_teams_channel"]},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"emails":{"type":"string","description":"Comma separated list of emails to invite"}},"required":["channel","emails"]},"create_notion_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_notion_page"]},"title":{"type":"string","description":"The Notion page title"},"parent_page":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The parent page id and display name"},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating page task, if desired"},"mark_post_mortem_as_published":{"type":"boolean","default":true},"show_timeline_as_table":{"type":"boolean"},"show_action_items_as_table":{"type":"boolean"}},"required":["parent_page","title"]},"send_microsoft_teams_message_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_microsoft_teams_message"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"text":{"type":"string","description":"The message text"}},"required":["text"],"anyOf":[{"required":["channels"]}]},"send_microsoft_teams_blocks_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_microsoft_teams_blocks"]},"attachments":{"type":"string","description":"Support liquid markup. Needs to be a valid JSON string after liquid is parsed"}},"required":["attachments"],"anyOf":[{"required":["channels"]}]},"update_notion_page_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_notion_page"]},"file_id":{"type":"string","description":"The Notion page ID"},"title":{"type":"string","description":"The Notion page title"},"post_mortem_template_id":{"type":"string","description":"Retrospective template to use when creating page task, if desired"},"show_timeline_as_table":{"type":"boolean"},"show_action_items_as_table":{"type":"boolean"}},"required":["file_id"]},"create_service_now_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_service_now_incident"]},"title":{"type":"string","description":"The incident title"},"description":{"type":"string","description":"The incident description"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The completion id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["title"]},"create_shortcut_story_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_shortcut_story"]},"title":{"type":"string","description":"The incident title"},"kind":{"type":"string","enum":["bug","chore","feature"]},"description":{"type":"string","description":"The incident description"},"labels":{"type":"string","description":"The story labels"},"due_date":{"type":"string","description":"The due date"},"archivation":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The archivation id and display name"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The project id and display name"}},"required":["title","project","archivation","kind"]},"create_shortcut_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_shortcut_task"]},"parent_story_id":{"type":"string","description":"The parent story"},"description":{"type":"string","description":"The task description"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The completion id and display name"}},"required":["parent_story_id","description","completion"]},"create_trello_card_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_trello_card"]},"title":{"type":"string","description":"The card title"},"description":{"type":"string","description":"The card description"},"due_date":{"type":"string","description":"The due date"},"board":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The board id and display name"},"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The list id and display name"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"archivation":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The archivation id and display name"}},"required":["title","board","list"]},"create_webex_meeting_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_webex_meeting"]},"topic":{"type":"string","description":"The meeting topic"},"password":{"type":"string","description":"The meeting password"},"record_meeting":{"type":"boolean","description":"Rootly AI will record the meeting and automatically generate a transcript and summary from your meeting"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["topic"]},"create_zendesk_ticket_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_zendesk_ticket"]},"kind":{"type":"string","enum":["problem","incident","question","task"]},"subject":{"type":"string","description":"The ticket subject"},"comment":{"type":"string","description":"The ticket comment"},"tags":{"type":"string","description":"The ticket tags"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The completion id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"ticket_payload":{"type":"string","description":"Additional Zendesk ticket attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["kind","subject"]},"create_zendesk_jira_link_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_zendesk_jira_link"]},"jira_issue_id":{"type":"string","description":"Jira Issue Id."},"jira_issue_key":{"type":"string","description":"Jira Issue Key."},"zendesk_ticket_id":{"type":"string","description":"Zendesk Ticket Id."}},"required":["jira_issue_id","jira_issue_key","zendesk_ticket_id"]},"create_clickup_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_clickup_task"]},"title":{"type":"string","description":"The task title"},"description":{"type":"string","description":"The task description"},"tags":{"type":"string","description":"The task tags"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"due_date":{"type":"string","description":"The due date"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"task_payload":{"type":"string","description":"Additional ClickUp task attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["title"]},"create_motion_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_motion_task"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"status":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"The task title"},"description":{"type":"string","description":"The task description"},"labels":{"type":"array","items":{"type":"string"}},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"duration":{"type":"string","description":"The duration. Eg. \"NONE\", \"REMINDER\", or a integer greater than 0."},"due_date":{"type":"string","description":"The due date"}},"required":["workspace","title"]},"create_zoom_meeting_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_zoom_meeting"]},"topic":{"type":"string","description":"The meeting topic"},"password":{"type":"string","description":"The meeting password"},"create_as_email":{"type":"string","description":"The email to use if creating as email"},"alternative_hosts":{"type":"array","items":{"type":"string","description":"Alternative host email"}},"auto_recording":{"type":"string","enum":["none","local","cloud"],"default":"none"},"record_meeting":{"type":"boolean","description":"Rootly AI will record the meeting and automatically generate a transcript and summary from your meeting"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["topic"]},"get_github_commits_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["get_github_commits"]},"service_ids":{"type":"array","items":{"type":"string","description":"ID of service impacted by incident"}},"github_repository_names":{"type":"array","items":{"type":"string"}},"branch":{"type":"string","description":"The branch"},"past_duration":{"type":"string","description":"How far back to fetch commits (in format '1 minute', '30 days', '3 months', etc.)","example":"1 hour"},"services_impacted_by_incident":{"type":"boolean"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["branch","past_duration"],"anyOf":[{"required":["service_ids"]},{"required":["github_repository_names"]}]},"get_gitlab_commits_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["get_gitlab_commits"]},"service_ids":{"type":"array","items":{"type":"string","description":"ID of service impacted by incident"}},"gitlab_repository_names":{"type":"array","items":{"type":"string"}},"branch":{"type":"string","description":"The branch"},"past_duration":{"type":"string","description":"How far back to fetch commits (in format '1 minute', '30 days', '3 months', etc.)","example":"1 hour"},"services_impacted_by_incident":{"type":"boolean"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["branch","past_duration"],"anyOf":[{"required":["service_ids"]},{"required":["gitlab_repository_names"]}]},"get_pulses_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["get_pulses"]},"service_ids":{"type":"array","items":{"type":"string","description":"ID of service impacted by incident"}},"environment_ids":{"type":"array","items":{"type":"string","description":"ID of environment impacted by incident"}},"labels":{"type":"array","items":{"type":"string"}},"refs":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}},"past_duration":{"type":"string","description":"How far back to fetch commits (in format '1 minute', '30 days', '3 months', etc.)","example":"1 hour"},"services_impacted_by_incident":{"type":"boolean"},"environments_impacted_by_incident":{"type":"boolean"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"parent_message_thread_task":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task"}},"required":["past_duration"]},"get_alerts_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["get_alerts"]},"service_ids":{"type":"array","items":{"type":"string","description":"ID of service impacted by incident"}},"environment_ids":{"type":"array","items":{"type":"string","description":"ID of environment impacted by incident"}},"labels":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"string"}},"past_duration":{"type":"string","description":"How far back to fetch commits (in format '1 minute', '30 days', '3 months', etc.)","example":"1 hour"},"services_impacted_by_incident":{"type":"boolean"},"environments_impacted_by_incident":{"type":"boolean"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"parent_message_thread_task":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task"}},"required":["past_duration"]},"http_client_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["http_client"]},"headers":{"type":"string","description":"JSON map of HTTP headers"},"params":{"type":"string","description":"JSON map of HTTP query parameters"},"body":{"type":"string","description":"HTTP body"},"url":{"type":"string","description":"URL endpoint","example":"https://example.com/foo.json"},"event_url":{"type":"string"},"event_message":{"type":"string"},"method":{"type":"string","description":"HTTP method","enum":["GET","POST","PATCH","PUT","DELETE","OPTIONS"],"default":"GET"},"succeed_on_status":{"type":"string","description":"HTTP status code expected. Can be a regular expression. Eg: 200, 200|203, 20[0-3]","example":200},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["url","succeed_on_status"]},"invite_to_slack_channel_opsgenie_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["invite_to_slack_channel_opsgenie"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"schedule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["schedule"]},"invite_to_slack_channel_rootly_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["invite_to_slack_channel_rootly"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"escalation_policy_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"service_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"user_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"group_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"schedule_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"invite_to_slack_channel_pagerduty_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["invite_to_slack_channel_pagerduty"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"escalation_policy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"schedule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"anyOf":[{"required":["escalation_policy"]},{"required":["schedule"]}]},"invite_to_slack_channel_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["invite_to_slack_channel"]},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"slack_users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"slack_user_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["channel"],"anyOf":[{"required":["slack_users"]},{"required":["slack_user_groups"]}]},"invite_to_slack_channel_victor_ops_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["invite_to_slack_channel_victor_ops"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["team"]},"page_opsgenie_on_call_responders_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["page_opsgenie_on_call_responders"]},"title":{"type":"string","description":"Incident title.","nullable":true},"message":{"type":"string","description":"Message of the incident"},"description":{"type":"string","description":"Description field of the incident that is generally used to provide a detailed information about the incident"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"priority":{"type":"string","enum":["P1","P2","P3","P4","P5","auto"],"default":"P1"}}},"create_opsgenie_alert_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_opsgenie_alert"]},"message":{"type":"string","description":"Message of the alert"},"description":{"type":"string","description":"Description field of the alert that is generally used to provide a detailed information about the alert"},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"escalations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"priority":{"type":"string","enum":["P1","P2","P3","P4","P5","auto"],"default":"P1"},"details":{"type":"string","description":"Details payload. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["message"]},"update_opsgenie_alert_task_params":{"type":"object","properties":{"alert_id":{"type":"string","description":"Opsgenie Alert ID"},"task_type":{"type":"string","enum":["update_opsgenie_alert"]},"message":{"type":"string","description":"Message of the alert"},"description":{"type":"string","description":"Description field of the alert that is generally used to provide a detailed information about the alert"},"priority":{"type":"string","enum":["P1","P2","P3","P4","P5","auto"]},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["alert_id","priority","completion"]},"update_opsgenie_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_opsgenie_incident"]},"opsgenie_incident_id":{"type":"string","description":"The Opsgenie incident ID, this can also be a Rootly incident variable ex. {{ incident.opsgenie_incident_id }}"},"message":{"type":"string","description":"Message of the alert"},"description":{"type":"string","description":"Description field of the alert that is generally used to provide a detailed information about the alert"},"status":{"type":"string","enum":["resolve","open","close","auto"]},"priority":{"type":"string","enum":["P1","P2","P3","P4","P5","auto"]}},"required":["opsgenie_incident_id"]},"page_rootly_on_call_responders_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["page_rootly_on_call_responders"]},"escalation_policy_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"service_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"user_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"group_target":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"alert_urgency_id":{"type":"string","description":"Alert urgency ID"},"summary":{"type":"string","description":"Alert title"},"description":{"type":"string","description":"Alert description"},"escalation_note":{"type":"string"}},"required":["summary"]},"page_pagerduty_on_call_responders_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["page_pagerduty_on_call_responders"]},"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"escalation_policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"title":{"type":"string","description":"Incident title.","nullable":true},"message":{"type":"string"},"urgency":{"type":"string","enum":["high","low","auto"],"default":"high"},"priority":{"type":"string","description":"PagerDuty incident priority, selecting auto will let Rootly auto map our incident severity"},"create_new_incident_on_conflict":{"type":"boolean","description":"Rootly only supports linking to a single PagerDuty incident. If this feature is disabled Rootly will add responders from any additional pages to the existing PagerDuty incident that is linked to the Rootly incident. If enabled, Rootly will create a new PagerDuty incident that is not linked to any Rootly incidents","default":false}},"required":["service"]},"page_victor_ops_on_call_responders_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["page_victor_ops_on_call_responders"]},"escalation_policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"title":{"type":"string","description":"Alert title.","nullable":true}},"anyOf":[{"required":["users"]},{"required":["escalation_policies"]}]},"update_victor_ops_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_victor_ops_incident"]},"victor_ops_incident_id":{"type":"string","description":"The victor_ops incident ID, this can also be a Rootly incident variable ex. {{ incident.victor_ops_incident_id }}"},"status":{"type":"string","enum":["resolve","ack","auto"]},"resolution_message":{"type":"string","description":"Resolution message"}},"required":["victor_ops_incident_id","status"]},"print_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["print"]},"message":{"type":"string","description":"The message to print"}},"required":["message"]},"publish_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["publish_incident"]},"incident":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"public_title":{"type":"string"},"event":{"type":"string","description":"Incident event description"},"status":{"type":"string","enum":["investigating","identified","monitoring","resolved","scheduled","in_progress","verifying","completed"],"default":"resolved"},"notify_subscribers":{"type":"boolean","description":"When true notifies subscribers of the status page by email/text","default":false},"should_tweet":{"type":"boolean","description":"For Statuspage.io integrated pages auto publishes a tweet for your update","default":false},"status_page_template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"status_page_id":{"type":"string"},"integration_payload":{"type":"string","description":"Additional API Payload you can pass to statuspage.io for example. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["incident","public_title","status","status_page_id"]},"redis_client_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["redis_client"]},"url":{"type":"string","example":"redis://redis-12345.c1.us-east-1-2.ec2.cloud.redislabs.com:12345"},"commands":{"type":"string"},"event_url":{"type":"string"},"event_message":{"type":"string"},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["url","commands"]},"rename_slack_channel_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["rename_slack_channel"]},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string"}},"required":["title","channel"]},"change_slack_channel_privacy_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["rename_slack_channel"]},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"privacy":{"type":"string","enum":["private","public"]}},"required":["title","privacy"]},"run_command_heroku_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["run_command_heroku"]},"command":{"type":"string"},"app_name":{"type":"string"},"size":{"type":"string","enum":["standard-1X","standard-2X"]},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["command","app_name","size"]},"send_email_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_email"]},"from":{"type":"string","description":"The from email address. Need to use SMTP integration if different than rootly.com","default":"Rootly "},"to":{"type":"array","items":{"type":"string","description":"To address email"}},"cc":{"type":"array","items":{"type":"string","description":"Cc address email"}},"bcc":{"type":"array","items":{"type":"string","description":"Bcc address email"}},"subject":{"type":"string","description":"The subject"},"preheader":{"type":"string","description":"The preheader","nullable":true},"body":{"type":"string","description":"The email body","nullable":true},"include_header":{"type":"boolean"},"include_footer":{"type":"boolean"},"custom_logo_url":{"type":"string","description":"URL to your custom email logo","nullable":true}},"required":["to","subject","body"]},"send_dashboard_report_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_dashboard_report"]},"dashboard_ids":{"type":"array","items":{"type":"string"}},"from":{"type":"string","description":"The from email address. Need to use SMTP integration if different than rootly.com","default":"Rootly "},"to":{"type":"array","items":{"type":"string","description":"The recipient"}},"subject":{"type":"string","description":"The subject"},"preheader":{"type":"string","description":"The preheader","nullable":true},"body":{"type":"string","description":"The email body","nullable":true}},"required":["dashboard_ids","to","subject","body"]},"create_slack_channel_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["create_slack_channel"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"title":{"type":"string","description":"Slack channel title"},"private":{"type":"string","enum":["auto","true","false"],"default":"auto"}},"required":["workspace","title"]},"send_slack_message_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_slack_message"]},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"slack_users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"slack_user_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"actionables":{"type":"array","items":{"type":"string","enum":["update_summary","update_status","archive_channel","manage_incident_roles","update_incident","all_commands","leave_feedback","manage_form_fields","manage_action_items","view_tasks","add_pagerduty_responders","add_opsgenie_responders","add_victor_ops_responders","update_status_page","pause_reminder","snooze_reminder","restart_reminder","cancel_incident","delete_message"]}},"broadcast_thread_reply_to_channel":{"type":"boolean"},"send_as_ephemeral":{"type":"boolean"},"color":{"type":"string","description":"A hex color ex. #FFFFFF"},"pin_to_channel":{"type":"boolean"},"update_parent_message":{"type":"boolean"},"parent_message_thread_task":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task"},"text":{"type":"string","description":"The message text"},"send_only_as_threaded_message":{"type":"boolean","description":"When set to true, if the parent for this threaded message cannot be found the message will be skipped."}},"required":["text"],"anyOf":[{"required":["channels"]},{"required":["slack_users"]},{"required":["slack_user_groups"]}]},"send_sms_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_sms"]},"phone_numbers":{"type":"array","items":{"type":"string","description":"A recipient phone number","example":["14150001111"]}},"name":{"type":"string","description":"The name"},"content":{"type":"string","description":"The SMS message"}},"required":["phone_numbers","name","content"]},"send_whatsapp_message_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_whatsapp_message"]},"phone_numbers":{"type":"array","items":{"type":"string","description":"A recipient phone number","example":["14150001111"]}},"name":{"type":"string","description":"The name"},"content":{"type":"string","description":"The WhatsApp message"}},"required":["phone_numbers","name","content"]},"snapshot_datadog_graph_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["snapshot_datadog_graph"]},"dashboards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"past_duration":{"type":"string","description":"in format '1 minute', '30 days', '3 months', etc","example":"1 hour"},"metric_queries":{"type":"array","items":{"type":"string"}},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["past_duration"]},"snapshot_grafana_dashboard_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["snapshot_grafana_dashboard"]},"dashboards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["dashboards"]},"snapshot_looker_look_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["snapshot_looker_look"]},"dashboards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["dashboards"]},"snapshot_new_relic_graph_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["snapshot_looker_graph"]},"metric_query":{"type":"string"},"metric_type":{"type":"string","enum":["APDEX","AREA","BAR","BASELINE","BILLBOARD","BULLET","EVENT_FEED","FUNNEL","HEATMAP","HISTOGRAM","LINE","PIE","SCATTER","STACKED_HORIZONTAL_BAR","TABLE","VERTICAL_BAR"]},"post_to_incident_timeline":{"type":"boolean"},"post_to_slack_channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"required":["metric_query","metric_type"]},"tweet_twitter_message_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["tweet_twitter_message"]},"message":{"type":"string"}},"required":["message"]},"update_airtable_table_record_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_airtable_table_record"]},"base_key":{"type":"string","description":"The base key"},"table_name":{"type":"string","description":"The table name"},"record_id":{"type":"string","description":"The record id"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["base_key","table_name","record_id"]},"update_asana_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_asana_task"]},"task_id":{"type":"string","description":"The task id"},"title":{"type":"string","description":"The task title"},"notes":{"type":"string"},"assign_user_email":{"type":"string","description":"The assigned user's email"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"due_date":{"type":"string","description":"The due date"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"dependency_direction":{"type":"string","enum":["blocking","blocked_by"],"default":"blocking"},"dependent_task_ids":{"type":"array","description":"Dependent task ids. Supports liquid syntax","items":{"type":"string"},"nullable":true}},"required":["task_id","completion"]},"update_github_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_github_issue"]},"issue_id":{"type":"string","description":"The issue id"},"title":{"type":"string","description":"The issue title"},"body":{"type":"string","description":"The issue body"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["issue_id","completion"]},"update_gitlab_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_gitlab_issue"]},"issue_id":{"type":"string","description":"The issue id"},"issue_type":{"type":"string","description":"The issue type","enum":["issue","incident","test_case","task"]},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"labels":{"type":"string","description":"The issue labels"},"due_date":{"type":"string","description":"The due date"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"required":["issue_id","completion"]},"update_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_incident"]},"attribute_to_query_by":{"type":"string","enum":["id","slug","sequential_id","pagerduty_incident_id","opsgenie_incident_id","victor_ops_incident_id","jira_issue_id","asana_task_id","shortcut_task_id","linear_issue_id","zendesk_ticket_id","motion_task_id","trello_card_id","airtable_record_id","shortcut_story_id","github_issue_id","gitlab_issue_id","freshservice_ticket_id","freshservice_task_id","clickup_task_id"],"default":"id"},"incident_id":{"type":"string","description":"The incident id to update or id of any attribute on the incident"},"title":{"type":"string","description":"The incident title","nullable":true},"summary":{"type":"string","description":"The incident summary","nullable":true},"status":{"type":"string","nullable":true},"severity_id":{"type":"string","nullable":true},"incident_type_ids":{"type":"array","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","items":{"type":"string"},"nullable":true},"functionality_ids":{"type":"array","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","items":{"type":"string"},"nullable":true},"started_at":{"type":"string","nullable":true},"detected_at":{"type":"string","nullable":true},"acknowledged_at":{"type":"string","nullable":true},"mitigated_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"private":{"type":"boolean"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["incident_id"]},"update_incident_postmortem_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_incident_postmortem"]},"postmortem_id":{"type":"string","description":"UUID of the retrospective that needs to be updated"},"title":{"type":"string","description":"The incident title","nullable":true},"status":{"type":"string","nullable":true}},"required":["postmortem_id"]},"update_jira_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_jira_issue"]},"issue_id":{"type":"string","description":"The issue id"},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"labels":{"type":"string","description":"The issue labels"},"assign_user_email":{"type":"string","description":"The assigned user's email"},"reporter_user_email":{"type":"string","description":"The reporter user's email"},"project_key":{"type":"string","description":"The project key"},"due_date":{"type":"string","description":"The due date"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"status":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The status id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"update_payload":{"type":"string","description":"Update payload. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["issue_id","project_key"]},"update_linear_issue_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_linear_issue"]},"issue_id":{"type":"string","description":"The issue id"},"title":{"type":"string","description":"The issue title"},"description":{"type":"string","description":"The issue description"},"state":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The state id and display name"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The project id and display name"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"assign_user_email":{"type":"string","description":"The assigned user's email"}},"required":["issue_id"]},"update_service_now_incident_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_service_now_incident"]},"incident_id":{"type":"string","description":"The incident id"},"title":{"type":"string","description":"The incident title"},"description":{"type":"string","description":"The incident description"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The completion id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["incident_id"]},"update_shortcut_story_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_shortcut_story"]},"story_id":{"type":"string","description":"The story id"},"title":{"type":"string","description":"The incident title"},"description":{"type":"string","description":"The incident description"},"labels":{"type":"string","description":"The story labels"},"due_date":{"type":"string","description":"The due date"},"archivation":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The archivation id and display name"}},"required":["story_id","archivation"]},"update_shortcut_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_shortcut_task"]},"task_id":{"type":"string","description":"The task id"},"parent_story_id":{"type":"string","description":"The parent story"},"description":{"type":"string","description":"The task description"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The completion id and display name"}},"required":["task_id","parent_story_id","completion"]},"update_slack_channel_topic_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_slack_channel_topic"]},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"topic":{"type":"string"}},"required":["channel","topic"]},"update_status_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_status"]},"status":{"type":"string","enum":["in_triage","started","mitigated","resolved","closed","cancelled"]},"inactivity_timeout":{"type":"string","description":"In format '1 hour', '1 day', etc","example":"1 hour"}},"required":["status"]},"update_incident_status_timestamp_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_status"]},"sub_status_id":{"type":"string","description":"Sub-status to update timestamp for"},"assigned_at":{"type":"string","description":"Timestamp of when the sub-status was assigned"}},"required":["sub_status_id","assigned_at"]},"update_trello_card_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_trello_card"]},"card_id":{"type":"string","description":"The card id"},"title":{"type":"string","description":"The card title"},"description":{"type":"string","description":"The card description"},"due_date":{"type":"string","description":"The due date"},"board":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The board id and display name"},"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The list id and display name"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"archivation":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The archivation id and display name"}},"required":["card_id","archivation"]},"update_clickup_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_clickup_task"]},"task_id":{"type":"string","description":"The task id"},"title":{"type":"string","description":"The task title"},"description":{"type":"string","description":"The task description"},"tags":{"type":"string","description":"The task tags"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"due_date":{"type":"string","description":"The due date"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"task_payload":{"type":"string","description":"Additional ClickUp task attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["task_id"]},"update_motion_task_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_motion_task"]},"task_id":{"type":"string","description":"The task id"},"title":{"type":"string","description":"The task title"},"description":{"type":"string","description":"The task description"},"labels":{"type":"array","items":{"type":"string"}},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"duration":{"type":"string","description":"The duration. Eg. \"NONE\", \"REMINDER\", or a integer greater than 0."},"due_date":{"type":"string","description":"The due date"}},"required":["task_id"]},"update_zendesk_ticket_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_zendesk_ticket"]},"ticket_id":{"type":"string","description":"The ticket id"},"subject":{"type":"string","description":"The ticket subject"},"tags":{"type":"string","description":"The ticket tags"},"priority":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The priority id and display name"},"completion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"The completion id and display name"},"custom_fields_mapping":{"type":"string","description":"Custom field mappings. Can contain liquid markup and need to be valid JSON","nullable":true},"ticket_payload":{"type":"string","description":"Additional Zendesk ticket attributes. Will be merged into whatever was specified in this tasks current parameters. Can contain liquid markup and need to be valid JSON","nullable":true}},"required":["ticket_id"]},"update_attached_alerts_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["update_attached_alerts"]},"status":{"type":"string","enum":["acknowledged","resolved"]}},"required":["status"]},"trigger_workflow_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["trigger_workflow"]},"kind":{"type":"string","enum":["incident","post_mortem","action_item","pulse","alert"],"default":"incident"},"attribute_to_query_by":{"type":"string","enum":["id","slug","sequential_id","pagerduty_incident_id","opsgenie_incident_id","victor_ops_incident_id","jira_issue_id","asana_task_id","shortcut_task_id","linear_issue_id","zendesk_ticket_id","motion_task_id","trello_card_id","airtable_record_id","shortcut_story_id","github_issue_id","freshservice_ticket_id","freshservice_task_id","clickup_task_id"],"default":"id","description":"[\"(incident) kind can only match [:id, :slug, :sequential_id, :pagerduty_incident_id, :opsgenie_incident_id, :victor_ops_incident_id, :jira_issue_id, :asana_task_id, :shortcut_task_id, :linear_issue_id, :zendesk_ticket_id, :motion_task_id, :trello_card_id, :airtable_record_id, :shortcut_story_id, :github_issue_id, :freshservice_ticket_id, :freshservice_task_id, :clickup_task_id]\", \"(post_mortem) kind can only match [:id]\", \"(action_item) kind can only match [:id, :jira_issue_id, :asana_task_id, :shortcut_task_id, :linear_issue_id, :zendesk_ticket_id, :motion_task_id, :trello_card_id, :airtable_record_id, :shortcut_story_id, :github_issue_id, :freshservice_ticket_id, :freshservice_task_id, :clickup_task_id]\", \"(pulse) kind can only match [:id]\", \"(alert) kind can only match [:id]\"]"},"resource":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"workflow":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"check_workflow_conditions":{"type":"boolean"}},"required":["kind","workflow","resource","attribute_to_query_by"]},"send_slack_blocks_task_params":{"type":"object","properties":{"task_type":{"type":"string","enum":["send_slack_blocks"]},"message":{"type":"string"},"blocks":{"type":"string","description":"Support liquid markup. Needs to be a valid JSON string after liquid is parsed"},"attachments":{"type":"string","description":"Support liquid markup. Needs to be a valid JSON string after liquid is parsed"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"slack_users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"slack_user_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"broadcast_thread_reply_to_channel":{"type":"boolean"},"send_as_ephemeral":{"type":"boolean"},"pin_to_channel":{"type":"boolean"},"update_parent_message":{"type":"boolean"},"parent_message_thread_task":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"description":"A hash where [id] is the task id of the parent task that sent a message, and [name] is the name of the parent task"},"send_only_as_threaded_message":{"type":"boolean","description":"When set to true, if the parent for this threaded message cannot be found the message will be skipped."}},"required":["blocks"],"anyOf":[{"required":["channels"]},{"required":["slack_users"]},{"required":["slack_user_groups"]}]},"new_workflow_task":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_tasks"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"Name of the workflow task"},"position":{"type":"integer","description":"The position of the workflow task"},"skip_on_failure":{"type":"boolean","description":"Skip workflow task if any failures"},"enabled":{"type":"boolean","description":"Enable/disable workflow task","default":true},"task_params":{"oneOf":[{"$ref":"#/components/schemas/add_action_item_task_params"},{"$ref":"#/components/schemas/update_action_item_task_params"},{"$ref":"#/components/schemas/add_role_task_params"},{"$ref":"#/components/schemas/add_slack_bookmark_task_params"},{"$ref":"#/components/schemas/add_team_task_params"},{"$ref":"#/components/schemas/add_to_timeline_task_params"},{"$ref":"#/components/schemas/archive_slack_channels_task_params"},{"$ref":"#/components/schemas/attach_datadog_dashboards_task_params"},{"$ref":"#/components/schemas/auto_assign_role_opsgenie_task_params"},{"$ref":"#/components/schemas/auto_assign_role_rootly_task_params"},{"$ref":"#/components/schemas/auto_assign_role_pagerduty_task_params"},{"$ref":"#/components/schemas/update_pagerduty_incident_task_params"},{"$ref":"#/components/schemas/create_pagerduty_status_update_task_params"},{"$ref":"#/components/schemas/create_pagertree_alert_task_params"},{"$ref":"#/components/schemas/update_pagertree_alert_task_params"},{"$ref":"#/components/schemas/auto_assign_role_victor_ops_task_params"},{"$ref":"#/components/schemas/call_people_task_params"},{"$ref":"#/components/schemas/create_airtable_table_record_task_params"},{"$ref":"#/components/schemas/create_asana_subtask_task_params"},{"$ref":"#/components/schemas/create_asana_task_task_params"},{"$ref":"#/components/schemas/create_confluence_page_task_params"},{"$ref":"#/components/schemas/create_datadog_notebook_task_params"},{"$ref":"#/components/schemas/create_dropbox_paper_page_task_params"},{"$ref":"#/components/schemas/create_github_issue_task_params"},{"$ref":"#/components/schemas/create_gitlab_issue_task_params"},{"$ref":"#/components/schemas/create_outlook_event_task_params"},{"$ref":"#/components/schemas/create_google_calendar_event_task_params"},{"$ref":"#/components/schemas/update_google_docs_page_task_params"},{"$ref":"#/components/schemas/update_google_calendar_event_task_params"},{"$ref":"#/components/schemas/create_sharepoint_page_task_params"},{"$ref":"#/components/schemas/create_google_docs_page_task_params"},{"$ref":"#/components/schemas/create_google_docs_permissions_task_params"},{"$ref":"#/components/schemas/remove_google_docs_permissions_task_params"},{"$ref":"#/components/schemas/create_quip_page_task_params"},{"$ref":"#/components/schemas/create_google_meeting_task_params"},{"$ref":"#/components/schemas/create_go_to_meeting_task_params"},{"$ref":"#/components/schemas/create_incident_task_params"},{"$ref":"#/components/schemas/create_incident_postmortem_task_params"},{"$ref":"#/components/schemas/create_jira_issue_task_params"},{"$ref":"#/components/schemas/create_jira_subtask_task_params"},{"$ref":"#/components/schemas/create_linear_issue_task_params"},{"$ref":"#/components/schemas/create_linear_subtask_issue_task_params"},{"$ref":"#/components/schemas/create_linear_issue_comment_task_params"},{"$ref":"#/components/schemas/create_microsoft_teams_meeting_task_params"},{"$ref":"#/components/schemas/create_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/add_microsoft_teams_tab_task_params"},{"$ref":"#/components/schemas/archive_microsoft_teams_channels_task_params"},{"$ref":"#/components/schemas/rename_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/invite_to_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/create_notion_page_task_params"},{"$ref":"#/components/schemas/send_microsoft_teams_message_task_params"},{"$ref":"#/components/schemas/send_microsoft_teams_blocks_task_params"},{"$ref":"#/components/schemas/update_notion_page_task_params"},{"$ref":"#/components/schemas/create_service_now_incident_task_params"},{"$ref":"#/components/schemas/create_shortcut_story_task_params"},{"$ref":"#/components/schemas/create_shortcut_task_task_params"},{"$ref":"#/components/schemas/create_trello_card_task_params"},{"$ref":"#/components/schemas/create_webex_meeting_task_params"},{"$ref":"#/components/schemas/create_zendesk_ticket_task_params"},{"$ref":"#/components/schemas/create_zendesk_jira_link_task_params"},{"$ref":"#/components/schemas/create_clickup_task_task_params"},{"$ref":"#/components/schemas/create_motion_task_task_params"},{"$ref":"#/components/schemas/create_zoom_meeting_task_params"},{"$ref":"#/components/schemas/get_github_commits_task_params"},{"$ref":"#/components/schemas/get_gitlab_commits_task_params"},{"$ref":"#/components/schemas/get_pulses_task_params"},{"$ref":"#/components/schemas/get_alerts_task_params"},{"$ref":"#/components/schemas/http_client_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_opsgenie_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_rootly_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_pagerduty_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_victor_ops_task_params"},{"$ref":"#/components/schemas/page_opsgenie_on_call_responders_task_params"},{"$ref":"#/components/schemas/create_opsgenie_alert_task_params"},{"$ref":"#/components/schemas/update_opsgenie_alert_task_params"},{"$ref":"#/components/schemas/update_opsgenie_incident_task_params"},{"$ref":"#/components/schemas/page_rootly_on_call_responders_task_params"},{"$ref":"#/components/schemas/page_pagerduty_on_call_responders_task_params"},{"$ref":"#/components/schemas/page_victor_ops_on_call_responders_task_params"},{"$ref":"#/components/schemas/update_victor_ops_incident_task_params"},{"$ref":"#/components/schemas/print_task_params"},{"$ref":"#/components/schemas/publish_incident_task_params"},{"$ref":"#/components/schemas/redis_client_task_params"},{"$ref":"#/components/schemas/rename_slack_channel_task_params"},{"$ref":"#/components/schemas/change_slack_channel_privacy_task_params"},{"$ref":"#/components/schemas/run_command_heroku_task_params"},{"$ref":"#/components/schemas/send_email_task_params"},{"$ref":"#/components/schemas/send_dashboard_report_task_params"},{"$ref":"#/components/schemas/create_slack_channel_task_params"},{"$ref":"#/components/schemas/send_slack_message_task_params"},{"$ref":"#/components/schemas/send_sms_task_params"},{"$ref":"#/components/schemas/send_whatsapp_message_task_params"},{"$ref":"#/components/schemas/snapshot_datadog_graph_task_params"},{"$ref":"#/components/schemas/snapshot_grafana_dashboard_task_params"},{"$ref":"#/components/schemas/snapshot_looker_look_task_params"},{"$ref":"#/components/schemas/snapshot_new_relic_graph_task_params"},{"$ref":"#/components/schemas/tweet_twitter_message_task_params"},{"$ref":"#/components/schemas/update_airtable_table_record_task_params"},{"$ref":"#/components/schemas/update_asana_task_task_params"},{"$ref":"#/components/schemas/update_github_issue_task_params"},{"$ref":"#/components/schemas/update_gitlab_issue_task_params"},{"$ref":"#/components/schemas/update_incident_task_params"},{"$ref":"#/components/schemas/update_incident_postmortem_task_params"},{"$ref":"#/components/schemas/update_jira_issue_task_params"},{"$ref":"#/components/schemas/update_linear_issue_task_params"},{"$ref":"#/components/schemas/update_service_now_incident_task_params"},{"$ref":"#/components/schemas/update_shortcut_story_task_params"},{"$ref":"#/components/schemas/update_shortcut_task_task_params"},{"$ref":"#/components/schemas/update_slack_channel_topic_task_params"},{"$ref":"#/components/schemas/update_status_task_params"},{"$ref":"#/components/schemas/update_incident_status_timestamp_task_params"},{"$ref":"#/components/schemas/update_trello_card_task_params"},{"$ref":"#/components/schemas/update_clickup_task_task_params"},{"$ref":"#/components/schemas/update_motion_task_task_params"},{"$ref":"#/components/schemas/update_zendesk_ticket_task_params"},{"$ref":"#/components/schemas/update_attached_alerts_task_params"},{"$ref":"#/components/schemas/trigger_workflow_task_params"},{"$ref":"#/components/schemas/send_slack_blocks_task_params"}]}},"required":["task_params"],"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"update_workflow_task":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_tasks"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"Name of the workflow task"},"position":{"type":"integer","description":"The position of the workflow task"},"skip_on_failure":{"type":"boolean","description":"Skip workflow task if any failures"},"enabled":{"type":"boolean","description":"Enable/disable workflow task","default":true},"task_params":{"anyOf":[{"$ref":"#/components/schemas/add_action_item_task_params"},{"$ref":"#/components/schemas/update_action_item_task_params"},{"$ref":"#/components/schemas/add_role_task_params"},{"$ref":"#/components/schemas/add_slack_bookmark_task_params"},{"$ref":"#/components/schemas/add_team_task_params"},{"$ref":"#/components/schemas/add_to_timeline_task_params"},{"$ref":"#/components/schemas/archive_slack_channels_task_params"},{"$ref":"#/components/schemas/attach_datadog_dashboards_task_params"},{"$ref":"#/components/schemas/auto_assign_role_opsgenie_task_params"},{"$ref":"#/components/schemas/auto_assign_role_rootly_task_params"},{"$ref":"#/components/schemas/auto_assign_role_pagerduty_task_params"},{"$ref":"#/components/schemas/update_pagerduty_incident_task_params"},{"$ref":"#/components/schemas/create_pagerduty_status_update_task_params"},{"$ref":"#/components/schemas/create_pagertree_alert_task_params"},{"$ref":"#/components/schemas/update_pagertree_alert_task_params"},{"$ref":"#/components/schemas/auto_assign_role_victor_ops_task_params"},{"$ref":"#/components/schemas/call_people_task_params"},{"$ref":"#/components/schemas/create_airtable_table_record_task_params"},{"$ref":"#/components/schemas/create_asana_subtask_task_params"},{"$ref":"#/components/schemas/create_asana_task_task_params"},{"$ref":"#/components/schemas/create_confluence_page_task_params"},{"$ref":"#/components/schemas/create_datadog_notebook_task_params"},{"$ref":"#/components/schemas/create_dropbox_paper_page_task_params"},{"$ref":"#/components/schemas/create_github_issue_task_params"},{"$ref":"#/components/schemas/create_gitlab_issue_task_params"},{"$ref":"#/components/schemas/create_outlook_event_task_params"},{"$ref":"#/components/schemas/create_google_calendar_event_task_params"},{"$ref":"#/components/schemas/update_google_docs_page_task_params"},{"$ref":"#/components/schemas/update_google_calendar_event_task_params"},{"$ref":"#/components/schemas/create_sharepoint_page_task_params"},{"$ref":"#/components/schemas/create_google_docs_page_task_params"},{"$ref":"#/components/schemas/create_google_docs_permissions_task_params"},{"$ref":"#/components/schemas/remove_google_docs_permissions_task_params"},{"$ref":"#/components/schemas/create_quip_page_task_params"},{"$ref":"#/components/schemas/create_google_meeting_task_params"},{"$ref":"#/components/schemas/create_go_to_meeting_task_params"},{"$ref":"#/components/schemas/create_incident_task_params"},{"$ref":"#/components/schemas/create_incident_postmortem_task_params"},{"$ref":"#/components/schemas/create_jira_issue_task_params"},{"$ref":"#/components/schemas/create_jira_subtask_task_params"},{"$ref":"#/components/schemas/create_linear_issue_task_params"},{"$ref":"#/components/schemas/create_linear_subtask_issue_task_params"},{"$ref":"#/components/schemas/create_linear_issue_comment_task_params"},{"$ref":"#/components/schemas/create_microsoft_teams_meeting_task_params"},{"$ref":"#/components/schemas/create_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/add_microsoft_teams_tab_task_params"},{"$ref":"#/components/schemas/archive_microsoft_teams_channels_task_params"},{"$ref":"#/components/schemas/rename_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/invite_to_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/create_notion_page_task_params"},{"$ref":"#/components/schemas/send_microsoft_teams_message_task_params"},{"$ref":"#/components/schemas/send_microsoft_teams_blocks_task_params"},{"$ref":"#/components/schemas/update_notion_page_task_params"},{"$ref":"#/components/schemas/create_service_now_incident_task_params"},{"$ref":"#/components/schemas/create_shortcut_story_task_params"},{"$ref":"#/components/schemas/create_shortcut_task_task_params"},{"$ref":"#/components/schemas/create_trello_card_task_params"},{"$ref":"#/components/schemas/create_webex_meeting_task_params"},{"$ref":"#/components/schemas/create_zendesk_ticket_task_params"},{"$ref":"#/components/schemas/create_zendesk_jira_link_task_params"},{"$ref":"#/components/schemas/create_clickup_task_task_params"},{"$ref":"#/components/schemas/create_motion_task_task_params"},{"$ref":"#/components/schemas/create_zoom_meeting_task_params"},{"$ref":"#/components/schemas/get_github_commits_task_params"},{"$ref":"#/components/schemas/get_gitlab_commits_task_params"},{"$ref":"#/components/schemas/get_pulses_task_params"},{"$ref":"#/components/schemas/get_alerts_task_params"},{"$ref":"#/components/schemas/http_client_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_opsgenie_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_rootly_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_pagerduty_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_victor_ops_task_params"},{"$ref":"#/components/schemas/page_opsgenie_on_call_responders_task_params"},{"$ref":"#/components/schemas/create_opsgenie_alert_task_params"},{"$ref":"#/components/schemas/update_opsgenie_alert_task_params"},{"$ref":"#/components/schemas/update_opsgenie_incident_task_params"},{"$ref":"#/components/schemas/page_rootly_on_call_responders_task_params"},{"$ref":"#/components/schemas/page_pagerduty_on_call_responders_task_params"},{"$ref":"#/components/schemas/page_victor_ops_on_call_responders_task_params"},{"$ref":"#/components/schemas/update_victor_ops_incident_task_params"},{"$ref":"#/components/schemas/print_task_params"},{"$ref":"#/components/schemas/publish_incident_task_params"},{"$ref":"#/components/schemas/redis_client_task_params"},{"$ref":"#/components/schemas/rename_slack_channel_task_params"},{"$ref":"#/components/schemas/change_slack_channel_privacy_task_params"},{"$ref":"#/components/schemas/run_command_heroku_task_params"},{"$ref":"#/components/schemas/send_email_task_params"},{"$ref":"#/components/schemas/send_dashboard_report_task_params"},{"$ref":"#/components/schemas/create_slack_channel_task_params"},{"$ref":"#/components/schemas/send_slack_message_task_params"},{"$ref":"#/components/schemas/send_sms_task_params"},{"$ref":"#/components/schemas/send_whatsapp_message_task_params"},{"$ref":"#/components/schemas/snapshot_datadog_graph_task_params"},{"$ref":"#/components/schemas/snapshot_grafana_dashboard_task_params"},{"$ref":"#/components/schemas/snapshot_looker_look_task_params"},{"$ref":"#/components/schemas/snapshot_new_relic_graph_task_params"},{"$ref":"#/components/schemas/tweet_twitter_message_task_params"},{"$ref":"#/components/schemas/update_airtable_table_record_task_params"},{"$ref":"#/components/schemas/update_asana_task_task_params"},{"$ref":"#/components/schemas/update_github_issue_task_params"},{"$ref":"#/components/schemas/update_gitlab_issue_task_params"},{"$ref":"#/components/schemas/update_incident_task_params"},{"$ref":"#/components/schemas/update_incident_postmortem_task_params"},{"$ref":"#/components/schemas/update_jira_issue_task_params"},{"$ref":"#/components/schemas/update_linear_issue_task_params"},{"$ref":"#/components/schemas/update_service_now_incident_task_params"},{"$ref":"#/components/schemas/update_shortcut_story_task_params"},{"$ref":"#/components/schemas/update_shortcut_task_task_params"},{"$ref":"#/components/schemas/update_slack_channel_topic_task_params"},{"$ref":"#/components/schemas/update_status_task_params"},{"$ref":"#/components/schemas/update_incident_status_timestamp_task_params"},{"$ref":"#/components/schemas/update_trello_card_task_params"},{"$ref":"#/components/schemas/update_clickup_task_task_params"},{"$ref":"#/components/schemas/update_motion_task_task_params"},{"$ref":"#/components/schemas/update_zendesk_ticket_task_params"},{"$ref":"#/components/schemas/update_attached_alerts_task_params"},{"$ref":"#/components/schemas/trigger_workflow_task_params"},{"$ref":"#/components/schemas/send_slack_blocks_task_params"}]}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"workflow_task":{"type":"object","properties":{"workflow_id":{"type":"string","description":"The ID of the parent workflow"},"task_params":{"oneOf":[{"$ref":"#/components/schemas/add_action_item_task_params"},{"$ref":"#/components/schemas/update_action_item_task_params"},{"$ref":"#/components/schemas/add_role_task_params"},{"$ref":"#/components/schemas/add_slack_bookmark_task_params"},{"$ref":"#/components/schemas/add_team_task_params"},{"$ref":"#/components/schemas/add_to_timeline_task_params"},{"$ref":"#/components/schemas/archive_slack_channels_task_params"},{"$ref":"#/components/schemas/attach_datadog_dashboards_task_params"},{"$ref":"#/components/schemas/auto_assign_role_opsgenie_task_params"},{"$ref":"#/components/schemas/auto_assign_role_rootly_task_params"},{"$ref":"#/components/schemas/auto_assign_role_pagerduty_task_params"},{"$ref":"#/components/schemas/update_pagerduty_incident_task_params"},{"$ref":"#/components/schemas/create_pagerduty_status_update_task_params"},{"$ref":"#/components/schemas/create_pagertree_alert_task_params"},{"$ref":"#/components/schemas/update_pagertree_alert_task_params"},{"$ref":"#/components/schemas/auto_assign_role_victor_ops_task_params"},{"$ref":"#/components/schemas/call_people_task_params"},{"$ref":"#/components/schemas/create_airtable_table_record_task_params"},{"$ref":"#/components/schemas/create_asana_subtask_task_params"},{"$ref":"#/components/schemas/create_asana_task_task_params"},{"$ref":"#/components/schemas/create_confluence_page_task_params"},{"$ref":"#/components/schemas/create_datadog_notebook_task_params"},{"$ref":"#/components/schemas/create_dropbox_paper_page_task_params"},{"$ref":"#/components/schemas/create_github_issue_task_params"},{"$ref":"#/components/schemas/create_gitlab_issue_task_params"},{"$ref":"#/components/schemas/create_outlook_event_task_params"},{"$ref":"#/components/schemas/create_google_calendar_event_task_params"},{"$ref":"#/components/schemas/update_google_docs_page_task_params"},{"$ref":"#/components/schemas/update_google_calendar_event_task_params"},{"$ref":"#/components/schemas/create_sharepoint_page_task_params"},{"$ref":"#/components/schemas/create_google_docs_page_task_params"},{"$ref":"#/components/schemas/create_google_docs_permissions_task_params"},{"$ref":"#/components/schemas/remove_google_docs_permissions_task_params"},{"$ref":"#/components/schemas/create_quip_page_task_params"},{"$ref":"#/components/schemas/create_google_meeting_task_params"},{"$ref":"#/components/schemas/create_go_to_meeting_task_params"},{"$ref":"#/components/schemas/create_incident_task_params"},{"$ref":"#/components/schemas/create_incident_postmortem_task_params"},{"$ref":"#/components/schemas/create_jira_issue_task_params"},{"$ref":"#/components/schemas/create_jira_subtask_task_params"},{"$ref":"#/components/schemas/create_linear_issue_task_params"},{"$ref":"#/components/schemas/create_linear_subtask_issue_task_params"},{"$ref":"#/components/schemas/create_linear_issue_comment_task_params"},{"$ref":"#/components/schemas/create_microsoft_teams_meeting_task_params"},{"$ref":"#/components/schemas/create_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/add_microsoft_teams_tab_task_params"},{"$ref":"#/components/schemas/archive_microsoft_teams_channels_task_params"},{"$ref":"#/components/schemas/rename_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/invite_to_microsoft_teams_channel_task_params"},{"$ref":"#/components/schemas/create_notion_page_task_params"},{"$ref":"#/components/schemas/send_microsoft_teams_message_task_params"},{"$ref":"#/components/schemas/send_microsoft_teams_blocks_task_params"},{"$ref":"#/components/schemas/update_notion_page_task_params"},{"$ref":"#/components/schemas/create_service_now_incident_task_params"},{"$ref":"#/components/schemas/create_shortcut_story_task_params"},{"$ref":"#/components/schemas/create_shortcut_task_task_params"},{"$ref":"#/components/schemas/create_trello_card_task_params"},{"$ref":"#/components/schemas/create_webex_meeting_task_params"},{"$ref":"#/components/schemas/create_zendesk_ticket_task_params"},{"$ref":"#/components/schemas/create_zendesk_jira_link_task_params"},{"$ref":"#/components/schemas/create_clickup_task_task_params"},{"$ref":"#/components/schemas/create_motion_task_task_params"},{"$ref":"#/components/schemas/create_zoom_meeting_task_params"},{"$ref":"#/components/schemas/get_github_commits_task_params"},{"$ref":"#/components/schemas/get_gitlab_commits_task_params"},{"$ref":"#/components/schemas/get_pulses_task_params"},{"$ref":"#/components/schemas/get_alerts_task_params"},{"$ref":"#/components/schemas/http_client_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_opsgenie_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_rootly_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_pagerduty_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_task_params"},{"$ref":"#/components/schemas/invite_to_slack_channel_victor_ops_task_params"},{"$ref":"#/components/schemas/page_opsgenie_on_call_responders_task_params"},{"$ref":"#/components/schemas/create_opsgenie_alert_task_params"},{"$ref":"#/components/schemas/update_opsgenie_alert_task_params"},{"$ref":"#/components/schemas/update_opsgenie_incident_task_params"},{"$ref":"#/components/schemas/page_rootly_on_call_responders_task_params"},{"$ref":"#/components/schemas/page_pagerduty_on_call_responders_task_params"},{"$ref":"#/components/schemas/page_victor_ops_on_call_responders_task_params"},{"$ref":"#/components/schemas/update_victor_ops_incident_task_params"},{"$ref":"#/components/schemas/print_task_params"},{"$ref":"#/components/schemas/publish_incident_task_params"},{"$ref":"#/components/schemas/redis_client_task_params"},{"$ref":"#/components/schemas/rename_slack_channel_task_params"},{"$ref":"#/components/schemas/change_slack_channel_privacy_task_params"},{"$ref":"#/components/schemas/run_command_heroku_task_params"},{"$ref":"#/components/schemas/send_email_task_params"},{"$ref":"#/components/schemas/send_dashboard_report_task_params"},{"$ref":"#/components/schemas/create_slack_channel_task_params"},{"$ref":"#/components/schemas/send_slack_message_task_params"},{"$ref":"#/components/schemas/send_sms_task_params"},{"$ref":"#/components/schemas/send_whatsapp_message_task_params"},{"$ref":"#/components/schemas/snapshot_datadog_graph_task_params"},{"$ref":"#/components/schemas/snapshot_grafana_dashboard_task_params"},{"$ref":"#/components/schemas/snapshot_looker_look_task_params"},{"$ref":"#/components/schemas/snapshot_new_relic_graph_task_params"},{"$ref":"#/components/schemas/tweet_twitter_message_task_params"},{"$ref":"#/components/schemas/update_airtable_table_record_task_params"},{"$ref":"#/components/schemas/update_asana_task_task_params"},{"$ref":"#/components/schemas/update_github_issue_task_params"},{"$ref":"#/components/schemas/update_gitlab_issue_task_params"},{"$ref":"#/components/schemas/update_incident_task_params"},{"$ref":"#/components/schemas/update_incident_postmortem_task_params"},{"$ref":"#/components/schemas/update_jira_issue_task_params"},{"$ref":"#/components/schemas/update_linear_issue_task_params"},{"$ref":"#/components/schemas/update_service_now_incident_task_params"},{"$ref":"#/components/schemas/update_shortcut_story_task_params"},{"$ref":"#/components/schemas/update_shortcut_task_task_params"},{"$ref":"#/components/schemas/update_slack_channel_topic_task_params"},{"$ref":"#/components/schemas/update_status_task_params"},{"$ref":"#/components/schemas/update_incident_status_timestamp_task_params"},{"$ref":"#/components/schemas/update_trello_card_task_params"},{"$ref":"#/components/schemas/update_clickup_task_task_params"},{"$ref":"#/components/schemas/update_motion_task_task_params"},{"$ref":"#/components/schemas/update_zendesk_ticket_task_params"},{"$ref":"#/components/schemas/update_attached_alerts_task_params"},{"$ref":"#/components/schemas/trigger_workflow_task_params"},{"$ref":"#/components/schemas/send_slack_blocks_task_params"}]},"name":{"type":"string","description":"Name of the workflow task"},"position":{"type":"integer","description":"The position of the workflow task"},"skip_on_failure":{"type":"boolean","description":"Skip workflow task if any failures"},"enabled":{"type":"boolean","description":"Enable/disable workflow task","default":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["workflow_id","task_params","position","skip_on_failure","enabled","created_at","updated_at"]},"workflow_task_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow task"},"type":{"type":"string","enum":["workflow_tasks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_task"}]}},"required":["id","type","attributes"]}},"required":["data"]},"workflow_task_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow task"},"type":{"type":"string","enum":["workflow_tasks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_task"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_workflow_custom_field_selection":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_custom_field_selections"]},"attributes":{"type":"object","properties":{"workflow_id":{"type":"string","description":"The workflow for this selection"},"custom_field_id":{"type":"integer","description":"The custom field for this selection"},"incident_condition":{"type":"string","description":"The trigger condition","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"values":{"type":"array","items":{"type":"string","description":"The value to associate with the custom field trigger"}},"selected_option_ids":{"type":"array","items":{"type":"integer","description":"The selected option id for select and multi_select kinds"}}},"additionalProperties":false,"required":["incident_condition","custom_field_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_workflow_custom_field_selection":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_custom_field_selections"]},"attributes":{"type":"object","properties":{"incident_condition":{"type":"string","description":"The trigger condition","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"values":{"type":"array","items":{"type":"string","description":"The value to associate with the custom field trigger"}},"selected_option_ids":{"type":"array","items":{"type":"integer","description":"The selected option id for select and multi_select kinds"}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"workflow_custom_field_selection":{"type":"object","properties":{"workflow_id":{"type":"string","description":"The workflow for this selection"},"custom_field_id":{"type":"integer","description":"The custom field for this selection"},"incident_condition":{"type":"string","description":"The trigger condition","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"values":{"type":"array","items":{"type":"string","description":"The value to associate with the custom field trigger"}},"selected_option_ids":{"type":"array","items":{"type":"integer","description":"The selected option id for select and multi_select kinds"}}},"required":["workflow_id","custom_field_id","incident_condition","selected_option_ids"]},"workflow_custom_field_selection_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow_custom_field_selection"},"type":{"type":"string","enum":["workflow_custom_field_selections"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_custom_field_selection"}]}},"required":["id","type","attributes"]}},"required":["data"]},"workflow_custom_field_selection_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow_custom_field_selection"},"type":{"type":"string","enum":["workflow_custom_field_selections"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_custom_field_selection"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_workflow_form_field_condition":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_form_field_conditions"]},"attributes":{"type":"object","properties":{"workflow_id":{"type":"string","description":"The workflow for this condition"},"form_field_id":{"type":"string","description":"The custom field for this condition"},"incident_condition":{"type":"string","description":"The trigger condition","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"values":{"type":"array","items":{"type":"string","description":"The value to associate with the custom field trigger"}},"selected_catalog_entity_ids":{"type":"array","items":{"type":"string","description":"The selected catalog entities for select and multi_select kinds"}},"selected_functionality_ids":{"type":"array","items":{"type":"string","description":"The selected functionalities for select and multi_select kinds"}},"selected_group_ids":{"type":"array","items":{"type":"string","description":"The selected groups (teams) for select and multi_select kinds"}},"selected_option_ids":{"type":"array","items":{"type":"string","description":"The selected option id for select and multi_select kinds"}},"selected_service_ids":{"type":"array","items":{"type":"string","description":"The selected services for select and multi_select kinds"}},"selected_user_ids":{"type":"array","items":{"type":"integer","description":"The selected user id for select and multi_select kinds"}}},"additionalProperties":false,"required":["incident_condition","form_field_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_workflow_form_field_condition":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_form_field_conditions"]},"attributes":{"type":"object","properties":{"incident_condition":{"type":"string","description":"The trigger condition","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"values":{"type":"array","items":{"type":"string","description":"The value to associate with the custom field trigger"}},"selected_catalog_entity_ids":{"type":"array","items":{"type":"string","description":"The selected catalog entities for select and multi_select kinds"}},"selected_functionality_ids":{"type":"array","items":{"type":"string","description":"The selected functionalities for select and multi_select kinds"}},"selected_group_ids":{"type":"array","items":{"type":"string","description":"The selected groups (teams) for select and multi_select kinds"}},"selected_option_ids":{"type":"array","items":{"type":"string","description":"The selected option id for select and multi_select kinds"}},"selected_service_ids":{"type":"array","items":{"type":"string","description":"The selected services for select and multi_select kinds"}},"selected_user_ids":{"type":"array","items":{"type":"integer","description":"The selected user id for select and multi_select kinds"}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"workflow_form_field_condition":{"type":"object","properties":{"workflow_id":{"type":"string","description":"The workflow for this condition"},"form_field_id":{"type":"string","description":"The custom field for this condition"},"incident_condition":{"type":"string","description":"The trigger condition","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"values":{"type":"array","items":{"type":"string","description":"The value to associate with the custom field trigger"}},"selected_catalog_entity_ids":{"type":"array","items":{"type":"string","description":"The selected catalog entities for select and multi_select kinds"}},"selected_functionality_ids":{"type":"array","items":{"type":"string","description":"The selected functionalities for select and multi_select kinds"}},"selected_group_ids":{"type":"array","items":{"type":"string","description":"The selected groups (teams) for select and multi_select kinds"}},"selected_option_ids":{"type":"array","items":{"type":"string","description":"The selected option id for select and multi_select kinds"}},"selected_service_ids":{"type":"array","items":{"type":"string","description":"The selected services for select and multi_select kinds"}},"selected_user_ids":{"type":"array","items":{"type":"integer","description":"The selected user id for select and multi_select kinds"}}},"required":["workflow_id","form_field_id","incident_condition","selected_catalog_entity_ids","selected_option_ids","selected_user_ids"]},"workflow_form_field_condition_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow_form_field_condition"},"type":{"type":"string","enum":["workflow_form_field_conditions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_form_field_condition"}]}},"required":["id","type","attributes"]}},"required":["data"]},"workflow_form_field_condition_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow_form_field_condition"},"type":{"type":"string","enum":["workflow_form_field_conditions"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_form_field_condition"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_workflow_group":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_groups"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the workflow group","enum":["simple","incident","post_mortem","action_item","pulse","alert"],"nullable":true},"name":{"type":"string","description":"The name of the workflow group."},"description":{"type":"string","description":"A description of the workflow group.","nullable":true},"icon":{"type":"string","description":"An emoji icon displayed next to the workflow group."},"expanded":{"type":"boolean","description":"Whether the group is expanded or collapsed."},"position":{"type":"integer","description":"The position of the workflow group"}},"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_workflow_group":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_groups"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the workflow group","enum":["simple","incident","post_mortem","action_item","pulse","alert"],"nullable":true},"name":{"type":"string","description":"The name of the workflow group."},"description":{"type":"string","description":"A description of the workflow group.","nullable":true},"icon":{"type":"string","description":"An emoji icon displayed next to the workflow group."},"expanded":{"type":"boolean","description":"Whether the group is expanded or collapsed."},"position":{"type":"integer","description":"The position of the workflow group"}}}},"required":["type","attributes"]}},"required":["data"]},"workflow_group":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the workflow group","enum":["simple","incident","post_mortem","action_item","pulse","alert"],"nullable":true},"name":{"type":"string","description":"The name of the workflow group."},"slug":{"type":"string","description":"The slug of the workflow group."},"description":{"type":"string","description":"A description of the workflow group.","nullable":true},"icon":{"type":"string","description":"An emoji icon displayed next to the workflow group."},"expanded":{"type":"boolean","description":"Whether the group is expanded or collapsed."},"position":{"type":"integer","description":"The position of the workflow group"}},"required":["name","position"]},"workflow_group_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow group"},"type":{"type":"string","enum":["workflow_groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_group"}]}},"required":["id","type","attributes"]}},"required":["data"]},"workflow_group_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow group"},"type":{"type":"string","enum":["workflow_groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_group"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_workflow_run":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflow_runs"]},"attributes":{"type":"object","anyOf":[{"properties":{"immediate":{"type":"boolean","nullable":true,"default":true,"description":"If false, this will respect wait time configured on the workflow."},"check_conditions":{"type":"boolean","nullable":true,"default":false,"description":"If true, this will check conditions. If conditions are not satisfied the run will not be created."}}},{"properties":{"incident_id":{"type":"string"},"immediate":{"type":"boolean","nullable":true,"default":true,"description":"If false, this will respect wait time configured on the workflow"},"check_conditions":{"type":"boolean","nullable":true,"default":false,"description":"If true, this will check conditions. If conditions are not satisfied the run will not be created"}},"required":["incident_id"]},{"properties":{"post_mortem_id":{"type":"string"},"immediate":{"type":"boolean","nullable":true,"default":true,"description":"If false, this will respect wait time configured on the workflow"},"check_conditions":{"type":"boolean","nullable":true,"default":false,"description":"If true, this will check conditions. If conditions are not satisfied the run will not be created"}},"required":["post_mortem_id"]},{"properties":{"action_item_id":{"type":"string"},"immediate":{"type":"boolean","nullable":true,"default":true,"description":"If false, this will respect wait time configured on the workflow"},"check_conditions":{"type":"boolean","nullable":true,"default":false,"description":"If true, this will check conditions. If conditions are not satisfied the run will not be created"}},"required":["action_item_id"]},{"properties":{"alert_id":{"type":"string"},"immediate":{"type":"boolean","nullable":true,"default":true,"description":"If false, this will respect wait time configured on the workflow"},"check_conditions":{"type":"boolean","nullable":true,"default":false,"description":"If true, this will check conditions. If conditions are not satisfied the run will not be created"}},"required":["alert_id"]},{"properties":{"pulse_id":{"type":"string"},"immediate":{"type":"boolean","nullable":true,"default":true,"description":"If false, this will respect wait time configured on the workflow"},"check_conditions":{"type":"boolean","nullable":true,"default":false,"description":"If true, this will check conditions. If conditions are not satisfied the run will not be created"}},"required":["pulse_id"]}]}},"required":["type","attributes"]}},"required":["data"]},"workflow_run":{"type":"object","properties":{"workflow_id":{"type":"string"},"status":{"type":"string","enum":["queued","started","completed","completed_with_errors","failed","canceled"]},"status_message":{"type":"string","nullable":true},"triggered_by":{"type":"string","enum":["system","user"]},"started_at":{"type":"string","nullable":true},"completed_at":{"type":"string","nullable":true},"failed_at":{"type":"string","nullable":true},"canceled_at":{"type":"string","nullable":true},"incident_id":{"type":"string","nullable":true},"post_mortem_id":{"type":"string","nullable":true},"action_item_id":{"type":"string","nullable":true},"alert_id":{"type":"string","nullable":true},"pulse_id":{"type":"string","nullable":true},"context":{"type":"object","additionalProperties":true}},"required":["status","triggered_by","workflow_id"]},"workflow_run_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow run"},"type":{"type":"string","enum":["workflow_runs"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_run"}]}},"required":["id","type","attributes"]}},"required":["data"]},"workflow_runs_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow run"},"type":{"type":"string","enum":["workflow_runs"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow_run"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_workflow":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflows"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The title of the workflow"},"slug":{"type":"string","description":"The slug of the workflow"},"description":{"type":"string","description":"The description of the workflow","nullable":true},"command":{"type":"string","description":"Workflow command","nullable":true},"command_feedback_enabled":{"type":"boolean","description":"This will notify you back when the workflow is starting","nullable":true},"wait":{"type":"string","description":"Wait this duration before executing","nullable":true},"priority":{"type":"string","description":"Priority","enum":["low","normal","high"],"nullable":true},"repeat_every_duration":{"type":"string","description":"Repeat workflow every duration","nullable":true},"repeat_on":{"type":"array","items":{"type":"string","description":"Repeat on weekdays","enum":["S","M","T","W","R","F","U"]}},"enabled":{"type":"boolean"},"locked":{"type":"boolean","description":"Restricts workflow edits to admins when turned on. Only admins can set this field."},"position":{"type":"integer","description":"The order which the workflow should run with other workflows."},"workflow_group_id":{"type":"string","description":"The group this workflow belongs to.","nullable":true},"trigger_params":{"oneOf":[{"$ref":"#/components/schemas/incident_trigger_params"},{"$ref":"#/components/schemas/action_item_trigger_params"},{"$ref":"#/components/schemas/alert_trigger_params"},{"$ref":"#/components/schemas/pulse_trigger_params"},{"$ref":"#/components/schemas/simple_trigger_params"}]},"environment_ids":{"type":"array","items":{"type":"string"}},"severity_ids":{"type":"array","items":{"type":"string"}},"incident_type_ids":{"type":"array","items":{"type":"string"}},"incident_role_ids":{"type":"array","items":{"type":"string"}},"service_ids":{"type":"array","items":{"type":"string"}},"functionality_ids":{"type":"array","items":{"type":"string"}},"group_ids":{"type":"array","items":{"type":"string"}},"cause_ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"incident_trigger_params":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["incident"]},"triggers":{"type":"array","items":{"type":"string","description":"Actions that trigger the workflow. One of custom_fields..updated, incident_in_triage, incident_created, incident_started, incident_updated, title_updated, summary_updated, status_updated, severity_updated, environments_added, environments_removed, environments_updated, incident_types_added, incident_types_removed, incident_types_updated, services_added, services_removed, services_updated, visibility_updated, functionalities_added, functionalities_removed, functionalities_updated, teams_added, teams_removed, teams_updated, causes_added, causes_removed, causes_updated, timeline_updated, status_page_timeline_updated, role_assignments_updated, role_assignments_added, role_assignments_removed, slack_command, slack_channel_created, slack_channel_converted, microsoft_teams_channel_created, subscribers_updated, subscribers_added, subscribers_removed, user_joined_slack_channel, user_left_slack_channel"}},"incident_visibilities":{"type":"array","items":{"type":"boolean"}},"incident_kinds":{"type":"array","items":{"type":"string","enum":["test","test_sub","example","example_sub","normal","normal_sub","backfilled","scheduled"]}},"incident_statuses":{"type":"array","items":{"type":"string","enum":["in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","scheduled","in_progress","completed"]}},"incident_inactivity_duration":{"anyOf":[{"enum":[null]},{"type":"string","description":"ex. 10 min, 1h, 3 days, 2 weeks"}]},"incident_condition":{"type":"string","enum":["ALL","ANY","NONE"],"default":"ALL"},"incident_condition_visibility":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_kind":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"IS"},"incident_condition_status":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_environment":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_severity":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_incident_type":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_incident_roles":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_service":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_functionality":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_group":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_cause":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_post_mortem_condition_cause":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY","description":"[DEPRECATED] Use incident_condition_cause instead"},"incident_condition_summary":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_started_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_detected_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_acknowledged_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_mitigated_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_resolved_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_conditional_inactivity":{"anyOf":[{"enum":[null]},{"type":"string","enum":["IS"]}]}},"required":["trigger_type"]},"post_mortem_trigger_params":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["post_mortem"]},"triggers":{"type":"array","items":{"type":"string","description":"Actions that trigger the workflow. One of custom_fields..updated, post_mortem_created, post_mortem_updated, status_updated, slack_command"}},"incident_visibilities":{"type":"array","items":{"type":"boolean"}},"incident_kinds":{"type":"array","items":{"type":"string","enum":["test","test_sub","example","example_sub","normal","normal_sub","backfilled","scheduled"]}},"incident_statuses":{"type":"array","items":{"type":"string","enum":["in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","scheduled","in_progress","completed"]}},"incident_inactivity_duration":{"anyOf":[{"enum":[null]},{"type":"string","description":"ex. 10 min, 1h, 3 days, 2 weeks"}]},"incident_condition":{"type":"string","enum":["ALL","ANY","NONE"],"default":"ALL"},"incident_condition_visibility":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_kind":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"IS"},"incident_condition_status":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_environment":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_severity":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_incident_type":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_incident_roles":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_service":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_functionality":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_group":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_cause":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_post_mortem_condition_cause":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY","description":"[DEPRECATED] Use incident_condition_cause instead"},"incident_condition_summary":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_started_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_detected_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_acknowledged_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_mitigated_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_resolved_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_conditional_inactivity":{"anyOf":[{"enum":[null]},{"type":"string","enum":["IS"]}]},"incident_post_mortem_condition":{"type":"string","enum":["ALL","ANY","NONE"]},"incident_post_mortem_condition_status":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_post_mortem_statuses":{"type":"array","items":{"type":"string","enum":["draft","published"]}}},"required":["trigger_type"]},"action_item_trigger_params":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["action_item"]},"triggers":{"type":"array","items":{"type":"string","description":"Actions that trigger the workflow. One of custom_fields..updated, incident_updated, action_item_created, action_item_updated, assigned_user_updated, summary_updated, description_updated, status_updated, priority_updated, due_date_updated, teams_updated, slack_command"}},"incident_visibilities":{"type":"array","items":{"type":"boolean"}},"incident_kinds":{"type":"array","items":{"type":"string","enum":["test","test_sub","example","example_sub","normal","normal_sub","backfilled","scheduled"]}},"incident_statuses":{"type":"array","items":{"type":"string","enum":["in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","scheduled","in_progress","completed"]}},"incident_inactivity_duration":{"anyOf":[{"enum":[null]},{"type":"string","description":"ex. 10 min, 1h, 3 days, 2 weeks"}]},"incident_condition":{"type":"string","enum":["ALL","ANY","NONE"],"default":"ALL"},"incident_condition_visibility":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_kind":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"IS"},"incident_condition_status":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_environment":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_severity":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_incident_type":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_incident_roles":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_service":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_functionality":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_group":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_condition_summary":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_started_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_detected_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_acknowledged_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_mitigated_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_condition_resolved_at":{"anyOf":[{"enum":[null]},{"type":"string","enum":["SET","UNSET"]}]},"incident_conditional_inactivity":{"anyOf":[{"enum":[null]},{"type":"string","enum":["IS"]}]},"incident_action_item_condition":{"type":"string","enum":["ALL","ANY","NONE"]},"incident_action_item_condition_kind":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_action_item_kinds":{"type":"array","items":{"type":"string","enum":["task","follow_up"]}},"incident_action_item_condition_status":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_action_item_statuses":{"type":"array","items":{"type":"string","enum":["open","in_progress","cancelled","done"]}},"incident_action_item_condition_priority":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_action_item_priorities":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}},"incident_action_item_condition_group":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"incident_action_item_group_ids":{"type":"array","items":{"type":"string"}}},"required":["trigger_type"]},"alert_trigger_params":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["alert"]},"triggers":{"type":"array","items":{"type":"string","description":"Actions that trigger the workflow","enum":["alert_created"]}},"alert_condition":{"type":"string","enum":["ALL","ANY","NONE"]},"alert_condition_source":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"alert_condition_source_use_regexp":{"type":"boolean","default":false},"alert_sources":{"type":"array","items":{"type":"string"}},"alert_condition_label":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"alert_condition_label_use_regexp":{"type":"boolean","default":false},"alert_labels":{"type":"array","items":{"type":"string"}},"alert_condition_payload":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"alert_condition_payload_use_regexp":{"type":"boolean","default":false},"alert_payload":{"type":"array","items":{"type":"string"}},"alert_query_payload":{"type":"string","description":"You can use jsonpath syntax. eg: $.incident.teams[*]","nullable":true}},"required":["trigger_type"]},"pulse_trigger_params":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["pulse"]},"triggers":{"type":"array","items":{"type":"string","description":"Actions that trigger the workflow","enum":["pulse_created"]}},"pulse_condition":{"type":"string","enum":["ALL","ANY","NONE"]},"pulse_condition_source":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"pulse_condition_source_use_regexp":{"type":"boolean","default":false},"pulse_sources":{"type":"array","items":{"type":"string"}},"pulse_condition_label":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"pulse_condition_label_use_regexp":{"type":"boolean","default":false},"pulse_labels":{"type":"array","items":{"type":"string"}},"pulse_condition_payload":{"type":"string","enum":["IS","ANY","CONTAINS","CONTAINS_ALL","CONTAINS_NONE","NONE","SET","UNSET"],"default":"ANY"},"pulse_condition_payload_use_regexp":{"type":"boolean","default":false},"pulse_payload":{"type":"array","items":{"type":"string"}},"pulse_query_payload":{"type":"string","description":"You can use jsonpath syntax. eg: $.incident.teams[*]","nullable":true}},"required":["trigger_type"]},"simple_trigger_params":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["simple"]},"triggers":{"type":"array","items":{"type":"string","description":"Actions that trigger the workflow","enum":["slack_command"]}}},"required":["trigger_type"]},"update_workflow":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["workflows"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The title of the workflow"},"slug":{"type":"string","description":"The slug of the workflow"},"description":{"type":"string","description":"The description of the workflow","nullable":true},"command":{"type":"string","description":"Workflow command","nullable":true},"command_feedback_enabled":{"type":"boolean","description":"This will notify you back when the workflow is starting","nullable":true},"wait":{"type":"string","description":"Wait this duration before executing","nullable":true},"repeat_every_duration":{"type":"string","description":"Repeat workflow every duration","nullable":true},"enabled":{"type":"boolean"},"locked":{"type":"boolean","description":"Restricts workflow edits to admins when turned on. Only admins can set this field."},"position":{"type":"integer","description":"The order which the workflow should run with other workflows."},"workflow_group_id":{"type":"string","description":"The group this workflow belongs to.","nullable":true},"trigger_params":{"oneOf":[{"$ref":"#/components/schemas/incident_trigger_params"},{"$ref":"#/components/schemas/action_item_trigger_params"},{"$ref":"#/components/schemas/alert_trigger_params"},{"$ref":"#/components/schemas/pulse_trigger_params"},{"$ref":"#/components/schemas/simple_trigger_params"}]},"environment_ids":{"type":"array","items":{"type":"string"}},"severity_ids":{"type":"array","items":{"type":"string"}},"incident_type_ids":{"type":"array","items":{"type":"string"}},"incident_role_ids":{"type":"array","items":{"type":"string"}},"service_ids":{"type":"array","items":{"type":"string"}},"functionality_ids":{"type":"array","items":{"type":"string"}},"group_ids":{"type":"array","items":{"type":"string"}},"cause_ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"workflow":{"type":"object","properties":{"name":{"type":"string","description":"The title of the workflow"},"slug":{"type":"string","description":"The slug of the workflow"},"description":{"type":"string","description":"The description of the workflow","nullable":true},"command":{"type":"string","description":"Workflow command","nullable":true},"command_feedback_enabled":{"type":"boolean","description":"This will notify you back when the workflow is starting","nullable":true},"wait":{"type":"string","description":"Wait this duration before executing","nullable":true},"repeat_every_duration":{"type":"string","description":"Repeat workflow every duration","nullable":true},"repeat_on":{"type":"array","items":{"type":"string","description":"Repeat on weekdays","enum":["S","M","T","W","R","F","U"]},"nullable":true},"enabled":{"type":"boolean"},"locked":{"type":"boolean","description":"Restricts workflow edits to admins when turned on. Only admins can set this field."},"position":{"type":"integer","description":"The order which the workflow should run with other workflows."},"workflow_group_id":{"type":"string","description":"The group this workflow belongs to.","nullable":true},"trigger_params":{"oneOf":[{"$ref":"#/components/schemas/incident_trigger_params"},{"$ref":"#/components/schemas/action_item_trigger_params"},{"$ref":"#/components/schemas/alert_trigger_params"},{"$ref":"#/components/schemas/pulse_trigger_params"},{"$ref":"#/components/schemas/simple_trigger_params"}]},"environment_ids":{"type":"array","items":{"type":"string"}},"severity_ids":{"type":"array","items":{"type":"string"}},"incident_type_ids":{"type":"array","items":{"type":"string"}},"incident_role_ids":{"type":"array","items":{"type":"string"}},"service_ids":{"type":"array","items":{"type":"string"}},"functionality_ids":{"type":"array","items":{"type":"string"}},"group_ids":{"type":"array","items":{"type":"string"}},"cause_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"workflow_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow"},"type":{"type":"string","enum":["workflows"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow"}]}},"required":["id","type","attributes"]}},"required":["data"]},"workflow_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the workflow"},"type":{"type":"string","enum":["workflows"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/workflow"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_live_call_router":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["live_call_routers"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the live_call_router","enum":["voicemail","live"]},"enabled":{"type":"boolean","description":"Whether the live_call_router is enabled"},"name":{"type":"string","description":"The name of the live_call_router"},"country_code":{"type":"string","description":"The country code of the live_call_router","enum":["US","GB","NZ","CA","AU"]},"phone_type":{"type":"string","description":"The phone type of the live_call_router","enum":["local","toll_free"]},"phone_number":{"type":"string","description":"You can select a phone number using [generate_phone_number](#//api/v1/live_call_routers/generate_phone_number) API and pass that phone number here to register"},"voicemail_greeting":{"type":"string","description":"The voicemail greeting of the live_call_router"},"caller_greeting":{"type":"string","description":"The caller greeting message of the live_call_router"},"waiting_music_url":{"type":"string","description":"The waiting music URL of the live_call_router"},"sent_to_voicemail_delay":{"type":"integer","description":"The delay (seconds) after which the caller in redirected to voicemail"},"should_redirect_to_voicemail_on_no_answer":{"type":"boolean","description":"This prompts the caller to choose voicemail or connect live"},"escalation_level_delay_in_seconds":{"type":"integer","description":"This overrides the delay (seconds) in escalation levels"},"should_auto_resolve_alert_on_call_end":{"type":"boolean","description":"This overrides the delay (seconds) in escalation levels"},"alert_urgency_id":{"type":"string","description":"This is used in escalation paths to determine who to page"},"escalation_policy_trigger_params":{"type":"object","properties":{"id":{"type":"string","description":"The ID of notification target"},"type":{"type":"string","description":"The type of the notification target","enum":["service","group","escalation_policy"]}},"required":["id","type"],"nullable":false}},"additionalProperties":false,"required":["kind","name","country_code","phone_type","phone_number","escalation_policy_trigger_params"]}},"required":["type","attributes"]}},"required":["data"]},"update_live_call_router":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["live_call_routers"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the live_call_router","enum":["voicemail","live"]},"enabled":{"type":"boolean","description":"Whether the live_call_router is enabled"},"name":{"type":"string","description":"The name of the live_call_router"},"country_code":{"type":"string","description":"The country code of the live_call_router","enum":["US","GB","NZ","CA","AU"]},"phone_type":{"type":"string","description":"The phone type of the live_call_router","enum":["local","toll_free"]},"voicemail_greeting":{"type":"string","description":"The voicemail greeting of the live_call_router"},"caller_greeting":{"type":"string","description":"The caller greeting message of the live_call_router"},"waiting_music_url":{"type":"string","description":"The waiting music URL of the live_call_router"},"sent_to_voicemail_delay":{"type":"integer","description":"The delay (seconds) after which the caller in redirected to voicemail"},"should_redirect_to_voicemail_on_no_answer":{"type":"boolean","description":"This prompts the caller to choose voicemail or connect live"},"escalation_level_delay_in_seconds":{"type":"integer","description":"This overrides the delay (seconds) in escalation levels"},"should_auto_resolve_alert_on_call_end":{"type":"boolean","description":"This overrides the delay (seconds) in escalation levels"},"alert_urgency_id":{"type":"string","description":"This is used in escalation paths to determine who to page"},"escalation_policy_trigger_params":{"type":"object","properties":{"id":{"type":"string","description":"The ID of notification target"},"type":{"type":"string","description":"The type of the notification target","enum":["Service","Group","EscalationPolicy"]}},"required":["id","type"],"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"live_call_router":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the live_call_router","enum":["voicemail","live"]},"enabled":{"type":"boolean","description":"Whether the live_call_router is enabled"},"name":{"type":"string","description":"The name of the live_call_router"},"country_code":{"type":"string","description":"The country code of the live_call_router","enum":["US","GB","NZ","CA","AU"]},"phone_type":{"type":"string","description":"The phone type of the live_call_router","enum":["local","toll_free"]},"phone_number":{"type":"string","description":"You can select a phone number using [generate_phone_number](#//api/v1/live_call_routers/generate_phone_number) API and pass that phone number here to register"},"voicemail_greeting":{"type":"string","description":"The voicemail greeting of the live_call_router"},"caller_greeting":{"type":"string","description":"The caller greeting message of the live_call_router"},"waiting_music_url":{"type":"string","description":"The waiting music URL of the live_call_router"},"sent_to_voicemail_delay":{"type":"integer","description":"The delay (seconds) after which the caller in redirected to voicemail"},"should_redirect_to_voicemail_on_no_answer":{"type":"boolean","description":"This prompts the caller to choose voicemail or connect live"},"escalation_level_delay_in_seconds":{"type":"integer","description":"This overrides the delay (seconds) in escalation levels"},"should_auto_resolve_alert_on_call_end":{"type":"boolean","description":"This overrides the delay (seconds) in escalation levels"},"alert_urgency_id":{"type":"string","description":"This is used in escalation paths to determine who to page"},"escalation_policy_trigger_params":{"type":"object","properties":{"id":{"type":"string","description":"The ID of notification target"},"type":{"type":"string","description":"The type of the notification target","enum":["Service","Group","EscalationPolicy"]}},"required":["id","type"],"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"live_call_router_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the live_call_router"},"type":{"type":"string","enum":["live_call_routers"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/live_call_router"}]}},"required":["id","type","attributes"]}},"required":["data"]},"live_call_router_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the live_call_router"},"type":{"type":"string","enum":["live_call_routers"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/live_call_router"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_heartbeat":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["heartbeats"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the heartbeat"},"description":{"type":"string","description":"The description of the heartbeat","nullable":true},"alert_summary":{"type":"string","description":"Summary of alerts triggered when heartbeat expires."},"alert_urgency_id":{"type":"string","description":"Urgency of alerts triggered when heartbeat expires.","nullable":true},"interval":{"type":"integer"},"interval_unit":{"type":"string","enum":["seconds","minutes","hours"]},"notification_target_id":{"type":"string"},"notification_target_type":{"type":"string","enum":["User","Group","Service","EscalationPolicy"]},"enabled":{"type":"boolean","description":"Whether to trigger alerts when heartbeat is expired."}},"additionalProperties":false,"required":["name","alert_summary","interval","interval_unit","notification_target_id","notification_target_type"]}},"required":["type","attributes"]}},"required":["data"]},"update_heartbeat":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["heartbeats"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the heartbeat"},"description":{"type":"string","description":"The description of the heartbeat","nullable":true},"alert_summary":{"type":"string","description":"Summary of alerts triggered when heartbeat expires."},"alert_urgency_id":{"type":"string","description":"Urgency of alerts triggered when heartbeat expires.","nullable":true},"interval":{"type":"integer"},"interval_unit":{"type":"string","enum":["seconds","minutes","hours"]},"notification_target_id":{"type":"string"},"notification_target_type":{"type":"string","enum":["User","Group","Service","EscalationPolicy"]},"enabled":{"type":"boolean","description":"Whether to trigger alerts when heartbeat is expired."}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"heartbeat":{"type":"object","properties":{"name":{"type":"string","description":"The name of the heartbeat"},"description":{"type":"string","description":"The description of the heartbeat","nullable":true},"alert_summary":{"type":"string","description":"Summary of alerts triggered when heartbeat expires."},"alert_urgency_id":{"type":"string","description":"Urgency of alerts triggered when heartbeat expires.","nullable":true},"interval":{"type":"integer"},"interval_unit":{"type":"string","enum":["seconds","minutes","hours"]},"notification_target_id":{"type":"string"},"notification_target_type":{"type":"string","enum":["User","Group","Service","EscalationPolicy"]},"enabled":{"type":"boolean","description":"Whether to trigger alerts when heartbeat is expired."},"status":{"type":"string","enum":["waiting","active","expired"]},"last_pinged_at":{"type":"string","description":"When the heartbeat was last pinged.","nullable":true},"expires_at":{"type":"string","description":"When heartbeat expires","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","alert_summary","interval","interval_unit","notification_target_id","notification_target_type","enabled","status","created_at","updated_at"]},"heartbeat_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the heartbeat"},"type":{"type":"string","enum":["heartbeats"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/heartbeat"}]}},"required":["id","type","attributes"]}},"required":["data"]},"heartbeat_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the heartbeat"},"type":{"type":"string","enum":["heartbeats"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/heartbeat"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_action_item":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_action_items"]},"attributes":{"type":"object","properties":{"summary":{"type":"string","description":"The summary of the action item"},"description":{"type":"string","description":"The description of the action item","nullable":true},"kind":{"type":"string","description":"The kind of the action item","enum":["task","follow_up"]},"assigned_to_user_id":{"type":"integer","description":"ID of user you wish to assign this action item","nullable":true},"assigned_to_group_ids":{"type":"array","description":"IDs of groups you wish to assign this action item","items":{"type":"string"}},"priority":{"type":"string","description":"The priority of the action item","enum":["high","medium","low"]},"status":{"type":"string","description":"The status of the action item","enum":["open","in_progress","cancelled","done"]},"due_date":{"type":"string","description":"The due date of the action item","nullable":true}},"additionalProperties":false,"required":["summary"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_action_item":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_action_items"]},"attributes":{"type":"object","properties":{"summary":{"type":"string","description":"The summary of the action item"},"description":{"type":"string","description":"The description of the action item","nullable":true},"kind":{"type":"string","description":"The kind of the action item","enum":["task","follow_up"]},"assigned_to_user_id":{"type":"integer","description":"ID of user you wish to assign this action item","nullable":true},"assigned_to_group_ids":{"type":"array","description":"IDs of groups you wish to assign this action item","items":{"type":"string"},"nullable":true},"priority":{"type":"string","description":"The priority of the action item","enum":["high","medium","low"]},"status":{"type":"string","description":"The status of the action item","enum":["open","in_progress","cancelled","done"]},"due_date":{"type":"string","description":"The due date of the action item","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_action_item":{"type":"object","properties":{"summary":{"type":"string","description":"The summary of the action item"},"description":{"type":"string","description":"The description of incident action item","nullable":true},"kind":{"type":"string","description":"The kind of the action item","enum":["task","follow_up"]},"assigned_to_user_id":{"type":"integer","description":"ID of user you wish to assign this action item","nullable":true},"assigned_to_group_ids":{"type":"array","description":"IDs of groups you wish to assign this action item","items":{"type":"string"},"nullable":true},"priority":{"type":"string","description":"The priority of the action item","enum":["high","medium","low"]},"status":{"type":"string","description":"The status of the action item","enum":["open","in_progress","cancelled","done"]},"due_date":{"type":"string","description":"The due date of the action item","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["summary","created_at","updated_at"]},"incident_action_item_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the action item"},"type":{"type":"string","enum":["incident_action_items"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_action_item"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_action_item_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the action item"},"type":{"type":"string","enum":["incident_action_items"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_action_item"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_custom_field_selection":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_custom_field_selections"]},"attributes":{"type":"object","properties":{"custom_field_id":{"type":"integer","description":"The custom field for this selection"},"value":{"type":"string","description":"The selected value for text kind custom fields","nullable":true},"selected_option_ids":{"type":"array","items":{"type":"integer","description":"The selected option id for select and multi_select kinds"}}},"additionalProperties":false,"required":["value","custom_field_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_custom_field_selection":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_custom_field_selections"]},"attributes":{"type":"object","properties":{"value":{"type":"string","description":"The selected value for text kind custom fields","nullable":true},"selected_option_ids":{"type":"array","items":{"type":"integer","description":"The selected option id for select and multi_select kinds"}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_custom_field_selection":{"type":"object","properties":{"incident_id":{"type":"string"},"custom_field_id":{"type":"integer"},"value":{"type":"string","description":"The value of the incident_custom_field_selection","nullable":true},"selected_option_ids":{"type":"array","items":{"type":"integer","description":"The selected option id for select and multi_select kinds"}}},"required":["value","selected_option_ids"]},"incident_custom_field_selection_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident_custom_field_selection"},"type":{"type":"string","enum":["incident_custom_field_selections"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_custom_field_selection"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_custom_field_selection_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident_custom_field_selection"},"type":{"type":"string","enum":["incident_custom_field_selections"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_custom_field_selection"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_event_functionality":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_event_functionalities"]},"attributes":{"type":"object","properties":{"incident_event_id":{"type":"string","description":"The ID of the incident event."},"functionality_id":{"type":"string","description":"The ID of the functionality."},"status":{"type":"string","description":"The status of the affected functionality","enum":["operational","partial_outage","major_outage"]}},"additionalProperties":false,"required":["incident_event_id","functionality_id","status"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_event_functionality":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_event_functionalities"]},"attributes":{"type":"object","properties":{"status":{"type":"string","description":"The status of the affected functionality","enum":["operational","partial_outage","major_outage"]}},"additionalProperties":false,"required":["status"]}},"required":["type","attributes"]}},"required":["data"]},"incident_event_functionality":{"type":"object","properties":{"incident_event_id":{"type":"string","description":"The ID of the incident event."},"functionality_id":{"type":"string","description":"The ID of the functionality."},"status":{"type":"string","description":"The status of the affected functionality","enum":["operational","partial_outage","major_outage"]}},"additionalProperties":false,"required":["incident_event_id","functionality_id","status"]},"incident_event_functionality_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event functionality"},"type":{"type":"string","enum":["incident_event_functionalities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_event_functionality"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_event_functionality_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event functionality"},"type":{"type":"string","enum":["incident_event_functionalities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_event_functionality"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_event_service":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_event_services"]},"attributes":{"type":"object","properties":{"incident_event_id":{"type":"string","description":"The ID of the incident event."},"service_id":{"type":"string","description":"The ID of the service."},"status":{"type":"string","description":"The status of the affected service","enum":["operational","partial_outage","major_outage"]}},"additionalProperties":false,"required":["incident_event_id","service_id","status"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_event_service":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_event_services"]},"attributes":{"type":"object","properties":{"status":{"type":"string","description":"The status of the affected service","enum":["operational","partial_outage","major_outage"]}},"additionalProperties":false,"required":["status"]}},"required":["type","attributes"]}},"required":["data"]},"incident_event_service":{"type":"object","properties":{"incident_event_id":{"type":"string","description":"The ID of the incident event."},"service_id":{"type":"string","description":"The ID of the service."},"status":{"type":"string","description":"The status of the affected service","enum":["operational","partial_outage","major_outage"]}},"additionalProperties":false,"required":["incident_event_id","service_id","status"]},"incident_event_service_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event service"},"type":{"type":"string","enum":["incident_event_services"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_event_service"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_event_service_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event service"},"type":{"type":"string","enum":["incident_event_services"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_event_service"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_event":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_events"]},"attributes":{"type":"object","properties":{"event":{"type":"string","description":"The summary of the incident event"},"visibility":{"type":"string","description":"The visibility of the incident action item","enum":["internal","external"]}},"additionalProperties":false,"required":["event"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_event":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_events"]},"attributes":{"type":"object","properties":{"event":{"type":"string","description":"The summary of the incident event"},"visibility":{"type":"string","description":"The visibility of the incident action item","enum":["internal","external"]}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_event":{"type":"object","properties":{"event":{"type":"string","description":"The summary of the incident event"},"visibility":{"type":"string","description":"The visibility of the incident action item","enum":["internal","external"]},"occurred_at":{"type":"string","description":"Date of occurence"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["event","occurred_at","created_at","updated_at"]},"incident_event_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event"},"type":{"type":"string","enum":["incident_events"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_event"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_event_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event"},"type":{"type":"string","enum":["incident_events"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_event"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_feedback":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_feedbacks"]},"attributes":{"type":"object","properties":{"feedback":{"type":"string","description":"The feedback of the incident feedback"},"rating":{"type":"integer","description":"The rating of the incident feedback","enum":[4,3,2,1,0]},"anonymous":{"type":"boolean","description":"Is the feedback anonymous?"}},"additionalProperties":false,"required":["rating","feedback"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_feedback":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_feedbacks"]},"attributes":{"type":"object","properties":{"feedback":{"type":"string","description":"The feedback of the incident feedback"},"rating":{"type":"integer","description":"The rating of the incident feedback","enum":[4,3,2,1,0]},"anonymous":{"type":"boolean","description":"Is the feedback anonymous?"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_feedback":{"type":"object","properties":{"feedback":{"type":"string","description":"The feedback of the incident feedback"},"rating":{"type":"integer","description":"The rating of the incident feedback","enum":[4,3,2,1,0]},"anonymous":{"type":"boolean","description":"Is the feedback anonymous?"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["rating","feedback","anonymous","created_at","updated_at"]},"incident_feedback_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident feedback"},"type":{"type":"string","enum":["incident_feedbacks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_feedback"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_feedback_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident feedback"},"type":{"type":"string","enum":["incident_feedbacks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_feedback"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_form_field_selection":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_form_field_selections"]},"attributes":{"type":"object","properties":{"incident_id":{"type":"string"},"form_field_id":{"type":"string","description":"The custom field for this selection"},"value":{"type":"string","description":"The selected value for text kind custom fields","nullable":true},"selected_catalog_entity_ids":{"type":"array","items":{"type":"string","description":"The selected catalog entities for select and multi_select kinds"}},"selected_group_ids":{"type":"array","items":{"type":"string","description":"The selected groups (teams) for select and multi_select kinds"}},"selected_option_ids":{"type":"array","items":{"type":"string","description":"The selected options for select and multi_select kinds"}},"selected_service_ids":{"type":"array","items":{"type":"string","description":"The selected services for select and multi_select kinds"}},"selected_functionality_ids":{"type":"array","items":{"type":"string","description":"The selected functionalities for select and multi_select kinds"}},"selected_user_ids":{"type":"array","items":{"type":"integer","description":"The selected users for select and multi_select kinds"}}},"additionalProperties":false,"required":["form_field_id","incident_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_form_field_selection":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_form_field_selections"]},"attributes":{"type":"object","properties":{"value":{"type":"string","description":"The selected value for text kind custom fields","nullable":true},"selected_catalog_entity_ids":{"type":"array","items":{"type":"string","description":"The selected catalog entities for select and multi_select kinds"}},"selected_group_ids":{"type":"array","items":{"type":"string","description":"The selected groups (teams) for select and multi_select kinds"}},"selected_option_ids":{"type":"array","items":{"type":"string","description":"The selected options for select and multi_select kinds"}},"selected_service_ids":{"type":"array","items":{"type":"string","description":"The selected services for select and multi_select kinds"}},"selected_functionality_ids":{"type":"array","items":{"type":"string","description":"The selected functionalities for select and multi_select kinds"}},"selected_user_ids":{"type":"array","items":{"type":"integer","description":"The selected users for select and multi_select kinds"}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_form_field_selection":{"type":"object","properties":{"incident_id":{"type":"string"},"form_field_id":{"type":"string","description":"The custom field for this selection"},"value":{"type":"string","description":"The selected value for text kind custom fields","nullable":true},"selected_catalog_entity_ids":{"type":"array","items":{"type":"string","description":"The selected catalog entities for select and multi_select kinds"}},"selected_group_ids":{"type":"array","items":{"type":"string","description":"The selected groups (teams) for select and multi_select kinds"}},"selected_option_ids":{"type":"array","items":{"type":"string","description":"The selected options for select and multi_select kinds"}},"selected_service_ids":{"type":"array","items":{"type":"string","description":"The selected services for select and multi_select kinds"}},"selected_functionality_ids":{"type":"array","items":{"type":"string","description":"The selected functionalities for select and multi_select kinds"}},"selected_user_ids":{"type":"array","items":{"type":"integer","description":"The selected users for select and multi_select kinds"}}},"required":["incident_id","form_field_id"]},"incident_form_field_selection_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident_form_field_selection"},"type":{"type":"string","enum":["incident_form_field_selections"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_form_field_selection"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_form_field_selection_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident_form_field_selection"},"type":{"type":"string","enum":["incident_form_field_selections"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_form_field_selection"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_permission_set_boolean":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_permission_set_booleans"]},"attributes":{"type":"object","properties":{"incident_permission_set_id":{"type":"string"},"kind":{"type":"string","enum":["publish_to_status_page","assign_incident_roles","invite_subscribers","update_summary","update_timeline","trigger_workflows","modify_custom_fields"]},"private":{"type":"boolean"},"enabled":{"type":"boolean"},"severity_params":{"type":"object","properties":{"fully_enabled":{"type":"boolean","description":"Whether permissions are enabled for any severity incident","default":true},"create_enabled":{"type":"boolean","description":"Whether permissions are enabled when creating incident","default":false},"applies_to_unassigned":{"type":"boolean","description":"Whether permissions are enabled for incident without severity","default":true},"severity_ids":{"type":"array","description":"Severity ids that determine if an incident is permitted based on matching severity","items":{"type":"string"},"nullable":true}}}},"additionalProperties":false,"required":["kind","incident_permission_set_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_permission_set_boolean":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_permission_set_booleans"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","enum":["publish_to_status_page","assign_incident_roles","invite_subscribers","update_summary","update_timeline","trigger_workflows","modify_custom_fields"]},"private":{"type":"boolean"},"enabled":{"type":"boolean"},"severity_params":{"type":"object","properties":{"fully_enabled":{"type":"boolean","description":"Whether permissions are enabled for any severity incident","default":true},"applies_to_unassigned":{"type":"boolean","description":"Whether permissions are enabled for incident without severity","default":true},"create_enabled":{"type":"boolean","description":"Whether permissions are enabled when creating incident","default":false},"severity_ids":{"type":"array","description":"Severity ids that determine if an incident is permitted based on matching severity","items":{"type":"string"},"nullable":true}}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_permission_set_boolean":{"type":"object","properties":{"incident_permission_set_id":{"type":"string"},"kind":{"type":"string","enum":["publish_to_status_page","assign_incident_roles","invite_subscribers","update_summary","update_timeline","trigger_workflows","modify_custom_fields"]},"private":{"type":"boolean"},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["kind","created_at","updated_at"]},"incident_permission_set_boolean_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident permission set boolean"},"type":{"type":"string","enum":["incident_permission_set_booleans"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_permission_set_boolean"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_permission_set_boolean_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident permission set boolean"},"type":{"type":"string","enum":["incident_permission_set_booleans"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_permission_set_boolean"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_permission_set_resource":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_permission_set_resources"]},"attributes":{"type":"object","properties":{"incident_permission_set_id":{"type":"string"},"kind":{"type":"string","enum":["severities","incident_types","statuses","sub_statuses"]},"private":{"type":"boolean"},"resource_id":{"type":"string"},"resource_type":{"type":"string"},"severity_params":{"type":"object","properties":{"fully_enabled":{"type":"boolean","description":"Whether permissions are enabled for any severity incident","default":true},"create_enabled":{"type":"boolean","description":"Whether permissions are enabled when creating incident","default":false},"applies_to_unassigned":{"type":"boolean","description":"Whether permissions are enabled for incident without severity","default":true},"severity_ids":{"type":"array","description":"Severity ids that determine if an incident is permitted based on matching severity","items":{"type":"string"},"nullable":true}}}},"additionalProperties":false,"required":["incident_permission_set_id","kind"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_permission_set_resource":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_permission_set_resources"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","enum":["severities","incident_types","statuses","sub_statuses"]},"private":{"type":"boolean"},"resource_id":{"type":"string"},"resource_type":{"type":"string"},"severity_params":{"type":"object","properties":{"fully_enabled":{"type":"boolean","description":"Whether permissions are enabled for any severity incident","default":true},"create_enabled":{"type":"boolean","description":"Whether permissions are enabled when creating incident","default":false},"applies_to_unassigned":{"type":"boolean","description":"Whether permissions are enabled for incident without severity","default":true},"severity_ids":{"type":"array","description":"Severity ids that determine if an incident is permitted based on matching severity","items":{"type":"string"},"nullable":true}}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_permission_set_resource":{"type":"object","properties":{"incident_permission_set_id":{"type":"string"},"kind":{"type":"string","enum":["severities","incident_types","statuses","sub_statuses"]},"private":{"type":"boolean"},"resource_id":{"type":"string"},"resource_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["incident_permission_set_id","kind","created_at","updated_at"]},"incident_permission_set_resource_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident permission set resource"},"type":{"type":"string","enum":["incident_permission_set_resources"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_permission_set_resource"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_permission_set_resource_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident permission set resource"},"type":{"type":"string","enum":["incident_permission_set_resources"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_permission_set_resource"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_permission_set":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_permission_sets"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The incident permission set name."},"slug":{"type":"string","description":"The incident permission set slug."},"description":{"type":"string","description":"The incident permission set description.","nullable":true},"private_incident_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"public_incident_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_permission_set":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_permission_sets"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The incident permission set name."},"slug":{"type":"string","description":"The incident permission set slug."},"description":{"type":"string","description":"The incident permission set description.","nullable":true},"private_incident_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"public_incident_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_permission_set":{"type":"object","properties":{"name":{"type":"string","description":"The incident permission set name."},"slug":{"type":"string","description":"The incident permission set slug."},"description":{"type":"string","description":"The incident permission set description.","nullable":true},"private_incident_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"public_incident_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["name","slug","created_at","updated_at"]},"incident_permission_set_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident permission set"},"type":{"type":"string","enum":["incident_permission_sets"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_permission_set"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_permission_set_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident permission set"},"type":{"type":"string","enum":["incident_permission_sets"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_permission_set"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"update_incident_post_mortem":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_post_mortems"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the incident retrospective"},"status":{"type":"string","description":"The status of the incident retrospective","enum":["draft","published"]},"started_at":{"type":"string","description":"Date of started at","nullable":true},"mitigated_at":{"type":"string","description":"Date of mitigation","nullable":true},"resolved_at":{"type":"string","description":"Date of resolution","nullable":true},"show_timeline":{"type":"boolean","description":"Show events timeline of the incident retrospective"},"show_timeline_trail":{"type":"boolean","description":"Show trail events in the timeline of the incident retrospective"},"show_timeline_genius":{"type":"boolean","description":"Show workflow events in the timeline of the incident retrospective"},"show_timeline_tasks":{"type":"boolean","description":"Show tasks in the timeline of the incident retrospective"},"show_timeline_action_items":{"type":"boolean","description":"Show action items in the timeline of the incident retrospective"},"show_services_impacted":{"type":"boolean","description":"Show functionalities impacted of the incident retrospective"},"show_functionalities_impacted":{"type":"boolean","description":"Show services impacted of the incident retrospective"},"show_groups_impacted":{"type":"boolean","description":"Show groups impacted of the incident retrospective"},"show_alerts_attached":{"type":"boolean","description":"Show alerts attached to the incident"},"show_action_items":{"type":"boolean","description":"Show action items (follow-ups) in the incident retrospective"},"cause_ids":{"type":"array","description":"The Cause ID's to attach to the incident retrospective","items":{"type":"string"},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_post_mortem":{"type":"object","properties":{"title":{"type":"string","description":"The title of the incident retrospective"},"content":{"type":"string","description":"The content of the incident retrospective (Only if internal)","nullable":true},"status":{"type":"string","description":"The status of the incident retrospective","enum":["draft","published"]},"started_at":{"type":"string","description":"Date of started at","nullable":true},"mitigated_at":{"type":"string","description":"Date of mitigation","nullable":true},"resolved_at":{"type":"string","description":"Date of resolution","nullable":true},"show_timeline":{"type":"boolean","description":"Show events timeline of the incident retrospective"},"show_timeline_trail":{"type":"boolean","description":"Show trail events in the timeline of the incident retrospective"},"show_timeline_genius":{"type":"boolean","description":"Show workflow events in the timeline of the incident retrospective"},"show_timeline_tasks":{"type":"boolean","description":"Show tasks in the timeline of the incident retrospective"},"show_timeline_action_items":{"type":"boolean","description":"Show action items in the timeline of the incident retrospective"},"show_timeline_order":{"type":"string","description":"The order of the incident retrospective timeline","enum":["asc","desc"],"default":"desc"},"show_services_impacted":{"type":"boolean","description":"Show functionalities impacted of the incident retrospective"},"show_functionalities_impacted":{"type":"boolean","description":"Show services impacted of the incident retrospective"},"show_groups_impacted":{"type":"boolean","description":"Show groups impacted of the incident retrospective"},"show_alerts_attached":{"type":"boolean","description":"Show alerts attached to the incident"},"url":{"type":"string","description":"The url to the incident retrospective"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["title","created_at","updated_at"]},"incident_post_mortem_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident retrospective"},"type":{"type":"string","enum":["incident_post_mortems"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_post_mortem"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_post_mortem_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident retrospective"},"type":{"type":"string","enum":["incident_post_mortems"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_post_mortem"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"update_incident_retrospective_step":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_retrospective_steps"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The name of the incident retrospective step"},"description":{"type":"string","description":"The description of the incident retrospective step","nullable":true},"due_date":{"type":"string","description":"Due date","nullable":true},"position":{"type":"integer","description":"Position of the step","nullable":true},"skippable":{"type":"boolean","description":"Is the step skippable?","nullable":false},"status":{"type":"string","description":"Status of the incident retrospective step","enum":["todo","in_progress","completed","skipped"],"nullable":false}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_retrospective_step":{"type":"object","properties":{"retrospective_step_id":{"type":"string"},"incident_id":{"type":"string"},"title":{"type":"string","description":"The name of the step"},"description":{"type":"string","description":"The description of the step","nullable":true},"status":{"type":"string","description":"Status of the incident retrospective step","enum":["todo","in_progress","completed","skipped"],"nullable":false},"kind":{"type":"string","description":"Due date","nullable":true},"due_date":{"type":"string","description":"Due date","nullable":true},"position":{"type":"integer","description":"Position of the step"},"skippable":{"type":"boolean","description":"Is the step skippable?"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["retrospective_step_id","incident_id","title","created_at","updated_at"]},"incident_retrospective_step_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step"},"type":{"type":"string","enum":["incident_retrospective_steps"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_retrospective_step"}]}},"required":["id","type","attributes"]}},"required":["data"]},"new_incident_role_task":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_role_tasks"]},"attributes":{"type":"object","properties":{"incident_role_id":{"type":"string"},"task":{"type":"string","description":"The task of the incident task"},"description":{"type":"string","description":"The description of the incident task","nullable":true},"priority":{"type":"string","description":"The priority of the incident task","enum":["high","medium","low"]}},"additionalProperties":false,"required":["task"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_role_task":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_role_tasks"]},"attributes":{"type":"object","properties":{"task":{"type":"string","description":"The task of the incident task"},"description":{"type":"string","description":"The description of the incident task","nullable":true},"priority":{"type":"string","description":"The priority of the incident task","enum":["high","medium","low"]}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_role_task":{"type":"object","properties":{"incident_role_id":{"type":"string"},"task":{"type":"string","description":"The task of the incident task"},"description":{"type":"string","description":"The description of incident task","nullable":true},"priority":{"type":"string","description":"The priority of the incident task","enum":["high","medium","low"]},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["task","created_at","updated_at"]},"incident_role_task_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident task"},"type":{"type":"string","enum":["incident_role_tasks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_role_task"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_role_task_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident task"},"type":{"type":"string","enum":["incident_role_tasks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_role_task"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_role":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_roles"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the incident role"},"summary":{"type":"string","description":"The summary of the incident role","nullable":true},"description":{"type":"string","description":"The description of the incident role","nullable":true},"position":{"type":"integer","description":"Position of the incident role","nullable":true},"optional":{"type":"boolean"},"enabled":{"type":"boolean"},"allow_multi_user_assignment":{"type":"boolean"}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_role":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_roles"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the incident role"},"summary":{"type":"string","description":"The summary of the incident role","nullable":true},"description":{"type":"string","description":"The description of the incident role","nullable":true},"position":{"type":"integer","description":"Position of the incident role","nullable":true},"optional":{"type":"boolean"},"enabled":{"type":"boolean"},"allow_multi_user_assignment":{"type":"boolean"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_role":{"type":"object","properties":{"name":{"type":"string","description":"The name of the incident role"},"slug":{"type":"string","description":"The slug of the incident role"},"summary":{"type":"string","description":"The summary of the incident role","nullable":true},"description":{"type":"string","description":"The description of the incident role","nullable":true},"position":{"type":"integer","description":"Position of the incident role","nullable":true},"optional":{"type":"boolean"},"enabled":{"type":"boolean"},"allow_multi_user_assignment":{"type":"boolean"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"incident_role_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident role"},"type":{"type":"string","enum":["incident_roles"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_role"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_role_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident role"},"type":{"type":"string","enum":["incident_roles"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_role"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_status_page_event":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_status_page_events"]},"attributes":{"type":"object","properties":{"event":{"type":"string","description":"The summary of the incident event"},"status_page_id":{"type":"string","description":"Unique ID of the status page you wish to post the event to"},"status":{"type":"string","description":"The status of the incident event","enum":["investigating","identified","monitoring","resolved","scheduled","in_progress","verifying","completed"]},"notify_subscribers":{"type":"boolean","description":"Notify all status pages subscribers","default":false,"nullable":true},"should_tweet":{"type":"boolean","description":"For Statuspage.io integrated pages auto publishes a tweet for your update","default":false,"nullable":true}},"additionalProperties":false,"required":["event"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_status_page_event":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_status_page_events"]},"attributes":{"type":"object","properties":{"event":{"type":"string","description":"The summary of the incident event"},"status_page_id":{"type":"string","description":"Unique ID of the status page you wish to post the event to"},"status":{"type":"string","description":"The status of the incident event","enum":["investigating","identified","monitoring","resolved","scheduled","in_progress","verifying","completed"]},"notify_subscribers":{"type":"boolean","description":"Notify all status pages subscribers","default":false,"nullable":true},"should_tweet":{"type":"boolean","description":"For Statuspage.io integrated pages auto publishes a tweet for your update","default":false,"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_status_page_event":{"type":"object","properties":{"event":{"type":"string","description":"The summary of the incident event"},"status_page_id":{"type":"string","description":"Unique ID of the status page you wish to post the event to"},"status":{"type":"string","description":"The status of the incident event","enum":["investigating","identified","monitoring","resolved","scheduled","in_progress","verifying","completed"]},"notify_subscribers":{"type":"boolean","description":"Notify all status pages subscribers"},"should_tweet":{"type":"boolean","description":"For Statuspage.io integrated pages auto publishes a tweet for your update"},"started_at":{"type":"string","description":"Date of start"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["event","started_at","created_at","updated_at"]},"incident_status_page_event_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event"},"type":{"type":"string","enum":["incident_status_page_events"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_status_page_event"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_status_page_event_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident event"},"type":{"type":"string","enum":["incident_status_page_events"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_status_page_event"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_type":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_types"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the incident type"},"description":{"type":"string","description":"The description of the incident type","nullable":true},"color":{"type":"string","description":"The hex color of the incident type","nullable":true},"position":{"type":"integer","description":"Position of the incident type","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the incident type","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this incident type","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this incident type","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_type":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_types"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the incident type"},"description":{"type":"string","description":"The description of the incident type","nullable":true},"color":{"type":"string","description":"The hex color of the incident type","nullable":true},"position":{"type":"integer","description":"Position of the incident type","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the incident type","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this incident type","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this incident type","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_type":{"type":"object","properties":{"name":{"type":"string","description":"The name of the incident type"},"slug":{"type":"string","description":"The slug of the incident type"},"description":{"type":"string","description":"The description of the incident type","nullable":true},"color":{"type":"string","description":"The hex color of the incident type","nullable":true},"position":{"type":"integer","description":"Position of the incident type","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the incident type","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this incident type","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this incident type","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"incident_type_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident type"},"type":{"type":"string","enum":["incident_types"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_type"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_type_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident type"},"type":{"type":"string","enum":["incident_types"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_type"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the incident. We will autogenerate one if null","nullable":true},"kind":{"type":"string","description":"The kind of the incident","enum":["test","test_sub","example","example_sub","normal","normal_sub","backfilled","scheduled"],"default":"normal","nullable":true},"parent_incident_id":{"type":"string","description":"ID of parent incident","nullable":true},"private":{"type":"boolean","description":"Create an incident as private. Once an incident is made as private it cannot be undone","default":false,"nullable":true},"summary":{"type":"string","description":"The summary of the incident","nullable":true},"user_id":{"type":"string","description":"User ID of the creator of the incident. Default to the user attached to the Api Key","nullable":true},"severity_id":{"type":"string","description":"The Severity ID to attach to the incident","nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the incident","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the incident","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the incident","items":{"type":"string"},"nullable":true},"functionality_ids":{"type":"array","description":"The Functionality ID's to attach to the incident","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the incident","items":{"type":"string"},"nullable":true},"cause_ids":{"type":"array","description":"The Cause ID's to attach to the incident","items":{"type":"string"},"nullable":true},"labels":{"type":"object","description":"Labels to attach to the incidents. eg: {\"platform\":\"osx\", \"version\": \"1.29\"}","nullable":true},"slack_channel_name":{"type":"string","description":"Slack channel name","nullable":true},"notify_emails":{"type":"array","description":"Emails you want to notify","items":{"type":"string"},"nullable":true},"status":{"type":"string","description":"The status of the incident","enum":["in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","scheduled","in_progress","completed"]},"url":{"type":"string","description":"The url to the incident"},"scheduled_for":{"type":"string","description":"Date of when the maintenance begins","nullable":true},"scheduled_until":{"type":"string","description":"Date of when the maintenance ends","nullable":true},"in_triage_at":{"type":"string","description":"Date of triage","nullable":true},"started_at":{"type":"string","description":"Date of start","nullable":true},"detected_at":{"type":"string","description":"Date of detection","nullable":true},"acknowledged_at":{"type":"string","description":"Date of acknowledgment","nullable":true},"mitigated_at":{"type":"string","description":"Date of mitigation","nullable":true},"resolved_at":{"type":"string","description":"Date of resolution","nullable":true},"cancelled_at":{"type":"string","description":"Date of cancellation","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"update_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the incident","nullable":true},"kind":{"type":"string","description":"The kind of the incident","enum":["test","test_sub","example","example_sub","normal","normal_sub","backfilled","scheduled"],"default":"normal","nullable":true},"parent_incident_id":{"type":"string","description":"ID of parent incident","nullable":true},"summary":{"type":"string","description":"The summary of the incident","nullable":true},"status":{"type":"string","description":"The status of the incident","enum":["in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","in_triage","started","detected","acknowledged","mitigated","resolved","closed","cancelled","scheduled","in_progress","completed"],"nullable":true},"private":{"type":"boolean","description":"Convert the incident as private. Once an incident is updated as private it cannot be undone","default":false,"nullable":true},"severity_id":{"type":"string","description":"The Severity ID to attach to the incident","nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the incident","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the incident","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the incident","items":{"type":"string"},"nullable":true},"functionality_ids":{"type":"array","description":"The Functionality ID's to attach to the incident","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the incident","items":{"type":"string"},"nullable":true},"cause_ids":{"type":"array","description":"The Cause ID's to attach to the incident","items":{"type":"string"},"nullable":true},"labels":{"type":"object","description":"Labels to attach to the incidents. eg: {\"platform\":\"osx\", \"version\": \"1.29\"}","nullable":true},"slack_channel_id":{"type":"string","description":"Slack channel id","nullable":true},"slack_channel_name":{"type":"string","description":"Slack channel name","nullable":true},"slack_channel_url":{"type":"string","description":"Slack channel url","nullable":true},"scheduled_for":{"type":"string","description":"Date of when the maintenance begins","nullable":true},"scheduled_until":{"type":"string","description":"Date of when the maintenance ends","nullable":true},"in_triage_at":{"type":"string","description":"Date of triage","nullable":true},"started_at":{"type":"string","description":"Date of start","nullable":true},"detected_at":{"type":"string","description":"Date of detection","nullable":true},"acknowledged_at":{"type":"string","description":"Date of acknowledgment","nullable":true},"mitigated_at":{"type":"string","description":"Date of mitigation","nullable":true},"resolved_at":{"type":"string","description":"Date of resolution","nullable":true},"cancelled_at":{"type":"string","description":"Date of cancellation","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"in_triage_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]}},"required":["type"]}},"required":["data"]},"restart_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{},"additionalProperties":false}},"required":["type"]}},"required":["data"]},"mitigate_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"mitigation_message":{"type":"string","description":"How was the incident mitigated?","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"resolve_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"resolution_message":{"type":"string","description":"How was the incident resolved?","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"cancel_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"cancellation_message":{"type":"string","description":"Why was the incident cancelled?","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"duplicate_incident":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"duplicate_incident_id":{"type":"string"},"auto_cancel_incident":{"type":"boolean","default":true,"nullable":true},"reason_for_cancellation":{"type":"string","description":"Why was the incident cancelled?","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"add_subscribers":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"user_ids":{"type":"array","description":"IDs of users you wish to add to list of subscribers for this incident","items":{"type":"string"},"nullable":true},"remove_users_with_no_private_incident_access":{"description":"Users without read permissions for private incidents will be removed from the subscriber list of this incident","type":"boolean","default":false,"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"remove_subscribers":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"user_ids":{"type":"array","description":"IDs of users you wish to remove from the list of subscribers for this incident","items":{"type":"string"},"nullable":true},"remove_users_with_no_private_incident_access":{"description":"Users without read permissions for private incidents will be removed from the subscriber list of this incident","type":"boolean","default":false,"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"assign_role_to_user":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"user_id":{"type":"string","description":"ID of user you wish to assign this incident","nullable":false},"incident_role_id":{"type":"string","description":"ID of the incident role","nullable":false}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"unassign_role_from_user":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","properties":{"user_id":{"type":"string","description":"ID of user you wish to remove as assigned user from this incident","nullable":false},"incident_role_id":{"type":"string","description":"ID of the incident role","nullable":false}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident":{"type":"object","properties":{"title":{"type":"string","description":"The title of the incident"},"kind":{"type":"string","description":"The kind of the incident"},"slug":{"type":"string","description":"The slug of the incident"},"parent_incident_id":{"type":"string","description":"ID of parent incident","nullable":true},"summary":{"type":"string","description":"The summary of the incident","nullable":true},"private":{"type":"boolean","description":"Create an incident as private","default":false,"nullable":true},"severity":{"type":"object","description":"The Severity of the incident","allOf":[{"$ref":"#/components/schemas/severity_response"}],"nullable":true},"environments":{"type":"array","description":"The Environments of the incident","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/environment_response"}]},"nullable":true},"incident_types":{"type":"array","description":"The Incident Types of the incident","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_type_response"}]},"nullable":true},"services":{"type":"array","description":"The Services of the incident","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/service_response"}]},"nullable":true},"functionalities":{"type":"array","description":"The Functionalities of the incident","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/functionality_response"}]},"nullable":true},"groups":{"type":"array","description":"The Teams of to the incident","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/team_response"}]},"nullable":true},"labels":{"type":"object","description":"Labels to attach to the incidents. eg: {\"platform\":\"osx\", \"version\": \"1.29\"}","nullable":true},"slack_channel_id":{"type":"string","description":"Slack channel id","nullable":true},"slack_channel_name":{"type":"string","description":"Slack channel name","nullable":true},"slack_channel_url":{"type":"string","description":"Slack channel url","nullable":true},"mitigation_message":{"type":"string","description":"How was the incident mitigated?","nullable":true},"resolution_message":{"type":"string","description":"How was the incident resolved?","nullable":true},"cancellation_message":{"type":"string","description":"Why was the incident cancelled?","nullable":true},"scheduled_for":{"type":"string","description":"Date of when the maintenance begins","nullable":true},"scheduled_until":{"type":"string","description":"Date of when the maintenance ends","nullable":true},"retrospective_progress_status":{"type":"string","description":"The status of the retrospective progress","nullable":true,"enum":["not_started","active","completed","skipped"]},"in_triage_at":{"type":"string","description":"Date of triage","nullable":true},"started_at":{"type":"string","description":"Date of start","nullable":true},"detected_at":{"type":"string","description":"Date of detection","nullable":true},"acknowledged_at":{"type":"string","description":"Date of acknowledgment","nullable":true},"mitigated_at":{"type":"string","description":"Date of mitigation","nullable":true},"resolved_at":{"type":"string","description":"Date of resolution","nullable":true},"cancelled_at":{"type":"string","description":"Date of cancellation","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["title","slug","created_at","updated_at"]},"incident_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident"},"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident"},"type":{"type":"string","enum":["incidents"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"ip_ranges":{"type":"object","properties":{"integrations_ipv4":{"type":"array","description":"IPv4 addresses associated with Rootly integrations.","items":{"type":"string"}},"integrations_ipv6":{"type":"array","description":"IPv6 addresses associated with Rootly integrations.","items":{"type":"string"}},"webhooks_ipv4":{"type":"array","description":"IPv4 addresses associated with Rootly webhooks.","items":{"type":"string"}},"webhooks_ipv6":{"type":"array","description":"IPv6 addresses associated with Rootly webhooks.","items":{"type":"string"}}},"required":["integrations_ipv4","integrations_ipv6","webhooks_ipv4","webhooks_ipv6"]},"ip_ranges_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the ip_ranges"},"type":{"type":"string","enum":["ip_ranges"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/ip_ranges"}]}},"required":["id","type","attributes"]}},"required":["data"]},"links":{"type":"object","properties":{"self":{"type":"string"},"first":{"type":"string"},"prev":{"type":"string","nullable":true},"next":{"type":"string","nullable":true},"last":{"type":"string"}},"required":["self","first","prev","next","last"]},"new_on_call_shadow":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["on_call_shadows"]},"attributes":{"type":"object","properties":{"shadowable_type":{"type":"string","enum":["User","Schedule"]},"shadowable_id":{"type":"string","description":"ID of schedule or user the shadow user is shadowing","nullable":false},"shadow_user_id":{"type":"integer","description":"Which user the shadow shift belongs to.","nullable":false},"starts_at":{"type":"string","description":"Start datetime of shadow shift","format":"date-time","nullable":false},"ends_at":{"type":"string","description":"End datetime for shadow shift","format":"date-time","nullable":false}},"additionalProperties":false,"required":["shadowable_type","shadow_user_id","shadowable_id","starts_at","ends_at"]}},"required":["type","attributes"]}},"required":["data"]},"update_on_call_shadow":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["on_call_shadows"]},"attributes":{"type":"object","properties":{"schedule_id":{"type":"string","description":"ID of schedule the shadow shift belongs to","nullable":false},"shadowable_type":{"type":"string","enum":["User","Schedule"]},"shadowable_id":{"type":"string","description":"ID of schedule or user the shadow user is shadowing","nullable":false},"shadow_user_id":{"type":"integer","description":"Which user the shadow shift belongs to.","nullable":false},"starts_at":{"type":"string","description":"Start datetime of shadow shift","format":"date-time","nullable":false},"ends_at":{"type":"string","description":"End datetime for shadow shift","format":"date-time","nullable":false}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"on_call_shadow":{"type":"object","properties":{"schedule_id":{"type":"string","description":"ID of schedule the shadow shift belongs to","nullable":false},"shadowable_type":{"type":"string","enum":["User","Schedule"]},"shadowable_id":{"type":"string","description":"ID of schedule or user the shadow user is shadowing","nullable":false},"shadow_user_id":{"type":"integer","description":"Which user the shadow shift belongs to.","nullable":false},"starts_at":{"type":"string","description":"Start datetime of shadow shift","format":"date-time","nullable":false},"ends_at":{"type":"string","description":"End datetime for shadow shift","format":"date-time","nullable":false},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["schedule_id","shadowable_type","shadow_user_id","shadowable_id","starts_at","ends_at"]},"on_call_shadow_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of shadow shift"},"type":{"type":"string","enum":["on_call_shadows"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/on_call_shadow"}]}},"required":["id","type","attributes"]}},"required":["data"]},"on_call_shadows_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique id of the on call shadow shift"},"type":{"type":"string","enum":["on_call_shadows"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/on_call_shadow"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_on_call_role":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["on_call_roles"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The role name."},"slug":{"type":"string","description":"The role slug."},"system_role":{"type":"string","description":"The kind of role (user and custom type roles are only editable)","items":{"type":"string","enum":["admin","user","custom","no_access"]}},"alert_sources_permissions":{"type":"array","items":{"type":"string","enum":["create","update","delete"]}},"alert_urgency_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"alerts_permissions":{"type":"array","items":{"type":"string","enum":["create","update","read"]}},"api_keys_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"audits_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"contacts_permissions":{"type":"array","items":{"type":"string","enum":["read"]}},"escalation_policies_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"groups_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"heartbeats_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"integrations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"invitations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"live_call_routing_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"schedule_override_permissions":{"type":"array","items":{"type":"string","enum":["create","update"]}},"schedules_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"services_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"webhooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"workflows_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}}},"additionalProperties":false,"required":["name","system_role"]}},"required":["type","attributes"]}},"required":["data"]},"update_on_call_role":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["on_call_roles"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The role name."},"slug":{"type":"string","description":"The role slug."},"system_role":{"type":"string","description":"The kind of role (user and custom type roles are only editable)","items":{"type":"string","enum":["admin","user","custom","no_access"]}},"alert_sources_permissions":{"type":"array","items":{"type":"string","enum":["create","update","delete"]}},"alert_urgency_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"alerts_permissions":{"type":"array","items":{"type":"string","enum":["create","update","read"]}},"api_keys_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"audits_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"contacts_permissions":{"type":"array","items":{"type":"string","enum":["read"]}},"escalation_policies_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"groups_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"heartbeats_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"integrations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"invitations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"live_call_routing_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"schedule_override_permissions":{"type":"array","items":{"type":"string","enum":["create","update"]}},"schedules_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"services_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"webhooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"workflows_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"on_call_role":{"type":"object","properties":{"name":{"type":"string","description":"The role name."},"slug":{"type":"string","description":"The role slug."},"system_role":{"type":"string","description":"The kind of role","items":{"type":"string","enum":["admin","user","custom","no_access"]}},"alert_sources_permissions":{"type":"array","items":{"type":"string","enum":["create","update","delete"]}},"alert_urgency_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"alerts_permissions":{"type":"array","items":{"type":"string","enum":["create","update","read"]}},"api_keys_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"audits_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"contacts_permissions":{"type":"array","items":{"type":"string","enum":["read"]}},"escalation_policies_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"groups_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"heartbeats_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"integrations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"invitations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"live_call_routing_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"schedule_override_permissions":{"type":"array","items":{"type":"string","enum":["create","update"]}},"schedules_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"services_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"webhooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"workflows_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["name","slug","system_role","created_at","updated_at"]},"on_call_role_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the on_call_role"},"type":{"type":"string","enum":["on_call_roles"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/on_call_role"}]}},"required":["id","type","attributes"]}},"required":["data"]},"on_call_role_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the on_call_role"},"type":{"type":"string","enum":["on_call_roles"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/on_call_role"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_override_shift":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["shifts"]},"attributes":{"type":"object","properties":{"starts_at":{"type":"string","description":"Start datetime of override shift","format":"date-time","nullable":false},"ends_at":{"type":"string","description":"End datetime of override shift","format":"date-time","nullable":false},"user_id":{"type":"integer","description":"Override shift user","nullable":false}},"additionalProperties":false,"required":["starts_at","ends_at","user_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_override_shift":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["shifts"]},"attributes":{"type":"object","properties":{"user_id":{"type":"integer","description":"Override shift user","nullable":false}},"additionalProperties":false,"required":["user_id"]}},"required":["type","attributes"]}},"required":["data"]},"override_shift":{"type":"object","properties":{"schedule_id":{"type":"string","description":"ID of schedule","nullable":false},"rotation_id":{"type":"string","description":"ID of rotation","nullable":true},"starts_at":{"type":"string","description":"Start datetime of shift","nullable":false},"ends_at":{"type":"string","description":"End datetime of shift","nullable":false},"is_override":{"type":"boolean","description":"Denotes shift is an override shift"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"},"shift_override":{"type":"object","allOf":[{"$ref":"#/components/schemas/shift_override_response"}],"description":"Override metadata","nullable":true},"user":{"type":"object","allOf":[{"$ref":"#/components/schemas/user_response"}],"description":"User metadata","nullable":false}},"required":["schedule_id","rotation_id","starts_at","ends_at","is_override"]},"override_shift_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the shift"},"type":{"type":"string","enum":["shifts"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/override_shift"}]}},"required":["id","type","attributes"]}},"required":["data"]},"override_shift_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the shift"},"type":{"type":"string","enum":["shifts"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/override_shift"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"shift_override":{"type":"object","properties":{"shift_id":{"type":"string","description":"ID of shift","nullable":false},"created_by_user_id":{"type":"integer","description":"User who created the override","nullable":false},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["shift_id","created_by_user_id"]},"shift_override_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the shift override"},"type":{"type":"string","enum":["shift_override"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/shift_override"}]}},"required":["id","type","attributes"]}},"required":["data"]},"new_playbook_task":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["playbook_tasks"]},"attributes":{"type":"object","properties":{"task":{"type":"string","description":"The task of the task"},"description":{"type":"string","description":"The description of the task","nullable":true},"position":{"type":"integer","description":"The position of the task","nullable":true}},"additionalProperties":false,"required":["task"]}},"required":["type","attributes"]}},"required":["data"]},"update_playbook_task":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["playbook_tasks"]},"attributes":{"type":"object","properties":{"task":{"type":"string","description":"The task of the task"},"description":{"type":"string","description":"The description of the task","nullable":true},"position":{"type":"integer","description":"The position of the task","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"playbook_task":{"type":"object","properties":{"playbook_id":{"type":"string"},"task":{"type":"string","description":"The task of the task"},"description":{"type":"string","description":"The description of task","nullable":true},"position":{"type":"integer","description":"The position of the task","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["task","created_at","updated_at"]},"playbook_task_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the task"},"type":{"type":"string","enum":["playbook_tasks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/playbook_task"}]}},"required":["id","type","attributes"]}},"required":["data"]},"playbook_task_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the task"},"type":{"type":"string","enum":["playbook_tasks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/playbook_task"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_playbook":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["playbooks"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the playbook"},"summary":{"type":"string","description":"The summary of the playbook","nullable":true},"external_url":{"type":"string","description":"The external url of the playbook","nullable":true},"severity_ids":{"type":"array","description":"The Severity ID's to attach to the incident","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the incident","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the incident","items":{"type":"string"},"nullable":true},"functionality_ids":{"type":"array","description":"The Functionality ID's to attach to the incident","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the incident","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the incident","items":{"type":"string"},"nullable":true}},"additionalProperties":false,"required":["title"]}},"required":["type","attributes"]}},"required":["data"]},"update_playbook":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["playbooks"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the playbook"},"summary":{"type":"string","description":"The summary of the playbook","nullable":true},"external_url":{"type":"string","description":"The external url of the playbook","nullable":true},"severity_ids":{"type":"array","description":"The Severity ID's to attach to the incident","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the incident","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the incident","items":{"type":"string"},"nullable":true},"functionality_ids":{"type":"array","description":"The Functionality ID's to attach to the incident","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the incident","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the incident","items":{"type":"string"},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"playbook":{"type":"object","properties":{"title":{"type":"string","description":"The title of the playbook"},"summary":{"type":"string","description":"The summary of the playbook","nullable":true},"external_url":{"type":"string","description":"The external url of the playbook","nullable":true},"severity_ids":{"type":"array","description":"The Severity ID's to attach to the incident","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the incident","items":{"type":"string"},"nullable":true},"functionality_ids":{"type":"array","description":"The Functionality ID's to attach to the incident","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"The Service ID's to attach to the incident","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the incident","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the incident","items":{"type":"string"},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["title","created_at","updated_at"]},"playbook_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the playbook"},"type":{"type":"string","enum":["playbooks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/playbook"}]}},"required":["id","type","attributes"]}},"required":["data"]},"playbook_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the playbook"},"type":{"type":"string","enum":["playbooks"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/playbook"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_post_mortem_template":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["post_mortem_templates"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the postmortem template"},"default":{"type":"boolean","description":"Default selected template when editing a postmortem","nullable":true},"content":{"type":"string","description":"The postmortem template. Liquid syntax is supported"},"format":{"type":"string","description":"The format of the input","enum":["html","markdown"],"default":"html","nullable":true}},"additionalProperties":false,"required":["name","content"]}},"required":["type","attributes"]}},"required":["data"]},"update_post_mortem_template":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["post_mortem_templates"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the postmortem template"},"default":{"type":"boolean","description":"Default selected template when editing a postmortem","nullable":true},"content":{"type":"string","description":"The postmortem template. Liquid syntax is supported"},"format":{"type":"string","description":"The format of the input","enum":["html","markdown"],"default":"html","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"post_mortem_template":{"type":"object","properties":{"name":{"type":"string","description":"The name of the postmortem template"},"default":{"type":"boolean","description":"Default selected template when editing a postmortem","nullable":true},"content":{"type":"string","description":"The postmortem template. Liquid syntax and markdown are supported"},"format":{"type":"string","description":"The format of the input","enum":["html","markdown"]},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"post_mortem_template_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the post_mortem_template"},"type":{"type":"string","enum":["post_mortem_templates"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/post_mortem_template"}]}},"required":["id","type","attributes"]}},"required":["data"]},"post_mortem_template_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the post_mortem_template"},"type":{"type":"string","enum":["post_mortem_templates"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/post_mortem_template"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_pulse":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["pulses"]},"attributes":{"type":"object","properties":{"source":{"type":"string","description":"The source of the pulse (eg: k8s)","nullable":true},"summary":{"type":"string","description":"The summary of the pulse"},"service_ids":{"type":"array","description":"The Service ID's to attach to the pulse","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the pulse","items":{"type":"string"},"nullable":true},"started_at":{"type":"string","description":"Pulse start datetime","format":"date-time","nullable":true},"ended_at":{"type":"string","description":"Pulse end datetime","format":"date-time","nullable":true},"external_url":{"type":"string","description":"The external url of the pulse","nullable":true},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the tag"},"value":{"type":"string","description":"Value of the tag"}},"required":["key","value"],"nullable":true}},"refs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the ref"},"value":{"type":"string","description":"Value of the ref"}},"required":["key","value"],"nullable":true}},"data":{"type":"object","description":"Additional data","nullable":true}},"additionalProperties":false,"required":["summary"]}},"required":["type","attributes"]}},"required":["data"]},"update_pulse":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["pulses"]},"attributes":{"type":"object","properties":{"source":{"type":"string","description":"The source of the pulse (eg: k8s)","nullable":true},"summary":{"type":"string","description":"The summary of the pulse"},"service_ids":{"type":"array","description":"The Service ID's to attach to the pulse","items":{"type":"string"},"nullable":true},"environment_ids":{"type":"array","description":"The Environment ID's to attach to the pulse","items":{"type":"string"},"nullable":true},"started_at":{"type":"string","description":"Pulse start datetime","format":"date-time","nullable":true},"ended_at":{"type":"string","description":"Pulse end datetime","format":"date-time","nullable":true},"external_url":{"type":"string","description":"The external url of the pulse","nullable":true},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the tag"},"value":{"type":"string","description":"Value of the tag"}},"required":["key","value"],"nullable":true}},"refs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the ref"},"value":{"type":"string","description":"Value of the ref"}},"required":["key","value"],"nullable":true}},"data":{"type":"object","description":"Additional data","nullable":true}},"additionalProperties":false}},"required":["summary","attributes"]}},"required":["data"]},"pulse":{"type":"object","properties":{"source":{"type":"string","description":"The source of the pulse (eg: k8s)","nullable":true},"summary":{"type":"string","description":"The summary of the pulse"},"services":{"type":"array","description":"Services attached to the pulse","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/service"}]}},"environments":{"type":"array","description":"Environments attached to the pulse","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/environment"}]}},"external_url":{"type":"string","description":"The external url of the pulse","nullable":true},"labels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the tag"},"value":{"type":"string","description":"Value of the tag"}},"required":["key","value"],"nullable":true}},"refs":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Key of the ref"},"value":{"type":"string","description":"Value of the ref"}},"required":["key","value"],"nullable":true}},"data":{"type":"object","description":"Additional data","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["summary","created_at","updated_at"]},"pulse_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the pulse"},"type":{"type":"string","enum":["pulses"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/pulse"}]}},"required":["id","type","attributes"]}},"required":["data"]},"pulse_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the pulse"},"type":{"type":"string","enum":["pulses"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/pulse"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"update_retrospective_configuration":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_configurations"]},"attributes":{"type":"object","properties":{"severity_ids":{"type":"array","description":"The Severity ID's to attach to the retrospective configuration","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the retrospective configuration","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the retrospective configuration","items":{"type":"string"},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"retrospective_configuration":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the configuration.","enum":["skip","mandatory"]},"severity_ids":{"type":"array","description":"The Severity ID's to attach to the retrospective configuration","items":{"type":"string"},"nullable":true},"group_ids":{"type":"array","description":"The Team ID's to attach to the retrospective configuration","items":{"type":"string"},"nullable":true},"incident_type_ids":{"type":"array","description":"The Incident Type ID's to attach to the retrospective configuration","items":{"type":"string"},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}}},"retrospective_configuration_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the retrospective configuration"},"type":{"type":"string","enum":["retrospective_configurations"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_configuration"}]}},"required":["id","type","attributes"]}},"required":["data"]},"retrospective_configuration_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the configuration"},"type":{"type":"string","enum":["retrospective_configurations"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_configuration"}]}},"required":["id","type","attributes"]}}},"required":["data"]},"new_retrospective_process":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_processes"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the retrospective process"},"copy_from":{"type":"string","description":"Retrospective process ID from which retrospective steps have to be copied. To use starter template for retrospective steps provide value: 'starter_template'"},"description":{"type":"string","description":"The description of the retrospective process","nullable":true},"retrospective_process_matching_criteria":{"type":"object","oneOf":[{"type":"object","properties":{"severity_ids":{"type":"array","description":"Severity ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["severity_ids"]},{"type":"object","properties":{"group_ids":{"type":"array","description":"Team ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["group_ids"]},{"type":"object","properties":{"incident_type_ids":{"type":"array","description":"Incident type ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["incident_type_ids"]}]}},"additionalProperties":false,"required":["name","copy_from"]}},"required":["type","attributes"]}},"required":["data"]},"update_retrospective_process":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_processes"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the retrospective process"},"description":{"type":"string","description":"The description of the retrospective process","nullable":true},"retrospective_process_matching_criteria":{"type":"object","oneOf":[{"type":"object","properties":{"severity_ids":{"type":"array","description":"Severity ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["severity_ids"]},{"type":"object","properties":{"group_ids":{"type":"array","description":"Team ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["group_ids"]},{"type":"object","properties":{"incident_type_ids":{"type":"array","description":"Incident type ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["incident_type_ids"]}]}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"retrospective_process":{"type":"object","properties":{"name":{"type":"string","description":"The name of the retrospective process"},"description":{"type":"string","description":"The description of the retrospective process","nullable":true},"is_default":{"type":"boolean","description":"Indicates the default process that Rootly created. This will be used as a fallback if no processes match the incident's conditions. The default process cannot have conditions and cannot be changed.","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"},"retrospective_process_matching_criteria":{"type":"object","oneOf":[{"type":"object","properties":{"severity_ids":{"type":"array","description":"Severity ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["severity_ids"]},{"type":"object","properties":{"group_ids":{"type":"array","description":"Team ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["group_ids"]},{"type":"object","properties":{"incident_type_ids":{"type":"array","description":"Incident type ID's for retrospective process matching criteria","items":{"type":"string"}}},"additionalProperties":false,"required":["incident_type_ids"]}]}}},"retrospective_process_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique id of retrospective process"},"type":{"type":"string","enum":["retrospective_processes"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_process"}]}},"required":["id","type","attributes"]}},"required":["data"]},"retrospective_process_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the retrospective process"},"type":{"type":"string","enum":["retrospective_processes"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_process"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_retrospective_step":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_steps"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The name of the step"},"description":{"type":"string","description":"The description of the step","nullable":true},"due_after_days":{"type":"integer","description":"Due date in days","nullable":true},"incident_role_id":{"type":"string","description":"Users assigned to the selected incident role will be the default owners for this step","nullable":true},"position":{"type":"integer","description":"Position of the step","nullable":true},"skippable":{"type":"boolean","description":"Is the step skippable?","nullable":false}},"additionalProperties":false,"required":["title"]}},"required":["type","attributes"]}},"required":["data"]},"update_retrospective_step":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_steps"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The name of the step"},"description":{"type":"string","description":"The description of the step","nullable":true},"incident_role_id":{"type":"string","description":"Users assigned to the selected incident role will be the default owners for this step","nullable":true},"due_after_days":{"type":"integer","description":"Due date in days","nullable":true},"position":{"type":"integer","description":"Position of the step","nullable":true},"skippable":{"type":"boolean","description":"Is the step skippable?","nullable":false}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"retrospective_step":{"type":"object","properties":{"retrospective_process_id":{"type":"string"},"title":{"type":"string","description":"The name of the step"},"slug":{"type":"string","description":"The slug of the step"},"description":{"type":"string","description":"The description of the step","nullable":true},"incident_role_id":{"type":"string","description":"Users assigned to the selected incident role will be the default owners for this step","nullable":true},"due_after_days":{"type":"integer","description":"Due date in days","nullable":true},"position":{"type":"integer","description":"Position of the step"},"skippable":{"type":"boolean","description":"Is the step skippable?"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["retrospective_process_id","title","created_at","updated_at"]},"retrospective_step_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step"},"type":{"type":"string","enum":["retrospective_steps"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_step"}]}},"required":["id","type","attributes"]}},"required":["data"]},"retrospective_step_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step"},"type":{"type":"string","enum":["retrospective_steps"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_step"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_role":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["roles"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The role name."},"slug":{"type":"string","description":"The role slug."},"incident_permission_set_id":{"type":"string","description":"Associated incident permissions set.","nullable":true},"alerts_permissions":{"type":"array","items":{"type":"string","enum":["create","read"]}},"api_keys_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"audits_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"billing_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"environments_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"form_fields_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"functionalities_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"groups_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_causes_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_feedbacks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_roles_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_types_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incidents_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"invitations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"playbooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"private_incidents_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"pulses_permissions":{"type":"array","items":{"type":"string","enum":["create","update","read"]}},"retrospective_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"roles_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"secrets_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"services_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"severities_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"status_pages_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"webhooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"workflows_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_role":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["roles"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The role name."},"slug":{"type":"string","description":"The role slug."},"incident_permission_set_id":{"type":"string","description":"Associated incident permissions set.","nullable":true},"api_keys_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"audits_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"billing_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"environments_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"form_fields_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"functionalities_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"groups_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_causes_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_feedbacks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_roles_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_types_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incidents_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"invitations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"playbooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"private_incidents_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"retrospective_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"roles_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"secrets_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"services_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"severities_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"status_pages_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"webhooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"workflows_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"role":{"type":"object","properties":{"name":{"type":"string","description":"The role name."},"slug":{"type":"string","description":"The role slug."},"incident_permission_set_id":{"type":"string","description":"Associated incident permissions set.","nullable":true},"is_deletable":{"type":"boolean","description":"Whether the role can be deleted."},"is_editable":{"type":"boolean","description":"Whether the role can be edited."},"alerts_permissions":{"type":"array","items":{"type":"string","enum":["create","read"]}},"pulses_permissions":{"type":"array","items":{"type":"string","enum":["create","update","read"]}},"api_keys_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"audits_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"billing_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"environments_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"form_fields_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"functionalities_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"groups_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_causes_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_feedbacks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_roles_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incident_types_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"incidents_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"invitations_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"playbooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"private_incidents_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"retrospective_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"roles_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"secrets_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"services_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"severities_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"status_pages_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"webhooks_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"workflows_permissions":{"type":"array","items":{"type":"string","enum":["create","read","update","delete"]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["name","slug","created_at","updated_at"]},"role_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the role"},"type":{"type":"string","enum":["roles"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/role"}]}},"required":["id","type","attributes"]}},"required":["data"]},"role_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the role"},"type":{"type":"string","enum":["roles"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/role"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_schedule_rotation_active_day":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedule_rotation_active_days"]},"attributes":{"type":"object","properties":{"day_name":{"type":"string","description":"Schedule rotation day name for which active times to be created","enum":["S","M","T","W","R","F","U"]},"active_time_attributes":{"type":"array","description":"Schedule rotation active times per day","items":{"type":"object","properties":{"start_time":{"type":"string","description":"Start time for schedule rotation active time","format":"time"},"end_time":{"type":"string","description":"End time for schedule rotation active time","format":"time"}}}}},"additionalProperties":false,"required":["day_name","active_time_attributes"]}},"required":["type","attributes"]}},"required":["data"]},"update_schedule_rotation_active_day":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedule_rotation_active_days"]},"attributes":{"type":"object","properties":{"day_name":{"type":"string","description":"Schedule rotation day name for which active times to be created","enum":["S","M","T","W","R","F","U"]},"active_time_attributes":{"type":"array","description":"Schedule rotation active times per day","items":{"type":"object","properties":{"start_time":{"type":"string","description":"Start time for schedule rotation active time","format":"time"},"end_time":{"type":"string","description":"End time for schedule rotation active time","format":"time"}}}}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"schedule_rotation_active_day":{"properties":{"schedule_rotation_id":{"type":"string"},"day_name":{"type":"string","description":"Schedule rotation day name for which active times to be created","enum":["S","M","T","W","R","F","U"]},"active_time_attributes":{"type":"array","description":"Schedule rotation active times per day","items":{"type":"object","properties":{"start_time":{"type":"string","description":"Start time for schedule rotation active time","format":"time"},"end_time":{"type":"string","description":"End time for schedule rotation active time","format":"time"}}}},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["schedule_rotation_id","day_name","active_time_attributes","created_at","updated_at"]},"schedule_rotation_active_day_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule rotation active time"},"type":{"type":"string","enum":["schedule_rotation_active_days"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule_rotation_active_day"}]}}}}},"schedule_rotation_active_day_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule rotation active time"},"type":{"type":"string","enum":["schedule_rotation_active_days"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule_rotation_active_day"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_schedule_rotation_user":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedule_rotation_users"]},"attributes":{"type":"object","properties":{"user_id":{"type":"integer","description":"Schedule rotation user"},"position":{"type":"integer","description":"Position of the user inside rotation"}},"additionalProperties":false,"required":["user_id"]}}}}},"update_schedule_rotation_user":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedule_rotation_users"]},"attributes":{"type":"object","properties":{"user_id":{"type":"integer","description":"Schedule rotation user"},"position":{"type":"integer","description":"Position of the user inside rotation"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"schedule_rotation_user":{"type":"object","properties":{"schedule_rotation_id":{"type":"string"},"user_id":{"type":"integer","description":"Schedule rotation user"},"position":{"type":"integer","description":"Position of the user inside rotation"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["schedule_rotation_id","user_id","position","created_at","updated_at"]},"schedule_rotation_user_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule rotation user"},"type":{"type":"string","enum":["schedule_rotation_users"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule_rotation_user"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"schedule_rotation_user_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule rotation user"},"type":{"type":"string","enum":["schedule_rotation_users"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule_rotation_user"}]}},"required":["id","type","attributes"]}},"required":["data"]},"new_schedule_rotation":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedule_rotations"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the schedule rotation"},"position":{"type":"integer","description":"Position of the schedule rotation"},"schedule_rotationable_type":{"type":"string","description":"Schedule rotation type","enum":["ScheduleDailyRotation","ScheduleWeeklyRotation","ScheduleBiweeklyRotation","ScheduleMonthlyRotation","ScheduleCustomRotation"]},"active_all_week":{"type":"boolean","description":"Schedule rotation active all week?","default":true},"active_days":{"type":"array","items":{"type":"string","description":"Schedule rotation active days","enum":["S","M","T","W","R","F","U"]}},"active_time_type":{"type":"string","items":{"type":"string","description":"Schedule rotation active time type","enum":["all_day","same_time","custom"],"default":"all_day"}},"active_time_attributes":{"type":"array","description":"Schedule rotation's active times","items":{"type":"object","properties":{"start_time":{"type":"string","description":"Start time for schedule rotation active time","format":"time"},"end_time":{"type":"string","description":"End time for schedule rotation active time","format":"time"}},"required":["start_time","end_time"]}},"time_zone":{"type":"string","description":"A valid IANA time zone name.","default":"Etc/UTC"},"schedule_rotationable_attributes":{"type":"object","oneOf":[{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for daily rotation","format":"time"}},"additionalProperties":false,"required":["handoff_time"]},{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for weekly/biweekly rotation","format":"time"},"handoff_day":{"type":"string","description":"Hand off day for weekly/biweekly rotation","enum":["S","M","T","W","R","F","U"]}},"additionalProperties":false,"required":["handoff_time","handoff_day"]},{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for monthly rotation","format":"time"},"handoff_day":{"type":"string","description":"Hand off day for monthly rotation","enum":["first_day_of_month","last_day_of_month"]}},"additionalProperties":false,"required":["handoff_time","handoff_day"]},{"type":"object","properties":{"shift_length":{"type":"integer","description":"Shift length for custom rotation"},"shift_length_unit":{"type":"string","description":"Shift length unit for custom rotation","enum":["hours","days","weeks"]},"handoff_time":{"type":"string","description":"Hand off time for custom rotation","format":"time"}},"additionalProperties":false,"required":["shift_length","handoff_time"]}]}},"additionalProperties":false,"required":["name","schedule_rotationable_type","schedule_rotationable_attributes"]}},"required":["type","attributes"]}},"required":["data"]},"update_schedule_rotation":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedule_rotations"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the schedule rotation"},"position":{"type":"integer","description":"Position of the schedule rotation"},"schedule_rotationable_type":{"type":"string","description":"Schedule rotation type","enum":["ScheduleDailyRotation","ScheduleWeeklyRotation","ScheduleBiweeklyRotation","ScheduleMonthlyRotation","ScheduleCustomRotation"]},"active_all_week":{"type":"boolean","description":"Schedule rotation active all week?","default":true},"active_days":{"type":"array","items":{"type":"string","description":"Schedule rotation active days","enum":["S","M","T","W","R","F","U"]}},"active_time_type":{"type":"string","items":{"type":"string","description":"Schedule rotation active time type","enum":["all_day","same_time","custom"],"default":"all_day"}},"active_time_attributes":{"type":"array","description":"Schedule rotation's active times","items":{"type":"object","properties":{"start_time":{"type":"string","description":"Start time for schedule rotation active time","format":"time"},"end_time":{"type":"string","description":"End time for schedule rotation active time","format":"time"}},"required":["start_time","end_time"]}},"time_zone":{"type":"string","description":"A valid IANA time zone name.","default":"Etc/UTC"},"schedule_rotationable_attributes":{"type":"object","oneOf":[{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for daily rotation","format":"time"}},"additionalProperties":false,"required":["handoff_time"]},{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for weekly/biweekly rotation","format":"time"},"handoff_day":{"type":"string","description":"Hand off day for weekly/biweekly rotation","enum":["S","M","T","W","R","F","U"]}},"additionalProperties":false,"required":["handoff_time","handoff_day"]},{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for monthly rotation","format":"time"},"handoff_day":{"type":"string","description":"Hand off day for monthly rotation","enum":["first_day_of_month","last_day_of_month"]}},"additionalProperties":false,"required":["handoff_time","handoff_day"]},{"type":"object","properties":{"shift_length":{"type":"integer","description":"Shift length for custom rotation"},"shift_length_unit":{"type":"string","description":"Shift length unit for custom rotation","enum":["hours","days","weeks"]},"handoff_time":{"type":"string","description":"Hand off time for custom rotation","format":"time"}},"additionalProperties":false,"required":["shift_length","handoff_time"]}]}},"additionalProperties":false,"required":["schedule_rotationable_type"]}},"required":["type","attributes"]}},"required":["data"]},"schedule_rotation":{"type":"object","properties":{"schedule_id":{"type":"string","description":"The ID of parent schedule"},"name":{"type":"string","description":"The name of the schedule rotation"},"position":{"type":"integer","description":"Position of the schedule rotation"},"schedule_rotationable_type":{"type":"string","description":"Schedule rotation type","enum":["ScheduleDailyRotation","ScheduleWeeklyRotation","ScheduleBiweeklyRotation","ScheduleMonthlyRotation","ScheduleCustomRotation"]},"active_all_week":{"type":"boolean","description":"Schedule rotation active all week?","default":true},"active_days":{"type":"array","items":{"type":"string","description":"Schedule rotation active days","enum":["S","M","T","W","R","F","U"]}},"active_time_type":{"type":"string","items":{"type":"string","description":"Schedule rotation active time type","enum":["all_day","same_time","custom"],"default":"all_day"}},"active_time_attributes":{"type":"array","description":"Schedule rotation's active times","items":{"type":"object","properties":{"start_time":{"type":"string","description":"Start time for schedule rotation active time","format":"time"},"end_time":{"type":"string","description":"End time for schedule rotation active time","format":"time"}},"required":["start_time","end_time"]}},"time_zone":{"type":"string","description":"A valid IANA time zone name.","default":"Etc/UTC"},"schedule_rotationable_attributes":{"type":"object","oneOf":[{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for daily rotation","format":"time"}},"additionalProperties":false,"required":["handoff_time"]},{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for weekly/biweekly rotation","format":"time"},"handoff_day":{"type":"string","description":"Hand off day for weekly/biweekly rotation","enum":["S","M","T","W","R","F","U"]}},"additionalProperties":false,"required":["handoff_time","handoff_day"]},{"type":"object","properties":{"handoff_time":{"type":"string","description":"Hand off time for monthly rotation","format":"time"},"handoff_day":{"type":"string","description":"Hand off day for monthly rotation","enum":["first_day_of_month","last_day_of_month"]}},"additionalProperties":false,"required":["handoff_time","handoff_day"]},{"type":"object","properties":{"shift_length":{"type":"integer","description":"Shift length for custom rotation"},"shift_length_unit":{"type":"string","description":"Shift length unit for custom rotation","enum":["hours","days","weeks"]},"handoff_time":{"type":"string","description":"Hand off time for custom rotation","format":"time"}},"additionalProperties":false,"required":["shift_length","handoff_time"]}]}},"required":["schedule_id","name","schedule_rotationable_type","schedule_rotationable_attributes"]},"schedule_rotation_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule rotation"},"type":{"type":"string","enum":["schedule_rotations"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule_rotation"}]}},"required":["id","type","attributes"]}},"required":["data"]},"schedule_rotation_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule rotation"},"type":{"type":"string","enum":["schedule_rotations"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule_rotation"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_schedule":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedules"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the schedule"},"description":{"type":"string","description":"The description of the schedule","nullable":true},"all_time_coverage":{"type":"boolean","description":"24/7 coverage of the schedule","nullable":true},"owner_user_id":{"type":"integer","description":"ID of the owner of the schedule","nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_schedule":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["schedules"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the schedule"},"description":{"type":"string","description":"The description of the schedule","nullable":true},"all_time_coverage":{"type":"boolean","description":"24/7 coverage of the schedule","nullable":true},"owner_user_id":{"type":"integer","description":"ID of the owner of the schedule","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"schedule":{"type":"object","properties":{"name":{"type":"string","description":"The name of the schedule"},"description":{"type":"string","description":"The description of the schedule","nullable":true},"all_time_coverage":{"type":"boolean","description":"24/7 coverage of the schedule","nullable":true},"slack_user_group":{"type":"string","description":"Synced slack group of the schedule","nullable":true},"owner_user_id":{"type":"integer","description":"ID of user assigned as owner of the schedule","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"schedule_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique id of schedule"},"type":{"type":"string","enum":["schedules"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule"}]}},"required":["id","type","attributes"]}},"required":["data"]},"schedule_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the schedule"},"type":{"type":"string","enum":["schedules"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/schedule"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_secret":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["secrets"]},"attributes":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the secret","enum":["built_in","hashicorp_vault"]},"name":{"type":"string","description":"The name of the secret"},"secret":{"type":"string","description":"The secret"},"hashicorp_vault_mount":{"type":"string","description":"The HashiCorp Vault secret mount path","nullable":true,"default":"secret"},"hashicorp_vault_path":{"type":"string","description":"The HashiCorp Vault secret path","nullable":true},"hashicorp_vault_version":{"type":"string","description":"The HashiCorp Vault secret version","nullable":true,"default":0}},"additionalProperties":false,"required":["name","secret"]}},"required":["type","attributes"]}},"required":["data"]},"update_secret":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["secrets"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the secret"},"secret":{"type":"string","description":"The secret"},"hashicorp_vault_mount":{"type":"string","description":"The HashiCorp Vault secret mount path","nullable":true,"default":"secret"},"hashicorp_vault_path":{"type":"string","description":"The HashiCorp Vault secret path","nullable":true},"hashicorp_vault_version":{"type":"integer","description":"The HashiCorp Vault secret version","nullable":true,"default":0}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"secret":{"type":"object","properties":{"name":{"type":"string","description":"The name of the secret"},"secret":{"type":"string","description":"The redacted secret"},"hashicorp_vault_mount":{"type":"string","description":"The HashiCorp Vault secret mount path"},"hashicorp_vault_path":{"type":"string","description":"The HashiCorp Vault secret path","nullable":true},"hashicorp_vault_version":{"type":"integer","description":"The HashiCorp Vault secret version"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"secret_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the secret"},"type":{"type":"string","enum":["secrets"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/secret"}]}},"required":["id","type","attributes"]}},"required":["data"]},"secret_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the secret"},"type":{"type":"string","enum":["secrets"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/secret"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data"]},"new_service":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["services"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the service"},"description":{"type":"string","description":"The description of the service","nullable":true},"public_description":{"type":"string","description":"The public description of the service","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the service","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the service","nullable":true},"position":{"type":"integer","description":"Position of the service","nullable":true},"show_uptime":{"type":"boolean","description":"Show uptime","nullable":true},"show_uptime_last_days":{"type":"integer","description":"Show uptime over x days","enum":[30,60,90],"nullable":true,"default":60},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty service id associated to this service","nullable":true},"external_id":{"type":"string","description":"The external id associated to this service","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie service id associated to this service","nullable":true},"opsgenie_team_id":{"type":"string","description":"The Opsgenie team id associated to this service","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this service","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this service","nullable":true},"github_repository_name":{"type":"string","description":"The GitHub repository name associated to this service. eg: rootlyhq/my-service","nullable":true},"github_repository_branch":{"type":"string","description":"The GitHub repository branch associated to this service. eg: main","nullable":true},"gitlab_repository_name":{"type":"string","description":"The GitLab repository name associated to this service. eg: rootlyhq/my-service","nullable":true},"gitlab_repository_branch":{"type":"string","description":"The GitLab repository branch associated to this service. eg: main","nullable":true},"environment_ids":{"type":"array","description":"Environments associated with this service","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"Services dependent on this service","items":{"type":"string"},"nullable":true},"owners_group_ids":{"type":"array","description":"Owner Teams associated with this service","items":{"type":"string"},"nullable":true},"owners_user_ids":{"type":"array","description":"Owner Users associated with this service","items":{"type":"integer"},"nullable":true},"alerts_email_enabled":{"type":"boolean","description":"Enable alerts through email","nullable":true},"alert_urgency_id":{"type":"string","description":"The alert urgency id of the service","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this service","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this service","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_service":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["services"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the service"},"description":{"type":"string","description":"The description of the service","nullable":true},"public_description":{"type":"string","description":"The public description of the service","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the service","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the service","nullable":true},"position":{"type":"integer","description":"Position of the service","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this service","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty service id associated to this service","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie service id associated to this service","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this service","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this service","nullable":true},"github_repository_name":{"type":"string","description":"The GitHub repository name associated to this service. eg: rootlyhq/my-service","nullable":true},"github_repository_branch":{"type":"string","description":"The GitHub repository branch associated to this service. eg: main","nullable":true},"gitlab_repository_name":{"type":"string","description":"The GitLab repository name associated to this service. eg: rootlyhq/my-service","nullable":true},"gitlab_repository_branch":{"type":"string","description":"The GitLab repository branch associated to this service. eg: main","nullable":true},"environment_ids":{"type":"array","description":"Environments associated with this service","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"Services dependent on this service","items":{"type":"string"},"nullable":true},"owners_group_ids":{"type":"array","description":"Owner Teams associated with this service","items":{"type":"string"},"nullable":true},"owners_user_ids":{"type":"array","description":"Owner Users associated with this service","items":{"type":"integer"},"nullable":true},"alerts_email_enabled":{"type":"boolean","description":"Enable alerts through email","nullable":true},"alert_urgency_id":{"type":"string","description":"The alert urgency id of the service","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this service","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this service","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"service":{"type":"object","properties":{"name":{"type":"string","description":"The name of the service"},"slug":{"type":"string","description":"The slug of the service"},"description":{"type":"string","description":"The description of the service","nullable":true},"public_description":{"type":"string","description":"The public description of the service","nullable":true},"notify_emails":{"type":"array","description":"Emails attached to the service","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the service","nullable":true},"position":{"type":"integer","description":"Position of the service","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this service","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty service id associated to this service","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie service id associated to this service","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this service","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this service","nullable":true},"github_repository_name":{"type":"string","description":"The GitHub repository name associated to this service. eg: rootlyhq/my-service","nullable":true},"github_repository_branch":{"type":"string","description":"The GitHub repository branch associated to this service. eg: main","nullable":true},"gitlab_repository_name":{"type":"string","description":"The GitLab repository name associated to this service. eg: rootlyhq/my-service","nullable":true},"gitlab_repository_branch":{"type":"string","description":"The GitLab repository branch associated to this service. eg: main","nullable":true},"environment_ids":{"type":"array","description":"Environments associated with this service","items":{"type":"string"},"nullable":true},"service_ids":{"type":"array","description":"Services dependent on this service","items":{"type":"string"},"nullable":true},"owners_group_ids":{"type":"array","description":"Owner Teams associated with this service","items":{"type":"string"},"nullable":true},"owners_user_ids":{"type":"array","description":"Owner Users associated with this service","items":{"type":"integer"},"nullable":true},"alert_urgency_id":{"type":"string","description":"The alert urgency id of the service","nullable":true},"alerts_email_enabled":{"type":"boolean","description":"Enable alerts through email","nullable":true},"alerts_email_address":{"type":"string","description":"Email generated to send alerts to","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this service","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this service","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"service_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the service"},"type":{"type":"string","enum":["services"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/service"}]}},"required":["id","type","attributes"]}},"required":["data"]},"service_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the service"},"type":{"type":"string","enum":["services"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/service"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_severity":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["severities"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the severity"},"description":{"type":"string","description":"The description of the severity","nullable":true},"severity":{"type":"string","description":"The severity of the severity","enum":["critical","high","medium","low"]},"color":{"type":"string","description":"The hex color of the severity","nullable":true},"position":{"type":"integer","description":"Position of the severity","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the severity","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this severity","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this severity","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_severity":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["severities"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the severity"},"description":{"type":"string","description":"The description of the severity","nullable":true},"severity":{"type":"string","description":"The severity of the severity","enum":["critical","high","medium","low"]},"color":{"type":"string","description":"The hex color of the severity","nullable":true},"position":{"type":"integer","description":"Position of the severity","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the severity","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this severity","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this severity","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"severity":{"type":"object","properties":{"name":{"type":"string","description":"The name of the severity"},"slug":{"type":"string","description":"The slug of the severity"},"description":{"type":"string","description":"The description of the severity","nullable":true},"severity":{"type":"string","description":"The severity of the severity","enum":["critical","high","medium","low"]},"color":{"type":"string","description":"The hex color of the severity","nullable":true},"position":{"type":"integer","description":"Position of the severity","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the severity","items":{"type":"string"},"nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this severity","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this severity","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"severity_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the severity"},"type":{"type":"string","enum":["severities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/severity"}]}},"required":["id","type","attributes"]}},"required":["data"]},"severity_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the severity"},"type":{"type":"string","enum":["severities"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/severity"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"shift":{"type":"object","properties":{"schedule_id":{"type":"string","description":"ID of schedule","nullable":false},"rotation_id":{"type":"string","description":"ID of rotation","nullable":true},"starts_at":{"type":"string","description":"Start datetime of shift","nullable":false},"ends_at":{"type":"string","description":"End datetime of shift","nullable":false},"is_override":{"type":"boolean","description":"Denotes shift is an override shift"},"shift_override":{"type":"object","allOf":[{"$ref":"#/components/schemas/shift_override_response"}],"description":"Override metadata","nullable":true},"user":{"type":"object","allOf":[{"$ref":"#/components/schemas/user_response"}],"description":"User metadata","nullable":false}},"required":["schedule_id","rotation_id","starts_at","ends_at","is_override"]},"shift_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the shift"},"type":{"type":"string","enum":["shifts"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/shift"}]}},"required":["id","type","attributes"]}}},"required":["data"]},"new_status_page_template":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["status_page_templates"]},"attributes":{"type":"object","properties":{"status_page_id":{"type":"string"},"title":{"type":"string","description":"Title of the template"},"body":{"type":"string","description":"Description of the event the template will populate"},"update_status":{"type":"string","description":"Status of the event the template will populate","enum":["investigating","identified","monitoring","resolved","scheduled","in_progress","verifying","completed"],"nullable":true},"kind":{"type":"string","description":"The kind of the status page template","nullable":false,"enum":["normal","scheduled"]},"should_notify_subscribers":{"type":"boolean","description":"Controls if incident subscribers should be notified","nullable":true},"position":{"type":"integer","description":"Position of the status page template"},"enabled":{"type":"boolean","description":"Enable / Disable the status page template","nullable":true}},"additionalProperties":false,"required":["title","body"]}},"required":["type","attributes"]}},"required":["data"]},"update_status_page_template":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["status_page_templates"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"Title of the template"},"body":{"type":"string","description":"Description of the event the template will populate"},"update_status":{"type":"string","description":"Status of the event the template will populate","enum":["investigating","identified","monitoring","resolved","scheduled","in_progress","verifying","completed"],"nullable":true},"kind":{"type":"string","description":"The kind of the status page template","nullable":false,"enum":["normal","scheduled"]},"should_notify_subscribers":{"type":"boolean","description":"Controls if incident subscribers should be notified","nullable":true},"position":{"type":"integer","description":"Position of the workflow task"},"enabled":{"type":"boolean","description":"Enable / Disable the status page template","nullable":true}},"additionalProperties":false,"required":["title","body"]}},"required":["type","attributes"]}},"required":["data"]},"status_page_template":{"type":"object","properties":{"status_page_id":{"type":"string"},"title":{"type":"string","description":"Title of the template"},"body":{"type":"string","description":"Description of the event the template will populate"},"update_status":{"type":"string","description":"Status of the event the template will populate","nullable":true},"kind":{"type":"string","description":"The kind of the status page template","nullable":false,"enum":["normal","scheduled"]},"should_notify_subscribers":{"type":"boolean","description":"Controls if incident subscribers should be notified","nullable":true},"enabled":{"type":"boolean","description":"Enable / Disable the status page template","nullable":true},"position":{"type":"integer","description":"Position of the workflow task"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["status_page_id","title","body","created_at","updated_at"]},"status_page_template_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the status page template"},"type":{"type":"string","enum":["status_page_templates"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/status_page_template"}]}},"required":["id","type","attributes"]}},"required":["data"]},"status_page_template_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the template"},"type":{"type":"string","enum":["status_page_templates"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/status_page_template"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_status_page":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["status_pages"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the status page"},"public_title":{"type":"string","description":"The public title of the status page","nullable":true},"description":{"type":"string","description":"The description of the status page","nullable":true},"public_description":{"type":"string","description":"The public description of the status page","nullable":true},"header_color":{"type":"string","description":"The color of the header. Eg. \"#0061F2\"","nullable":true},"footer_color":{"type":"string","description":"The color of the footer. Eg. \"#1F2F41\"","nullable":true},"allow_search_engine_index":{"type":"boolean","description":"Allow search engines to include your public status page in search results","nullable":true},"show_uptime":{"type":"boolean","description":"Show uptime","nullable":true},"show_uptime_last_days":{"type":"integer","description":"Show uptime over x days","enum":[30,60,90,180,360],"nullable":true},"success_message":{"type":"string","description":"Message showing when all components are operational","nullable":true},"failure_message":{"type":"string","description":"Message showing when at least one component is not operational","nullable":true},"authentication_enabled":{"type":"boolean","description":"Enable authentication","nullable":true,"default":false},"authentication_password":{"type":"string","description":"Authentication password","nullable":true},"website_url":{"type":"string","description":"Website URL","nullable":true},"website_privacy_url":{"type":"string","description":"Website Privacy URL","nullable":true},"website_support_url":{"type":"string","description":"Website Support URL","nullable":true},"ga_tracking_id":{"type":"string","description":"Google Analytics tracking ID","nullable":true},"time_zone":{"type":"string","description":"A valid IANA time zone name.","default":"Etc/UTC","nullable":true},"public":{"type":"boolean","description":"Make the status page accessible to the public","nullable":true},"service_ids":{"type":"array","items":{"type":"string"},"description":"Services attached to the status page"},"functionality_ids":{"type":"array","items":{"type":"string"},"description":"Functionalities attached to the status page"},"enabled":{"type":"boolean","description":"Enabled / Disable the status page","nullable":true}},"additionalProperties":false,"required":["title"]}},"required":["type","attributes"]}},"required":["data"]},"update_status_page":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["status_pages"]},"attributes":{"type":"object","properties":{"title":{"type":"string","description":"The title of the status page"},"public_title":{"type":"string","description":"The public title of the status page","nullable":true},"description":{"type":"string","description":"The description of the status page","nullable":true},"public_description":{"type":"string","description":"The public description of the status page","nullable":true},"header_color":{"type":"string","description":"The color of the header. Eg. \"#0061F2\"","nullable":true},"footer_color":{"type":"string","description":"The color of the footer. Eg. \"#1F2F41\"","nullable":true},"allow_search_engine_index":{"type":"boolean","description":"Allow search engines to include your public status page in search results","nullable":true},"show_uptime":{"type":"boolean","description":"Show uptime","nullable":true},"show_uptime_last_days":{"type":"integer","description":"Show uptime over x days","enum":[30,60,90,180,360],"nullable":true},"success_message":{"type":"string","description":"Message showing when all components are operational","nullable":true},"failure_message":{"type":"string","description":"Message showing when at least one component is not operational","nullable":true},"authentication_enabled":{"type":"boolean","description":"Enable authentication","nullable":true,"default":false},"authentication_password":{"type":"string","description":"Authentication password","nullable":true},"website_url":{"type":"string","description":"Website URL","nullable":true},"website_privacy_url":{"type":"string","description":"Website Privacy URL","nullable":true},"website_support_url":{"type":"string","description":"Website Support URL","nullable":true},"ga_tracking_id":{"type":"string","description":"Google Analytics tracking ID","nullable":true},"time_zone":{"type":"string","description":"A valid IANA time zone name.","default":"Etc/UTC","nullable":true},"public":{"type":"boolean","description":"Make the status page accessible to the public","nullable":true},"service_ids":{"type":"array","items":{"type":"string"},"description":"Services attached to the status page"},"functionality_ids":{"type":"array","items":{"type":"string"},"description":"Functionalities attached to the status page"},"enabled":{"type":"boolean","description":"Enabled / Disable the status page","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"status_page":{"type":"object","properties":{"title":{"type":"string","description":"The title of the status page"},"public_title":{"type":"string","description":"The public title of the status page","nullable":true},"description":{"type":"string","description":"The description of the status page","nullable":true},"public_description":{"type":"string","description":"The public description of the status page","nullable":true},"header_color":{"type":"string","description":"The color of the header. Eg. \"#0061F2\"","nullable":true},"footer_color":{"type":"string","description":"The color of the footer. Eg. \"#1F2F41\"","nullable":true},"allow_search_engine_index":{"type":"boolean","description":"Allow search engines to include your public status page in search results","nullable":true},"show_uptime":{"type":"boolean","description":"Show uptime","nullable":true},"show_uptime_last_days":{"type":"integer","description":"Show uptime over x days","enum":[30,60,90,180,360],"nullable":true},"success_message":{"type":"string","description":"Message showing when all components are operational","nullable":true},"failure_message":{"type":"string","description":"Message showing when at least one component is not operational","nullable":true},"authentication_enabled":{"type":"boolean","description":"Enable authentication","nullable":true,"default":false},"authentication_password":{"type":"string","description":"Authentication password","nullable":true},"website_url":{"type":"string","description":"Website URL","nullable":true},"website_privacy_url":{"type":"string","description":"Website Privacy URL","nullable":true},"website_support_url":{"type":"string","description":"Website Support URL","nullable":true},"ga_tracking_id":{"type":"string","description":"Google Analytics tracking ID","nullable":true},"time_zone":{"type":"string","description":"A valid IANA time zone name.","default":"Etc/UTC","nullable":true},"public":{"type":"boolean","description":"Make the status page accessible to the public","nullable":true},"service_ids":{"type":"array","items":{"type":"string"},"description":"Services attached to the status page"},"functionality_ids":{"type":"array","items":{"type":"string"},"description":"Functionalities attached to the status page"},"enabled":{"type":"boolean","description":"Enabled / Disable the status page","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["title","created_at","updated_at"]},"status_page_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the status page"},"type":{"type":"string","enum":["status_pages"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/status_page"}]}},"required":["id","type","attributes"]}},"required":["data"]},"status_page_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the status page"},"type":{"type":"string","enum":["status_pages"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/status_page"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_team":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["groups"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team"},"description":{"type":"string","description":"The description of the team","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the team","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the team","nullable":true},"position":{"type":"integer","description":"Position of the team","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this team. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this team","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty group id associated to this team","nullable":true},"pagerduty_service_id":{"type":"string","description":"The PagerDuty service id associated to this team","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie group id associated to this team","nullable":true},"opsgenie_team_id":{"type":"string","description":"The Opsgenie team id associated to this team","nullable":true},"victor_ops_id":{"type":"string","description":"The VictorOps group id associated to this team","nullable":true},"pagertree_id":{"type":"string","description":"The PagerTree group id associated to this team","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this team","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this team","nullable":true},"user_ids":{"type":"array","description":"The User ID's members of this team","items":{"type":"integer"},"nullable":true},"alerts_email_enabled":{"type":"boolean","description":"Enable alerts through email","nullable":true},"alert_urgency_id":{"type":"string","description":"The alert urgency id of the team","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this team","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this team","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false,"required":["name"]}},"required":["type","attributes"]}},"required":["data"]},"update_team":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["groups"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team"},"description":{"type":"string","description":"The description of the team","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the team","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the team","nullable":true},"position":{"type":"integer","description":"Position of the team","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this team. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this team","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty group id associated to this team","nullable":true},"pagerduty_service_id":{"type":"string","description":"The PagerDuty service id associated to this team","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie group id associated to this team","nullable":true},"victor_ops_id":{"type":"string","description":"The VictorOps group id associated to this team","nullable":true},"pagertree_id":{"type":"string","description":"The PagerTree group id associated to this team","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this team","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this team","nullable":true},"user_ids":{"type":"array","description":"The User ID's members of this team","items":{"type":"integer"},"nullable":true},"alerts_email_enabled":{"type":"boolean","description":"Enable alerts through email","nullable":true},"alert_urgency_id":{"type":"string","description":"The alert urgency id of the team","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this team","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this team","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"team":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team"},"slug":{"type":"string"},"description":{"type":"string","description":"The description of the team","nullable":true},"notify_emails":{"type":"array","description":"Emails to attach to the team","items":{"type":"string"},"nullable":true},"color":{"type":"string","description":"The hex color of the team","nullable":true},"position":{"type":"integer","description":"Position of the team","nullable":true},"backstage_id":{"type":"string","description":"The Backstage entity id associated to this team. eg: :namespace/:kind/:entity_name","nullable":true},"external_id":{"type":"string","description":"The external id associated to this team","nullable":true},"pagerduty_id":{"type":"string","description":"The PagerDuty group id associated to this team","nullable":true},"pagerduty_service_id":{"type":"string","description":"The PagerDuty service id associated to this team","nullable":true},"opsgenie_id":{"type":"string","description":"The Opsgenie group id associated to this team","nullable":true},"victor_ops_id":{"type":"string","description":"The VictorOps group id associated to this team","nullable":true},"pagertree_id":{"type":"string","description":"The PagerTree group id associated to this team","nullable":true},"cortex_id":{"type":"string","description":"The Cortex group id associated to this team","nullable":true},"service_now_ci_sys_id":{"type":"string","description":"The Service Now CI sys id associated to this team","nullable":true},"user_ids":{"type":"array","description":"The User ID's members of this team","items":{"type":"integer"},"nullable":true},"alerts_email_enabled":{"type":"boolean","description":"Enable alerts through email","nullable":true},"alerts_email_address":{"type":"string","description":"Email generated to send alerts to","nullable":true},"alert_urgency_id":{"type":"string","description":"The alert urgency id of the team","nullable":true},"slack_channels":{"type":"array","description":"Slack Channels associated with this team","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack channel ID"},"name":{"type":"string","description":"Slack channel name"}},"required":["id","name"]},"nullable":true},"slack_aliases":{"type":"array","description":"Slack Aliases associated with this team","items":{"type":"object","properties":{"id":{"type":"string","description":"Slack alias ID"},"name":{"type":"string","description":"Slack alias name"}},"required":["id","name"]},"nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","created_at","updated_at"]},"team_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the team"},"type":{"type":"string","enum":["groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/team"}]}},"required":["id","type","attributes"]}},"required":["data"]},"team_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the team"},"type":{"type":"string","enum":["groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/team"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_user_notification_rule":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["user_notification_rules"]},"attributes":{"type":"object","properties":{"delay":{"type":"integer","description":"Delay after which rule gets triggered","nullable":true},"position":{"type":"integer","description":"Position of the rule","nullable":true},"user_email_address_id":{"type":"string","description":"User email address to which notification to be sent","nullable":true},"user_call_number_id":{"type":"string","description":"User phone number to which notification to be sent","nullable":true},"user_sms_number_id":{"type":"string","description":"User sms number to which notification to be sent","nullable":true},"user_device_id":{"type":"string","description":"User device to which notification to be sent","nullable":true},"enabled_contact_types":{"type":"array","description":"Contact types for which notification needs to be enabled","items":{"type":"string","enum":["email","sms","call","device","non_critical_device"]},"nullable":false}},"additionalProperties":false,"required":["enabled_contact_types"]}},"required":["type","attributes"]}},"required":["data"]},"update_user_notification_rule":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["user_notification_rules"]},"attributes":{"type":"object","properties":{"delay":{"type":"integer","description":"Delay after which rule gets triggered","nullable":true},"position":{"type":"integer","description":"Position of the rule","nullable":true},"user_email_address_id":{"type":"string","description":"User email address to which notification to be sent","nullable":true},"user_call_number_id":{"type":"string","description":"User phone number to which notification to be sent","nullable":true},"user_sms_number_id":{"type":"string","description":"User sms number to which notification to be sent","nullable":true},"user_device_id":{"type":"string","description":"User device to which notification to be sent","nullable":true},"enabled_contact_types":{"type":"array","description":"Contact types for which notification needs to be enabled","items":{"type":"string","enum":["email","sms","call","device","non_critical_device"]},"nullable":false}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"user_notification_rule":{"type":"object","properties":{"user_id":{"type":"integer"},"delay":{"type":"integer","description":"Delay after which rule gets triggered","nullable":true},"position":{"type":"integer","description":"Position of the rule","nullable":true},"user_email_address_id":{"type":"string","description":"User email address to which notification to be sent","nullable":true},"user_call_number_id":{"type":"string","description":"User phone number to which notification to be sent","nullable":true},"user_sms_number_id":{"type":"string","description":"User sms number to which notification to be sent","nullable":true},"user_device_id":{"type":"string","description":"User device to which notification to be sent","nullable":true},"enabled_contact_types":{"type":"array","description":"Contact types for which notification needs to be enabled","items":{"type":"string","enum":["email","sms","call","device","non_critical_device"]},"nullable":false},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}}},"user_notification_rule_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the rule"},"type":{"type":"string","enum":["user_notification_rules"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/user_notification_rule"}]}},"required":["id","type","attributes"]}},"required":["data"]},"user_notification_rule_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the rule"},"type":{"type":"string","enum":["user_notification_rules"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/user_notification_rule"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"user":{"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"full_name":{"type":"string","description":"The full name of the user","nullable":true},"full_name_with_team":{"type":"string","description":"The full name with team of the user","nullable":true},"time_zone":{"type":"string","description":"Configured time zone","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["email","created_at","updated_at"]},"user_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the user"},"type":{"type":"string","enum":["users"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/user"}]}},"required":["id","type","attributes"]}},"required":["data"]},"user_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the user"},"type":{"type":"string","enum":["users"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/user"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"webhooks_delivery":{"type":"object","properties":{"endpoint_id":{"type":"string"},"payload":{"type":"string"},"delivered_at":{"type":"string","nullable":true},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["endpoint_id","payload","delivered_at","created_at","updated_at"]},"webhooks_delivery_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the webhooks_delivery"},"type":{"type":"string","enum":["webhooks_deliveries"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/webhooks_delivery"}]}},"required":["id","type","attributes"]}},"required":["data"]},"webhooks_delivery_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the webhooks_delivery"},"type":{"type":"string","enum":["webhooks_deliveries"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/webhooks_delivery"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data"]},"new_webhooks_endpoint":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["webhooks_endpoints"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the endpoint"},"url":{"type":"string","description":"The URL of the endpoint."},"secret":{"type":"string","description":"The webhook signing secret used to verify webhook requests."},"event_types":{"type":"array","items":{"type":"string","enum":["incident.created","incident.updated","incident.in_triage","incident.mitigated","incident.resolved","incident.cancelled","incident.deleted","incident.scheduled.created","incident.scheduled.updated","incident.scheduled.in_progress","incident.scheduled.completed","incident.scheduled.deleted","incident_post_mortem.created","incident_post_mortem.updated","incident_post_mortem.published","incident_post_mortem.deleted","alert.created","pulse.created","genius_workflow_run.queued","genius_workflow_run.started","genius_workflow_run.completed","genius_workflow_run.failed","genius_workflow_run.canceled"]}},"enabled":{"type":"boolean"}},"additionalProperties":false,"required":["name","url"]}},"required":["type","attributes"]}},"required":["data"]},"update_webhooks_endpoint":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["webhooks_endpoints"]},"attributes":{"type":"object","properties":{"name":{"type":"string","description":"The name of the endpoint"},"event_types":{"type":"array","items":{"type":"string","enum":["incident.created","incident.updated","incident.in_triage","incident.mitigated","incident.resolved","incident.cancelled","incident.deleted","incident.scheduled.created","incident.scheduled.updated","incident.scheduled.in_progress","incident.scheduled.completed","incident.scheduled.deleted","incident_post_mortem.created","incident_post_mortem.updated","incident_post_mortem.published","incident_post_mortem.deleted","alert.created","pulse.created","genius_workflow_run.queued","genius_workflow_run.started","genius_workflow_run.completed","genius_workflow_run.failed","genius_workflow_run.canceled"]}},"enabled":{"type":"boolean"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"webhooks_endpoint":{"type":"object","properties":{"name":{"type":"string","description":"The name of the endpoint"},"slug":{"type":"string","description":"The slug of the endpoint"},"url":{"type":"string","description":"The URL of the endpoint."},"event_types":{"type":"array","items":{"type":"string","enum":["incident.created","incident.updated","incident.in_triage","incident.mitigated","incident.resolved","incident.cancelled","incident.deleted","incident.scheduled.created","incident.scheduled.updated","incident.scheduled.in_progress","incident.scheduled.completed","incident.scheduled.deleted","incident_post_mortem.created","incident_post_mortem.updated","incident_post_mortem.published","incident_post_mortem.deleted","alert.created","pulse.created","genius_workflow_run.queued","genius_workflow_run.started","genius_workflow_run.completed","genius_workflow_run.failed","genius_workflow_run.canceled"]}},"secret":{"type":"string","description":"The webhook signing secret used to verify webhook requests."},"enabled":{"type":"boolean"},"created_at":{"type":"string","description":"Date of creation"},"updated_at":{"type":"string","description":"Date of last update"}},"required":["name","slug","url","event_types","secret","enabled","created_at","updated_at"]},"webhooks_endpoint_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the webhooks_endpoint"},"type":{"type":"string","enum":["webhooks_endpoints"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/webhooks_endpoint"}]}},"required":["id","type","attributes"]}},"required":["data"]},"webhooks_endpoint_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the webhooks_endpoint"},"type":{"type":"string","enum":["webhooks_endpoints"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/webhooks_endpoint"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data"]},"new_sub_status":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["sub_statuses"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"parent_status":{"type":"string","enum":["started","retrospective"]},"position":{"type":"integer","nullable":true}},"additionalProperties":false,"required":["name","parent_status"]}},"required":["type","attributes"]}},"required":["data"]},"update_sub_status":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["sub_statuses"]},"attributes":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"integer","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"sub_status":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"parent_status":{"type":"string","enum":["in_triage","started","resolved","closed","cancelled","scheduled","in_progress","completed"]},"position":{"type":"integer","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["name","parent_status","created_at","updated_at"]},"sub_status_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the sub_status"},"type":{"type":"string","enum":["sub_statuses"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/sub_status"}]}},"required":["id","type","attributes"]}},"required":["data"]},"sub_status_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the sub_status"},"type":{"type":"string","enum":["sub_statuses"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/sub_status"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_incident_sub_status":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_sub_statuses"]},"attributes":{"type":"object","properties":{"sub_status_id":{"type":"string","description":"Note: To change an incident's sub-status, use the PATCH /incidents/:id endpoint and set the sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's sub-status was assigned."},"assigned_at":{"type":"string"},"assigned_by_user_id":{"type":"integer","nullable":true}},"additionalProperties":false,"required":["sub_status_id","assigned_at"]}},"required":["type","attributes"]}},"required":["data"]},"update_incident_sub_status":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["incident_sub_statuses"]},"attributes":{"type":"object","properties":{"sub_status_id":{"type":"string","description":"Note: To change an incident's sub-status, use the PATCH /incidents/:id endpoint and set the sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's sub-status was assigned."},"assigned_at":{"type":"string"},"assigned_by_user_id":{"type":"integer","nullable":true}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"incident_sub_status":{"type":"object","properties":{"incident_id":{"type":"string"},"sub_status_id":{"type":"string","description":"Note: To change an incident's sub-status, use the PATCH /incidents/:id endpoint and set the sub_status_id attribute. This endpoint is for modifying the timestamp of when an incident's sub-status was assigned."},"assigned_at":{"type":"string"},"assigned_by_user_id":{"type":"integer","nullable":true}},"required":["incident_id","sub_status_id","assigned_at"]},"incident_sub_status_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident_sub_status"},"type":{"type":"string","enum":["incident_sub_statuses"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_sub_status"}]}},"required":["id","type","attributes"]}},"required":["data"]},"incident_sub_status_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the incident_sub_status"},"type":{"type":"string","enum":["incident_sub_statuses"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/incident_sub_status"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_retrospective_process_group":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_process_groups"]},"attributes":{"type":"object","properties":{"sub_status_id":{"type":"string"},"position":{"type":"integer"}},"additionalProperties":false,"required":["sub_status_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_retrospective_process_group":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_process_groups"]},"attributes":{"type":"object","properties":{"sub_status_id":{"type":"string"},"position":{"type":"integer"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"retrospective_process_group":{"type":"object","properties":{"retrospective_process_id":{"type":"string"},"sub_status_id":{"type":"string"},"position":{"type":"integer"}},"required":["retrospective_process_id","sub_status_id","position"]},"retrospective_process_group_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the retrospective_process_group"},"type":{"type":"string","enum":["retrospective_process_groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_process_group"}]}},"required":["id","type","attributes"]}},"required":["data"]},"retrospective_process_group_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the retrospective_process_group"},"type":{"type":"string","enum":["retrospective_process_groups"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_process_group"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]},"new_retrospective_process_group_step":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_process_group_steps"]},"attributes":{"type":"object","properties":{"retrospective_step_id":{"type":"string"},"position":{"type":"integer"}},"additionalProperties":false,"required":["retrospective_step_id"]}},"required":["type","attributes"]}},"required":["data"]},"update_retrospective_process_group_step":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["retrospective_process_group_steps"]},"attributes":{"type":"object","properties":{"position":{"type":"integer"}},"additionalProperties":false}},"required":["type","attributes"]}},"required":["data"]},"retrospective_process_group_step":{"type":"object","properties":{"retrospective_process_group_id":{"type":"string"},"retrospective_step_id":{"type":"string"},"position":{"type":"integer"}},"required":["retrospective_process_group_id","retrospective_step_id","position"]},"retrospective_process_group_step_response":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the retrospective_process_group_step"},"type":{"type":"string","enum":["retrospective_process_group_steps"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_process_group_step"}]}},"required":["id","type","attributes"]}},"required":["data"]},"retrospective_process_group_step_list":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the retrospective_process_group_step"},"type":{"type":"string","enum":["retrospective_process_group_steps"]},"attributes":{"type":"object","allOf":[{"$ref":"#/components/schemas/retrospective_process_group_step"}]}},"required":["id","type","attributes"]}},"links":{"type":"object","allOf":[{"$ref":"#/components/schemas/links"}]}},"required":["data","links"]}}}} From 373391f6a4250b8e1e6089b72a9445d5ffc66fa5 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Wed, 22 Apr 2026 09:39:01 -0700 Subject: [PATCH 5/7] Remove array items patching from escalation paths fix script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream spec now correctly defines items on all array properties. Only the inline oneOf → $ref extraction is still needed (client bug). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tools/fix_openapi_escalation_paths.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tools/fix_openapi_escalation_paths.py b/tools/fix_openapi_escalation_paths.py index dead1abe..5fe9a2f4 100644 --- a/tools/fix_openapi_escalation_paths.py +++ b/tools/fix_openapi_escalation_paths.py @@ -6,8 +6,6 @@ but no $ref. This script extracts each rule variant into a named component schema and replaces inline definitions with $ref pointers. -Also fixes upstream bug where urgency_ids array is missing items definition. - Run after downloading swagger.json, before generating: python tools/fix_openapi_escalation_paths.py tools/swagger.json @@ -53,11 +51,6 @@ def fix_spec(data: dict) -> int: ref_name = RULE_NAMES[rule_type] variant["type"] = "object" - - for prop in variant.get("properties", {}).values(): - if prop.get("type") == "array" and "items" not in prop: - prop["items"] = {"type": "string"} - schemas[ref_name] = variant extracted += 1 From 220723446ca4279257c43452d4a2fb2961fc5678 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Wed, 22 Apr 2026 09:42:00 -0700 Subject: [PATCH 6/7] Bump minimum Python version to 3.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generated code uses PEP 604 union syntax (str | None) via ruff UP rules. No from __future__ import annotations in generated files, so 3.9 would fail at runtime. CI test matrix already starts at 3.10. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CHANGELOG.md | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa969c08..645e8fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Regenerated client from latest OpenAPI specification - **BREAKING**: Catalog Fields renamed to Catalog Properties across all endpoints and models -- Minimum Python version bumped to 3.10 in generated code (SDK still supports 3.9 via pyproject.toml) +- **BREAKING**: Minimum Python version bumped to 3.10 ### Removed - Catalog Fields endpoints and models (replaced by Catalog Properties) @@ -41,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Applied nullable enum fix to 1,348 model files via `tools/fix_nullable_enums.py` -- Escalation path endpoints now fully generated — added `tools/fix_openapi_escalation_paths.py` to patch inline `oneOf` variants into named `$ref` schemas and fix missing array `items` definitions +- Escalation path endpoints now fully generated — added `tools/fix_openapi_escalation_paths.py` to patch inline `oneOf` variants into named `$ref` schemas ([upstream bug](https://github.com/openapi-generators/openapi-python-client/issues/1428)) ## [1.2.1] - 2025-03-02 diff --git a/pyproject.toml b/pyproject.toml index 7b4acf9c..dc679cd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ packages = [ include = ["CHANGELOG.md", "rootly_sdk/py.typed"] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" httpx = ">=0.20.0,<0.29.0" attrs = ">=22.2.0" python-dateutil = "^2.8.0" From dbb069100f94b95d8af9b6bae9248be1e87ecf0b Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Thu, 23 Apr 2026 20:00:05 -0700 Subject: [PATCH 7/7] Regenerate client with latest OpenAPI spec updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New fields from upstream spec changes: - filter[notification_types] on /v1/oncalls endpoint - calling_tree_enabled on live call router - time_zone, csv_file_url, xlsx_file_url on on-call pay reports - links.last now nullable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- rootly_sdk/api/on_calls/list_oncalls.py | 15 +++++ rootly_sdk/models/links.py | 12 +++- .../new_live_call_router_data_attributes.py | 10 +++ rootly_sdk/models/on_call_pay_report.py | 62 +++++++++++++++++++ ...update_live_call_router_data_attributes.py | 10 +++ 5 files changed, 106 insertions(+), 3 deletions(-) diff --git a/rootly_sdk/api/on_calls/list_oncalls.py b/rootly_sdk/api/on_calls/list_oncalls.py index 7fe486c2..16c945b8 100644 --- a/rootly_sdk/api/on_calls/list_oncalls.py +++ b/rootly_sdk/api/on_calls/list_oncalls.py @@ -22,6 +22,7 @@ def _get_kwargs( filteruser_ids: str | Unset = UNSET, filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, + filternotification_types: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -50,6 +51,8 @@ def _get_kwargs( params["filter[group_ids]"] = filtergroup_ids + params["filter[notification_types]"] = filternotification_types + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -104,6 +107,7 @@ def sync_detailed( filteruser_ids: str | Unset = UNSET, filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, + filternotification_types: str | Unset = UNSET, ) -> Response[Any | ErrorsList]: """List on-calls @@ -121,6 +125,7 @@ def sync_detailed( filteruser_ids (str | Unset): filterservice_ids (str | Unset): filtergroup_ids (str | Unset): + filternotification_types (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,6 +146,7 @@ def sync_detailed( filteruser_ids=filteruser_ids, filterservice_ids=filterservice_ids, filtergroup_ids=filtergroup_ids, + filternotification_types=filternotification_types, ) response = client.get_httpx_client().request( @@ -163,6 +169,7 @@ def sync( filteruser_ids: str | Unset = UNSET, filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, + filternotification_types: str | Unset = UNSET, ) -> Any | ErrorsList | None: """List on-calls @@ -180,6 +187,7 @@ def sync( filteruser_ids (str | Unset): filterservice_ids (str | Unset): filtergroup_ids (str | Unset): + filternotification_types (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -201,6 +209,7 @@ def sync( filteruser_ids=filteruser_ids, filterservice_ids=filterservice_ids, filtergroup_ids=filtergroup_ids, + filternotification_types=filternotification_types, ).parsed @@ -217,6 +226,7 @@ async def asyncio_detailed( filteruser_ids: str | Unset = UNSET, filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, + filternotification_types: str | Unset = UNSET, ) -> Response[Any | ErrorsList]: """List on-calls @@ -234,6 +244,7 @@ async def asyncio_detailed( filteruser_ids (str | Unset): filterservice_ids (str | Unset): filtergroup_ids (str | Unset): + filternotification_types (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -254,6 +265,7 @@ async def asyncio_detailed( filteruser_ids=filteruser_ids, filterservice_ids=filterservice_ids, filtergroup_ids=filtergroup_ids, + filternotification_types=filternotification_types, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -274,6 +286,7 @@ async def asyncio( filteruser_ids: str | Unset = UNSET, filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, + filternotification_types: str | Unset = UNSET, ) -> Any | ErrorsList | None: """List on-calls @@ -291,6 +304,7 @@ async def asyncio( filteruser_ids (str | Unset): filterservice_ids (str | Unset): filtergroup_ids (str | Unset): + filternotification_types (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -313,5 +327,6 @@ async def asyncio( filteruser_ids=filteruser_ids, filterservice_ids=filterservice_ids, filtergroup_ids=filtergroup_ids, + filternotification_types=filternotification_types, ) ).parsed diff --git a/rootly_sdk/models/links.py b/rootly_sdk/models/links.py index 4dcd3acf..48bcff63 100644 --- a/rootly_sdk/models/links.py +++ b/rootly_sdk/models/links.py @@ -17,14 +17,14 @@ class Links: first (str): prev (None | str): next_ (None | str): - last (str): + last (None | str): """ self_: str first: str prev: None | str next_: None | str - last: str + last: None | str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,6 +38,7 @@ def to_dict(self) -> dict[str, Any]: next_: None | str next_ = self.next_ + last: None | str last = self.last field_dict: dict[str, Any] = {} @@ -75,7 +76,12 @@ def _parse_next_(data: object) -> None | str: next_ = _parse_next_(d.pop("next")) - last = d.pop("last") + def _parse_last(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + last = _parse_last(d.pop("last")) links = cls( self_=self_, diff --git a/rootly_sdk/models/new_live_call_router_data_attributes.py b/rootly_sdk/models/new_live_call_router_data_attributes.py index e9dd0bba..e1bc4571 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes.py @@ -59,6 +59,8 @@ class NewLiveCallRouterDataAttributes: escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page + calling_tree_enabled (bool | Unset): Whether the live call router is configured as a phone tree, requiring + callers to press a key before being connected calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number, prompting them to select from available options to route their call escalation_policy_trigger_params (NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset): @@ -79,6 +81,7 @@ class NewLiveCallRouterDataAttributes: escalation_level_delay_in_seconds: int | Unset = UNSET should_auto_resolve_alert_on_call_end: bool | Unset = UNSET alert_urgency_id: str | Unset = UNSET + calling_tree_enabled: bool | Unset = UNSET calling_tree_prompt: str | Unset = UNSET escalation_policy_trigger_params: NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET @@ -118,6 +121,8 @@ def to_dict(self) -> dict[str, Any]: alert_urgency_id = self.alert_urgency_id + calling_tree_enabled = self.calling_tree_enabled + calling_tree_prompt = self.calling_tree_prompt escalation_policy_trigger_params: dict[str, Any] | Unset = UNSET @@ -153,6 +158,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id + if calling_tree_enabled is not UNSET: + field_dict["calling_tree_enabled"] = calling_tree_enabled if calling_tree_prompt is not UNSET: field_dict["calling_tree_prompt"] = calling_tree_prompt if escalation_policy_trigger_params is not UNSET: @@ -210,6 +217,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alert_urgency_id = d.pop("alert_urgency_id", UNSET) + calling_tree_enabled = d.pop("calling_tree_enabled", UNSET) + calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) _escalation_policy_trigger_params = d.pop("escalation_policy_trigger_params", UNSET) @@ -237,6 +246,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, alert_urgency_id=alert_urgency_id, + calling_tree_enabled=calling_tree_enabled, calling_tree_prompt=calling_tree_prompt, escalation_policy_trigger_params=escalation_policy_trigger_params, ) diff --git a/rootly_sdk/models/on_call_pay_report.py b/rootly_sdk/models/on_call_pay_report.py index 3d87a85f..566fea98 100644 --- a/rootly_sdk/models/on_call_pay_report.py +++ b/rootly_sdk/models/on_call_pay_report.py @@ -36,6 +36,11 @@ class OnCallPayReport: has_single_rate (bool | Unset): Whether a single rate is applied to all users. enabled_granular_time_breakdown (bool | Unset): Whether granular time breakdown is enabled. last_generated_at (datetime.datetime | None | Unset): When the report was last generated. + time_zone (None | str | Unset): The team's IANA timezone used to interpret start_date and end_date. + csv_file_url (None | str | Unset): Download URL for the generated CSV report. Null until the report is + generated. + xlsx_file_url (None | str | Unset): Download URL for the generated XLSX report. Null until the report is + generated. """ status: OnCallPayReportStatus @@ -55,6 +60,9 @@ class OnCallPayReport: has_single_rate: bool | Unset = UNSET enabled_granular_time_breakdown: bool | Unset = UNSET last_generated_at: datetime.datetime | None | Unset = UNSET + time_zone: None | str | Unset = UNSET + csv_file_url: None | str | Unset = UNSET + xlsx_file_url: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -100,6 +108,24 @@ def to_dict(self) -> dict[str, Any]: else: last_generated_at = self.last_generated_at + time_zone: None | str | Unset + if isinstance(self.time_zone, Unset): + time_zone = UNSET + else: + time_zone = self.time_zone + + csv_file_url: None | str | Unset + if isinstance(self.csv_file_url, Unset): + csv_file_url = UNSET + else: + csv_file_url = self.csv_file_url + + xlsx_file_url: None | str | Unset + if isinstance(self.xlsx_file_url, Unset): + xlsx_file_url = UNSET + else: + xlsx_file_url = self.xlsx_file_url + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -135,6 +161,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["enabled_granular_time_breakdown"] = enabled_granular_time_breakdown if last_generated_at is not UNSET: field_dict["last_generated_at"] = last_generated_at + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + if csv_file_url is not UNSET: + field_dict["csv_file_url"] = csv_file_url + if xlsx_file_url is not UNSET: + field_dict["xlsx_file_url"] = xlsx_file_url return field_dict @@ -195,6 +227,33 @@ def _parse_last_generated_at(data: object) -> datetime.datetime | None | Unset: last_generated_at = _parse_last_generated_at(d.pop("last_generated_at", UNSET)) + def _parse_time_zone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) + + def _parse_csv_file_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + csv_file_url = _parse_csv_file_url(d.pop("csv_file_url", UNSET)) + + def _parse_xlsx_file_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xlsx_file_url = _parse_xlsx_file_url(d.pop("xlsx_file_url", UNSET)) + on_call_pay_report = cls( status=status, start_date=start_date, @@ -213,6 +272,9 @@ def _parse_last_generated_at(data: object) -> datetime.datetime | None | Unset: has_single_rate=has_single_rate, enabled_granular_time_breakdown=enabled_granular_time_breakdown, last_generated_at=last_generated_at, + time_zone=time_zone, + csv_file_url=csv_file_url, + xlsx_file_url=xlsx_file_url, ) on_call_pay_report.additional_properties = d diff --git a/rootly_sdk/models/update_live_call_router_data_attributes.py b/rootly_sdk/models/update_live_call_router_data_attributes.py index d318ccdc..b2ad7f3c 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes.py @@ -54,6 +54,8 @@ class UpdateLiveCallRouterDataAttributes: escalation_level_delay_in_seconds (int | Unset): This overrides the delay (seconds) in escalation levels should_auto_resolve_alert_on_call_end (bool | Unset): This overrides the delay (seconds) in escalation levels alert_urgency_id (str | Unset): This is used in escalation paths to determine who to page + calling_tree_enabled (bool | Unset): Whether the live call router is configured as a phone tree, requiring + callers to press a key before being connected calling_tree_prompt (str | Unset): The audio instructions callers will hear when they call this number, prompting them to select from available options to route their call paging_targets (list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset): Paging targets that callers @@ -74,6 +76,7 @@ class UpdateLiveCallRouterDataAttributes: escalation_level_delay_in_seconds: int | Unset = UNSET should_auto_resolve_alert_on_call_end: bool | Unset = UNSET alert_urgency_id: str | Unset = UNSET + calling_tree_enabled: bool | Unset = UNSET calling_tree_prompt: str | Unset = UNSET paging_targets: list[UpdateLiveCallRouterDataAttributesPagingTargetsItem] | Unset = UNSET escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET @@ -113,6 +116,8 @@ def to_dict(self) -> dict[str, Any]: alert_urgency_id = self.alert_urgency_id + calling_tree_enabled = self.calling_tree_enabled + calling_tree_prompt = self.calling_tree_prompt paging_targets: list[dict[str, Any]] | Unset = UNSET @@ -155,6 +160,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id + if calling_tree_enabled is not UNSET: + field_dict["calling_tree_enabled"] = calling_tree_enabled if calling_tree_prompt is not UNSET: field_dict["calling_tree_prompt"] = calling_tree_prompt if paging_targets is not UNSET: @@ -220,6 +227,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: alert_urgency_id = d.pop("alert_urgency_id", UNSET) + calling_tree_enabled = d.pop("calling_tree_enabled", UNSET) + calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) _paging_targets = d.pop("paging_targets", UNSET) @@ -258,6 +267,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, alert_urgency_id=alert_urgency_id, + calling_tree_enabled=calling_tree_enabled, calling_tree_prompt=calling_tree_prompt, paging_targets=paging_targets, escalation_policy_trigger_params=escalation_policy_trigger_params,